substratepolkadot-jsrust-ink

When execute Delegator example, I get a "ContractTrapped" error


Build Delegator Contracts...

  1. Git clone "https://github.com/paritytech/ink.git".
  2. Move "examples/delegator".
  3. Build contracts by using "build-all.sh".

Deploy & Execute

  1. Excecute Substrate-Node-Template with Contract Pallet.
  2. Visit Polkadot/Substrate Portal(https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/accounts)
  3. Go to Contract Page(https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/contracts)
  4. Deploy "delegator/target/ink/accumulator/accumulator.contract".
  5. Deploy "delegator/target/ink/adder/adder.contract" by indicating "accumlator" address as a parameter.
  6. Excecute "inc" of adder contract.
  7. I get a error "system.ExtrinsicFailed contracts.ContractTrapped"

How can I solve this problem?


Solution

  • I could execute delegator example at the latest commit of the github. I could not recognize this cause of the error,but now the error is solved.