Context

near-runtime-ts > "near" > Context

Class: Context

Provides context for contract execution, including information about transaction sender, etc.

Hierarchy

Context

Index

Accessors

  • blockIndex

  • contractName

  • currentBalance

  • gasLeft

  • manaLeft

  • receivedAmount

  • sender

Accessors

blockIndex

getblockIndex(): u64

Defined in near.ts:756

Current block index.

Returns: u64

contractName

getcontractName(): string

Defined in near.ts:749

Account ID of contract.

Returns: string

currentBalance

getcurrentBalance(): u64

Defined in near.ts:763

Current balance of the contract.

Returns: u64

gasLeft

getgasLeft(): u64

Defined in near.ts:777

The amount of available gas left for this execution call.

Returns: u64

manaLeft

getmanaLeft(): u32

Defined in near.ts:784

The amount of available mana left for this execution call.

Returns: u32

receivedAmount

getreceivedAmount(): u64

Defined in near.ts:770

The amount of tokens received with this execution call.

Returns: u64

sender

getsender(): string

Defined in near.ts:742

Account ID of transaction sender.

Returns: string