polkadot-evm / frontier

Ethereum compatibility layer for Substrate.
Apache License 2.0
574 stars 487 forks source link

Adding custom pallets to the frontier template #1453

Open genjigakura opened 5 months ago

genjigakura commented 5 months ago

Just trying to play around with the Frontier template, following the Substrate docs.

I tried to add a simple custom pallet for an OCW, but following the Substrate docs to create the pallet and configure it inside the runtime, it just doesn't work.

The project structure is pretty different from the Substrate template node used in the docs, so maybe the implementation is different.

Are there some docs I'm missing? How can I add my pallets?

ref. https://docs.substrate.io/tutorials/build-application-logic/add-offchain-workers/ https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-http-requests/

boundless-forest commented 5 months ago

The frontier template node is derived from the substrate-template-node, so I think the overall structure is similar. What kind of errors do you see in the process of adding pallets? Paste here or raise a question in the https://substrate.stackexchange.com/ would be helpful.

genjigakura commented 5 months ago

i added pallet-contracts, i don't get error building the node, but when i try to deploy a smart contract i get:

✅InstantateWithCode

❌system.ExtrinsicFailed NoProvider