Questions tagged [evm]
Questions inquiring about using Substrate based EVMs including the EVM pallet or related tools.
90
questions
1
vote
0
answers
23
views
how to solve mismatched type error in substrate?
I have been integrating paritytech frontier(0.9.43) version with the substrate 0.9.43 version . while integrating when i added frontier changes in rpc.rs and service.rs file i am facing this error. ...
0
votes
1
answer
47
views
How to convert h160 address to ss58 address?
I am a dApp developer in Astar.
I want to convert EVM(h160) address to Substrate(ss58) address to implement the UI like the subscan page.
https://astar.subscan.io/account/...
0
votes
0
answers
18
views
thread 'tokio-runtime-worker' has overflowed its stack fatal runtime error: stack overflow Aborted (core dumped)
we are running a stand alone Blockchain network by using POA consensus mechanism. The chain was working fine and after producing 8 Lac Blocks the nodes we down and now i have tried to re-execute same ...
0
votes
0
answers
35
views
How to fix the gas limit using asset-erc20 precompile
When I transfer ERC in EVM with the classic method of deployed contract it set the gas limit correctly, however when I want to transfer using the precompile ( moonbeam one ) asset-erc20 ( from ...
2
votes
0
answers
55
views
Deploy ink! contracts with unified accounts
I have a chain similar to mentioned in this question, where I'm trying to deploy ink! smart contracts. I'm setting my Environment like this:
use ink::env::{Environment, DefaultEnvironment};
use ...
0
votes
0
answers
48
views
Converting a H256/bytes32 into a generic AccountId for EVM precompiles
Overview
We are building out a precompile for pallet-staking and have run into the tricky challenge of converting H256 types into generic AccountIds so that we can implement functions like nominate ...
2
votes
1
answer
41
views
Obtain the balance of erc20 tokens with Polkadot JS
I'm seeking a method to retrieve the balances of all ERC20 tokens associated with an account using the Polkadot JS API. I've been unable to locate a specific API call that enables this functionality. ...
2
votes
1
answer
34
views
EVM solo to para migration on Genesis
I need to migrate the state of an EVM solochain (not substrate) into a Frontier-based parachain.
The original chain has been running for a while with high activity, so the state is fairly big.
I am ...
0
votes
1
answer
45
views
Calling Precompiled Contracts from Other Contracts in EVM fails
I am in the process of working with a precompiled contract I created in my Frontier EVM.
I encounter issues when attempting to call this precompiled contract from another contract. While direct calls ...
2
votes
1
answer
118
views
how to solve the sys error in substrate polkadot branch (polkadot-v0.9.43)
I have been integrating EVM(43 version) in 43 version of substrate. while adding files to runtime module i am getting sys error while building it .I want to know how to solve
this error
0
votes
0
answers
29
views
Unable to recognise Shibuya account address to deploy an EVM contract on Shibuya network using Truffle
I want to make an XVM call from an ink! contract that is deployed to the Shibuya Wasm environment to a Solidity EVM contract that is deployed to the Shibuya EVM environment.
To deploy the Solidity ...
0
votes
1
answer
48
views
In pallet-evm why do we need `WithdrawOrigin`?
For pallet-evm there's a config item, actually two config items that I would put under the same category and that is CallOrigin and WithdrawOrigin :
pallet_evm::Config {
/// Allow the origin ...
1
vote
1
answer
43
views
Frontier & Substrate
Hello we are using frontier, and we would like to remove gas fees for all evm transactons, I tried many things, but didn't achieve..
I still need to pass gas when I sign and send a transaction :
await ...
0
votes
0
answers
52
views
Mapping EVM Address to Substrate Address with Preserved Balance
I'm working on a project involving an EVM-compatible Substrate blockchain and facing a challenge. The problem arises when trying to map Ethereum-based addresses, acquired through Metamask, to the ...
2
votes
1
answer
106
views
Issues with Function Call on EVM-Compatible Substrate Using Metamask and Polkadot
I'm working on a project using an EVM-compatible Substrate blockchain. I am encountering problems when trying to call functions on this Substrate instance.
Here's the function used to sign and send ...
4
votes
1
answer
69
views
Read pallet state using Metamask
I would like to read the state of a pallet using web3 clients (Metamask, Truffle). Let's suppose the pallet has exposed the function getValue().
I have not installed either EVM and Ethereum pallet ...
3
votes
1
answer
76
views
How substrate / frontier convert address
We are using frontier with substrate to be able to deploy evm smart contract.
When I create a transfer between two evm address and that the second one does not exist, the node create a new ss58 ...
3
votes
0
answers
37
views
Unified Accounts
We have followed the comets of moonBeam and implemented Unified Accounts. Now we're facing issues while adding session keys for aura, grandpa and I'm online.
we're using this method for Aura and ...
2
votes
1
answer
53
views
Duplicate lang item error (E0152) with sp_io crate when integrating Frontier pallets with Substrate
I'm trying to make my Substrate-based blockchain compatible with Solidity and MetaMask. I've cloned Substrate from the polkadot-v0.9.39 branch and am trying to integrate Frontier's Ethereum ...
2
votes
1
answer
66
views
How to Integrate a Substrate Chain with MetaMask and Implement Specific Features?
I am currently working on a project that involves creating a Substrate chain and I have several questions related to this:
Integration with MetaMask: I want to be able to connect my Substrate chain to ...
4
votes
1
answer
104
views
How can I retrieve the baseFeePerGas value for historical blocks on Astar?
I want to calculate fees for historical EIP-1559 transactions on Astar EVM. For this, I need to use the GasPrice formula:
GasPrice = BaseFee + MaxPriorityFeePerGas < MaxFeePerGas ?
BaseFee ...
0
votes
2
answers
179
views
Other: IO error: lock hold by current process, acquire time 1685847508 acquiring thread 196910: /tmp/chains/dev/frontier/db/LOCK: No locks available
I'm adding EVM compatibility to relay chain whie doing so I faced this error after running my blockchain.
-1
votes
2
answers
77
views
the trait bound `<RuntimeApi as ConstructRuntimeApi<sp_runtime::generic::Block<, OpaqueExtrinsic>>` is not satisfied
`the trait bound` `<RuntimeApi as ConstructRuntimeApi<sp_runtime::generic::Block<sp_runtime::generic::Header<u32, BlakeTwo256>, OpaqueExtrinsic>, sc_service::client::client::Client&...
4
votes
1
answer
159
views
How to interact between a smart contract written in Solidity from a smart contract written in ink!?
In the repository of the cargo-contract CLI tool, which currently "helps you develop smart contracts in Parity's ink!, which is a Rust eDSL allowing you to write smart contracts for blockchains ...
2
votes
1
answer
69
views
Transaction execution error of EVM "EvmCoreErrorExitReason (OutOfFund)"
I have developed Substrate Network with EVM compatibility and POA consensus algorithm.
It was working fine and transaction execution time was although alot but for now getting an error from EVM-core.
...
2
votes
0
answers
45
views
Frontier: What is trait LinearCostPrecompile about?
So it's often seen in Precompile implementations as a trait bound :
impl<T: LinearCostPrecompile> Precompile for T {
and the trait itself :
pub trait LinearCostPrecompile {
const BASE: u64;
...
3
votes
1
answer
102
views
Rationale on Moonbeam's GAS_PER_SECOND
I'm trying to understand the rationale behind Moonbeam's GAS_PER_SECOND:
/// Current approximation of the gas/s consumption considering
/// EVM execution over compiled WASM (on 4.4Ghz CPU).
/// Given ...
4
votes
1
answer
188
views
Getting "Gas estimation failed" error while deploying EVM contract on Substrate Node?
When I try to deploy a solidity smart contract on my substrate node I get the following error:
"Gas estimation failed
Gas estimation errored with the following message (see below). The ...
2
votes
0
answers
58
views
Failed to compact generated WASM binary in substrate standalone chain [duplicate]
I'm building the substrate standalone chain with this cargo build --release command and facing the issue:
thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(UnknownOpcode(192))...
2
votes
1
answer
70
views
error: no matching package named `sc-consensus-grandpa` found
I want to add pallet ethereum in our runtime but after adding this line:
pallet-ethereum = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/...
5
votes
0
answers
29
views
eip-681 equivalent for Polkadot to generate qrcodes
I'm developing an app and there I have the possibility to generate qrcodes to ask for payments in multiple blockchains using multiple tokens. For EVM blockchains I do have the eip681 to guide me (...
1
vote
2
answers
176
views
How to add evm and ethereum pallet from scratch into substrate node?
I want to add evm pallet and ethereum pallet into my substrate node from scratch, so how I can do that.
5
votes
2
answers
76
views
Is it possible to use ink! with Ethereum-style accounts?
Wondering if anyone knows whether ink! supports AccountIds which are ethereum-style accounts? Let's assume this would be a chain with a Unified Accounts setup, similar to Moonbeam. In specific, we ...
6
votes
0
answers
147
views
How to generate a Moonbeam Unified Account using Subkey?
In the Moonbeam Unified documentation here, it says that Moonbeam natively supports "Ethereum-style address (H160 format), which is 40+2 hex-characters long, in a Substrate based chain" and ...
1
vote
1
answer
38
views
NFT Enlisting on OpenSea
I have implemented EVM and ETH Pallet in Substrate Based chain with POA consensus mechanism. Contracts deployment in Solidity language and NFT Minting transactions are also working perfectly but i'm ...
1
vote
1
answer
60
views
How to implement the `Get` trait for a `Pallet<T>`?
I'm writing a pallet that implements evm::executor::stack::PrecompileSet.
The goal is to use this pallet in conjunction with Frontier's pallet-evm, which has the following types in its Config trait:
...
1
vote
0
answers
60
views
Change chainID in frontier after chain is live
We have tested in local chain with a runtime upgrade to change the chainID of the EVM (with frontier). All seems ok, chain continue to run correctly with the new chainID. Except the fact that we will ...
1
vote
1
answer
51
views
Unified Accounts with POS
is there any repository who are implementing unified accounts with Proof of Stake (POS) consensus except moonbeam.
we want H160 type of account for both Substrate and EVM Transactions.
1
vote
1
answer
52
views
Update ERC-20 Storage slot from Substrate
I'm trying to make a PoC (using frontier template) where I should update the balance of an EVM ERC-20.
I guess that the steps should be as follows:
Calculate the storage slot like this tool does: ...
0
votes
1
answer
70
views
`UnknownTransaction::CannotLookup` error on each extrinsic
I've implemented unified accounts in a NPoS consensus-based substrate chain, and modified the polkadot-js/apps accordingly as well. The transactions through metamask go through successfully, but I'm ...
2
votes
2
answers
135
views
Invalid AccountId provided, expected 32 bytes, found 20
I've implemented an evm-based Substrate chain (i.e. it uses the H160 address format), but when I try to open Accounts page on Polkadot explorer, I get this error:
Invalid AccountId provided, expected ...
1
vote
0
answers
64
views
EVM precompile actions always returns error code -32603 when called
We have started implementing a precompile for our NFT pallet but when I try testing it locally using Remix IDE when calling all of its actions I always get the following message:
Internal JSON-RPC ...
3
votes
1
answer
141
views
Unified accounts with AURA
I want to use unified accounts for a Substrate-based EVM chain. I've looked into the mooonbeam implementation, and they are using it with a custom module pallet-author-inherent which is used for block ...
0
votes
2
answers
127
views
How to change evm token decimals?
native token of my chain has 12 decimals,now i have integrated EVM functionality into my chain, is there any way by which i can change evm decimals from 18 to 12 as i don't want to change my native ...
2
votes
4
answers
488
views
Private key for EVM Frontier
I am running the Frontier-Node-Template and using the library Web3JS to generate EVM transactions following the Moonbeam guide.
const Web3 = require('web3');
const web3 = new Web3('ws://127.0.0.1:9944'...
4
votes
0
answers
123
views
EVM compatible chains and Substrate Bridges
I am looking for a bridging solution between EVM compatible chains and a substrate-based solo chain (i.e. not a parachain).
The bridges is purely for cross chain asset transfer.
I am aware of the ...
2
votes
1
answer
80
views
Frontier EVM integration: UnknownTransaction::NoUnsignedValidator error occurs while transferring funds via Metamask
I'm integrating Frontier EVM into my Substrate chain and facing the following issue while trying to send some funds between accounts via metamask:
[ethjs-query] while formatting outputs from RPC '{&...
2
votes
1
answer
118
views
Explorer for Substrate-based EVM chains
I've built an EVM-compatible blockchain using Substrate and connected it with Metamask and PolkadotJs explorer. But I want a more user-friendly explorer that users with a non-technical background can ...
0
votes
0
answers
76
views
build NPOS EVM commpatible chain
What's the best project setup to build an NPoS and EVM Compatible chain at this moment?
Which version/branch of polkadot release to use? such as polkadot-v0.9.22 or polkadot-v0.9.18?
Use ORML or ...
1
vote
1
answer
53
views
How to set gasPrice using hardhat in EVM smart contract
I was developing a contract on EVM on Shibuya, Astar Network's testnet.
I'm using hardhat.
We successfully deployed to Shibuya testnet and Shiden network using the following settings.
But it doesn't ...