Questions tagged [precompile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
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
1 vote
1 answer
84 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
1 vote
0 answers
63 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
1 answer
27 views

Precompile error.. main runtime: panicked at 'Digest item must match that calculated,'

I was adding a new precompile function to my parachain, then when I ran my parachain and invoked one of the precompile functions, I got this error from one of the polkadot validators: Relaychain ...
Russo's user avatar
  • 1,193
0 votes
1 answer
145 views

How to print color log in terminal with no_std requirement?

I tried to use ansi_term to print logs because it is used in the Substrate repository for logging: https://github.com/paritytech/substrate/blob/fece0657f20e15df94be5833b164dfacd44823eb/client/...
Russo's user avatar
  • 1,193
3 votes
2 answers
255 views

Frontier: How to change EVM gas fee charged in calling precompile functions

Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions? I saw a demonstration of ...
Russo's user avatar
  • 1,193