3

I've learned how to deploy a contract by following pages: https://substrate.dev/substrate-contracts-workshop/#/0/deploying-your-contract https://substrate.dev/docs/en/contracts/deploying-a-contract

But they both fails at the step 'Calling a contract'

Here is the chain source code that I created (referred from https://substrate.dev/docs/en/tutorials/creating-your-first-substrate-chain) : https://github.com/coolcode/sux-contract-chain

Error message: system.ExtrinsicFailed extrinsic event

Michael
  • 41,989
  • 11
  • 82
  • 128
Bruce Lee
  • 31
  • 1

3 Answers3

1

The contact was turning into tombstone immediately after creation. This can be prevented when rasing the default endowment at deployment.

The tutorial seems to be updated now and at the step when deploying the smart contract (https://substrate.dev/substrate-contracts-workshop/#/0/deploying-your-contract) it contains:

To instantiate our contract we just need to give this contract account an endowment of 10,000,000 and again set the maximum gas allowed to 500,000 units.

However, They are considering enhancing the user experience for the contracts that turns into tombstone.You can see the discussion here: https://github.com/paritytech/ink/issues/304

Muhammad Altabba
  • 2,583
  • 19
  • 31
0

system.ExtrinsicFailed means something went wrong. You should decode exactly what went wrong here, then repost if you're still confused. There doesn't seem to be much guidance on what these errors mean so It's confusing ;{ I'm having my own confusions over here.

0

I also encountered this problem. The solution is to set the amount of transfer to be larger.

amesy
  • 1
  • 2