Skip to main content

Questions tagged [precompile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Trying to add democracy precompile and getting an error that says the trait `LinearCostPrecompile` is not implemented for `DemocracyWrapper<Runtime>'

I am trying to add a precompile to my runtime(I hope this is what it is called). What I did was import the precompile first in my runtimes's cargo.toml file. All my dependencies are fetched from ...
RRR's user avatar
  • 43
0 votes
0 answers
64 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,194
2 votes
0 answers
60 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
92 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
94 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
44 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
209 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
346 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