Contract Instance
Type-safe shielded contract instances with read/write/tread/twrite/dwrite namespaces
import { getShieldedContract } from "seismic-viem";Constructor
Parameter
Type
Required
Description
import { getShieldedContract } from "seismic-viem";
const abi = [
{
name: "balanceOf",
type: "function",
stateMutability: "view",
inputs: [{ name: "account", type: "address" }],
outputs: [{ name: "", type: "uint256" }],
},
{
name: "transfer",
type: "function",
stateMutability: "nonpayable",
inputs: [
{ name: "to", type: "address" },
{ name: "amount", type: "uint256" },
],
outputs: [{ name: "", type: "bool" }],
},
{
name: "totalSupply",
type: "function",
stateMutability: "view",
inputs: [],
outputs: [{ name: "", type: "uint256" }],
},
{
name: "approve",
type: "function",
stateMutability: "nonpayable",
inputs: [
{ name: "spender", type: "address" },
{ name: "amount", type: "uint256" },
],
outputs: [{ name: "", type: "bool" }],
},
] as const;
const contract = getShieldedContract({
abi,
address: "0x1234567890abcdef1234567890abcdef12345678",
client,
});Namespaces
Namespace
Operation Type
Calldata
msg.sender
Description
.read -- Signed Read
.read -- Signed Read.write -- Shielded Write
.write -- Shielded Write.tread -- Transparent Read
.tread -- Transparent Read.twrite -- Transparent Write
.twrite -- Transparent Write.dwrite -- Debug Write
.dwrite -- Debug WriteTypeScript ABI Typing
See Also
Last updated

