14 releases (breaking)
0.10.0 | Sep 26, 2024 |
---|---|
0.9.0 | Jul 18, 2024 |
0.8.0 | Jul 12, 2024 |
0.3.1 | Mar 26, 2024 |
#95 in #ethereum
103,006 downloads per month
Used in 12 crates
(4 directly)
2.5MB
46K
SLoC
Ethereum System
Contains management functions to manage functions on Ethereum. For example, creating agents and channels.
Release
Polkadot SDK stable2409
lib.rs
:
Governance API for controlling the Ethereum side of the bridge
Extrinsics
Agents
Agents are smart contracts on Ethereum that act as proxies for consensus systems on Polkadot networks.
Call::create_agent
: Create agent for a sibling parachainCall::transfer_native_from_agent
: Withdraw ether from an agent
The create_agent
extrinsic should be called via an XCM Transact
instruction from the sibling
parachain.
Channels
Each sibling parachain has its own dedicated messaging channel for sending and receiving
messages. As a prerequisite to creating a channel, the sibling should have already created
an agent using the create_agent
extrinsic.
Call::create_channel
: Create channel for a siblingCall::update_channel
: Update a channel for a sibling
Governance
Only Polkadot governance itself can call these extrinsics. Delivery fees are waived.
Call::upgrade
`: Upgrade the gateway contractCall::set_operating_mode
: Update the operating mode of the gateway contractCall::force_update_channel
: Allow root to update a channel for a siblingCall::force_transfer_native_from_agent
: Allow root to withdraw ether from an agent
Typically, Polkadot governance will use the force_transfer_native_from_agent
and
force_update_channel
and extrinsics to manage agents and channels for system parachains.
Polkadot-native tokens on Ethereum
Tokens deposited on AssetHub pallet can be bridged to Ethereum as wrapped ERC20 tokens. As a prerequisite, the token should be registered first.
Call::register_token
: Register a token location as a wrapped ERC20 contract on Ethereum.
Dependencies
~22–36MB
~617K SLoC