0xa5::trusted_addresses
use 0x1::ascii;
TrustedAddresses
Types —–
struct TrustedAddresses has copy, drop
trusted_chains: vector<ascii::String>
trusted_addresses: vector<ascii::String>
Errors ——
#[error]
const EMalformedTrustedAddresses: vector<u8> = b"trusted chains and addresses have mismatching length";
new
Public Functions —————-
public fun new(trusted_chains: vector<ascii::String>, trusted_addresses: vector<ascii::String>): trusted_addresses::TrustedAddresses
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,
}
}
destroy
Package Functions —————–
public(friend) fun destroy(self: trusted_addresses::TrustedAddresses): (vector<ascii::String>, vector<ascii::String>)
public(package) fun destroy(
self: TrustedAddresses,
): (vector<String>, vector<String>) {
let TrustedAddresses { trusted_chains, trusted_addresses } = self;
(trusted_chains, trusted_addresses)
}