Module sui::forwarding_address
Registry for forwarding addresses.
A forwarding address is an off-chain-derived alias that forwards deposits to a registered master address at resolution time. This module currently defines only the singleton registry object; registration and resolution APIs are added in later steps.
use std::ascii;
use std::bcs;
use std::option;
use std::string;
use std::vector;
use sui::address;
use sui::hex;
use sui::object;
use sui::party;
use sui::transfer;
use sui::tx_context;
use sui::vec_map;
Struct ForwardingAddressRegistry
Singleton shared object which will hold forwarding address registrations.
public struct ForwardingAddressRegistry has key
Click to open
Fields
- id: sui::object::UID
Constants
#[error]
const ENotSystemAddress: vector<u8> = b"Only the system can create the forwarding address registry.";
Function create
Create and share the ForwardingAddressRegistry object. This function is called exactly once, when the registry object is first created. Can only be called by genesis or change_epoch transactions.
fun create(ctx: &sui::tx_context::TxContext)