I tried deployed two ink-compatible solidity smart contract using solang as the compiler. When trying to play around cross contract calls, I've stumbled upon the below failure:
Prerequisite:
- compile one solidity smart contract using solang: get abi bundle Flip.contract
- compile another solidity smart contract Inc that takes another smart contract as constructor input https://github.com/hyperledger-labs/solang/blob/main/integration/substrate/issue666.sol
Route1, using polkadot.js/app:
- upload smart contract Flip.contract using the contacts tab.
- upload Inc.contract and take the Flip account_address as constructor input. ... salt value is auto generated by polkadot.js app
- call the superFlip method on Inc contract to see if it can call external contract Results: ContractTrapped
Route2, using subxt to construct transaction ourself:
- deploy Flip.contract, call api.tx().contracts.instantiate_with_code(... same params as route1)
- deploy Inc.contract, call api.tx().contracts.instantiate_with_code(... same params as route1) ... both steps have the same input data/gas_limit value as route1, we input salt value using account.nonce value
- call the superFlip method on Inc contract to see if it can call external contract Results: ExtrinsicSuccess
Need some help for this, and specifically what should be salt in this scenario. Thx.
Example is produced with this node: https://github.com/paritytech/substrate-contracts-node