Questions tagged [evm]

Questions inquiring about using Substrate based EVMs including the EVM pallet or related tools.

Filter by
Sorted by
Tagged with
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. ...
Karanvir Singh's user avatar
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/...
ttt's user avatar
  • 1
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 ...
BlockBird's user avatar
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 ...
Dubs's user avatar
  • 294
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 ...
Discardo's user avatar
  • 382
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 ...
Drew Stone's user avatar
  • 1,164
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. ...
Brian Ramirez's user avatar
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 ...
Bernardo Rodrigues's user avatar
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 ...
ALeSD's user avatar
  • 469
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
Karanvir Singh's user avatar
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 ...
Luke Schoen's user avatar
  • 2,292
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 ...
Purple_Turtle's user avatar
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 ...
cibou's user avatar
  • 131
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 ...
Mr Coder's user avatar
  • 883
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 ...
Mr Coder's user avatar
  • 883
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 ...
magecnion's user avatar
  • 148
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 ...
cibou's user avatar
  • 131
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 ...
BlockBird's user avatar
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 ...
Mr Coder's user avatar
  • 883
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 ...
Mr Coder's user avatar
  • 883
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 ...
pjozvtg's user avatar
  • 75
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.
Arunjot Singh's user avatar
-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&...
Arunjot Singh's user avatar
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 ...
Luke Schoen's user avatar
  • 2,292
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. ...
BlockBird's user avatar
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; ...
Purple_Turtle's user avatar
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 ...
Bernardo Rodrigues's user avatar
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 ...
Brian Ramirez's user avatar
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))...
Muhammad Zaryab Rafique's user avatar
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/...
Deepak Chaudhary's user avatar
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 (...
Valhalla Hero's user avatar
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.
neeraj's user avatar
  • 41
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 ...
Justin Frevert's user avatar
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 ...
Luke Schoen's user avatar
  • 2,292
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 ...
BlockBird's user avatar
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: ...
Bernardo Rodrigues's user avatar
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 ...
Dubs's user avatar
  • 294
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.
BlockBird's user avatar
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: ...
dbp's user avatar
  • 11
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 ...
Discardo's user avatar
  • 382
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 ...
Discardo's user avatar
  • 382
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 ...
chexware's user avatar
  • 325
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 ...
Discardo's user avatar
  • 382
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 ...
Amit Kumar Yadav's user avatar
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'...
Alex Bean's user avatar
  • 5,364
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 ...
mr_bovo's user avatar
  • 171
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 '{&...
Oleg Kalenik's user avatar
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 ...
Discardo's user avatar
  • 382
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 ...
Muhammad Talha Dar's user avatar
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 ...
s.Takahashi's user avatar