8
votes
Accepted
cross contract call failure when using different salt to instantiate contract
The substrate backend of solang didn't get much love lately for various reasons. As a consequence of this it is out of date and doesn't work flawlessy with newer substrate versions. The current ...
4
votes
Accepted
How to interact between a smart contract written in Solidity from a smart contract written in ink!?
But how would it be possible to build smart contracts written in ink! that call public functions in smart contracts written in Solidity and vice versa?
We need to distinguish between Solidity ...
4
votes
Accepted
How can i implement re-entrancy in ink! smart contracts?
pallet-contract has a build in re-entrancy detection and re-entrancy is prevented by default. Indeed, you can allow for re-entrancy by setting the correct CallFlags, see:
https://paritytech.github.io/...
3
votes
cross contract call failure when using different salt to instantiate contract
From solang docs, it seems they target substrate 2.0, which is a relatively outdated release.
It might be worth it to open an issue on the solang repository asking about compatibility with substrate 3....
3
votes
Best way to handle Solidity's `uint256` in ink!
Answer from @alexander-theißen:
The biggest primitive type in wasm is 64bit cause this is what real
computers have (ignoring simd stuff). So there is no value in using
u128 over a collection.
3
votes
Accepted
How to return uint256 datatype from ink! wasm contract? How to make compatibility with IERC20?
The best way is to use ethnum crate: https://crates.io/crates/ethnum
Code example:
#[ink(message]
pub fn balance(&self, account : AccountId) -> [u128; 2] {
let balance_u128 : u128 = self....
2
votes
How can i implement re-entrancy in ink! smart contracts?
You can use call_builder to allow reentrancy
2
votes
Getting "Gas estimation failed" error while deploying EVM contract on Substrate Node?
This error generally occur due to the wrong gas_estimation to get rid of this error you can decrease the gas_feeof your chain or you can use metamask advance options to set the gas_limit manually.you ...
1
vote
Accepted
Calling Precompiled Contracts from Other Contracts in EVM fails
You don't need to deploy the 'correct' code in any sense. You just need to deploy any dummy bytecode. The bytecode will never actually be executed. Instead your precompile Rust code will be executed. ...
1
vote
Accepted
Expected input with 32 bytes (256 bits), found 48 bytes
Solang works with Parity Substrate 3.0. Note that for recent Substrate Version, cross-contract calls as well as using address type as function argument or return values ARE NOT SUPPORTED. We are ...
1
vote
deploy solidity ethereum to parachain with ExhaustsResources error
BlockWeights was set here.
Tips:
If you have sudo pallet on your chain. You could try sudo_unchecked_weight. To verify if this is the root cause.
1
vote
How to get a detailed error for a Solang-compiled contract with polkadot-js?
Currently it is not yet possible to view the error message directly in the polkadot.js UI. To see your error message from the require statement you need to:
Compile solang yourself from the latest ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
solidity × 16ink × 6
evm × 6
wasm × 5
smart-contract × 4
solang × 4
parachain × 2
frontier × 2
pallet-contracts × 2
substrate-node × 1
pallet × 1
polkadot-js × 1
events × 1
scale-codec × 1
contracts × 1
ethereum × 1
moonbeam × 1
blockchain-events × 1
cargo-contract × 1
address × 1
gas × 1