Skip to content

Latest commit

 

History

History
94 lines (47 loc) · 1.83 KB

Signer.md

File metadata and controls

94 lines (47 loc) · 1.83 KB

Module 0x1::Signer

Provide access methods for Signer.

Function borrow_address

Borrows the address of the signer Conceptually, you can think of the signer as being a resource struct wrapper around an address

resource struct Signer has key, store { addr: address }

borrow_address borrows this inner field

public fun borrow_address(s: &signer): &address
Implementation
native public fun borrow_address(s: &signer): &address;

Function address_of

Copies the address of the signer

public fun address_of(s: &signer): address
Implementation
public fun address_of(s: &signer): address {
    *borrow_address(s)
}
Specification
pragma opaque = true;
aborts_if false;
ensures result == address_of(s);

Module Specification

pragma verify;
pragma aborts_if_is_strict;