mirror of https://github.com/embarklabs/embark.git
fix: fix race condition by using function synatx
This commit is contained in:
parent
3c1c389e92
commit
117f010baa
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue