axelar-cgp-sui

Module 0xa5::trusted_addresses

use 0x1::ascii;

Struct TrustedAddresses


Types —–

struct TrustedAddresses has copy, drop
Fields
trusted_chains: vector<ascii::String>
trusted_addresses: vector<ascii::String>

Constants


Errors ——

#[error]
const EMalformedTrustedAddresses: vector<u8> = b"trusted chains and addresses have mismatching length";

Function new


Public Functions —————-

public fun new(trusted_chains: vector<ascii::String>, trusted_addresses: vector<ascii::String>): trusted_addresses::TrustedAddresses
Implementation
public fun new(
    trusted_chains: vector<String>,
    trusted_addresses: vector<String>,
): TrustedAddresses {
    let length = trusted_chains.length();

    assert!(length == trusted_addresses.length(), EMalformedTrustedAddresses);

    TrustedAddresses {
        trusted_chains,
        trusted_addresses,
    }
}

Function destroy


Package Functions —————–

public(friend) fun destroy(self: trusted_addresses::TrustedAddresses): (vector<ascii::String>, vector<ascii::String>)
Implementation
public(package) fun destroy(
    self: TrustedAddresses,
): (vector<String>, vector<String>) {
    let TrustedAddresses { trusted_chains, trusted_addresses } = self;
    (trusted_chains, trusted_addresses)
}