Delegator example don't work
PierreOssun opened this issue · comments
Hello,
I tried to run your delegator example with redspot 0.12.2
& europa 0.3.5-72dc7ca-x86_64-linux-gnu
Step to reproduce:
yarn build & yarn test
I've got:
the test of 'deploy delegator' fail with Some(ReturnCode::NewContractNotFunded)
error in Europa
Do you know how to make this work ?
Hello @ii-ii-ii ,
Can you reopen the issue ?
The PR I did was just to fix a wrong copy/paste on your side but the issue is still present =)
@PierreOssun I've updated the code https://github.com/patractlabs/redspot/blob/master/examples/delegator/tests/delegator.test.ts#L75
Just raise the endowment.
Because in redspot endowment defaults to existentialDeposit + contractDeposit. But for multiple contracts, this endowment is not enough, so you need to add endowment manually.
In practice, endowment should be determined by the developer, rather than using the default values provided by redspot.
Thanks !