You will need a MacOS or Linux system.
- Install the latest version of
parity. - Install the latest version of
solc. - Install the latest version of
npm.
Local development is worked against TestRPC (which will be installed via npm). Parity is used to test against a local dev-chain (see parity-spec.json) and can also be used to test agains Ropsten TestNet or the Public MainNet.
- Explorer URL: https://explorer.metronome.io
- Auction Board URL: https://metronome.io
Version: autonomoussoftware/metronome#35a6cd3
Ethereum Contract addresses
| Contract | Address | Description |
|---|---|---|
| Auctions | 0x9d9BcDd249E439AAaB545F59a33812E39A8e3072 | Use for purchasing newly minted MET |
| Proceeds | 0x68c4b7d05fAE45bCb6192bb93e246C77E98360e1 | Stores all auction proceeds |
| AutonomousConverter | 0x686e5ac50D9236A9b7406791256e47feDDB26AbA | Use for exchanging MET/ETH after initial auction is over |
| METToken | 0xa3d58c4E56fedCae3a7c43A725aeE9A71F0ece4e | Use this address for MET ERC20 functions and third-party wallets |
Ethereum Classic Contracts
| Contract | Address | Description |
|---|---|---|
| Auctions | 0xF5269Caa54F1f776dD996Db35992D599e14d8a3B | Use for purchasing newly minted MET |
| Proceeds | 0x09ACED531359ceFfAD9759a9252E1D82E3557Eb2 | Stores all auction proceeds |
| AutonomousConverter | 0x567EEBB6397cC8345e5A7eAE288994bf45FDF85B | Use for exchanging MET/ETC after initial auction is over |
| METToken | 0xA4d3A7b00056Cc5D8206b3b2983bfe0C107D90da | Use this address for MET ERC20 functions and third-party wallets |
npm installto install all module dependenciesnpm testto compile all the contracts and run the entire test suite agains TestRPCTESTFILE=test/<testfile>.js npm run testrpc:singleto compile and run a single test file
./deployto compile all the contracts and deploy them to a local parity dev-chain (this script will automatically start Parity)geth attach --preload js/metronome.js,js/const.js,js/initMetronome.jsto open a geth console and start metronomegeth attach --preload js/metronome.js,js/const.js,js/initPostAuction.jsto open a geth console and start metronme (bypassing the initial auction)
Here geth console commands to emulate auction transactions
loadScript('js/testStart.js')to load a geth test script for auction buys- call
pingBuy()to simulate a buy (this will also initiate a buy every 30 seconds)
Sample code of how to interact with the smart contracts can be viewed in the Truffle tests.
sharedfolder contains utility code shared amongs multiple test casesauctions.jstests for the Auction contractdeployment.jstests for emulating actual deployment process for all the contractserc-compliance.jstests for ERC20 and ERC827 compliancefixedMath.jstests for the Fixed Math contract (internal functions used by Metronome)formula.jstests for the Formula contract (math for minting calculations)metronome.jstests for Metronome use cases involving the AutonomousConvertermtnToken.jstests for MET Token use cases (i.e., transfering tokens)owned.jstests for Ownership operations (i.e., changeOwnership)pricer.jstests for Pricer contract (internal functions used by Metronome)proceeds.jstests for Proceeds contract to manage ETH fundssmartToken.jstests for internal SmartToken contract used by AutonomousConvertertokenLocker.jstests used for time locking founder tokenstokenPorter.jstests for exporting MET tokens to be imported to another chain
Simuating time proved to be a challenge, so we had to migrate a seperate suite of tests so that we can take advantage of evm_increaseTime. This allowed us to better test targeted scenarios that depended on system time.
ac.jstimed tests for AutonomousConverterauctions.jstimed tests for Auctionsproceeds.jstimed tests for Proceedssubscriptions.jstimed tests for MET Token subscriptionstokenLocker.jstimed tests for TokenLocker withdraws
