token.bend relies on unsafe/foreign
raw source on the hub · import 0x38c59765d1dfcdb7e4b4aa026bafb649/token.bend as Token
3 imports
import Base import ./sol.bend as S import ./types.bend as Ty
Definitions
def token_id source · line 14 · raw
0x38c59765d1dfcdb7e4b4aa026bafb649/types.Pubkey
SPL Token program id, Tokenkeg...VQ5DA.
def TOKEN_WORDS source · line 27 · raw
Nat
42 words (168 bytes) covers the 165-byte token account.
def token_mint source · line 30 · raw
@data:List<&2, U32> -> 0x38c59765d1dfcdb7e4b4aa026bafb649/types.Pubkey
def token_owner source · line 33 · raw
@data:List<&2, U32> -> 0x38c59765d1dfcdb7e4b4aa026bafb649/types.Pubkey
def token_amount source · line 36 · raw
@data:List<&2, U32> -> 0x38c59765d1dfcdb7e4b4aa026bafb649/types.u64
def token_set_amount source · line 39 · raw
@data:List<&2, U32> -> @amt:0x38c59765d1dfcdb7e4b4aa026bafb649/types.u64 -> List<&2, U32>
def mint_decimals source · line 43 · raw
@data:List<&2, U32> -> U32
Low byte of mint word 11 (byte 44).
def acc_is_token source · line 47 · raw
@+a:0x38c59765d1dfcdb7e4b4aa026bafb649/types.Account -> Bool
Account owner is the Token program.
def token_same_mint source · line 51 · raw
@+a:List<&2, U32> -> @+b:List<&2, U32> -> Bool
Both token accounts name the same mint.
def token_owned source · line 55 · raw
@+data:List<&2, U32> -> @+owner:0x38c59765d1dfcdb7e4b4aa026bafb649/types.Pubkey -> Bool
Token-account owner word equals owner.