fix: fix race condition by using function synatx

This commit is contained in:
Jonathan Rainville 2019-10-22 16:25:24 -04:00
parent 3c1c389e92
commit 117f010baa
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,9 @@ config({
deploy: { deploy: {
"SimpleStorage": { "SimpleStorage": {
args: [100], args: [100],
onDeploy: ["SimpleStorage.methods.setRegistar('$SimpleStorage').send()"] onDeploy: (dependencies) => {
return dependencies.contracts.SimpleStorage.methods.setRegistar(dependencies.contracts.SimpleStorage.options.address).send();
}
} }
} }
} }

View File

@ -42,7 +42,9 @@ config({
} }
}, },
SomeContract: { SomeContract: {
deployIf: "await MyToken.methods.isAvailable().call()", deployIf: (dependencies) => {
return dependencies.contract.MyToken.methods.isAvailable().call();
},
args: [ args: [
["$MyToken2", "$SimpleStorage"], ["$MyToken2", "$SimpleStorage"],
100 100