Contract Instance
Type-safe shielded contract instances with smart routing and read/write/sread/swrite/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: "saddress" }],
outputs: [{ name: "", type: "uint256" }],
},
{
name: "transfer",
type: "function",
stateMutability: "nonpayable",
inputs: [
{ name: "to", type: "saddress" },
{ name: "amount", type: "suint256" },
],
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: "saddress" },
{ name: "amount", type: "suint256" },
],
outputs: [{ name: "", type: "bool" }],
},
] as const;
const contract = getShieldedContract({
abi,
address: "0x1234567890abcdef1234567890abcdef12345678",
client,
});Namespaces
Namespace
Operation Type
Calldata
msg.sender
Description
.read / .write -- Smart Routing
.read / .write -- Smart Routing.sread -- Force Signed Read
.sread -- Force Signed Read.swrite -- Force Shielded Write
.swrite -- Force Shielded Write.tread -- Transparent Read
.tread -- Transparent Read.twrite -- Transparent Write
.twrite -- Transparent Write.dwrite -- Send + Inspect
.dwrite -- Send + InspectTypeScript ABI Typing
See Also
Last updated

