Skip to content

Latest commit

 

History

History
154 lines (69 loc) · 4.67 KB

auth_validator_registry.md

File metadata and controls

154 lines (69 loc) · 4.67 KB

Module 0x3::auth_validator_registry

Resource AuthValidatorWithType

struct AuthValidatorWithType<ValidatorType: store> has store, key

Resource ValidatorRegistry

struct ValidatorRegistry has key

Constants

Function genesis_init

Init function called by genesis.

public(friend) fun genesis_init(sender: &signer)

Function register

Register a new validator. This feature not enabled in the mainnet.

#[private_generics(#[ValidatorType])]
public fun register<ValidatorType: store>(): u64

Function register_by_system

Register a new validator by system. This function is only called by system.

public fun register_by_system<ValidatorType: store>(system: &signer): u64

Function register_internal

public(friend) fun register_internal<ValidatorType: store>(): u64

Function is_registered

public fun is_registered<ValidatorType: store>(): bool

Function borrow_validator

Function borrow_validator_by_type

public fun borrow_validator_by_type<ValidatorType: store>(): &auth_validator::AuthValidator