mirror of https://github.com/embarklabs/embark.git
a4a0e9dc33
This commit introduces a new feature that enables users to calculate Smart Contract constructor arguments lazily using an (async) function. Similar to normal Smart Contract configurations, the return or resolved value from that function has to be either a list of arguments in the order as they are needed for the constructor, or as an object with named members that match the arguments individually. ``` ... development: { deploy: { SimpleStorage: { args: async ({ contracts, web3, logger}) => { // do something with `contracts` and `web3` to determine // arguments let someValue = await ...; return [someValue]; // or return { initialValue: someValue }; } } } } ... ``` Closes #2270 |
||
---|---|---|
.. | ||
privatenet | ||
rinkeby | ||
ropsten | ||
blockchain.js | ||
communication.json | ||
contracts.js | ||
namesystem.js | ||
storage.json | ||
webserver.json |