A chain_extension
is one way to call into the runtime from a smart contract on the contracts pallet.
What other methods exist, and why might you use them instead of the extension pattern?
Substrate and Polkadot Stack Exchange is a question and answer site for developers building blockchains with the Substrate SDK. It only takes a minute to sign up.
Sign up to join this communityA chain_extension
is one way to call into the runtime from a smart contract on the contracts pallet.
What other methods exist, and why might you use them instead of the extension pattern?
With an ink! smart contract, you are interacting with the runtime via the contracts-pallet
and it's default defined API. If you want to extend the contracts-pallet
API, the recommended ink! way of doing so is to use the chain extension feature - it's built into the contracts-pallet
and ink!.
Of course you are not limited to this, imagine contracts-pallet
with evm-pallet
and cross-contract interaction or even cross-chain contract interaction.