Simple node service to deploy the plasma-contracts. Only one deployment can run at a time. Each deployment does the following:
- Cleans up after any previous deployment
- Clones the plasma-contracts repo with the given tag (or branch).
- Runs
npm installin the cloned repo. - Runs
npx truffle+ deploy.args in the cloned repo.
The results of the last 5 deploys are stored in memory.
The following environment variables should be set, either in the container or sent to the deploy job:
MIN_EXIT_PERIODMinimum exit period in seconds. Required.SOLC_VERSIONSolidity compiler version. Defaults to0.4.25ETH_CLIENT_HOSTHost of Ethereum client. Defaults to127.0.0.1ETH_CLIENT_PORTPort of Ethereum client. Defaults to8545DEPLOYER_ADDRESSAddress of theDEPLOYERaccount. Defaults toaccounts[0]DEPLOYER_PASSPHRASEPassphrase of theDEPLOYERaccount.AUTHORITY_PASSPHRASEPassphrase of theAUTHORITYaccount.AUTHORITY_ADDRESS_INITIAL_AMOUNTThe amount to fund theAUTHORITYaccount with (in wei). Defaults to 1 ETH.
POST http://localhost:3333/deploy
{
"deploy": {
"id": "a6ff00e9feb18400551fef6c3e5900df",
"args": ["migrate", "--quiet", "--network", "rinkeby"],
"cwd": "/home/omg",
"env": {
"MIN_EXIT_PERIOD": 300
}
}
}
If no id is passed it will generate one.
Returns the deploy id e.g. a6ff00e9feb18400551fef6c3e5900df
GET http://localhost:3333/deploy/:id/status
Returns what the deploy is currently doing, e.g.
StartingCloning git repo...Running truffle...Exited
GET http://localhost:3333/deploy/:id/success
Returns true if the tests passed (i.e. exited with code 0), false otherwise.
GET http://localhost:3333/deploy/:id/output
Returns both stdout and stderr
{
"stdout": "Compiling your contracts...",
"stderr": "npm ERR! ...",
"result": {
"contract_addr": "0x8f2E86DBD4b174Cf42FF20a2e2A69d4D8c4c421E",
"txhash_contract": "0x9d6760891302b49512d9e01ecde6bedb388a3269689b9e5e1c3303247c2757c8",
"authority_addr": "0xA40D11b34654168451CF598a616F9c954E4BD852"
}
}