Skip to main content

CallContext

For the complete documentation index, see llms.txt

@midnight/ledger v8.0.3


@midnight/ledger / CallContext

Type Alias: CallContext

type CallContext = {
balance: Map<TokenType, bigint>;
caller?: PublicAddress;
comIndices: Map<CoinCommitment, number>;
lastBlockTime: bigint;
ownAddress: ContractAddress;
parentBlockHash: string;
secondsSinceEpoch: bigint;
secondsSinceEpochErr: number;
};

VM에 제공되는 호출의 컨텍스트 정보입니다.

Properties

balance

balance: Map<TokenType, bigint>;

호출 시점에 호출된 컨트랙트가 보유한 잔액입니다.


caller?

optional caller: PublicAddress;

A public address identifying an entity.


comIndices

comIndices: Map<CoinCommitment, number>;

컨트랙트에서 접근 가능한 커밋먼트 인덱스 맵입니다.


lastBlockTime

lastBlockTime: bigint;

The secondsSinceEpoch of the previous block


ownAddress

ownAddress: ContractAddress;

parentBlockHash

parentBlockHash: string;

The hash of the block prior to this transaction, as a hex-encoded string


secondsSinceEpoch

secondsSinceEpoch: bigint;

The seconds since the UNIX epoch that have elapsed


secondsSinceEpochErr

secondsSinceEpochErr: number;

The maximum error on secondsSinceEpoch that should occur, as a positive seconds value