-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Мigrate to truffle #146
Мigrate to truffle #146
Conversation
487030b
to
abc031b
Compare
279459d
to
bc0f36c
Compare
6d5aa0f
to
db44c7a
Compare
5031307
to
26d129c
Compare
1bd3946
to
d481b6d
Compare
381180b
to
54d619e
Compare
d55613c
to
0bc3141
Compare
9f7f4f4
to
6720304
Compare
ff3f290
to
85f3aa6
Compare
until we figure out what is causing the result discrepancies sc-forks/solidity-coverage#559 (comment)
0027103
to
dee7bfc
Compare
deployment/6_register_modules.js
Outdated
const VersionManagerWrapper = await VersionManager.new(config.modules.VersionManager); | ||
|
||
const ModuleRegistryWrapper = await ModuleRegistry.new(config.contracts.ModuleRegistry); | ||
const MultiSigWrapper = await MultiSig.new(config.contracts.MultiSigWallet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be ContractWrapper = await Contract.at(config...)
instead of using ContractWrapper = await Contract.new(config...)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks, updated.
8af1039
to
c2e213a
Compare
f0f7c30
to
64d92fb
Compare
64d92fb
to
80dc7bc
Compare
and remove obsoleted signMessageHash util method
aa34748
to
9fd72d7
Compare
const { pkey, infuraKey } = manager; | ||
return (pkey, infuraKey); | ||
function getKeys() { | ||
// NOTE: While https://github.com/trufflesuite/truffle/issues/1054 is implemented we are using a temporary fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI we used to have a custom AWSWalletProvider
to solve that issue https://github.com/argentlabs/solidity/blob/dev/truffle-awswallet-provider/index.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a card to investigate that if the truffle fix is delayed
Here we migrate the solution from
etherlime
to thetruffle
framework. Truffle is used for compilation (using docker), testing, deployment and its extensions framework additionally implements code coverage, gas cost testing and etherscan verification.Notable changes include
bn.js
consistently for comparing and working with big numbersganache
is now nameddevelopment
, note that configuration file has changed fromganache.json
todevelopment.json
deployer
role is now minimal and it's no longer required to deploy new instances of a contract or create references to existing contracts. e.g.deployer.deploy(GuardianStorage)
becomesGuardianStorage.new()
anddeployer.wrapDeployedContract(ENS, newConfig.ENS.ensRegistry)
becomesENS.at(newConfig.ENS.ensRegistry)
.verboseWaitForTransaction
is no longer required as the transaction receipt is returned directly for each contract call..contractAddress
becomes.address
build folder
is done via@truffle\contract
until Allow artifacts loading from outside contracts and test folders trufflesuite/truffle#3436 is resolvedPlugins used
eth-gas-reporter
and CodeCheckshttps://github.com/argentlabs/argent-contracts/pull/146/checks?check_run_id=1341683785
These reports differ to the benchmark script results in that gas consumption per method is given which doesn't take into consideration chained calls though Proxy and/or Relayer contracts (meta transactions). We could accept these instances as relayed transactions take on average the same amount of extra gas ~45,000 while the Proxy calls are relevant only for the BaseWallet calls which are minimal.
Code coverage running via a plugin developed by @cgewecke in Add coverage script for truffle experiment #177 ref Support for multiple truffle configs compilation sc-forks/solidity-coverage#559
Etherscan verification using
truffle-plugin-verify
ref Fails to verify Argent contracts rkalis/truffle-plugin-verify#46This is done explicitly via the
./scripts/verify.js
script which verifies in EtherScan all contracts from the configuration file's "contracts" and "modules" sections for the test, staging and production networks.blockers
nice-to-haves
truffle
chore: move chain packages to a subfolder (temp) trufflesuite/ganache#702chainId
inutilities.getChainId()
after Upgrading Web3 >= 1.2.2 trufflesuite/truffle#2688 is resolved