Skip to content

Latest commit

 

History

History
226 lines (105 loc) · 9.33 KB

address_mapping.md

File metadata and controls

226 lines (105 loc) · 9.33 KB

Module 0x3::address_mapping

Resource AddressMapping

struct AddressMapping has key

Constants

Function genesis_init

public(friend) fun genesis_init(ctx: &mut context::Context, _genesis_account: &signer)

Function address_mapping_handle

Return AddressMapping table handle, including mapping and reverse_mapping table handle

Function borrow

Borrow the address mapping object

Function resolve_address

Function resolve_or_generate_address

Function reverse_resolve_address

Return the first multi chain address for the rooch address

Function reverse_resolve_address_with_multichain_id

Return the first multi chain address for the rooch address with the same multichain id

Function exists_mapping_address

Function resolve

Resolve a multi-chain address to a rooch address

Function resolve_or_generate

Resolve a multi-chain address to a rooch address, if not exists, generate a new rooch address

Function exists_mapping

Check if a multi-chain address is bound to a rooch address

Function bind

Bind a multi-chain address to the sender's rooch address The caller need to ensure the relationship between the multi-chain address and the rooch address

public fun bind(ctx: &mut context::Context, sender: &signer, maddress: multichain_address::MultiChainAddress)

Function bind_by_system

Bind a multi-chain address to the rooch address Called by system

public fun bind_by_system(ctx: &mut context::Context, system: &signer, rooch_address: address, maddress: multichain_address::MultiChainAddress)

Function bind_no_check

Bind a rooch address to a multi-chain address

public(friend) fun bind_no_check(ctx: &mut context::Context, rooch_address: address, maddress: multichain_address::MultiChainAddress)