Questions tagged [frontier]

Questions about the most popular Substrate EVM framework.

Filter by
Sorted by
Tagged with
1 vote
0 answers
18 views

How to replace substrate address(H256) to Ethereum Address(H160)

I need to replace the substrate address(H256) in fresh substrate-node-template to Ethereum Address(H160). Is it possible? If yes, Is it mandatory to integrate frontier in the node-template? Do we have ...
Deepak Chaudhary's user avatar
0 votes
2 answers
32 views

Is it it possible to change native token decimals of chain that is already running?

A blockchain I am working on enabled Frontier recently but since EVM chains' native tokens got 18 decimals by default and the chain's native token decimals are set to 12 we need to do decimals ...
chexware's user avatar
  • 325
0 votes
0 answers
16 views

Updating Frontier because of InvalidCode(Opcode(95))

I'm utilizing the Polkadot branch v0.9.37 within a Substrate-based standalone chain. Presently, when deploying smart contracts using the latest version of Solidity, I encounter the following error: ...
BlockBird's user avatar
2 votes
0 answers
79 views

How should I add offchain worker(OCW) in frontier when using AccountId20?

In order to add an offchain worker with using AccountId20 as the runtime account type I did following things. add associated type type AuthorityId: AppCrypto<Self::Public, Self::Signature>; in ...
xiao liang's user avatar
1 vote
1 answer
39 views

How to query the number of EVM contracts in a chain

Is there an easy way to query how many EVM smart contracts has been deployed in a Substrate chain?
ChristianArg's user avatar
1 vote
0 answers
20 views

Setting Gas fees for substrate chain which has frontier integrated in it

I am deploying the default smart contract in remix ide to local substrate chain using Metamask to connect with the chain. The local chain uses frontier for EVM. But fees comes quite high. I want to ...
Rohitas_atr894's user avatar
3 votes
0 answers
129 views

Unable to fully utilize block capacity when performing load testing

I'm currently running load tests on my local parachain which includes Frontier integration for EVM compatibility. During these tests, I'm sending thousands of transactions via the RPC endpoint. ...
magecnion's user avatar
  • 222
1 vote
0 answers
25 views

Run benchmark fail test in pallet-evm

test_benchmarks fail Repo: https://github.com/paritytech/frontier Command: cargo t -p pallet-evm --features runtime-benchmarks Issue: failures: ---- benchmarking::benchmark_tests::test_benchmarks ...
CocDap's user avatar
  • 678
0 votes
0 answers
43 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
0 votes
1 answer
48 views

Can we use AccountId20 with babe and other pallets?

As frontier now integrate natively the AccountId20 type, I wonder if it is compatible with all other pallets like BABE, Staking, ... Is there a place where we can check it or do we know some ...
Dubs's user avatar
  • 294
0 votes
1 answer
38 views

Moonbeam Unified Accounts Implementation

Moonbeam implemented unified accounts to use H160 address type across all network is quit old, is there any codebase available to implement same with newly generated frontier node template or is it ...
Rehan's user avatar
  • 167
2 votes
2 answers
66 views

Is it possible to turn a Frontier node into an Ethereum client?

Suppose I start with a Frontier-based template node and want it to sync with a Geth full node, as if it was an Ethereum execution client. What are the minimal set of changes necessary to make this ...
afm's user avatar
  • 355
2 votes
1 answer
52 views

How to debug/solve this frontier integration issue?

I am currently in the process of integrating the frontier with the solo chain. Following the integration, when I attempted to deploy the contract using Remix, it appears to be stuck, with no ...
Ajit's user avatar
  • 827
1 vote
1 answer
35 views

do we have any updated guide to integrate the frontier to the substrate solo-chain?

I want to integrate the frontier with my existing substrate solo-chain. do we have any guide/resource to help in that? substrate version i am using polkadot-v1.0.0
Pankaj's user avatar
  • 2,031
0 votes
1 answer
51 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
  • 489
0 votes
1 answer
61 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
51 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
1 vote
1 answer
92 views

Transferring Funds from SS58 Account to H160 Account Using Frontier and Metamask

I've successfully integrated Frontier into my runtime and have accessed the funds from an account, Alice's, using its SS58 account. To achieve this, I truncated the public address to retrieve the H160 ...
ALeSD's user avatar
  • 489
3 votes
1 answer
102 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
46 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
57 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
  • 923
2 votes
1 answer
117 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
  • 923
-1 votes
2 answers
91 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
0 votes
1 answer
57 views

frontier template upgrade to polkadotv0.9.38 but using Babe instead of Aura

I've upgraded the frontier-node-template to substrate polkadot-v0.9.38, I've fixed all issues in runtime, migrated my code as well. But since last few days, I'm stuck in converting service.rs file in ...
Zubair Buriro's user avatar
2 votes
0 answers
57 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
1 vote
1 answer
61 views

Frontier template using sr25519 - polkajsapi

I just cloned frontier and modified the code for using H256 address following this These are my changes in runtime/src/lib.rs: pub type Signature = MultiSignature; impl pallet_evm::Config for Runtime ...
Huy Duan Tran's user avatar
1 vote
0 answers
87 views

how withdraw astar frontier tip reward with alice in dev mode, i use evm.withdraw(0x15fdd31c61141abd04a99fd6822c8558854ccde3, 1) report "bad Origin"

[] https://github.com/AstarNetwork/Astar.git ./target/release/astar-collator --dev -d ./data -l info astar frontier evm use HashedAddressMapping in evm pallet alice public key is ...
Smith's user avatar
  • 141
5 votes
1 answer
154 views

PolkadotJS Apps shows wrong AccountId20 on Frontier Template Node

Frontier recently received support for Moonbeam's AccountId20: https://github.com/paritytech/frontier/pull/1019 So now I'm trying to use this new feature on PolkadotJS Apps. I'm running a Frontier ...
Bernardo Rodrigues's user avatar
1 vote
1 answer
94 views

Generating ethereum address from SS58 address [duplicate]

I have created keypairs for aura and grandpa and added it into customSpec file but i need to add ethereum address in customSpec file to fund it with some amount of ethereum. So, i have generated ...
neeraj's user avatar
  • 41
2 votes
1 answer
95 views

Derived H160 address is different than showing in metamask?

I know ss58 public key and private key, also I have derived the EVM HS160 account from the same public key, next is how I can import that EVM HS160 Account in metamask. If I put the private key of ...
neeraj's user avatar
  • 41
2 votes
1 answer
59 views

PreLog Blocks in frontier ethereum pallet on_initialize hook

fn on_initialize(_: T::BlockNumber) -> Weight { let mut weight = T::SystemWeightInfo::kill_storage(1); // If the digest contain an existing ethereum block(encoded as PreLog)...
Timothée Delabrouille's user avatar
1 vote
1 answer
179 views

How do I use the AccountId20 and EthereumSignature Signer with polkadot.js.org? [duplicate]

I'm trying to get a better understanding of Frontier, and thus I'm reimplementing the frontier node template over the generic substrate node template. Unfortunately I'm pretty much stuck at step 1. ...
Farcaller's user avatar
  • 148
1 vote
0 answers
18 views

subscan-essentials EVM plugin

I've tested subscan-essentials and love how nicely a substrate-based chain gets indexed in a database. But I see that it doesn't parse Frontier evm extrinsics. I couldn't find open-source plugins for ...
lucgerrits's user avatar
1 vote
1 answer
62 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
2 answers
102 views

frontier node template fees

I created a new frontier node template with frontier. During each interaction I pay a gas fee, my question is where this gas fee is deposited and can it be collected by the validator ?
user3941's user avatar
1 vote
0 answers
75 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
91 views

Moonbeam #[precompile] procedural macro and Rust generics compilation error

I'm trying to write something similar to Moonbeam's assets-erc20 precompile. I'm using Moonbeam's #[precompile] procedural macros. pub type AssetIdOf<R> = <<R as pallet_evm::Config&...
Bernardo Rodrigues's user avatar
0 votes
0 answers
28 views

What is the account code in genesis account?

What does account code use for? No idea why are 0xff (INVALID) and 0x00 (STOP)... https://github.com/paritytech/frontier/blob/08dfe8986e3f92ce213244c438eb9178653fce59/primitives/evm/src/lib.rs#L87 ...
wcl's user avatar
  • 41
4 votes
1 answer
152 views

Is there any way to access the accountid inside the offchain worker?

I am coding a pallet in which I need to know who I am inside a offchain worker to check if I should send a transaction or not. Right now I have access to the account in the send_signed_transaction ...
Gabriel Martinez's user avatar
1 vote
1 answer
69 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
1 vote
0 answers
80 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
0 votes
2 answers
166 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
3 votes
4 answers
656 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,702
0 votes
1 answer
58 views

Error building frontier-node-template

I am trying to build the Frontier Node Template from this code or from the Frontier repository. But when running the cargo build --release I am getting the following error: error: non-defining opaque ...
Alex Bean's user avatar
  • 5,702
3 votes
1 answer
252 views

Getting `insufficient funds for gas * price + value` error when performing transaction with another account than Alice

I'd like to use Substrate Frontier as a private blockchain for my current project. I have set up a project using a frontier-template-node build and I am now trying to adjust its settings. I am ...
Olivier Hory's user avatar
3 votes
1 answer
99 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
178 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
  • 436
0 votes
0 answers
83 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
0 votes
1 answer
75 views

What is the maximum contract size limit for frontier EVM smart contract?

Does the contract limit size information shown in the link below holds true for Frontier EVM also? https://ethereum.org/en/developers/docs/smart-contracts/#limitations
Henry Newling's user avatar
2 votes
1 answer
94 views

Can an off-chain worker read/write the state of an EVM contract?

Let's assume we have a frontier-based node with smart contract X. From an off-chain worker, we want to call X.some_method() which will return data, and then the worker would use this data to make some ...
Adam Wierzbicki's user avatar