1var Azimuth = artifacts.require('azimuth-solidity/Azimuth');
2var Polls = artifacts.require('azimuth-solidity/Polls');
3var Claims = artifacts.require('azimuth-solidity/Claims');
4var Censures = artifacts.require('azimuth-solidity/Censures');
5var Ecliptic = artifacts.require('azimuth-solidity/Ecliptic');
6var DelegatedSending = artifacts.require('azimuth-solidity/DelegatedSending');
7var LSR = artifacts.require('azimuth-solidity/LinearStarRelease');
8var CSR = artifacts.require('azimuth-solidity/ConditionalStarRelease');
9// TODO: replace when https://github.com/urbit/azimuth/pull/43 is merged
10var Naive = artifacts.require('Naive');
12const user1 = '0xD53208cf45fC9bd7938B200BFf8814A26146688f';
16 '0x00000000000000000000000000000000000000000000000000000000000000a0',
17 '0x00000000000000000000000000000000000000000000000000000000000001e0',
18 '0x0000000000000000000000000000000000000000000000000000000000000260',
19 '0x00000000000000000000000000000000000000000000000000000000621f23c4',
20 '0x0000000000000000000000000000000000000000000000000000000000000003',
21 '0x0000000000000000000000000000000000000000000000000000000000000060',
22 '0x00000000000000000000000000000000000000000000000000000000000000a0',
25const getLivelines = start => [
35const getDeadlines = start => [
45async function getChainTime() {
46 const block = await web3.eth.getBlock('latest');
48 return web3.utils.toDecimal(block.timestamp);
51module.exports = async function(deployer) {
55 const azimuth = await deployer.deploy(Azimuth);
56 const polls = await deployer.deploy(Polls, 1209600, 604800);
57 const claims = await deployer.deploy(Claims, azimuth.address);
58 const censures = await deployer.deploy(Censures, azimuth.address);
60 //NOTE for real deployment, use a real ENS registry
61 const ecliptic = await deployer.deploy(
63 '0x0000000000000000000000000000000000000000',
69 // configure contract ownership
70 await azimuth.transferOwnership(ecliptic.address);
71 await polls.transferOwnership(ecliptic.address);
73 // deploy secondary contracts
74 const sending = await deployer.deploy(DelegatedSending, azimuth.address);
75 const time = await getChainTime();
76 const livelines = getLivelines(time);
77 const deadlines = getDeadlines(time);
79 const escapeHatchDate = time + 200 * minute;
81 const csr = await deployer.deploy(
90 const lsr = await deployer.deploy(LSR, azimuth.address);
92 // deploy naive contract
93 const naive = await deployer.deploy(Naive);
95 const own = await ecliptic.owner();
96 switch (process.env.WITH_TEST_STATE) {
98 await ecliptic.createGalaxy(0, own);
99 await ecliptic.createGalaxy(1, own);
101 await ecliptic.configureKeys(0, '0x123', '0x456', 1, false);
102 await ecliptic.configureKeys(1, '0x123', '0x456', 1, false);
103 await ecliptic.spawn(256, own);
105 lsr.startReleasing();
106 await ecliptic.setSpawnProxy(0, lsr.address);
107 await ecliptic.setSpawnProxy(1, csr.address);
108 await ecliptic.setTransferProxy(256, lsr.address);
109 // Release 2 stars every 5 minutes, starting 2 minutes from now
110 // for a maximum of 8 stars
111 await lsr.register(user1, 2 * minute, 21, 2, 5 * minute);
112 // Release 1 star per minute for each completed batch
114 await csr.register(user1, [3, 3, 3, 3, 3, 3, 3], 1, rateUnit);
116 for (let i = 2; i < 23; i++) {
117 const offset = 256 * i;
118 await lsr.deposit(user1, offset);
119 await csr.deposit(user1, offset + 1);
123 await ecliptic.createGalaxy(0, own);
124 await ecliptic.configureKeys(0, '0x123', '0x456', 1, false);
125 await ecliptic.spawn(256, own);
126 await ecliptic.configureKeys(256, '0x456', '0x789', 1, false);
127 // set transfer proxy to delegated sending, very brittle
128 await ecliptic.setSpawnProxy(256, sending.address);
129 await ecliptic.spawn(65792, own);
130 await ecliptic.spawn(131328, own);
131 await ecliptic.spawn(512, own);
132 await sending.setPoolSize(256, 65792, 1000);
135 await ecliptic.createGalaxy(0, own);
136 await ecliptic.configureKeys(0, '0x123', '0x456', 1, false);
137 await ecliptic.spawn(256, own);
138 await ecliptic.configureKeys(256, '0x456', '0x789', 1, false);
139 for (let i = 2; i < 30; i++) {
140 // await ecliptic.spawn(256 * i, user1);
141 const offset = 65536 * i;
142 await ecliptic.spawn(offset + 256, own);
143 await ecliptic.transferPoint(offset + 256, user1, false);
147 // all ships will have as owner:
148 // 0x6deffb0cafdb11d175f123f6891aa64f01c24f7d
151 await ecliptic.createGalaxy(0, own);
152 await ecliptic.configureKeys(0, '0xffff', '0xffff', 1, false);
154 await ecliptic.spawn(256, own);
155 await ecliptic.configureKeys(256, '0xffff', '0xffff', 1, false);
157 await ecliptic.spawn(768, own);
158 await ecliptic.configureKeys(768, '0xffff', '0xffff', 1, false);
159 // ~wanzod sets spawn-proxy to L2
160 await ecliptic.setSpawnProxy(
162 '0x1111111111111111111111111111111111111111'
164 // ~wicdev-wisryt -> L1
165 await ecliptic.spawn(65792, own);
166 // ~panret-tocsel -> L1
167 await ecliptic.spawn(131328, own);
169 await ecliptic.spawn(512, own);
170 // ~norsyr-torryn -> L1
171 await ecliptic.spawn(99549440, own);
172 // ~norsyr-torryn -> L2
173 await ecliptic.transferPoint(
175 '0x1111111111111111111111111111111111111111',
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list