Contracts
Building clauses
Transfer VET and VTHO clauses
import {
Address,
Clause,
Units,
VET,
VTHO,
VTHO_ADDRESS
} from '@vechain/sdk-core';
// build some example clauses
// 1. Transfer vet
const transferVetClause = Clause.transferVET(
Address.of('0xf02f557c753edf5fcdcbfe4c1c3a448b3cc84d54'),
VET.of(300n, Units.wei)
);
// 2. Transfer VTHO
const transferVTHOClause = Clause.transferVTHOToken(
Address.of('0xf02f557c753edf5fcdcbfe4c1c3a448b3cc84d54'),
VTHO.of(300n, Units.wei)
);
Deploying a Smart Contract Clause
Steps:
Calling a Contract Function Clause
Steps:
Multi-Clause Contract Interaction
Multiple Clauses in a Single Transaction
Commenting Contract Invocations
Specifying Revisions in Read Functions
Delegating a Contract Call
Last updated
Was this helpful?