Get "Contract.ContractTrapped" erro when call new "xxx" contract from inside an depolyed contract in substrate of Shibuya testnet, bellow is my detailed operation:
1、Here are two related Contracts compiled by solang compiler scheduled to run in subsrate wasm of Shiybuya testnet 2、Contract B can be created by a specific interface of Contract A via new ContractB 3、Call the said interface shall be failed end up with 'Contract.ContractTrapped' error
I'm not sure if the error is caused by solang or the substarte runtime in Shibuya network, so could anyone konw that?
Bellow is what i done:
================Compile with solang=====================
#Solang version v0.1.10-84-g233920a1
#compiling command
docker run --rm -it -v $(pwd):/sources Package solang · GitHub -v -o /sources --target substrate /sources/test.sol
=============codes===========================
pragma solidity >=0.6.0;
contract Base{ constructor() payable{} }
contract Test{
constructor() payable{}
function createNew() public {
new Base();
}
}
=========================== exec
exec createNew via PolkadotUI(https://cloudflare-ipfs.com/ipns/dotapps.io/?rpc=wss%3A%2F%2Frpc.shibuya.astar.network#/accounts) shall raise “Contract.ContractTrapped”