AAStar Shared Configuration Package
Enumerations
EntryPointVersion
Defined in: packages/core/src/actions/entryPoint.ts:4
Enumeration Members
V06
V06: "0.6";Defined in: packages/core/src/actions/entryPoint.ts:5
V07
V07: "0.7";Defined in: packages/core/src/actions/entryPoint.ts:6
NodeType
Defined in: packages/core/src/communities.ts:8
Enumeration Members
ANODE
ANODE: 2;Defined in: packages/core/src/communities.ts:11
KMS
KMS: 3;Defined in: packages/core/src/communities.ts:12
PAYMASTER_AOA
PAYMASTER_AOA: 0;Defined in: packages/core/src/communities.ts:9
PAYMASTER_SUPER
PAYMASTER_SUPER: 1;Defined in: packages/core/src/communities.ts:10
RolePermissionLevel
Defined in: packages/core/src/roles.ts:159
Role permission levels (for UI sorting/filtering)
Enumeration Members
COMMUNITY
COMMUNITY: 30;Defined in: packages/core/src/roles.ts:163
KMS
KMS: 80;Defined in: packages/core/src/roles.ts:161
OPERATOR
OPERATOR: 50;Defined in: packages/core/src/roles.ts:162
PROTOCOL
PROTOCOL: 100;Defined in: packages/core/src/roles.ts:160
USER
USER: 10;Defined in: packages/core/src/roles.ts:164
Classes
AAStarValidationError
Defined in: packages/core/src/utils/validation.ts:3
Extends
Error
Constructors
Constructor
new AAStarValidationError(message): AAStarValidationError;Defined in: packages/core/src/utils/validation.ts:4
Parameters
| Parameter | Type |
|---|---|
message | string |
Returns
Overrides
Error.constructorProperties
cause?
optional cause: unknown;Defined in: node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.causemessage
message: string;Defined in: node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.messagename
name: string;Defined in: node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.namestack?
optional stack: string;Defined in: node_modules/.pnpm/typescript@5.7.2/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stackprepareStackTrace()?
static optional prepareStackTrace: (err, stackTraces) => any;Defined in: node_modules/.pnpm/@types+node@20.11.5/node_modules/@types/node/globals.d.ts:28
Optional override for formatting stack traces
Parameters
| Parameter | Type |
|---|---|
err | Error |
stackTraces | CallSite[] |
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTracestackTraceLimit
static stackTraceLimit: number;Defined in: node_modules/.pnpm/@types+node@20.11.5/node_modules/@types/node/globals.d.ts:30
Inherited from
Error.stackTraceLimitMethods
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;Defined in: node_modules/.pnpm/@types+node@20.11.5/node_modules/@types/node/globals.d.ts:21
Create .stack property on a target object
Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTraceabstract BaseClient
Defined in: packages/core/src/clients/BaseClient.ts:4
Constructors
Constructor
new BaseClient(config): BaseClient;Defined in: packages/core/src/clients/BaseClient.ts:13
Parameters
| Parameter | Type |
|---|---|
config | ClientConfig |
Returns
Properties
client
protected client: object;Defined in: packages/core/src/clients/BaseClient.ts:5
account
account: Account;The Account of the Client.
addChain()
addChain: (args) => Promise<void>;Adds an EVM chain to the wallet.
- Docs: https://viem.sh/docs/actions/wallet/addChain
- JSON-RPC Methods:
eth_addEthereumChain
Parameters
| Parameter | Type | Description |
|---|---|---|
args | AddChainParameters | AddChainParameters |
Returns
Promise<void>
Example
import { createWalletClient, custom } from 'viem'
import { optimism } from 'viem/chains'
const client = createWalletClient({
transport: custom(window.ethereum),
})
await client.addChain({ chain: optimism })batch?
optional batch: object;Flags for batch settings.
batch.multicall?
optional multicall:
| boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};Toggle to enable eth_call multicall aggregation.
Type Declaration
boolean
{
batchSize?: number;
deployless?: boolean;
wait?: number;
}cacheTime
cacheTime: number;Time (in ms) that cached data will remain in memory.
ccipRead?
optional ccipRead:
| false
| {
request?: (parameters) => Promise<`0x${string}`>;
};CCIP Read configuration.
Type Declaration
false
{
request?: (parameters) => Promise<`0x${string}`>;
}chain
chain: Chain;Chain for the client.
deployContract()
deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>;Deploys a contract to the network, given bytecode and constructor arguments.
- Docs: https://viem.sh/docs/contract/deployContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts
Type Parameters
| Type Parameter |
|---|
abi extends readonly unknown[] | Abi |
chainOverride extends Chain | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | DeployContractParameters<abi, Chain, Account, chainOverride> | DeployContractParameters |
Returns
Promise<`0x${string}`>
The Transaction hash. DeployContractReturnType
Example
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const hash = await client.deployContract({
abi: [],
account: '0x…,
bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',
})experimental_blockTag?
optional experimental_blockTag: BlockTag;Default block tag to use for RPC requests.
extend()
extend: <client>(fn) => Client<Transport, Chain, Account, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain, Account>>;Type Parameters
| Type Parameter |
|---|
client extends object & ExactPartial<ExtendableProtectedActions<Transport, Chain, Account>> |
Parameters
| Parameter | Type |
|---|---|
fn | (client) => client |
Returns
Client<Transport, Chain, Account, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain, Account>>
fillTransaction()
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain, chainOverride>>;Fills a transaction request with the necessary fields to be signed over.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args | FillTransactionParameters<Chain, Account, chainOverride, accountOverride> |
Returns
Promise<FillTransactionReturnType<Chain, chainOverride>>
The filled transaction. FillTransactionReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const result = await client.fillTransaction({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
})getAddresses()
getAddresses: () => Promise<GetAddressesReturnType>;Returns a list of account addresses owned by the wallet or client.
- Docs: https://viem.sh/docs/actions/wallet/getAddresses
- JSON-RPC Methods:
eth_accounts
Returns
Promise<GetAddressesReturnType>
List of account addresses owned by the wallet or client. GetAddressesReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const accounts = await client.getAddresses()getCallsStatus()
getCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;Returns the status of a call batch that was sent via sendCalls.
- Docs: https://viem.sh/docs/actions/wallet/getCallsStatus
- JSON-RPC Methods:
wallet_getCallsStatus
Parameters
| Parameter | Type |
|---|---|
parameters | GetCallsStatusParameters |
Returns
Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>
Status of the calls. GetCallsStatusReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })getCapabilities()
getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>;Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc).
- Docs: https://viem.sh/docs/actions/wallet/getCapabilities
- JSON-RPC Methods:
wallet_getCapabilities
Type Parameters
| Type Parameter |
|---|
chainId extends number | undefined |
Parameters
| Parameter | Type |
|---|---|
parameters? | GetCapabilitiesParameters<chainId> |
Returns
Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>
The wallet's capabilities. GetCapabilitiesReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const capabilities = await client.getCapabilities({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})getChainId()
getChainId: () => Promise<number>;Returns the chain ID associated with the current network.
- Docs: https://viem.sh/docs/actions/public/getChainId
- JSON-RPC Methods:
eth_chainId
Returns
Promise<number>
The current chain ID. GetChainIdReturnType
Example
import { createWalletClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const chainId = await client.getChainId()
// 1getPermissions()
getPermissions: () => Promise<GetPermissionsReturnType>;Gets the wallets current permissions.
- Docs: https://viem.sh/docs/actions/wallet/getPermissions
- JSON-RPC Methods:
wallet_getPermissions
Returns
Promise<GetPermissionsReturnType>
The wallet permissions. GetPermissionsReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const permissions = await client.getPermissions()key
key: string;A key for the client.
name
name: string;A name for the client.
pollingInterval
pollingInterval: number;Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds.
prepareAuthorization()
prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>;Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId).
With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object.
Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | PrepareAuthorizationParameters<Account> | PrepareAuthorizationParameters |
Returns
Promise<PrepareAuthorizationReturnType>
The prepared Authorization object. PrepareAuthorizationReturnType
Examples
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: http(),
})
const authorization = await client.prepareAuthorization({
account: privateKeyToAccount('0x..'),
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const authorization = await client.prepareAuthorization({
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})prepareTransactionRequest()
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;Prepares a transaction request for signing.
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object & object | - |
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | PrepareTransactionRequestParameters<Chain, Account, chainOverride, accountOverride, request> | PrepareTransactionRequestParameters |
Returns
Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>
The transaction request. PrepareTransactionRequestReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})request
request: EIP1193RequestFn<WalletRpcSchema>;Request function wrapped with friendly error handling
requestAddresses()
requestAddresses: () => Promise<RequestAddressesReturnType>;Requests a list of accounts managed by a wallet.
- Docs: https://viem.sh/docs/actions/wallet/requestAddresses
- JSON-RPC Methods:
eth_requestAccounts
Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses).
This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts.
Returns
Promise<RequestAddressesReturnType>
List of accounts managed by a wallet RequestAddressesReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const accounts = await client.requestAddresses()requestPermissions()
requestPermissions: (args) => Promise<RequestPermissionsReturnType>;Requests permissions for a wallet.
- Docs: https://viem.sh/docs/actions/wallet/requestPermissions
- JSON-RPC Methods:
wallet_requestPermissions
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { [key: string]: Record<string, any>; eth_accounts: Record<string, any>; } | RequestPermissionsParameters |
args.eth_accounts | Record<string, any> | - |
Returns
Promise<RequestPermissionsReturnType>
The wallet permissions. RequestPermissionsReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const permissions = await client.requestPermissions({
eth_accounts: {}
})sendCalls()
sendCalls: <calls, chainOverride>(parameters) => Promise<{
capabilities?: {
[key: string]: any;
};
id: string;
}>;Requests the connected wallet to send a batch of calls.
- Docs: https://viem.sh/docs/actions/wallet/sendCalls
- JSON-RPC Methods:
wallet_sendCalls
Type Parameters
| Type Parameter | Default type |
|---|---|
calls extends readonly unknown[] | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
parameters | SendCallsParameters<Chain, Account, chainOverride, calls> |
Returns
Promise<{ capabilities?: { [key: string]: any; }; id: string; }>
Transaction identifier. SendCallsReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const id = await client.sendCalls({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
calls: [
{
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 69420n,
},
],
})sendCallsSync()
sendCallsSync: <calls, chainOverride>(parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block.
- Docs: https://viem.sh/docs/actions/wallet/sendCallsSync
- JSON-RPC Methods:
wallet_sendCalls
Type Parameters
| Type Parameter | Default type |
|---|---|
calls extends readonly unknown[] | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
parameters | SendCallsSyncParameters<Chain, Account, chainOverride, calls> |
Returns
Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>
Calls status. SendCallsSyncReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const status = await client.sendCallsSync({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
calls: [
{
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 69420n,
},
],
})sendRawTransaction()
sendRawTransaction: (args) => Promise<`0x${string}`>;Sends a signed transaction to the network
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction
- JSON-RPC Method:
eth_sendRawTransaction
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionParameters |
Returns
Promise<`0x${string}`>
The transaction hash. SendRawTransactionReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransaction } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.sendRawTransaction({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})sendRawTransactionSync()
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block.
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync
- JSON-RPC Method:
eth_sendRawTransactionSync
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionSyncParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. SendRawTransactionSyncReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransactionSync } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.sendRawTransactionSync({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})sendTransaction()
sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>;Creates, signs, and sends a new transaction to the network.
- Docs: https://viem.sh/docs/actions/wallet/sendTransaction
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_sendTransaction - Local Accounts:
eth_sendRawTransaction
- JSON-RPC Accounts:
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SendTransactionParameters<Chain, Account, chainOverride, request> | SendTransactionParameters |
Returns
Promise<`0x${string}`>
The Transaction hash. SendTransactionReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.sendTransaction({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const hash = await client.sendTransaction({
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})sendTransactionSync()
sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>;Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt.
- Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_sendTransaction - Local Accounts:
eth_sendRawTransaction
- JSON-RPC Accounts:
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SendTransactionSyncParameters<Chain, Account, chainOverride, request> | SendTransactionParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. SendTransactionReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.sendTransactionSync({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const receipt = await client.sendTransactionSync({
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})showCallsStatus()
showCallsStatus: (parameters) => Promise<void>;Requests for the wallet to show information about a call batch that was sent via sendCalls.
- Docs: https://viem.sh/docs/actions/wallet/showCallsStatus
- JSON-RPC Methods:
wallet_showCallsStatus
Parameters
| Parameter | Type |
|---|---|
parameters | ShowCallsStatusParameters |
Returns
Promise<void>
Displays status of the calls in wallet. ShowCallsStatusReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
await client.showCallsStatus({ id: '0xdeadbeef' })signAuthorization()
signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>;Signs an EIP-7702 Authorization object.
With the calculated signature, you can:
- use
verifyAuthorizationto verify the signed Authorization object, - use
recoverAuthorizationAddressto recover the signing address from the signed Authorization object.
Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | SignAuthorizationParameters<Account> | SignAuthorizationParameters |
Returns
Promise<SignAuthorizationReturnType>
The signed Authorization object. SignAuthorizationReturnType
Examples
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: http(),
})
const signature = await client.signAuthorization({
account: privateKeyToAccount('0x..'),
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const signature = await client.signAuthorization({
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})signMessage()
signMessage: (args) => Promise<`0x${string}`>;Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)).
- Docs: https://viem.sh/docs/actions/wallet/signMessage
- JSON-RPC Methods:
- JSON-RPC Accounts:
personal_sign - Local Accounts: Signs locally. No JSON-RPC request.
- JSON-RPC Accounts:
With the calculated signature, you can:
- use
verifyMessageto verify the signature, - use
recoverMessageAddressto recover the signing address from a signature.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SignMessageParameters<Account> | SignMessageParameters |
Returns
Promise<`0x${string}`>
The signed message. SignMessageReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const signature = await client.signMessage({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
message: 'hello world',
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const signature = await client.signMessage({
message: 'hello world',
})signTransaction()
signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never>,
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>;Signs a transaction.
- Docs: https://viem.sh/docs/actions/wallet/signTransaction
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request.
- JSON-RPC Accounts:
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | - |
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> | UnionOmit<ExtractChainFormatterParameters<DeriveChain<Chain, chainOverride>, "transactionRequest", TransactionRequest>, "from"> |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SignTransactionParameters<Chain, Account, chainOverride, request> | SignTransactionParameters |
Returns
Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>
The signed message. SignTransactionReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})
const signature = await client.signTransaction(request)// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})
const signature = await client.signTransaction(request)signTypedData()
signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>;Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)).
- Docs: https://viem.sh/docs/actions/wallet/signTypedData
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request.
- JSON-RPC Accounts:
Type Parameters
| Type Parameter |
|---|
typedData extends | { [key: string]: readonly TypedDataParameter[]; [key: `string[${string}]`]: undefined; [key: `function[${string}]`]: undefined; [key: `address[${string}]`]: undefined; [key: `bool[${string}]`]: undefined; [key: `bytes[${string}]`]: undefined; [key: `bytes2[${string}]`]: undefined; [key: `bytes1[${string}]`]: undefined; [key: `bytes10[${string}]`]: undefined; [key: `bytes32[${string}]`]: undefined; [key: `bytes16[${string}]`]: undefined; [key: `bytes8[${string}]`]: undefined; [key: `bytes4[${string}]`]: undefined; [key: `bytes3[${string}]`]: undefined; [key: `bytes15[${string}]`]: undefined; [key: `bytes26[${string}]`]: undefined; [key: `bytes18[${string}]`]: undefined; [key: `bytes27[${string}]`]: undefined; [key: `bytes28[${string}]`]: undefined; [key: `bytes12[${string}]`]: undefined; [key: `bytes6[${string}]`]: undefined; [key: `bytes5[${string}]`]: undefined; [key: `bytes31[${string}]`]: undefined; [key: `bytes7[${string}]`]: undefined; [key: `bytes22[${string}]`]: undefined; [key: `bytes9[${string}]`]: undefined; [key: `bytes11[${string}]`]: undefined; [key: `bytes13[${string}]`]: undefined; [key: `bytes14[${string}]`]: undefined; [key: `bytes17[${string}]`]: undefined; [key: `bytes19[${string}]`]: undefined; [key: `bytes20[${string}]`]: undefined; [key: `bytes21[${string}]`]: undefined; [key: `bytes23[${string}]`]: undefined; [key: `bytes24[${string}]`]: undefined; [key: `bytes25[${string}]`]: undefined; [key: `bytes29[${string}]`]: undefined; [key: `bytes30[${string}]`]: undefined; [key: `int[${string}]`]: undefined; [key: `int48[${string}]`]: undefined; [key: `int32[${string}]`]: undefined; [key: `int256[${string}]`]: undefined; [key: `int16[${string}]`]: undefined; [key: `int8[${string}]`]: undefined; [key: `int64[${string}]`]: undefined; [key: `int40[${string}]`]: undefined; [key: `int88[${string}]`]: undefined; [key: `int160[${string}]`]: undefined; [key: `int96[${string}]`]: undefined; [key: `int128[${string}]`]: undefined; [key: `int192[${string}]`]: undefined; [key: `int24[${string}]`]: undefined; [key: `int56[${string}]`]: undefined; [key: `int72[${string}]`]: undefined; [key: `int80[${string}]`]: undefined; [key: `int104[${string}]`]: undefined; [key: `int112[${string}]`]: undefined; [key: `int120[${string}]`]: undefined; [key: `int136[${string}]`]: undefined; [key: `int144[${string}]`]: undefined; [key: `int152[${string}]`]: undefined; [key: `int168[${string}]`]: undefined; [key: `int176[${string}]`]: undefined; [key: `int184[${string}]`]: undefined; [key: `int200[${string}]`]: undefined; [key: `int208[${string}]`]: undefined; [key: `int216[${string}]`]: undefined; [key: `int224[${string}]`]: undefined; [key: `int232[${string}]`]: undefined; [key: `int240[${string}]`]: undefined; [key: `int248[${string}]`]: undefined; [key: `uint[${string}]`]: undefined; [key: `uint48[${string}]`]: undefined; [key: `uint32[${string}]`]: undefined; [key: `uint256[${string}]`]: undefined; [key: `uint16[${string}]`]: undefined; [key: `uint8[${string}]`]: undefined; [key: `uint64[${string}]`]: undefined; [key: `uint40[${string}]`]: undefined; [key: `uint88[${string}]`]: undefined; [key: `uint160[${string}]`]: undefined; [key: `uint96[${string}]`]: undefined; [key: `uint128[${string}]`]: undefined; [key: `uint192[${string}]`]: undefined; [key: `uint24[${string}]`]: undefined; [key: `uint56[${string}]`]: undefined; [key: `uint72[${string}]`]: undefined; [key: `uint80[${string}]`]: undefined; [key: `uint104[${string}]`]: undefined; [key: `uint112[${string}]`]: undefined; [key: `uint120[${string}]`]: undefined; [key: `uint136[${string}]`]: undefined; [key: `uint144[${string}]`]: undefined; [key: `uint152[${string}]`]: undefined; [key: `uint168[${string}]`]: undefined; [key: `uint176[${string}]`]: undefined; [key: `uint184[${string}]`]: undefined; [key: `uint200[${string}]`]: undefined; [key: `uint208[${string}]`]: undefined; [key: `uint216[${string}]`]: undefined; [key: `uint224[${string}]`]: undefined; [key: `uint232[${string}]`]: undefined; [key: `uint240[${string}]`]: undefined; [key: `uint248[${string}]`]: undefined; address?: undefined; bool?: undefined; bytes?: undefined; bytes1?: undefined; bytes10?: undefined; bytes11?: undefined; bytes12?: undefined; bytes13?: undefined; bytes14?: undefined; bytes15?: undefined; bytes16?: undefined; bytes17?: undefined; bytes18?: undefined; bytes19?: undefined; bytes2?: undefined; bytes20?: undefined; bytes21?: undefined; bytes22?: undefined; bytes23?: undefined; bytes24?: undefined; bytes25?: undefined; bytes26?: undefined; bytes27?: undefined; bytes28?: undefined; bytes29?: undefined; bytes3?: undefined; bytes30?: undefined; bytes31?: undefined; bytes32?: undefined; bytes4?: undefined; bytes5?: undefined; bytes6?: undefined; bytes7?: undefined; bytes8?: undefined; bytes9?: undefined; int104?: undefined; int112?: undefined; int120?: undefined; int128?: undefined; int136?: undefined; int144?: undefined; int152?: undefined; int16?: undefined; int160?: undefined; int168?: undefined; int176?: undefined; int184?: undefined; int192?: undefined; int200?: undefined; int208?: undefined; int216?: undefined; int224?: undefined; int232?: undefined; int24?: undefined; int240?: undefined; int248?: undefined; int256?: undefined; int32?: undefined; int40?: undefined; int48?: undefined; int56?: undefined; int64?: undefined; int72?: undefined; int8?: undefined; int80?: undefined; int88?: undefined; int96?: undefined; string?: undefined; uint104?: undefined; uint112?: undefined; uint120?: undefined; uint128?: undefined; uint136?: undefined; uint144?: undefined; uint152?: undefined; uint16?: undefined; uint160?: undefined; uint168?: undefined; uint176?: undefined; uint184?: undefined; uint192?: undefined; uint200?: undefined; uint208?: undefined; uint216?: undefined; uint224?: undefined; uint232?: undefined; uint24?: undefined; uint240?: undefined; uint248?: undefined; uint256?: undefined; uint32?: undefined; uint40?: undefined; uint48?: undefined; uint56?: undefined; uint64?: undefined; uint72?: undefined; uint8?: undefined; uint80?: undefined; uint88?: undefined; uint96?: undefined; } | { [key: string]: unknown; } |
primaryType extends string |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SignTypedDataParameters<typedData, primaryType, Account> | SignTypedDataParameters |
Returns
Promise<`0x${string}`>
The signed data. SignTypedDataReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const signature = await client.signTypedData({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
domain: {
name: 'Ether Mail',
version: '1',
chainId: 1,
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
},
types: {
Person: [
{ name: 'name', type: 'string' },
{ name: 'wallet', type: 'address' },
],
Mail: [
{ name: 'from', type: 'Person' },
{ name: 'to', type: 'Person' },
{ name: 'contents', type: 'string' },
],
},
primaryType: 'Mail',
message: {
from: {
name: 'Cow',
wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
},
to: {
name: 'Bob',
wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
},
contents: 'Hello, Bob!',
},
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const signature = await client.signTypedData({
domain: {
name: 'Ether Mail',
version: '1',
chainId: 1,
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
},
types: {
Person: [
{ name: 'name', type: 'string' },
{ name: 'wallet', type: 'address' },
],
Mail: [
{ name: 'from', type: 'Person' },
{ name: 'to', type: 'Person' },
{ name: 'contents', type: 'string' },
],
},
primaryType: 'Mail',
message: {
from: {
name: 'Cow',
wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
},
to: {
name: 'Bob',
wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
},
contents: 'Hello, Bob!',
},
})switchChain()
switchChain: (args) => Promise<void>;Switch the target chain in a wallet.
- Docs: https://viem.sh/docs/actions/wallet/switchChain
- JSON-RPC Methods:
eth_switchEthereumChain
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SwitchChainParameters | SwitchChainParameters |
Returns
Promise<void>
Example
import { createWalletClient, custom } from 'viem'
import { mainnet, optimism } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
await client.switchChain({ id: optimism.id })transport
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;The RPC transport
type
type: string;The type of client.
uid
uid: string;A unique ID for the client.
waitForCallsStatus()
waitForCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;Waits for the status & receipts of a call bundle that was sent via sendCalls.
- Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus
- JSON-RPC Methods:
wallet_getCallsStatus
Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | WaitForCallsStatusParameters | WaitForCallsStatusParameters |
Returns
Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>
Status & receipts of the call bundle. WaitForCallsStatusReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })watchAsset()
watchAsset: (args) => Promise<boolean>;Adds an EVM chain to the wallet.
- Docs: https://viem.sh/docs/actions/wallet/watchAsset
- JSON-RPC Methods:
eth_switchEthereumChain
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchAssetParams | WatchAssetParameters |
Returns
Promise<boolean>
Boolean indicating if the token was successfully added. WatchAssetReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const success = await client.watchAsset({
type: 'ERC20',
options: {
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
decimals: 18,
symbol: 'WETH',
},
})writeContract()
writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>;Executes a write function on a contract.
- Docs: https://viem.sh/docs/contract/writeContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts
A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state.
Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data.
Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
functionName extends string | - |
args extends unknown | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WriteContractParameters<abi, functionName, args, Chain, Account, chainOverride> | WriteContractParameters |
Returns
Promise<`0x${string}`>
A Transaction Hash. WriteContractReturnType
Examples
import { createWalletClient, custom, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.writeContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
functionName: 'mint',
args: [69420],
})// With Validation
import { createWalletClient, custom, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const { request } = await client.simulateContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
functionName: 'mint',
args: [69420],
}
const hash = await client.writeContract(request)writeContractSync()
writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>;Executes a write function on a contract synchronously. Returns the transaction receipt.
A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state.
Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data.
Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
functionName extends string | - |
args extends unknown | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WriteContractSyncParameters<abi, functionName, args, Chain, Account, chainOverride> | WriteContractSyncParameters |
Returns
Promise<TransactionReceipt>
A Transaction Receipt. WriteContractSyncReturnType
Example
import { createWalletClient, custom, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.writeContractSync({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
functionName: 'mint',
args: [69420],
})entryPointAddress?
protected optional entryPointAddress: `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:11
gTokenAddress?
protected optional gTokenAddress: `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:8
gTokenStakingAddress?
protected optional gTokenStakingAddress: `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:9
paymasterFactoryAddress?
protected optional paymasterFactoryAddress: `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:10
publicClient?
protected optional publicClient: object;Defined in: packages/core/src/clients/BaseClient.ts:6
account
account: undefined;The Account of the Client.
batch?
optional batch: object;Flags for batch settings.
batch.multicall?
optional multicall:
| boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};Toggle to enable eth_call multicall aggregation.
Type Declaration
boolean
{
batchSize?: number;
deployless?: boolean;
wait?: number;
}cacheTime
cacheTime: number;Time (in ms) that cached data will remain in memory.
call()
call: (parameters) => Promise<CallReturnType>;Executes a new message call immediately without submitting a transaction to the network.
- Docs: https://viem.sh/docs/actions/public/call
- JSON-RPC Methods:
eth_call
Parameters
| Parameter | Type |
|---|---|
parameters | CallParameters<Chain | undefined> |
Returns
Promise<CallReturnType>
The call data. CallReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const data = await client.call({
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
})ccipRead?
optional ccipRead:
| false
| {
request?: (parameters) => Promise<`0x${string}`>;
};CCIP Read configuration.
Type Declaration
false
{
request?: (parameters) => Promise<`0x${string}`>;
}chain
chain: Chain | undefined;Chain for the client.
createAccessList()
createAccessList: (parameters) => Promise<{
accessList: AccessList;
gasUsed: bigint;
}>;Creates an EIP-2930 access list that you can include in a transaction.
- Docs: https://viem.sh/docs/actions/public/createAccessList
- JSON-RPC Methods:
eth_createAccessList
Parameters
| Parameter | Type |
|---|---|
parameters | CreateAccessListParameters<Chain | undefined> |
Returns
Promise<{ accessList: AccessList; gasUsed: bigint; }>
The call data. CreateAccessListReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const data = await client.createAccessList({
data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
})createBlockFilter()
createBlockFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "block";
}>;Creates a Filter to listen for new block hashes that can be used with getFilterChanges.
- Docs: https://viem.sh/docs/actions/public/createBlockFilter
- JSON-RPC Methods:
eth_newBlockFilter
Returns
Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${(...)}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>
Filter. CreateBlockFilterReturnType
Example
import { createPublicClient, createBlockFilter, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await createBlockFilter(client)
// { id: "0x345a6572337856574a76364e457a4366", type: 'block' }createContractEventFilter()
createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>;Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
eventName extends string | undefined | - |
args extends readonly unknown[] | Record<string, unknown> | undefined | - |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | CreateContractEventFilterParameters<abi, eventName, args, strict, fromBlock, toBlock> | CreateContractEventFilterParameters |
Returns
Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>
Filter. CreateContractEventFilterReturnType
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createContractEventFilter({
abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
})createEventFilter()
createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>;Creates a Filter to listen for new events that can be used with getFilterChanges.
- Docs: https://viem.sh/docs/actions/public/createEventFilter
- JSON-RPC Methods:
eth_newFilter
Type Parameters
| Type Parameter | Default type |
|---|---|
abiEvent extends AbiEvent | undefined | undefined |
abiEvents extends readonly unknown[] | readonly AbiEvent[] | undefined | abiEvent extends AbiEvent ? [abiEvent<abiEvent>] : undefined |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
_EventName extends string | undefined | MaybeAbiEventName<abiEvent> |
_Args extends readonly unknown[] | Record<string, unknown> | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | CreateEventFilterParameters<abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args> | CreateEventFilterParameters |
Returns
Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>
Filter. CreateEventFilterReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2',
})createPendingTransactionFilter()
createPendingTransactionFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "transaction";
}>;Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges.
- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter
- JSON-RPC Methods:
eth_newPendingTransactionFilter
Returns
Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${(...)}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>
Filter. CreateBlockFilterReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createPendingTransactionFilter()
// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }estimateContractGas()
estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>;Estimates the gas required to successfully execute a contract write function call.
Type Parameters
| Type Parameter |
|---|
chain extends Chain | undefined |
abi extends readonly unknown[] | Abi |
functionName extends string |
args extends unknown |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | EstimateContractGasParameters<abi, functionName, args, chain> | EstimateContractGasParameters |
Returns
Promise<bigint>
The gas estimate (in wei). EstimateContractGasReturnType
Remarks
Internally, uses a Public Client to call the estimateGas action with ABI-encoded data.
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gas = await client.estimateContractGas({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint() public']),
functionName: 'mint',
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
})estimateFeesPerGas()
estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>;Returns an estimate for the fees per gas for a transaction to be included in the next block.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
type extends FeeValuesType | "eip1559" |
Parameters
| Parameter | Type |
|---|---|
args? | EstimateFeesPerGasParameters<Chain | undefined, chainOverride, type> |
Returns
Promise<EstimateFeesPerGasReturnType<type>>
An estimate (in wei) for the fees per gas. EstimateFeesPerGasReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const maxPriorityFeePerGas = await client.estimateFeesPerGas()
// { maxFeePerGas: ..., maxPriorityFeePerGas: ... }estimateGas()
estimateGas: (args) => Promise<bigint>;Estimates the gas necessary to complete a transaction without submitting it to the network.
- Docs: https://viem.sh/docs/actions/public/estimateGas
- JSON-RPC Methods:
eth_estimateGas
Parameters
| Parameter | Type | Description |
|---|---|---|
args | EstimateGasParameters<Chain | undefined> | EstimateGasParameters |
Returns
Promise<bigint>
The gas estimate (in wei). EstimateGasReturnType
Example
import { createPublicClient, http, parseEther } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gasEstimate = await client.estimateGas({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
})estimateMaxPriorityFeePerGas()
estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>;Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args? | { chain: chainOverride | null; } |
args.chain? | chainOverride | null |
Returns
Promise<bigint>
An estimate (in wei) for the max priority fee per gas. EstimateMaxPriorityFeePerGasReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas()
// 10000000nexperimental_blockTag?
optional experimental_blockTag: BlockTag;Default block tag to use for RPC requests.
extend()
extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>;Type Parameters
| Type Parameter |
|---|
client extends object & ExactPartial<ExtendableProtectedActions<Transport, Chain | undefined, undefined>> |
Parameters
| Parameter | Type |
|---|---|
fn | (client) => client |
Returns
Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>
fillTransaction()
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>;Fills a transaction request with the necessary fields to be signed over.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args | FillTransactionParameters<Chain | undefined, Account | undefined, chainOverride, accountOverride> |
Returns
Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>
The filled transaction. FillTransactionReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.fillTransaction({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
})getBalance()
getBalance: (args) => Promise<bigint>;Returns the balance of an address in wei.
- Docs: https://viem.sh/docs/actions/public/getBalance
- JSON-RPC Methods:
eth_getBalance
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetBalanceParameters | GetBalanceParameters |
Returns
Promise<bigint>
The balance of the address in wei. GetBalanceReturnType
Remarks
You can convert the balance to ether units with formatEther.
const balance = await getBalance(client, {
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
blockTag: 'safe'
})
const balanceAsEther = formatEther(balance)
// "6.942"Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const balance = await client.getBalance({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})
// 10000000000000000000000n (wei)getBlobBaseFee()
getBlobBaseFee: () => Promise<bigint>;Returns the base fee per blob gas in wei.
- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee
- JSON-RPC Methods:
eth_blobBaseFee
Returns
Promise<bigint>
The blob base fee (in wei). GetBlobBaseFeeReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { getBlobBaseFee } from 'viem/public'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const blobBaseFee = await client.getBlobBaseFee()getBlock()
getBlock: <includeTransactions, blockTag>(args?) => Promise<{
baseFeePerGas: bigint | null;
blobGasUsed: bigint;
difficulty: bigint;
excessBlobGas: bigint;
extraData: `0x${string}`;
gasLimit: bigint;
gasUsed: bigint;
hash: blockTag extends "pending" ? null : `0x${string}`;
logsBloom: blockTag extends "pending" ? null : `0x${string}`;
miner: `0x${string}`;
mixHash: `0x${string}`;
nonce: blockTag extends "pending" ? null : `0x${string}`;
number: blockTag extends "pending" ? null : bigint;
parentBeaconBlockRoot?: `0x${string}`;
parentHash: `0x${string}`;
receiptsRoot: `0x${string}`;
sealFields: `0x${string}`[];
sha3Uncles: `0x${string}`;
size: bigint;
stateRoot: `0x${string}`;
timestamp: bigint;
totalDifficulty: bigint | null;
transactions: includeTransactions extends true ? (
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "legacy";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip2930";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip1559";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${(...)}`[];
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip4844";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip7702";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
})[] : `0x${string}`[];
transactionsRoot: `0x${string}`;
uncles: `0x${string}`[];
withdrawals?: Withdrawal[];
withdrawalsRoot?: `0x${string}`;
}>;Returns information about a block at a block number, hash, or tag.
- Docs: https://viem.sh/docs/actions/public/getBlock
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks
- JSON-RPC Methods:
- Calls
eth_getBlockByNumberforblockNumber&blockTag. - Calls
eth_getBlockByHashforblockHash.
- Calls
Type Parameters
| Type Parameter | Default type |
|---|---|
includeTransactions extends boolean | false |
blockTag extends BlockTag | "latest" |
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetBlockParameters<includeTransactions, blockTag> | GetBlockParameters |
Returns
Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "legacy"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip2930"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip1559"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${(...)}`[]; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip4844"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip7702"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>
Information about the block. GetBlockReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const block = await client.getBlock()getBlockNumber()
getBlockNumber: (args?) => Promise<bigint>;Returns the number of the most recent block seen.
- Docs: https://viem.sh/docs/actions/public/getBlockNumber
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks
- JSON-RPC Methods:
eth_blockNumber
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetBlockNumberParameters | GetBlockNumberParameters |
Returns
Promise<bigint>
The number of the block. GetBlockNumberReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const blockNumber = await client.getBlockNumber()
// 69420ngetBlockTransactionCount()
getBlockTransactionCount: (args?) => Promise<number>;Returns the number of Transactions at a block number, hash, or tag.
- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount
- JSON-RPC Methods:
- Calls
eth_getBlockTransactionCountByNumberforblockNumber&blockTag. - Calls
eth_getBlockTransactionCountByHashforblockHash.
- Calls
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetBlockTransactionCountParameters | GetBlockTransactionCountParameters |
Returns
Promise<number>
The block transaction count. GetBlockTransactionCountReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const count = await client.getBlockTransactionCount()getBytecode()
getBytecode: (args) => Promise<GetCodeReturnType>;Parameters
| Parameter | Type |
|---|---|
args | GetCodeParameters |
Returns
Promise<GetCodeReturnType>
Deprecated
Use getCode instead.
getChainId()
getChainId: () => Promise<number>;Returns the chain ID associated with the current network.
- Docs: https://viem.sh/docs/actions/public/getChainId
- JSON-RPC Methods:
eth_chainId
Returns
Promise<number>
The current chain ID. GetChainIdReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const chainId = await client.getChainId()
// 1getCode()
getCode: (args) => Promise<GetCodeReturnType>;Retrieves the bytecode at an address.
- Docs: https://viem.sh/docs/contract/getCode
- JSON-RPC Methods:
eth_getCode
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetCodeParameters | GetBytecodeParameters |
Returns
Promise<GetCodeReturnType>
The contract's bytecode. GetBytecodeReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const code = await client.getCode({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
})getContractEvents()
getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>;Returns a list of event logs emitted by a contract.
- Docs: https://viem.sh/docs/actions/public/getContractEvents
- JSON-RPC Methods:
eth_getLogs
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
eventName extends string | undefined | undefined |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args | GetContractEventsParameters<abi, eventName, strict, fromBlock, toBlock> |
Returns
Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>
A list of event logs. GetContractEventsReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { wagmiAbi } from './abi'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const logs = await client.getContractEvents(client, {
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: wagmiAbi,
eventName: 'Transfer'
})getEip712Domain()
getEip712Domain: (args) => Promise<GetEip712DomainReturnType>;Reads the EIP-712 domain from a contract, based on the ERC-5267 specification.
Parameters
| Parameter | Type |
|---|---|
args | GetEip712DomainParameters |
Returns
Promise<GetEip712DomainReturnType>
The EIP-712 domain, fields, and extensions. GetEip712DomainReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const domain = await client.getEip712Domain({
address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
})
// {
// domain: {
// name: 'ExampleContract',
// version: '1',
// chainId: 1,
// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
// },
// fields: '0x0f',
// extensions: [],
// }getEnsAddress()
getEnsAddress: (args) => Promise<GetEnsAddressReturnType>;Gets address for ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsAddress
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { blockNumber?: bigint; blockTag?: BlockTag; coinType?: bigint; gatewayUrls?: string[]; name: string; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsAddressParameters |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.coinType? | bigint | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the coinType for a chain id, use the toCoinType function: import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id) Default 60n |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.name | string | Name to get the address for. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsAddressReturnType>
Address for ENS name or null if not found. GetEnsAddressReturnType
Remarks
Calls resolve(bytes, bytes) on ENS Universal Resolver Contract.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensAddress = await client.getEnsAddress({
name: normalize('wevm.eth'),
})
// '0xd2135CfB216b74109775236E36d4b433F1DF507B'getEnsAvatar()
getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>;Gets the avatar of an ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { assetGatewayUrls?: AssetGatewayUrls; blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: string[]; name: string; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsAvatarParameters |
args.assetGatewayUrls? | AssetGatewayUrls | Gateway urls to resolve IPFS and/or Arweave assets. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.name | string | ENS name to get Text for. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsAvatarReturnType>
Avatar URI or null if not found. GetEnsAvatarReturnType
Remarks
Calls getEnsText with key set to 'avatar'.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensAvatar = await client.getEnsAvatar({
name: normalize('wevm.eth'),
})
// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'getEnsName()
getEnsName: (args) => Promise<GetEnsNameReturnType>;Gets primary name for specified address.
- Docs: https://viem.sh/docs/ens/actions/getEnsName
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { address: `0x${string}`; blockNumber?: bigint; blockTag?: BlockTag; coinType?: bigint; gatewayUrls?: string[]; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsNameParameters |
args.address | `0x${string}` | Address to get ENS name for. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.coinType? | bigint | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the coinType for a chain id, use the toCoinType function: import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id) Default 60n |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsNameReturnType>
Name or null if not found. GetEnsNameReturnType
Remarks
Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensName = await client.getEnsName({
address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
})
// 'wevm.eth'getEnsResolver()
getEnsResolver: (args) => Promise<`0x${string}`>;Gets resolver for ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsResolver
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { blockNumber?: bigint; blockTag?: BlockTag; name: string; universalResolverAddress?: `0x${string}`; } | GetEnsResolverParameters |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.name | string | Name to get the address for. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<`0x${string}`>
Address for ENS resolver. GetEnsResolverReturnType
Remarks
Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const resolverAddress = await client.getEnsResolver({
name: normalize('wevm.eth'),
})
// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'getEnsText()
getEnsText: (args) => Promise<GetEnsTextReturnType>;Gets a text record for specified ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsResolver
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: string[]; key: string; name: string; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsTextParameters |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.key | string | Text record to retrieve. |
args.name | string | ENS name to get Text for. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsTextReturnType>
Address for ENS resolver. GetEnsTextReturnType
Remarks
Calls resolve(bytes, bytes) on ENS Universal Resolver Contract.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const twitterRecord = await client.getEnsText({
name: normalize('wevm.eth'),
key: 'com.twitter',
})
// 'wevm_dev'getFeeHistory()
getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>;Returns a collection of historical gas information.
- Docs: https://viem.sh/docs/actions/public/getFeeHistory
- JSON-RPC Methods:
eth_feeHistory
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetFeeHistoryParameters | GetFeeHistoryParameters |
Returns
Promise<GetFeeHistoryReturnType>
The gas estimate (in wei). GetFeeHistoryReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const feeHistory = await client.getFeeHistory({
blockCount: 4,
rewardPercentiles: [25, 75],
})getFilterChanges()
getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>;Returns a list of logs or hashes based on a Filter since the last time it was called.
- Docs: https://viem.sh/docs/actions/public/getFilterChanges
- JSON-RPC Methods:
eth_getFilterChanges
Type Parameters
| Type Parameter | Default type |
|---|---|
filterType extends FilterType | - |
abi extends readonly unknown[] | Abi | undefined | - |
eventName extends string | undefined | - |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetFilterChangesParameters<filterType, abi, eventName, strict, fromBlock, toBlock> | GetFilterChangesParameters |
Returns
Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>
Logs or hashes. GetFilterChangesReturnType
Remarks
A Filter can be created from the following actions:
Depending on the type of filter, the return value will be different:
- If the filter was created with
createContractEventFilterorcreateEventFilter, it returns a list of logs. - If the filter was created with
createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with
createBlockFilter, it returns a list of block hashes.
Examples
// Blocks
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createBlockFilter()
const hashes = await client.getFilterChanges({ filter })// Contract Events
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createContractEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
eventName: 'Transfer',
})
const logs = await client.getFilterChanges({ filter })// Raw Events
import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
})
const logs = await client.getFilterChanges({ filter })// Transactions
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createPendingTransactionFilter()
const hashes = await client.getFilterChanges({ filter })getFilterLogs()
getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>;Returns a list of event logs since the filter was created.
- Docs: https://viem.sh/docs/actions/public/getFilterLogs
- JSON-RPC Methods:
eth_getFilterLogs
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | undefined | - |
eventName extends string | undefined | - |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetFilterLogsParameters<abi, eventName, strict, fromBlock, toBlock> | GetFilterLogsParameters |
Returns
Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>
A list of event logs. GetFilterLogsReturnType
Remarks
getFilterLogs is only compatible with event filters.
Example
import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
})
const logs = await client.getFilterLogs({ filter })getGasPrice()
getGasPrice: () => Promise<bigint>;Returns the current price of gas (in wei).
- Docs: https://viem.sh/docs/actions/public/getGasPrice
- JSON-RPC Methods:
eth_gasPrice
Returns
Promise<bigint>
The gas price (in wei). GetGasPriceReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gasPrice = await client.getGasPrice()getLogs()
getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>;Returns a list of event logs matching the provided parameters.
- Docs: https://viem.sh/docs/actions/public/getLogs
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs
- JSON-RPC Methods:
eth_getLogs
Type Parameters
| Type Parameter | Default type |
|---|---|
abiEvent extends AbiEvent | undefined | undefined |
abiEvents extends readonly unknown[] | readonly AbiEvent[] | undefined | abiEvent extends AbiEvent ? [abiEvent<abiEvent>] : undefined |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetLogsParameters<abiEvent, abiEvents, strict, fromBlock, toBlock> | GetLogsParameters |
Returns
Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>
A list of event logs. GetLogsReturnType
Example
import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const logs = await client.getLogs()getProof()
getProof: (args) => Promise<GetProofReturnType>;Returns the account and storage values of the specified account including the Merkle-proof.
- Docs: https://viem.sh/docs/actions/public/getProof
- JSON-RPC Methods:
- Calls
eth_getProof
- Calls
Parameters
| Parameter | Type |
|---|---|
args | GetProofParameters |
Returns
Promise<GetProofReturnType>
Proof data. GetProofReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const block = await client.getProof({
address: '0x...',
storageKeys: ['0x...'],
})getStorageAt()
getStorageAt: (args) => Promise<GetStorageAtReturnType>;Returns the value from a storage slot at a given address.
- Docs: https://viem.sh/docs/contract/getStorageAt
- JSON-RPC Methods:
eth_getStorageAt
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetStorageAtParameters | GetStorageAtParameters |
Returns
Promise<GetStorageAtReturnType>
The value of the storage slot. GetStorageAtReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { getStorageAt } from 'viem/contract'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const code = await client.getStorageAt({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
slot: toHex(0),
})getTransaction()
getTransaction: <blockTag>(args) => Promise<
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "legacy";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip2930";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip1559";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${string}`[];
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip4844";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip7702";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}>;Returns information about a Transaction given a hash or block identifier.
- Docs: https://viem.sh/docs/actions/public/getTransaction
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions
- JSON-RPC Methods:
eth_getTransactionByHash
Type Parameters
| Type Parameter | Default type |
|---|---|
blockTag extends BlockTag | "latest" |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionParameters<blockTag> | GetTransactionParameters |
Returns
Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>
The transaction information. GetTransactionReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transaction = await client.getTransaction({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})getTransactionConfirmations()
getTransactionConfirmations: (args) => Promise<bigint>;Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions
- JSON-RPC Methods:
eth_getTransactionConfirmations
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionConfirmationsParameters<Chain | undefined> | GetTransactionConfirmationsParameters |
Returns
Promise<bigint>
The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. GetTransactionConfirmationsReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const confirmations = await client.getTransactionConfirmations({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})getTransactionCount()
getTransactionCount: (args) => Promise<number>;Returns the number of Transactions an Account has broadcast / sent.
- Docs: https://viem.sh/docs/actions/public/getTransactionCount
- JSON-RPC Methods:
eth_getTransactionCount
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionCountParameters | GetTransactionCountParameters |
Returns
Promise<number>
The number of transactions an account has sent. GetTransactionCountReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionCount = await client.getTransactionCount({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})getTransactionReceipt()
getTransactionReceipt: (args) => Promise<TransactionReceipt>;Returns the Transaction Receipt given a Transaction hash.
- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions
- JSON-RPC Methods:
eth_getTransactionReceipt
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionReceiptParameters | GetTransactionReceiptParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. GetTransactionReceiptReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionReceipt = await client.getTransactionReceipt({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})key
key: string;A key for the client.
multicall()
multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>;Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract.
Type Parameters
| Type Parameter | Default type |
|---|---|
contracts extends readonly unknown[] | - |
allowFailure extends boolean | true |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | MulticallParameters<contracts, allowFailure> | MulticallParameters |
Returns
Promise<MulticallReturnType<contracts, allowFailure>>
An array of results with accompanying status. MulticallReturnType
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const abi = parseAbi([
'function balanceOf(address) view returns (uint256)',
'function totalSupply() view returns (uint256)',
])
const result = await client.multicall({
contracts: [
{
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi,
functionName: 'balanceOf',
args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
},
{
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi,
functionName: 'totalSupply',
},
],
})
// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]name
name: string;A name for the client.
pollingInterval
pollingInterval: number;Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds.
prepareTransactionRequest()
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;Prepares a transaction request for signing.
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${(...)}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${(...)}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object & object | - |
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | PrepareTransactionRequestParameters<Chain | undefined, Account | undefined, chainOverride, accountOverride, request> | PrepareTransactionRequestParameters |
Returns
Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>
The transaction request. PrepareTransactionRequestReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})readContract()
readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>;Calls a read-only function on a contract, and returns the response.
- Docs: https://viem.sh/docs/contract/readContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts
Type Parameters
| Type Parameter |
|---|
abi extends readonly unknown[] | Abi |
functionName extends string |
args extends unknown |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | ReadContractParameters<abi, functionName, args> | ReadContractParameters |
Returns
Promise<ReadContractReturnType<abi, functionName, args>>
The response from the contract. Type is inferred. ReadContractReturnType
Remarks
A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.
Internally, uses a Public Client to call the call action with ABI-encoded data.
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
import { readContract } from 'viem/contract'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.readContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function balanceOf(address) view returns (uint256)']),
functionName: 'balanceOf',
args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
})
// 424122nrequest
request: EIP1193RequestFn<PublicRpcSchema>;Request function wrapped with friendly error handling
sendRawTransaction()
sendRawTransaction: (args) => Promise<`0x${string}`>;Sends a signed transaction to the network
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction
- JSON-RPC Method:
eth_sendRawTransaction
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionParameters |
Returns
Promise<`0x${string}`>
The transaction hash. SendRawTransactionReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransaction } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.sendRawTransaction({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})sendRawTransactionSync()
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;Sends a signed transaction to the network
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync
- JSON-RPC Method:
eth_sendRawTransactionSync
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionSyncParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. SendRawTransactionSyncReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransactionSync } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.sendRawTransactionSync({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})simulate()
simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;Type Parameters
| Type Parameter |
|---|
calls extends readonly unknown[] |
Parameters
| Parameter | Type |
|---|---|
args | SimulateBlocksParameters<calls> |
Returns
Promise<SimulateBlocksReturnType<calls>>
Deprecated
Use simulateBlocks instead.
simulateBlocks()
simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;Simulates a set of calls on block(s) with optional block and state overrides.
Type Parameters
| Type Parameter |
|---|
calls extends readonly unknown[] |
Parameters
| Parameter | Type |
|---|---|
args | SimulateBlocksParameters<calls> |
Returns
Promise<SimulateBlocksReturnType<calls>>
Simulated blocks. SimulateReturnType
Example
import { createPublicClient, http, parseEther } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.simulateBlocks({
blocks: [{
blockOverrides: {
number: 69420n,
},
calls: [{
{
account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
},
}],
stateOverrides: [{
address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
balance: parseEther('10'),
}],
}]
})simulateCalls()
simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>;Simulates a set of calls.
Type Parameters
| Type Parameter |
|---|
calls extends readonly unknown[] |
Parameters
| Parameter | Type |
|---|---|
args | SimulateCallsParameters<calls> |
Returns
Promise<SimulateCallsReturnType<calls>>
Results. SimulateCallsReturnType
Example
import { createPublicClient, http, parseEther } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.simulateCalls({
account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
calls: [{
{
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
},
]
})simulateContract()
simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>;Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions.
- Docs: https://viem.sh/docs/contract/simulateContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
functionName extends string | - |
args extends unknown | - |
chainOverride extends Chain | undefined | - |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SimulateContractParameters<abi, functionName, args, Chain | undefined, chainOverride, accountOverride> | SimulateContractParameters |
Returns
Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>
The simulation result and write request. SimulateContractReturnType
Remarks
This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions.
Internally, uses a Public Client to call the call action with ABI-encoded data.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.simulateContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32) view returns (uint32)']),
functionName: 'mint',
args: ['69420'],
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})transport
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;The RPC transport
type
type: string;The type of client.
uid
uid: string;A unique ID for the client.
uninstallFilter()
uninstallFilter: (args) => Promise<boolean>;Destroys a Filter that was created from one of the following Actions:
JSON-RPC Methods:
eth_uninstallFilter
Parameters
| Parameter | Type | Description |
|---|---|---|
args | UninstallFilterParameters | UninstallFilterParameters |
Returns
Promise<boolean>
A boolean indicating if the Filter was successfully uninstalled. UninstallFilterReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { createPendingTransactionFilter, uninstallFilter } from 'viem/public'
const filter = await client.createPendingTransactionFilter()
const uninstalled = await client.uninstallFilter({ filter })
// trueverifyHash()
verifyHash: (args) => Promise<boolean>;Verify that a hash was signed by the provided address.
Parameters
| Parameter | Type |
|---|---|
args | VerifyHashParameters |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifyHashReturnType
verifyMessage()
verifyMessage: (args) => Promise<boolean>;Verify that a message was signed by the provided address.
Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { address: `0x${string}`; blockNumber?: bigint; blockTag?: BlockTag; chain?: Chain | null; erc6492VerifierAddress?: `0x${string}`; factory?: `0x${string}`; factoryData?: `0x${string}`; message: SignableMessage; multicallAddress?: `0x${string}`; signature: `0x${string}` | Signature | ByteArray; universalSignatureVerifierAddress?: `0x${string}`; } | - |
args.address | `0x${string}` | The address that signed the original message. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.chain? | Chain | null | The chain to use. |
args.erc6492VerifierAddress? | `0x${string}` | The address of the ERC-6492 signature verifier contract. |
args.factory? | `0x${string}` | - |
args.factoryData? | `0x${string}` | - |
args.message | SignableMessage | The message to be verified. |
args.multicallAddress? | `0x${string}` | Multicall3 address for ERC-8010 verification. |
args.signature | `0x${string}` | Signature | ByteArray | The signature that was generated by signing the message with the address's private key. |
args.universalSignatureVerifierAddress? | `0x${string}` | Deprecated use erc6492VerifierAddress instead. |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifyMessageReturnType
verifySiweMessage()
verifySiweMessage: (args) => Promise<boolean>;Verifies EIP-4361 formatted message was signed.
Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { address?: `0x${string}`; blockNumber?: bigint; blockTag?: BlockTag; domain?: string; message: string; nonce?: string; scheme?: string; signature: `0x${string}`; time?: Date; } | - |
args.address? | `0x${string}` | Ethereum address to check against. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.domain? | string | RFC 3986 authority to check against. |
args.message | string | EIP-4361 formatted message. |
args.nonce? | string | Random string to check against. |
args.scheme? | string | RFC 3986 URI scheme to check against. |
args.signature | `0x${string}` | Signature to check against. |
args.time? | Date | Current time to check optional expirationTime and notBefore fields. Default new Date() |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifySiweMessageReturnType
verifyTypedData()
verifyTypedData: (args) => Promise<boolean>;Verify that typed data was signed by the provided address.
Parameters
| Parameter | Type |
|---|---|
args | VerifyTypedDataParameters |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifyTypedDataReturnType
waitForTransactionReceipt()
waitForTransactionReceipt: (args) => Promise<TransactionReceipt>;Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error.
- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions
- JSON-RPC Methods:
- Polls
eth_getTransactionReceipton each block until it has been processed. - If a Transaction has been replaced:
- Calls
eth_getBlockByNumberand extracts the transactions - Checks if one of the Transactions is a replacement
- If so, calls
eth_getTransactionReceipt.
- Calls
- Polls
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WaitForTransactionReceiptParameters<Chain | undefined> | WaitForTransactionReceiptParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. WaitForTransactionReceiptReturnType
Remarks
The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions).
Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce.
There are 3 types of Transaction Replacement reasons:
repriced: The gas price has been modified (e.g. differentmaxFeePerGas)cancelled: The Transaction has been cancelled (e.g.value === 0n)replaced: The Transaction has been replaced (e.g. differentvalueordata)
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionReceipt = await client.waitForTransactionReceipt({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})watchBlockNumber()
watchBlockNumber: (args) => WatchBlockNumberReturnType;Watches and returns incoming block numbers.
- Docs: https://viem.sh/docs/actions/public/watchBlockNumber
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks
- JSON-RPC Methods:
- When
poll: true, callseth_blockNumberon a polling interval. - When
poll: false& WebSocket Transport, uses a WebSocket subscription viaeth_subscribeand the"newHeads"event.
- When
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchBlockNumberParameters | WatchBlockNumberParameters |
Returns
WatchBlockNumberReturnType
A function that can be invoked to stop watching for new block numbers. WatchBlockNumberReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchBlockNumber({
onBlockNumber: (blockNumber) => console.log(blockNumber),
})watchBlocks()
watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType;Watches and returns information for incoming blocks.
- Docs: https://viem.sh/docs/actions/public/watchBlocks
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks
- JSON-RPC Methods:
- When
poll: true, callseth_getBlockByNumberon a polling interval. - When
poll: false& WebSocket Transport, uses a WebSocket subscription viaeth_subscribeand the"newHeads"event.
- When
Type Parameters
| Type Parameter | Default type |
|---|---|
includeTransactions extends boolean | false |
blockTag extends BlockTag | "latest" |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchBlocksParameters<Transport, Chain | undefined, includeTransactions, blockTag> | WatchBlocksParameters |
Returns
WatchBlocksReturnType
A function that can be invoked to stop watching for new block numbers. WatchBlocksReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchBlocks({
onBlock: (block) => console.log(block),
})watchContractEvent()
watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType;Watches and returns emitted contract event logs.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
eventName extends string | - |
strict extends boolean | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchContractEventParameters<abi, eventName, strict, Transport> | WatchContractEventParameters |
Returns
WatchContractEventReturnType
A function that can be invoked to stop watching for new event logs. WatchContractEventReturnType
Remarks
This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs.
watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead.
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = client.watchContractEvent({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']),
eventName: 'Transfer',
args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },
onLogs: (logs) => console.log(logs),
})watchEvent()
watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType;Watches and returns emitted Event Logs.
- Docs: https://viem.sh/docs/actions/public/watchEvent
- JSON-RPC Methods:
- RPC Provider supports
eth_newFilter:- Calls
eth_newFilterto create a filter (called on initialize). - On a polling interval, it will call
eth_getFilterChanges.
- Calls
- RPC Provider does not support
eth_newFilter:- Calls
eth_getLogsfor each block between the polling interval.
- Calls
- RPC Provider supports
Type Parameters
| Type Parameter | Default type |
|---|---|
abiEvent extends AbiEvent | undefined | undefined |
abiEvents extends readonly unknown[] | readonly AbiEvent[] | undefined | abiEvent extends AbiEvent ? [abiEvent<abiEvent>] : undefined |
strict extends boolean | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchEventParameters<abiEvent, abiEvents, strict, Transport> | WatchEventParameters |
Returns
WatchEventReturnType
A function that can be invoked to stop watching for new Event Logs. WatchEventReturnType
Remarks
This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs.
watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = client.watchEvent({
onLogs: (logs) => console.log(logs),
})watchPendingTransactions()
watchPendingTransactions: (args) => WatchPendingTransactionsReturnType;Watches and returns pending transaction hashes.
- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions
- JSON-RPC Methods:
- When
poll: true- Calls
eth_newPendingTransactionFilterto initialize the filter. - Calls
eth_getFilterChangeson a polling interval.
- Calls
- When
poll: false& WebSocket Transport, uses a WebSocket subscription viaeth_subscribeand the"newPendingTransactions"event.
- When
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchPendingTransactionsParameters<Transport> | WatchPendingTransactionsParameters |
Returns
WatchPendingTransactionsReturnType
A function that can be invoked to stop watching for new pending transaction hashes. WatchPendingTransactionsReturnType
Remarks
This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchPendingTransactions({
onTransactions: (hashes) => console.log(hashes),
})registryAddress?
protected optional registryAddress: `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:7
Methods
getAddress()
getAddress(): `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:33
Get the account address of the connected wallet
Returns
`0x${string}`
getStartPublicClient()
protected getStartPublicClient():
| {
account: undefined;
batch?: {
multicall?: | boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};
};
cacheTime: number;
call: (parameters) => Promise<CallReturnType>;
ccipRead?: | false
| {
request?: (parameters) => Promise<`0x${string}`>;
};
chain: Chain | undefined;
createAccessList: (parameters) => Promise<{
accessList: AccessList;
gasUsed: bigint;
}>;
createBlockFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "block";
}>;
createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>;
createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>;
createPendingTransactionFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "transaction";
}>;
estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>;
estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>;
estimateGas: (args) => Promise<bigint>;
estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>;
experimental_blockTag?: BlockTag;
extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>;
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>;
getBalance: (args) => Promise<bigint>;
getBlobBaseFee: () => Promise<bigint>;
getBlock: <includeTransactions, blockTag>(args?) => Promise<{
baseFeePerGas: bigint | null;
blobGasUsed: bigint;
difficulty: bigint;
excessBlobGas: bigint;
extraData: `0x${string}`;
gasLimit: bigint;
gasUsed: bigint;
hash: blockTag extends "pending" ? null : `0x${string}`;
logsBloom: blockTag extends "pending" ? null : `0x${string}`;
miner: `0x${string}`;
mixHash: `0x${string}`;
nonce: blockTag extends "pending" ? null : `0x${string}`;
number: blockTag extends "pending" ? null : bigint;
parentBeaconBlockRoot?: `0x${string}`;
parentHash: `0x${string}`;
receiptsRoot: `0x${string}`;
sealFields: `0x${string}`[];
sha3Uncles: `0x${string}`;
size: bigint;
stateRoot: `0x${string}`;
timestamp: bigint;
totalDifficulty: bigint | null;
transactions: includeTransactions extends true ? (
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "legacy";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip2930";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip1559";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${(...)}`[];
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip4844";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip7702";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
})[] : `0x${string}`[];
transactionsRoot: `0x${string}`;
uncles: `0x${string}`[];
withdrawals?: Withdrawal[];
withdrawalsRoot?: `0x${string}`;
}>;
getBlockNumber: (args?) => Promise<bigint>;
getBlockTransactionCount: (args?) => Promise<number>;
getBytecode: (args) => Promise<GetCodeReturnType>;
getChainId: () => Promise<number>;
getCode: (args) => Promise<GetCodeReturnType>;
getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>;
getEip712Domain: (args) => Promise<GetEip712DomainReturnType>;
getEnsAddress: (args) => Promise<GetEnsAddressReturnType>;
getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>;
getEnsName: (args) => Promise<GetEnsNameReturnType>;
getEnsResolver: (args) => Promise<`0x${string}`>;
getEnsText: (args) => Promise<GetEnsTextReturnType>;
getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>;
getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>;
getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>;
getGasPrice: () => Promise<bigint>;
getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>;
getProof: (args) => Promise<GetProofReturnType>;
getStorageAt: (args) => Promise<GetStorageAtReturnType>;
getTransaction: <blockTag>(args) => Promise<
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "legacy";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip2930";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip1559";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${string}`[];
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip4844";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip7702";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}>;
getTransactionConfirmations: (args) => Promise<bigint>;
getTransactionCount: (args) => Promise<number>;
getTransactionReceipt: (args) => Promise<TransactionReceipt>;
key: string;
multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>;
name: string;
pollingInterval: number;
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;
readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>;
request: EIP1193RequestFn<PublicRpcSchema>;
sendRawTransaction: (args) => Promise<`0x${string}`>;
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;
simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;
simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;
simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>;
simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>;
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;
type: string;
uid: string;
uninstallFilter: (args) => Promise<boolean>;
verifyHash: (args) => Promise<boolean>;
verifyMessage: (args) => Promise<boolean>;
verifySiweMessage: (args) => Promise<boolean>;
verifyTypedData: (args) => Promise<boolean>;
waitForTransactionReceipt: (args) => Promise<TransactionReceipt>;
watchBlockNumber: (args) => WatchBlockNumberReturnType;
watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType;
watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType;
watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType;
watchPendingTransactions: (args) => WatchPendingTransactionsReturnType;
}
| {
account: Account;
addChain: (args) => Promise<void>;
batch?: {
multicall?: | boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};
};
cacheTime: number;
ccipRead?: | false
| {
request?: (parameters) => Promise<`0x${string}`>;
};
chain: Chain;
deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>;
experimental_blockTag?: BlockTag;
extend: <client>(fn) => Client<Transport, Chain, Account, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain, Account>>;
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain, chainOverride>>;
getAddresses: () => Promise<GetAddressesReturnType>;
getCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;
getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: (...) | (...) | (...) }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: (...)[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: (...) | (...); paymasterService?: (...) | (...); unstable_addSubAccount?: (...) | (...); [key: string]: any }>, number>)[K] }>;
getChainId: () => Promise<number>;
getPermissions: () => Promise<GetPermissionsReturnType>;
key: string;
name: string;
pollingInterval: number;
prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>;
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;
request: EIP1193RequestFn<WalletRpcSchema>;
requestAddresses: () => Promise<RequestAddressesReturnType>;
requestPermissions: (args) => Promise<RequestPermissionsReturnType>;
sendCalls: <calls, chainOverride>(parameters) => Promise<{
capabilities?: {
[key: string]: any;
};
id: string;
}>;
sendCallsSync: <calls, chainOverride>(parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;
sendRawTransaction: (args) => Promise<`0x${string}`>;
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;
sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>;
sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>;
showCallsStatus: (parameters) => Promise<void>;
signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>;
signMessage: (args) => Promise<`0x${string}`>;
signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never>,
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip1559" ? `0x02${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip2930" ? `0x01${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip4844" ? `0x03${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip7702" ? `0x04${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "legacy" ? TransactionSerializedLegacy : never>>;
signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>;
switchChain: (args) => Promise<void>;
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;
type: string;
uid: string;
waitForCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;
watchAsset: (args) => Promise<boolean>;
writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>;
writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>;
};Defined in: packages/core/src/clients/BaseClient.ts:40
Helper to ensure public client exists or fallback to wallet client (if it supports read)
Returns
{
account: undefined;
batch?: {
multicall?: | boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};
};
cacheTime: number;
call: (parameters) => Promise<CallReturnType>;
ccipRead?: | false
| {
request?: (parameters) => Promise<`0x${string}`>;
};
chain: Chain | undefined;
createAccessList: (parameters) => Promise<{
accessList: AccessList;
gasUsed: bigint;
}>;
createBlockFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "block";
}>;
createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>;
createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>;
createPendingTransactionFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "transaction";
}>;
estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>;
estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>;
estimateGas: (args) => Promise<bigint>;
estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>;
experimental_blockTag?: BlockTag;
extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>;
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>;
getBalance: (args) => Promise<bigint>;
getBlobBaseFee: () => Promise<bigint>;
getBlock: <includeTransactions, blockTag>(args?) => Promise<{
baseFeePerGas: bigint | null;
blobGasUsed: bigint;
difficulty: bigint;
excessBlobGas: bigint;
extraData: `0x${string}`;
gasLimit: bigint;
gasUsed: bigint;
hash: blockTag extends "pending" ? null : `0x${string}`;
logsBloom: blockTag extends "pending" ? null : `0x${string}`;
miner: `0x${string}`;
mixHash: `0x${string}`;
nonce: blockTag extends "pending" ? null : `0x${string}`;
number: blockTag extends "pending" ? null : bigint;
parentBeaconBlockRoot?: `0x${string}`;
parentHash: `0x${string}`;
receiptsRoot: `0x${string}`;
sealFields: `0x${string}`[];
sha3Uncles: `0x${string}`;
size: bigint;
stateRoot: `0x${string}`;
timestamp: bigint;
totalDifficulty: bigint | null;
transactions: includeTransactions extends true ? (
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "legacy";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip2930";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip1559";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${(...)}`[];
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip4844";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip7702";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
})[] : `0x${string}`[];
transactionsRoot: `0x${string}`;
uncles: `0x${string}`[];
withdrawals?: Withdrawal[];
withdrawalsRoot?: `0x${string}`;
}>;
getBlockNumber: (args?) => Promise<bigint>;
getBlockTransactionCount: (args?) => Promise<number>;
getBytecode: (args) => Promise<GetCodeReturnType>;
getChainId: () => Promise<number>;
getCode: (args) => Promise<GetCodeReturnType>;
getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>;
getEip712Domain: (args) => Promise<GetEip712DomainReturnType>;
getEnsAddress: (args) => Promise<GetEnsAddressReturnType>;
getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>;
getEnsName: (args) => Promise<GetEnsNameReturnType>;
getEnsResolver: (args) => Promise<`0x${string}`>;
getEnsText: (args) => Promise<GetEnsTextReturnType>;
getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>;
getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>;
getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>;
getGasPrice: () => Promise<bigint>;
getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>;
getProof: (args) => Promise<GetProofReturnType>;
getStorageAt: (args) => Promise<GetStorageAtReturnType>;
getTransaction: <blockTag>(args) => Promise<
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "legacy";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip2930";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip1559";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${string}`[];
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip4844";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip7702";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}>;
getTransactionConfirmations: (args) => Promise<bigint>;
getTransactionCount: (args) => Promise<number>;
getTransactionReceipt: (args) => Promise<TransactionReceipt>;
key: string;
multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>;
name: string;
pollingInterval: number;
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;
readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>;
request: EIP1193RequestFn<PublicRpcSchema>;
sendRawTransaction: (args) => Promise<`0x${string}`>;
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;
simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;
simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;
simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>;
simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>;
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;
type: string;
uid: string;
uninstallFilter: (args) => Promise<boolean>;
verifyHash: (args) => Promise<boolean>;
verifyMessage: (args) => Promise<boolean>;
verifySiweMessage: (args) => Promise<boolean>;
verifyTypedData: (args) => Promise<boolean>;
waitForTransactionReceipt: (args) => Promise<TransactionReceipt>;
watchBlockNumber: (args) => WatchBlockNumberReturnType;
watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType;
watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType;
watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType;
watchPendingTransactions: (args) => WatchPendingTransactionsReturnType;
}| Name | Type | Description | Defined in |
|---|---|---|---|
account | undefined | The Account of the Client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:73 |
batch? | object | Flags for batch settings. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:75 |
batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:20 |
cacheTime | number | Time (in ms) that cached data will remain in memory. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:77 |
call() | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:89 |
ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:79 |
chain | Chain | undefined | Chain for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:81 |
createAccessList() | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:113 |
createBlockFilter() | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${(...)}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:133 |
createContractEventFilter() | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:154 |
createEventFilter() | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:176 |
createPendingTransactionFilter() | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${(...)}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:196 |
estimateContractGas() | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:223 |
estimateFeesPerGas() | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:685 |
estimateGas() | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:247 |
estimateMaxPriorityFeePerGas() | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:877 |
experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:83 |
extend() | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:69 |
fillTransaction() | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:271 |
getBalance() | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:306 |
getBlobBaseFee() | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:327 |
getBlock() | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "legacy"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip2930"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip1559"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${(...)}`[]; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip4844"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip7702"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:350 |
getBlockNumber() | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:372 |
getBlockTransactionCount() | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:394 |
getBytecode() | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:396 |
getChainId() | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:416 |
getCode() | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:438 |
getContractEvents() | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:464 |
getEip712Domain() | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:497 |
getEnsAddress() | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:526 |
getEnsAvatar() | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:555 |
getEnsName() | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:581 |
getEnsResolver() | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:610 |
getEnsText() | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:640 |
getFeeHistory() | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:663 |
getFilterChanges() | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:764 |
getFilterLogs() | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:791 |
getGasPrice() | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:810 |
getLogs() | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:831 |
getProof() | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:856 |
getStorageAt() | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:901 |
getTransaction() | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:924 |
getTransactionConfirmations() | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:947 |
getTransactionCount() | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:969 |
getTransactionReceipt() | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:992 |
key | string | A key for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:85 |
multicall() | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1030 |
name | string | A name for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:87 |
pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:89 |
prepareTransactionRequest() | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1069 |
readContract() | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1101 |
request | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:91 |
sendRawTransaction() | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1126 |
sendRawTransactionSync() | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1151 |
simulate() | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1155 |
simulateBlocks() | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1198 |
simulateCalls() | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1231 |
simulateContract() | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1262 |
transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:93 |
type | string | The type of client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:95 |
uid | string | A unique ID for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:97 |
uninstallFilter() | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1325 |
verifyHash() | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1271 |
verifyMessage() | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1282 |
verifySiweMessage() | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1293 |
verifyTypedData() | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1302 |
waitForTransactionReceipt() | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1364 |
watchBlockNumber() | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1389 |
watchBlocks() | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1414 |
watchContractEvent() | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1444 |
watchEvent() | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1476 |
watchPendingTransactions() | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1505 |
{
account: Account;
addChain: (args) => Promise<void>;
batch?: {
multicall?: | boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};
};
cacheTime: number;
ccipRead?: | false
| {
request?: (parameters) => Promise<`0x${string}`>;
};
chain: Chain;
deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>;
experimental_blockTag?: BlockTag;
extend: <client>(fn) => Client<Transport, Chain, Account, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain, Account>>;
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain, chainOverride>>;
getAddresses: () => Promise<GetAddressesReturnType>;
getCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;
getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: (...) | (...) | (...) }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: (...)[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: (...) | (...); paymasterService?: (...) | (...); unstable_addSubAccount?: (...) | (...); [key: string]: any }>, number>)[K] }>;
getChainId: () => Promise<number>;
getPermissions: () => Promise<GetPermissionsReturnType>;
key: string;
name: string;
pollingInterval: number;
prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>;
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;
request: EIP1193RequestFn<WalletRpcSchema>;
requestAddresses: () => Promise<RequestAddressesReturnType>;
requestPermissions: (args) => Promise<RequestPermissionsReturnType>;
sendCalls: <calls, chainOverride>(parameters) => Promise<{
capabilities?: {
[key: string]: any;
};
id: string;
}>;
sendCallsSync: <calls, chainOverride>(parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;
sendRawTransaction: (args) => Promise<`0x${string}`>;
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;
sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>;
sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>;
showCallsStatus: (parameters) => Promise<void>;
signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>;
signMessage: (args) => Promise<`0x${string}`>;
signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never>,
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip1559" ? `0x02${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip2930" ? `0x01${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip4844" ? `0x03${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip7702" ? `0x04${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| ...[...] extends ... | ... ? Extract<..., ...> : never> extends "legacy" ? TransactionSerializedLegacy : never>>;
signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>;
switchChain: (args) => Promise<void>;
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;
type: string;
uid: string;
waitForCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;
watchAsset: (args) => Promise<boolean>;
writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>;
writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>;
}| Name | Type | Description | Defined in |
|---|---|---|---|
account | Account | The Account of the Client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:73 |
addChain() | (args) => Promise<void> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: eth_addEthereumChain Example import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:53 |
batch? | object | Flags for batch settings. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:75 |
batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:20 |
cacheTime | number | Time (in ms) that cached data will remain in memory. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:77 |
ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:79 |
chain | Chain | Chain for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:81 |
deployContract() | <abi, chainOverride>(args) => Promise<`0x${string}`> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts Example import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:79 |
experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:83 |
extend() | <client>(fn) => Client<Transport, Chain, Account, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain, Account>> | - | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:69 |
fillTransaction() | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:103 |
getAddresses() | () => Promise<GetAddressesReturnType> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: eth_accounts Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:122 |
getCallsStatus() | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Returns the status of a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:143 |
getCapabilities() | <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: (...) | (...) | (...) }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: (...)[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: (...) | (...); paymasterService?: (...) | (...); unstable_addSubAccount?: (...) | (...); [key: string]: any }>, number>)[K] }> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: wallet_getCapabilities Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:166 |
getChainId() | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1 | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:186 |
getPermissions() | () => Promise<GetPermissionsReturnType> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: wallet_getPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:205 |
key | string | A key for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:85 |
name | string | A name for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:87 |
pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:89 |
prepareAuthorization() | (parameters) => Promise<PrepareAuthorizationReturnType> | Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId). With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:247 |
prepareTransactionRequest() | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:286 |
request | EIP1193RequestFn<WalletRpcSchema> | Request function wrapped with friendly error handling | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:91 |
requestAddresses() | () => Promise<RequestAddressesReturnType> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: eth_requestAccounts Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:309 |
requestPermissions() | (args) => Promise<RequestPermissionsReturnType> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: wallet_requestPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:331 |
sendCalls() | <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:364 |
sendCallsSync() | <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:397 |
sendRawTransaction() | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:422 |
sendRawTransactionSync() | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:448 |
sendTransaction() | <request, chainOverride>(args) => Promise<`0x${string}`> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:491 |
sendTransactionSync() | <request, chainOverride>(args) => Promise<TransactionReceipt> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:535 |
showCallsStatus() | (parameters) => Promise<void> | Requests for the wallet to show information about a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: wallet_showCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:557 |
signAuthorization() | (parameters) => Promise<SignAuthorizationReturnType> | Signs an EIP-7702 Authorization object. With the calculated signature, you can: - use verifyAuthorization to verify the signed Authorization object, - use recoverAuthorizationAddress to recover the signing address from the signed Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:600 |
signMessage() | (args) => Promise<`0x${string}`> | Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: personal_sign - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use verifyMessage to verify the signature, - use recoverMessageAddress to recover the signing address from a signature. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:644 |
signTransaction() | <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | ...[...] extends ... | ... ? Extract<..., ...> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | ...[...] extends ... | ... ? Extract<..., ...> : never> extends "legacy" ? TransactionSerializedLegacy : never>> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:688 |
signTypedData() | <typedData, primaryType>(args) => Promise<`0x${string}`> | Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:785 |
switchChain() | (args) => Promise<void> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:806 |
transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:93 |
type | string | The type of client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:95 |
uid | string | A unique ID for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:97 |
waitForCallsStatus() | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Waits for the status & receipts of a call bundle that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:828 |
watchAsset() | (args) => Promise<boolean> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:855 |
writeContract() | <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Examples import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) // With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:903 |
writeContractSync() | <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Example import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/wallet.d.ts:934 |
requireEntryPoint()
protected requireEntryPoint(): `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:72
Returns
`0x${string}`
requireGToken()
protected requireGToken(): `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:51
Returns
`0x${string}`
requireGTokenStaking()
protected requireGTokenStaking(): `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:58
Returns
`0x${string}`
requirePaymasterFactory()
protected requirePaymasterFactory(): `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:65
Returns
`0x${string}`
requireRegistry()
protected requireRegistry(): `0x${string}`;Defined in: packages/core/src/clients/BaseClient.ts:44
Returns
`0x${string}`
BLSSigner
Defined in: packages/core/src/crypto/blsSigner.ts:9
BLS Signer for Registry reputation updates and DVT operations
Uses BLS12-381 curve for signature aggregation
Constructors
Constructor
new BLSSigner(privateKeyHex): BLSSigner;Defined in: packages/core/src/crypto/blsSigner.ts:12
Parameters
| Parameter | Type |
|---|---|
privateKeyHex | `0x${string}` |
Returns
Methods
getPublicKey()
getPublicKey(): `0x${string}`;Defined in: packages/core/src/crypto/blsSigner.ts:31
Get BLS public key
Returns
`0x${string}`
Public key as hex string
sign()
sign(message): `0x${string}`;Defined in: packages/core/src/crypto/blsSigner.ts:21
Sign a message with BLS private key
Parameters
| Parameter | Type | Description |
|---|---|---|
message | `0x${string}` | Message hash to sign |
Returns
`0x${string}`
BLS signature as hex string
aggregatePublicKeys()
static aggregatePublicKeys(pubKeys): `0x${string}`;Defined in: packages/core/src/crypto/blsSigner.ts:52
Aggregate multiple BLS public keys
Parameters
| Parameter | Type | Description |
|---|---|---|
pubKeys | `0x${string}`[] | Array of BLS public keys |
Returns
`0x${string}`
Aggregated public key (uncompressed G1 - 96 bytes for EVM)
aggregateSignatures()
static aggregateSignatures(signatures): `0x${string}`;Defined in: packages/core/src/crypto/blsSigner.ts:41
Aggregate multiple BLS signatures
Parameters
| Parameter | Type | Description |
|---|---|---|
signatures | `0x${string}`[] | Array of BLS signatures |
Returns
`0x${string}`
Aggregated signature
verify()
static verify(
message,
signature,
publicKey): boolean;Defined in: packages/core/src/crypto/blsSigner.ts:65
Verify a BLS signature
Parameters
| Parameter | Type | Description |
|---|---|---|
message | `0x${string}` | Message hash |
signature | `0x${string}` | BLS signature |
publicKey | `0x${string}` | BLS public key |
Returns
boolean
True if signature is valid
ContractConfigManager
Defined in: packages/core/src/config/ContractConfigManager.ts:14
Constructors
Constructor
new ContractConfigManager(): ContractConfigManager;Returns
Methods
getConfig()
static getConfig(): SuperPaymasterConfig;Defined in: packages/core/src/config/ContractConfigManager.ts:18
Get validated core configuration
Returns
RequirementChecker
Defined in: packages/core/src/requirementChecker.ts:26
Requirement Checker Utility
Centralized validation for all role requirements
Constructors
Constructor
new RequirementChecker(publicClient, addresses?): RequirementChecker;Defined in: packages/core/src/requirementChecker.ts:27
Parameters
| Parameter | Type | Description |
|---|---|---|
publicClient | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | - |
publicClient.account | undefined | The Account of the Client. |
publicClient.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
publicClient.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
publicClient.cacheTime? | number | Time (in ms) that cached data will remain in memory. |
publicClient.call? | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
publicClient.chain? | Chain | undefined | Chain for the client. |
publicClient.createAccessList? | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.createBlockFilter? | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } |
publicClient.createContractEventFilter? | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) |
publicClient.createEventFilter? | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) |
publicClient.createPendingTransactionFilter? | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } |
publicClient.estimateContractGas? | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) |
publicClient.estimateFeesPerGas? | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } |
publicClient.estimateGas? | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.estimateMaxPriorityFeePerGas? | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n |
publicClient.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
publicClient.extend? | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - |
publicClient.fillTransaction? | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.getBalance? | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) |
publicClient.getBlobBaseFee? | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() |
publicClient.getBlock? | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() |
publicClient.getBlockNumber? | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n |
publicClient.getBlockTransactionCount? | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() |
publicClient.getBytecode? | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. |
publicClient.getChainId? | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 |
publicClient.getCode? | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) |
publicClient.getContractEvents? | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) |
publicClient.getEip712Domain? | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } |
publicClient.getEnsAddress? | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' |
publicClient.getEnsAvatar? | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' |
publicClient.getEnsName? | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' |
publicClient.getEnsResolver? | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' |
publicClient.getEnsText? | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' |
publicClient.getFeeHistory? | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) |
publicClient.getFilterChanges? | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) |
publicClient.getFilterLogs? | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) |
publicClient.getGasPrice? | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() |
publicClient.getLogs? | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() |
publicClient.getProof? | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) |
publicClient.getStorageAt? | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) |
publicClient.getTransaction? | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionConfirmations? | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionCount? | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.getTransactionReceipt? | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.key? | string | A key for the client. |
publicClient.multicall? | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] |
publicClient.name? | string | A name for the client. |
publicClient.pollingInterval? | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
publicClient.prepareTransactionRequest? | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
publicClient.readContract? | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n |
publicClient.request? | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling |
publicClient.sendRawTransaction? | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.sendRawTransactionSync? | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.simulate? | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. |
publicClient.simulateBlocks? | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) |
publicClient.simulateCalls? | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) |
publicClient.simulateContract? | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.transport? | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
publicClient.type? | string | The type of client. |
publicClient.uid? | string | A unique ID for the client. |
publicClient.uninstallFilter? | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true |
publicClient.verifyHash? | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash |
publicClient.verifyMessage? | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage |
publicClient.verifySiweMessage? | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage |
publicClient.verifyTypedData? | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData |
publicClient.waitForTransactionReceipt? | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.watchBlockNumber? | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) |
publicClient.watchBlocks? | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) |
publicClient.watchContractEvent? | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) |
publicClient.watchEvent? | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) |
publicClient.watchPendingTransactions? | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) |
addresses? | { apnts?: `0x${string}`; gtoken?: `0x${string}`; mysbt?: `0x${string}`; registry?: `0x${string}`; } | - |
addresses.apnts? | `0x${string}` | - |
addresses.gtoken? | `0x${string}` | - |
addresses.mysbt? | `0x${string}` | - |
addresses.registry? | `0x${string}` | - |
Returns
Methods
checkAPNTsBalance()
checkAPNTsBalance(address, required): Promise<{
balance: bigint;
hasEnough: boolean;
}>;Defined in: packages/core/src/requirementChecker.ts:148
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
required | bigint |
Returns
Promise<{ balance: bigint; hasEnough: boolean; }>
checkGTokenBalance()
checkGTokenBalance(address, required): Promise<{
balance: bigint;
hasEnough: boolean;
}>;Defined in: packages/core/src/requirementChecker.ts:130
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
required | bigint |
Returns
Promise<{ balance: bigint; hasEnough: boolean; }>
checkHasRole()
checkHasRole(roleId, address): Promise<boolean>;Defined in: packages/core/src/requirementChecker.ts:178
Parameters
| Parameter | Type |
|---|---|
roleId | `0x${string}` |
address | `0x${string}` |
Returns
Promise<boolean>
checkHasSBT()
checkHasSBT(address): Promise<boolean>;Defined in: packages/core/src/requirementChecker.ts:166
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
Promise<boolean>
checkRequirements()
checkRequirements(params): Promise<RoleRequirement>;Defined in: packages/core/src/requirementChecker.ts:37
Parameters
| Parameter | Type |
|---|---|
params | { address: `0x${string}`; requiredAPNTs?: bigint; requiredGToken?: bigint; requireSBT?: boolean; roleId?: `0x${string}`; } |
params.address | `0x${string}` |
params.requiredAPNTs? | bigint |
params.requiredGToken? | bigint |
params.requireSBT? | boolean |
params.roleId? | `0x${string}` |
Returns
Promise<RoleRequirement>
SepoliaFaucetAPI
Defined in: packages/core/src/actions/faucet.ts:31
Constructors
Constructor
new SepoliaFaucetAPI(): SepoliaFaucetAPI;Returns
Methods
adminDepositForUser()
static adminDepositForUser(
adminWallet,
publicClient,
paymaster,
target,
token,
amount): Promise<boolean>;Defined in: packages/core/src/actions/faucet.ts:349
Complex Flow:
- Admin mints tokens to SELF.
- Admin approves Paymaster.
- Admin calls depositFor(target) on Paymaster.
Parameters
| Parameter | Type | Description |
|---|---|---|
adminWallet | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } | - |
adminWallet.account | Account | undefined | The Account of the Client. |
adminWallet.addChain | (args) => Promise<void> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: eth_addEthereumChain Example import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism }) |
adminWallet.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
adminWallet.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
adminWallet.cacheTime | number | Time (in ms) that cached data will remain in memory. |
adminWallet.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
adminWallet.chain | Chain | undefined | Chain for the client. |
adminWallet.deployContract | <abi, chainOverride>(args) => Promise<`0x${string}`> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts Example import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', }) |
adminWallet.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
adminWallet.extend | <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>> | - |
adminWallet.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
adminWallet.getAddresses | () => Promise<GetAddressesReturnType> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: eth_accounts Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses() |
adminWallet.getCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Returns the status of a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.getCapabilities | <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: wallet_getCapabilities Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1 |
adminWallet.getPermissions | () => Promise<GetPermissionsReturnType> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: wallet_getPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions() |
adminWallet.key | string | A key for the client. |
adminWallet.name | string | A name for the client. |
adminWallet.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
adminWallet.prepareAuthorization | (parameters) => Promise<PrepareAuthorizationReturnType> | Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId). With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
adminWallet.request | EIP1193RequestFn<WalletRpcSchema> | Request function wrapped with friendly error handling |
adminWallet.requestAddresses | () => Promise<RequestAddressesReturnType> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: eth_requestAccounts Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses() |
adminWallet.requestPermissions | (args) => Promise<RequestPermissionsReturnType> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: wallet_requestPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} }) |
adminWallet.sendCalls | <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendCallsSync | <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendTransaction | <request, chainOverride>(args) => Promise<`0x${string}`> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.sendTransactionSync | <request, chainOverride>(args) => Promise<TransactionReceipt> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.showCallsStatus | (parameters) => Promise<void> | Requests for the wallet to show information about a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: wallet_showCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.signAuthorization | (parameters) => Promise<SignAuthorizationReturnType> | Signs an EIP-7702 Authorization object. With the calculated signature, you can: - use verifyAuthorization to verify the signed Authorization object, - use recoverAuthorizationAddress to recover the signing address from the signed Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.signMessage | (args) => Promise<`0x${string}`> | Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: personal_sign - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use verifyMessage to verify the signature, - use recoverMessageAddress to recover the signing address from a signature. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', }) |
adminWallet.signTransaction | <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) |
adminWallet.signTypedData | <typedData, primaryType>(args) => Promise<`0x${string}`> | Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) |
adminWallet.switchChain | (args) => Promise<void> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id }) |
adminWallet.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
adminWallet.type | string | The type of client. |
adminWallet.uid | string | A unique ID for the client. |
adminWallet.waitForCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Waits for the status & receipts of a call bundle that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' }) |
adminWallet.watchAsset | (args) => Promise<boolean> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, }) |
adminWallet.writeContract | <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Examples import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) // With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request) |
adminWallet.writeContractSync | <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Example import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) |
publicClient | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | - |
publicClient.account | undefined | The Account of the Client. |
publicClient.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
publicClient.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
publicClient.cacheTime | number | Time (in ms) that cached data will remain in memory. |
publicClient.call | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
publicClient.chain | Chain | undefined | Chain for the client. |
publicClient.createAccessList | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.createBlockFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } |
publicClient.createContractEventFilter | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) |
publicClient.createEventFilter | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) |
publicClient.createPendingTransactionFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } |
publicClient.estimateContractGas | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) |
publicClient.estimateFeesPerGas | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } |
publicClient.estimateGas | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.estimateMaxPriorityFeePerGas | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n |
publicClient.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
publicClient.extend | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - |
publicClient.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.getBalance | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) |
publicClient.getBlobBaseFee | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() |
publicClient.getBlock | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() |
publicClient.getBlockNumber | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n |
publicClient.getBlockTransactionCount | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() |
publicClient.getBytecode | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. |
publicClient.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 |
publicClient.getCode | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) |
publicClient.getContractEvents | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) |
publicClient.getEip712Domain | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } |
publicClient.getEnsAddress | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' |
publicClient.getEnsAvatar | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' |
publicClient.getEnsName | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' |
publicClient.getEnsResolver | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' |
publicClient.getEnsText | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' |
publicClient.getFeeHistory | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) |
publicClient.getFilterChanges | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) |
publicClient.getFilterLogs | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) |
publicClient.getGasPrice | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() |
publicClient.getLogs | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() |
publicClient.getProof | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) |
publicClient.getStorageAt | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) |
publicClient.getTransaction | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionConfirmations | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionCount | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.getTransactionReceipt | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.key | string | A key for the client. |
publicClient.multicall | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] |
publicClient.name | string | A name for the client. |
publicClient.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
publicClient.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
publicClient.readContract | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n |
publicClient.request | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling |
publicClient.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.simulate | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. |
publicClient.simulateBlocks | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) |
publicClient.simulateCalls | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) |
publicClient.simulateContract | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
publicClient.type | string | The type of client. |
publicClient.uid | string | A unique ID for the client. |
publicClient.uninstallFilter | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true |
publicClient.verifyHash | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash |
publicClient.verifyMessage | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage |
publicClient.verifySiweMessage | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage |
publicClient.verifyTypedData | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData |
publicClient.waitForTransactionReceipt | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.watchBlockNumber | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) |
publicClient.watchBlocks | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) |
publicClient.watchContractEvent | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) |
publicClient.watchEvent | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) |
publicClient.watchPendingTransactions | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) |
paymaster | `0x${string}` | - |
target | `0x${string}` | - |
token | `0x${string}` | - |
amount | bigint | - |
Returns
Promise<boolean>
fundETH()
static fundETH(
adminWallet,
publicClient,
target,
amount): Promise<boolean>;Defined in: packages/core/src/actions/faucet.ts:95
Funds the target with ETH if balance is below threshold.
Parameters
| Parameter | Type | Description |
|---|---|---|
adminWallet | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } | - |
adminWallet.account | Account | undefined | The Account of the Client. |
adminWallet.addChain | (args) => Promise<void> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: eth_addEthereumChain Example import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism }) |
adminWallet.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
adminWallet.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
adminWallet.cacheTime | number | Time (in ms) that cached data will remain in memory. |
adminWallet.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
adminWallet.chain | Chain | undefined | Chain for the client. |
adminWallet.deployContract | <abi, chainOverride>(args) => Promise<`0x${string}`> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts Example import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', }) |
adminWallet.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
adminWallet.extend | <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>> | - |
adminWallet.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
adminWallet.getAddresses | () => Promise<GetAddressesReturnType> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: eth_accounts Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses() |
adminWallet.getCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Returns the status of a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.getCapabilities | <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: wallet_getCapabilities Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1 |
adminWallet.getPermissions | () => Promise<GetPermissionsReturnType> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: wallet_getPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions() |
adminWallet.key | string | A key for the client. |
adminWallet.name | string | A name for the client. |
adminWallet.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
adminWallet.prepareAuthorization | (parameters) => Promise<PrepareAuthorizationReturnType> | Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId). With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
adminWallet.request | EIP1193RequestFn<WalletRpcSchema> | Request function wrapped with friendly error handling |
adminWallet.requestAddresses | () => Promise<RequestAddressesReturnType> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: eth_requestAccounts Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses() |
adminWallet.requestPermissions | (args) => Promise<RequestPermissionsReturnType> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: wallet_requestPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} }) |
adminWallet.sendCalls | <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendCallsSync | <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendTransaction | <request, chainOverride>(args) => Promise<`0x${string}`> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.sendTransactionSync | <request, chainOverride>(args) => Promise<TransactionReceipt> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.showCallsStatus | (parameters) => Promise<void> | Requests for the wallet to show information about a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: wallet_showCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.signAuthorization | (parameters) => Promise<SignAuthorizationReturnType> | Signs an EIP-7702 Authorization object. With the calculated signature, you can: - use verifyAuthorization to verify the signed Authorization object, - use recoverAuthorizationAddress to recover the signing address from the signed Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.signMessage | (args) => Promise<`0x${string}`> | Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: personal_sign - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use verifyMessage to verify the signature, - use recoverMessageAddress to recover the signing address from a signature. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', }) |
adminWallet.signTransaction | <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) |
adminWallet.signTypedData | <typedData, primaryType>(args) => Promise<`0x${string}`> | Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) |
adminWallet.switchChain | (args) => Promise<void> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id }) |
adminWallet.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
adminWallet.type | string | The type of client. |
adminWallet.uid | string | A unique ID for the client. |
adminWallet.waitForCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Waits for the status & receipts of a call bundle that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' }) |
adminWallet.watchAsset | (args) => Promise<boolean> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, }) |
adminWallet.writeContract | <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Examples import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) // With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request) |
adminWallet.writeContractSync | <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Example import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) |
publicClient | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | - |
publicClient.account | undefined | The Account of the Client. |
publicClient.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
publicClient.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
publicClient.cacheTime | number | Time (in ms) that cached data will remain in memory. |
publicClient.call | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
publicClient.chain | Chain | undefined | Chain for the client. |
publicClient.createAccessList | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.createBlockFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } |
publicClient.createContractEventFilter | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) |
publicClient.createEventFilter | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) |
publicClient.createPendingTransactionFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } |
publicClient.estimateContractGas | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) |
publicClient.estimateFeesPerGas | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } |
publicClient.estimateGas | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.estimateMaxPriorityFeePerGas | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n |
publicClient.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
publicClient.extend | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - |
publicClient.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.getBalance | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) |
publicClient.getBlobBaseFee | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() |
publicClient.getBlock | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() |
publicClient.getBlockNumber | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n |
publicClient.getBlockTransactionCount | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() |
publicClient.getBytecode | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. |
publicClient.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 |
publicClient.getCode | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) |
publicClient.getContractEvents | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) |
publicClient.getEip712Domain | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } |
publicClient.getEnsAddress | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' |
publicClient.getEnsAvatar | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' |
publicClient.getEnsName | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' |
publicClient.getEnsResolver | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' |
publicClient.getEnsText | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' |
publicClient.getFeeHistory | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) |
publicClient.getFilterChanges | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) |
publicClient.getFilterLogs | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) |
publicClient.getGasPrice | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() |
publicClient.getLogs | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() |
publicClient.getProof | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) |
publicClient.getStorageAt | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) |
publicClient.getTransaction | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionConfirmations | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionCount | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.getTransactionReceipt | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.key | string | A key for the client. |
publicClient.multicall | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] |
publicClient.name | string | A name for the client. |
publicClient.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
publicClient.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
publicClient.readContract | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n |
publicClient.request | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling |
publicClient.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.simulate | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. |
publicClient.simulateBlocks | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) |
publicClient.simulateCalls | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) |
publicClient.simulateContract | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
publicClient.type | string | The type of client. |
publicClient.uid | string | A unique ID for the client. |
publicClient.uninstallFilter | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true |
publicClient.verifyHash | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash |
publicClient.verifyMessage | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage |
publicClient.verifySiweMessage | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage |
publicClient.verifyTypedData | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData |
publicClient.waitForTransactionReceipt | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.watchBlockNumber | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) |
publicClient.watchBlocks | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) |
publicClient.watchContractEvent | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) |
publicClient.watchEvent | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) |
publicClient.watchPendingTransactions | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) |
target | `0x${string}` | - |
amount | bigint | - |
Returns
Promise<boolean>
mintTestTokens()
static mintTestTokens(
adminWallet,
publicClient,
token,
target,
amount): Promise<boolean>;Defined in: packages/core/src/actions/faucet.ts:279
Mints tokens directly to the target.
Parameters
| Parameter | Type | Description |
|---|---|---|
adminWallet | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } | - |
adminWallet.account | Account | undefined | The Account of the Client. |
adminWallet.addChain | (args) => Promise<void> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: eth_addEthereumChain Example import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism }) |
adminWallet.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
adminWallet.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
adminWallet.cacheTime | number | Time (in ms) that cached data will remain in memory. |
adminWallet.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
adminWallet.chain | Chain | undefined | Chain for the client. |
adminWallet.deployContract | <abi, chainOverride>(args) => Promise<`0x${string}`> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts Example import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', }) |
adminWallet.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
adminWallet.extend | <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>> | - |
adminWallet.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
adminWallet.getAddresses | () => Promise<GetAddressesReturnType> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: eth_accounts Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses() |
adminWallet.getCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Returns the status of a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.getCapabilities | <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: wallet_getCapabilities Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1 |
adminWallet.getPermissions | () => Promise<GetPermissionsReturnType> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: wallet_getPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions() |
adminWallet.key | string | A key for the client. |
adminWallet.name | string | A name for the client. |
adminWallet.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
adminWallet.prepareAuthorization | (parameters) => Promise<PrepareAuthorizationReturnType> | Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId). With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
adminWallet.request | EIP1193RequestFn<WalletRpcSchema> | Request function wrapped with friendly error handling |
adminWallet.requestAddresses | () => Promise<RequestAddressesReturnType> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: eth_requestAccounts Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses() |
adminWallet.requestPermissions | (args) => Promise<RequestPermissionsReturnType> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: wallet_requestPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} }) |
adminWallet.sendCalls | <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendCallsSync | <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendTransaction | <request, chainOverride>(args) => Promise<`0x${string}`> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.sendTransactionSync | <request, chainOverride>(args) => Promise<TransactionReceipt> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.showCallsStatus | (parameters) => Promise<void> | Requests for the wallet to show information about a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: wallet_showCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.signAuthorization | (parameters) => Promise<SignAuthorizationReturnType> | Signs an EIP-7702 Authorization object. With the calculated signature, you can: - use verifyAuthorization to verify the signed Authorization object, - use recoverAuthorizationAddress to recover the signing address from the signed Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.signMessage | (args) => Promise<`0x${string}`> | Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: personal_sign - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use verifyMessage to verify the signature, - use recoverMessageAddress to recover the signing address from a signature. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', }) |
adminWallet.signTransaction | <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) |
adminWallet.signTypedData | <typedData, primaryType>(args) => Promise<`0x${string}`> | Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) |
adminWallet.switchChain | (args) => Promise<void> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id }) |
adminWallet.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
adminWallet.type | string | The type of client. |
adminWallet.uid | string | A unique ID for the client. |
adminWallet.waitForCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Waits for the status & receipts of a call bundle that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' }) |
adminWallet.watchAsset | (args) => Promise<boolean> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, }) |
adminWallet.writeContract | <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Examples import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) // With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request) |
adminWallet.writeContractSync | <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Example import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) |
publicClient | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | - |
publicClient.account | undefined | The Account of the Client. |
publicClient.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
publicClient.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
publicClient.cacheTime | number | Time (in ms) that cached data will remain in memory. |
publicClient.call | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
publicClient.chain | Chain | undefined | Chain for the client. |
publicClient.createAccessList | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.createBlockFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } |
publicClient.createContractEventFilter | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) |
publicClient.createEventFilter | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) |
publicClient.createPendingTransactionFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } |
publicClient.estimateContractGas | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) |
publicClient.estimateFeesPerGas | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } |
publicClient.estimateGas | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.estimateMaxPriorityFeePerGas | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n |
publicClient.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
publicClient.extend | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - |
publicClient.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.getBalance | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) |
publicClient.getBlobBaseFee | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() |
publicClient.getBlock | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() |
publicClient.getBlockNumber | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n |
publicClient.getBlockTransactionCount | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() |
publicClient.getBytecode | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. |
publicClient.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 |
publicClient.getCode | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) |
publicClient.getContractEvents | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) |
publicClient.getEip712Domain | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } |
publicClient.getEnsAddress | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' |
publicClient.getEnsAvatar | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' |
publicClient.getEnsName | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' |
publicClient.getEnsResolver | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' |
publicClient.getEnsText | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' |
publicClient.getFeeHistory | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) |
publicClient.getFilterChanges | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) |
publicClient.getFilterLogs | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) |
publicClient.getGasPrice | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() |
publicClient.getLogs | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() |
publicClient.getProof | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) |
publicClient.getStorageAt | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) |
publicClient.getTransaction | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionConfirmations | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionCount | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.getTransactionReceipt | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.key | string | A key for the client. |
publicClient.multicall | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] |
publicClient.name | string | A name for the client. |
publicClient.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
publicClient.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
publicClient.readContract | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n |
publicClient.request | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling |
publicClient.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.simulate | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. |
publicClient.simulateBlocks | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) |
publicClient.simulateCalls | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) |
publicClient.simulateContract | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
publicClient.type | string | The type of client. |
publicClient.uid | string | A unique ID for the client. |
publicClient.uninstallFilter | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true |
publicClient.verifyHash | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash |
publicClient.verifyMessage | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage |
publicClient.verifySiweMessage | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage |
publicClient.verifyTypedData | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData |
publicClient.waitForTransactionReceipt | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.watchBlockNumber | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) |
publicClient.watchBlocks | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) |
publicClient.watchContractEvent | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) |
publicClient.watchEvent | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) |
publicClient.watchPendingTransactions | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) |
token | `0x${string}` | - |
target | `0x${string}` | - |
amount | bigint | - |
Returns
Promise<boolean>
prepareTestAccount()
static prepareTestAccount(
adminWallet,
publicClient,
config): Promise<{
ethFunded: boolean;
paymasterDeposited: boolean;
roleRegistered: boolean;
tokenMinted: boolean;
}>;Defined in: packages/core/src/actions/faucet.ts:40
Orchestrates the complete setup for a test account.
- Funds ETH
- Registers ENDUSER role
- Mints potential Paymaster Tokens (cPNTs/dPNTs)
- Deposits to Paymaster V4 (if address provided) using Admin's tokens
Parameters
| Parameter | Type | Description |
|---|---|---|
adminWallet | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } | - |
adminWallet.account | Account | undefined | The Account of the Client. |
adminWallet.addChain | (args) => Promise<void> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: eth_addEthereumChain Example import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism }) |
adminWallet.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
adminWallet.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
adminWallet.cacheTime | number | Time (in ms) that cached data will remain in memory. |
adminWallet.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
adminWallet.chain | Chain | undefined | Chain for the client. |
adminWallet.deployContract | <abi, chainOverride>(args) => Promise<`0x${string}`> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts Example import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', }) |
adminWallet.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
adminWallet.extend | <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>> | - |
adminWallet.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
adminWallet.getAddresses | () => Promise<GetAddressesReturnType> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: eth_accounts Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses() |
adminWallet.getCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Returns the status of a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.getCapabilities | <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: wallet_getCapabilities Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1 |
adminWallet.getPermissions | () => Promise<GetPermissionsReturnType> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: wallet_getPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions() |
adminWallet.key | string | A key for the client. |
adminWallet.name | string | A name for the client. |
adminWallet.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
adminWallet.prepareAuthorization | (parameters) => Promise<PrepareAuthorizationReturnType> | Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId). With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
adminWallet.request | EIP1193RequestFn<WalletRpcSchema> | Request function wrapped with friendly error handling |
adminWallet.requestAddresses | () => Promise<RequestAddressesReturnType> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: eth_requestAccounts Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses() |
adminWallet.requestPermissions | (args) => Promise<RequestPermissionsReturnType> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: wallet_requestPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} }) |
adminWallet.sendCalls | <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendCallsSync | <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendTransaction | <request, chainOverride>(args) => Promise<`0x${string}`> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.sendTransactionSync | <request, chainOverride>(args) => Promise<TransactionReceipt> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.showCallsStatus | (parameters) => Promise<void> | Requests for the wallet to show information about a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: wallet_showCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.signAuthorization | (parameters) => Promise<SignAuthorizationReturnType> | Signs an EIP-7702 Authorization object. With the calculated signature, you can: - use verifyAuthorization to verify the signed Authorization object, - use recoverAuthorizationAddress to recover the signing address from the signed Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.signMessage | (args) => Promise<`0x${string}`> | Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: personal_sign - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use verifyMessage to verify the signature, - use recoverMessageAddress to recover the signing address from a signature. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', }) |
adminWallet.signTransaction | <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) |
adminWallet.signTypedData | <typedData, primaryType>(args) => Promise<`0x${string}`> | Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) |
adminWallet.switchChain | (args) => Promise<void> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id }) |
adminWallet.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
adminWallet.type | string | The type of client. |
adminWallet.uid | string | A unique ID for the client. |
adminWallet.waitForCallsStatus | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Waits for the status & receipts of a call bundle that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' }) |
adminWallet.watchAsset | (args) => Promise<boolean> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, }) |
adminWallet.writeContract | <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Examples import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) // With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request) |
adminWallet.writeContractSync | <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Example import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) |
publicClient | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | - |
publicClient.account | undefined | The Account of the Client. |
publicClient.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
publicClient.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
publicClient.cacheTime | number | Time (in ms) that cached data will remain in memory. |
publicClient.call | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
publicClient.chain | Chain | undefined | Chain for the client. |
publicClient.createAccessList | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.createBlockFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } |
publicClient.createContractEventFilter | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) |
publicClient.createEventFilter | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) |
publicClient.createPendingTransactionFilter | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } |
publicClient.estimateContractGas | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) |
publicClient.estimateFeesPerGas | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } |
publicClient.estimateGas | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.estimateMaxPriorityFeePerGas | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n |
publicClient.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
publicClient.extend | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - |
publicClient.fillTransaction | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.getBalance | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) |
publicClient.getBlobBaseFee | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() |
publicClient.getBlock | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() |
publicClient.getBlockNumber | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n |
publicClient.getBlockTransactionCount | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() |
publicClient.getBytecode | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. |
publicClient.getChainId | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 |
publicClient.getCode | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) |
publicClient.getContractEvents | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) |
publicClient.getEip712Domain | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } |
publicClient.getEnsAddress | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' |
publicClient.getEnsAvatar | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' |
publicClient.getEnsName | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' |
publicClient.getEnsResolver | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' |
publicClient.getEnsText | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' |
publicClient.getFeeHistory | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) |
publicClient.getFilterChanges | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) |
publicClient.getFilterLogs | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) |
publicClient.getGasPrice | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() |
publicClient.getLogs | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() |
publicClient.getProof | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) |
publicClient.getStorageAt | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) |
publicClient.getTransaction | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionConfirmations | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionCount | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.getTransactionReceipt | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.key | string | A key for the client. |
publicClient.multicall | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] |
publicClient.name | string | A name for the client. |
publicClient.pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
publicClient.prepareTransactionRequest | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
publicClient.readContract | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n |
publicClient.request | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling |
publicClient.sendRawTransaction | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.sendRawTransactionSync | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.simulate | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. |
publicClient.simulateBlocks | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) |
publicClient.simulateCalls | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) |
publicClient.simulateContract | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
publicClient.type | string | The type of client. |
publicClient.uid | string | A unique ID for the client. |
publicClient.uninstallFilter | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true |
publicClient.verifyHash | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash |
publicClient.verifyMessage | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage |
publicClient.verifySiweMessage | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage |
publicClient.verifyTypedData | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData |
publicClient.waitForTransactionReceipt | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.watchBlockNumber | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) |
publicClient.watchBlocks | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) |
publicClient.watchContractEvent | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) |
publicClient.watchEvent | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) |
publicClient.watchPendingTransactions | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) |
config | { community?: `0x${string}`; ethAmount?: bigint; paymasterV4?: `0x${string}`; registry: `0x${string}`; superPaymaster?: `0x${string}`; targetAA: `0x${string}`; token: `0x${string}`; tokenAmount?: bigint; } | - |
config.community? | `0x${string}` | - |
config.ethAmount? | bigint | - |
config.paymasterV4? | `0x${string}` | - |
config.registry | `0x${string}` | - |
config.superPaymaster? | `0x${string}` | - |
config.targetAA | `0x${string}` | - |
config.token | `0x${string}` | - |
config.tokenAmount? | bigint | - |
Returns
Promise<{ ethFunded: boolean; paymasterDeposited: boolean; roleRegistered: boolean; tokenMinted: boolean; }>
registerEndUser()
static registerEndUser(
adminWallet,
publicClient,
registryAddr,
target,
gasToken,
community?): Promise<boolean>;Defined in: packages/core/src/actions/faucet.ts:120
Registers the ENDUSER role using Sponsor Mode (Admin pays stake).
Parameters
| Parameter | Type | Description |
|---|---|---|
adminWallet | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } | - |
adminWallet.account | Account | undefined | The Account of the Client. |
adminWallet.addChain | (args) => Promise<void> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: eth_addEthereumChain Example import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism }) |
adminWallet.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
adminWallet.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
adminWallet.cacheTime | number | Time (in ms) that cached data will remain in memory. |
adminWallet.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
adminWallet.chain? | Chain | undefined | Chain for the client. |
adminWallet.deployContract? | <abi, chainOverride>(args) => Promise<`0x${string}`> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts Example import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', }) |
adminWallet.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
adminWallet.extend? | <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>> | - |
adminWallet.fillTransaction? | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
adminWallet.getAddresses? | () => Promise<GetAddressesReturnType> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: eth_accounts Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses() |
adminWallet.getCallsStatus? | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Returns the status of a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.getCapabilities? | <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: wallet_getCapabilities Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.getChainId? | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1 |
adminWallet.getPermissions? | () => Promise<GetPermissionsReturnType> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: wallet_getPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions() |
adminWallet.key? | string | A key for the client. |
adminWallet.name? | string | A name for the client. |
adminWallet.pollingInterval? | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
adminWallet.prepareAuthorization? | (parameters) => Promise<PrepareAuthorizationReturnType> | Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId). With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.prepareTransactionRequest? | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
adminWallet.request? | EIP1193RequestFn<WalletRpcSchema> | Request function wrapped with friendly error handling |
adminWallet.requestAddresses? | () => Promise<RequestAddressesReturnType> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: eth_requestAccounts Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses() |
adminWallet.requestPermissions? | (args) => Promise<RequestPermissionsReturnType> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: wallet_requestPermissions Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} }) |
adminWallet.sendCalls? | <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendCallsSync? | <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: wallet_sendCalls Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], }) |
adminWallet.sendRawTransaction? | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendRawTransactionSync? | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
adminWallet.sendTransaction? | <request, chainOverride>(args) => Promise<`0x${string}`> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.sendTransactionSync? | <request, chainOverride>(args) => Promise<TransactionReceipt> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: eth_sendTransaction - Local Accounts: eth_sendRawTransaction Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, }) |
adminWallet.showCallsStatus? | (parameters) => Promise<void> | Requests for the wallet to show information about a call batch that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: wallet_showCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' }) |
adminWallet.signAuthorization? | (parameters) => Promise<SignAuthorizationReturnType> | Signs an EIP-7702 Authorization object. With the calculated signature, you can: - use verifyAuthorization to verify the signed Authorization object, - use recoverAuthorizationAddress to recover the signing address from the signed Authorization object. Examples import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
adminWallet.signMessage? | (args) => Promise<`0x${string}`> | Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: personal_sign - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use verifyMessage to verify the signature, - use recoverMessageAddress to recover the signing address from a signature. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', }) |
adminWallet.signTransaction? | <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request) |
adminWallet.signTypedData? | <typedData, primaryType>(args) => Promise<`0x${string}`> | Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)). - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request. Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, }) |
adminWallet.switchChain? | (args) => Promise<void> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id }) |
adminWallet.transport? | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
adminWallet.type? | string | The type of client. |
adminWallet.uid? | string | A unique ID for the client. |
adminWallet.waitForCallsStatus? | (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }> | Waits for the status & receipts of a call bundle that was sent via sendCalls. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: wallet_getCallsStatus Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' }) |
adminWallet.watchAsset? | (args) => Promise<boolean> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: eth_switchEthereumChain Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, }) |
adminWallet.writeContract? | <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Examples import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) // With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request) |
adminWallet.writeContractSync? | <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state. Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data. Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it. Example import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], }) |
publicClient? | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | - |
publicClient.account? | undefined | The Account of the Client. |
publicClient.batch? | { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; } | Flags for batch settings. |
publicClient.batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. |
publicClient.cacheTime? | number | Time (in ms) that cached data will remain in memory. |
publicClient.call? | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. |
publicClient.chain? | Chain | undefined | Chain for the client. |
publicClient.createAccessList? | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) |
publicClient.createBlockFilter? | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } |
publicClient.createContractEventFilter? | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) |
publicClient.createEventFilter? | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) |
publicClient.createPendingTransactionFilter? | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } |
publicClient.estimateContractGas? | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) |
publicClient.estimateFeesPerGas? | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } |
publicClient.estimateGas? | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.estimateMaxPriorityFeePerGas? | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n |
publicClient.experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. |
publicClient.extend? | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - |
publicClient.fillTransaction? | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) |
publicClient.getBalance? | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) |
publicClient.getBlobBaseFee? | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() |
publicClient.getBlock? | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() |
publicClient.getBlockNumber? | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n |
publicClient.getBlockTransactionCount? | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() |
publicClient.getBytecode? | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. |
publicClient.getChainId? | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 |
publicClient.getCode? | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) |
publicClient.getContractEvents? | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) |
publicClient.getEip712Domain? | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } |
publicClient.getEnsAddress? | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' |
publicClient.getEnsAvatar? | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' |
publicClient.getEnsName? | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' |
publicClient.getEnsResolver? | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' |
publicClient.getEnsText? | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' |
publicClient.getFeeHistory? | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) |
publicClient.getFilterChanges? | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) |
publicClient.getFilterLogs? | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) |
publicClient.getGasPrice? | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() |
publicClient.getLogs? | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() |
publicClient.getProof? | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) |
publicClient.getStorageAt? | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) |
publicClient.getTransaction? | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionConfirmations? | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.getTransactionCount? | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.getTransactionReceipt? | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.key? | string | A key for the client. |
publicClient.multicall? | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] |
publicClient.name? | string | A name for the client. |
publicClient.pollingInterval? | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. |
publicClient.prepareTransactionRequest? | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) |
publicClient.readContract? | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n |
publicClient.request? | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling |
publicClient.sendRawTransaction? | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.sendRawTransactionSync? | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) |
publicClient.simulate? | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. |
publicClient.simulateBlocks? | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) |
publicClient.simulateCalls? | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) |
publicClient.simulateContract? | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) |
publicClient.transport? | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport |
publicClient.type? | string | The type of client. |
publicClient.uid? | string | A unique ID for the client. |
publicClient.uninstallFilter? | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true |
publicClient.verifyHash? | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash |
publicClient.verifyMessage? | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage |
publicClient.verifySiweMessage? | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage |
publicClient.verifyTypedData? | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData |
publicClient.waitForTransactionReceipt? | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) |
publicClient.watchBlockNumber? | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) |
publicClient.watchBlocks? | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) |
publicClient.watchContractEvent? | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) |
publicClient.watchEvent? | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) |
publicClient.watchPendingTransactions? | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) |
registryAddr? | `0x${string}` | - |
target? | `0x${string}` | - |
gasToken? | `0x${string}` | - |
community? | `0x${string}` | - |
Returns
Promise<boolean>
StateValidator
Defined in: packages/core/src/actions/StateValidator.ts:44
Constructors
Constructor
new StateValidator(): StateValidator;Returns
Methods
getAccountBalances()
static getAccountBalances(params): Promise<AccountBalance[]>;Defined in: packages/core/src/actions/StateValidator.ts:58
Batch fetch balances for multiple accounts
Parameters
| Parameter | Type |
|---|---|
params | { addresses: `0x${string}`[]; aPNTsAddress?: `0x${string}`; chain: Chain; gTokenAddress?: `0x${string}`; rpcUrl: string; xPNTsAddress?: `0x${string}`; } |
params.addresses | `0x${string}`[] |
params.aPNTsAddress? | `0x${string}` |
params.chain | Chain |
params.gTokenAddress? | `0x${string}` |
params.rpcUrl | string |
params.xPNTsAddress? | `0x${string}` |
Returns
Promise<AccountBalance[]>
validateDeployment()
static validateDeployment(params): Promise<ValidationResult>;Defined in: packages/core/src/actions/StateValidator.ts:232
Deployment Validation
Parameters
| Parameter | Type |
|---|---|
params | DeploymentValidationParams |
Returns
Promise<ValidationResult>
validateETHBalance()
static validateETHBalance(params): Promise<ValidationResult>;Defined in: packages/core/src/actions/StateValidator.ts:153
ETH Balance Validation
Parameters
| Parameter | Type |
|---|---|
params | BalanceValidationParams |
Returns
Promise<ValidationResult>
validateRole()
static validateRole(params): Promise<ValidationResult>;Defined in: packages/core/src/actions/StateValidator.ts:114
Role Validation
Parameters
| Parameter | Type |
|---|---|
params | RoleValidationParams |
Returns
Promise<ValidationResult>
validateTokenBalance()
static validateTokenBalance(params): Promise<ValidationResult>;Defined in: packages/core/src/actions/StateValidator.ts:189
Token Balance Validation
Parameters
| Parameter | Type |
|---|---|
params | TokenBalanceValidationParams |
Returns
Promise<ValidationResult>
Interfaces
AccountBalance
Defined in: packages/core/src/actions/StateValidator.ts:36
Properties
address
address: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:37
aPNTs
aPNTs: bigint;Defined in: packages/core/src/actions/StateValidator.ts:40
eth
eth: bigint;Defined in: packages/core/src/actions/StateValidator.ts:38
gToken
gToken: bigint;Defined in: packages/core/src/actions/StateValidator.ts:39
xPNTs
xPNTs: bigint;Defined in: packages/core/src/actions/StateValidator.ts:41
BalanceValidationParams
Defined in: packages/core/src/actions/StateValidator.ts:17
Interface definitions
Extends
Extended by
Properties
address
address: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:18
chain
chain: Chain;Defined in: packages/core/src/actions/StateValidator.ts:8
Inherited from
minBalance?
optional minBalance: string;Defined in: packages/core/src/actions/StateValidator.ts:19
rpcUrl
rpcUrl: string;Defined in: packages/core/src/actions/StateValidator.ts:7
Inherited from
ClientConfig
Defined in: packages/core/src/clients/types.ts:6
Base configuration for all L2 Business Clients
Properties
client
client: object;Defined in: packages/core/src/clients/types.ts:11
Viem WalletClient for write operations. Must have an account attached.
account
account: Account;The Account of the Client.
addChain()
addChain: (args) => Promise<void>;Adds an EVM chain to the wallet.
- Docs: https://viem.sh/docs/actions/wallet/addChain
- JSON-RPC Methods:
eth_addEthereumChain
Parameters
| Parameter | Type | Description |
|---|---|---|
args | AddChainParameters | AddChainParameters |
Returns
Promise<void>
Example
import { createWalletClient, custom } from 'viem'
import { optimism } from 'viem/chains'
const client = createWalletClient({
transport: custom(window.ethereum),
})
await client.addChain({ chain: optimism })batch?
optional batch: object;Flags for batch settings.
batch.multicall?
optional multicall:
| boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};Toggle to enable eth_call multicall aggregation.
Type Declaration
boolean
{
batchSize?: number;
deployless?: boolean;
wait?: number;
}cacheTime
cacheTime: number;Time (in ms) that cached data will remain in memory.
ccipRead?
optional ccipRead:
| false
| {
request?: (parameters) => Promise<`0x${string}`>;
};CCIP Read configuration.
Type Declaration
false
{
request?: (parameters) => Promise<`0x${string}`>;
}chain
chain: Chain;Chain for the client.
deployContract()
deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>;Deploys a contract to the network, given bytecode and constructor arguments.
- Docs: https://viem.sh/docs/contract/deployContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts
Type Parameters
| Type Parameter |
|---|
abi extends readonly unknown[] | Abi |
chainOverride extends Chain | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | DeployContractParameters<abi, Chain, Account, chainOverride> | DeployContractParameters |
Returns
Promise<`0x${string}`>
The Transaction hash. DeployContractReturnType
Example
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const hash = await client.deployContract({
abi: [],
account: '0x…,
bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',
})experimental_blockTag?
optional experimental_blockTag: BlockTag;Default block tag to use for RPC requests.
extend()
extend: <client>(fn) => Client<Transport, Chain, Account, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain, Account>>;Type Parameters
| Type Parameter |
|---|
client extends object & ExactPartial<ExtendableProtectedActions<Transport, Chain, Account>> |
Parameters
| Parameter | Type |
|---|---|
fn | (client) => client |
Returns
Client<Transport, Chain, Account, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain, Account>>
fillTransaction()
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain, chainOverride>>;Fills a transaction request with the necessary fields to be signed over.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args | FillTransactionParameters<Chain, Account, chainOverride, accountOverride> |
Returns
Promise<FillTransactionReturnType<Chain, chainOverride>>
The filled transaction. FillTransactionReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const result = await client.fillTransaction({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
})getAddresses()
getAddresses: () => Promise<GetAddressesReturnType>;Returns a list of account addresses owned by the wallet or client.
- Docs: https://viem.sh/docs/actions/wallet/getAddresses
- JSON-RPC Methods:
eth_accounts
Returns
Promise<GetAddressesReturnType>
List of account addresses owned by the wallet or client. GetAddressesReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const accounts = await client.getAddresses()getCallsStatus()
getCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;Returns the status of a call batch that was sent via sendCalls.
- Docs: https://viem.sh/docs/actions/wallet/getCallsStatus
- JSON-RPC Methods:
wallet_getCallsStatus
Parameters
| Parameter | Type |
|---|---|
parameters | GetCallsStatusParameters |
Returns
Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>
Status of the calls. GetCallsStatusReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })getCapabilities()
getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>;Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc).
- Docs: https://viem.sh/docs/actions/wallet/getCapabilities
- JSON-RPC Methods:
wallet_getCapabilities
Type Parameters
| Type Parameter |
|---|
chainId extends number | undefined |
Parameters
| Parameter | Type |
|---|---|
parameters? | GetCapabilitiesParameters<chainId> |
Returns
Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: "supported" | "ready" | "unsupported" }; paymasterService?: { supported: boolean }; unstable_addSubAccount?: { keyTypes: ((...) | (...) | (...) | (...))[]; supported: boolean }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any }>, number>)[K] }>
The wallet's capabilities. GetCapabilitiesReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const capabilities = await client.getCapabilities({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})getChainId()
getChainId: () => Promise<number>;Returns the chain ID associated with the current network.
- Docs: https://viem.sh/docs/actions/public/getChainId
- JSON-RPC Methods:
eth_chainId
Returns
Promise<number>
The current chain ID. GetChainIdReturnType
Example
import { createWalletClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const chainId = await client.getChainId()
// 1getPermissions()
getPermissions: () => Promise<GetPermissionsReturnType>;Gets the wallets current permissions.
- Docs: https://viem.sh/docs/actions/wallet/getPermissions
- JSON-RPC Methods:
wallet_getPermissions
Returns
Promise<GetPermissionsReturnType>
The wallet permissions. GetPermissionsReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const permissions = await client.getPermissions()key
key: string;A key for the client.
name
name: string;A name for the client.
pollingInterval
pollingInterval: number;Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds.
prepareAuthorization()
prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>;Prepares an EIP-7702 Authorization object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. nonce and chainId).
With the prepared Authorization object, you can use signAuthorization to sign over the Authorization object.
Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | PrepareAuthorizationParameters<Account> | PrepareAuthorizationParameters |
Returns
Promise<PrepareAuthorizationReturnType>
The prepared Authorization object. PrepareAuthorizationReturnType
Examples
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: http(),
})
const authorization = await client.prepareAuthorization({
account: privateKeyToAccount('0x..'),
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const authorization = await client.prepareAuthorization({
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})prepareTransactionRequest()
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;Prepares a transaction request for signing.
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object & object | - |
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | PrepareTransactionRequestParameters<Chain, Account, chainOverride, accountOverride, request> | PrepareTransactionRequestParameters |
Returns
Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>
The transaction request. PrepareTransactionRequestReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})request
request: EIP1193RequestFn<WalletRpcSchema>;Request function wrapped with friendly error handling
requestAddresses()
requestAddresses: () => Promise<RequestAddressesReturnType>;Requests a list of accounts managed by a wallet.
- Docs: https://viem.sh/docs/actions/wallet/requestAddresses
- JSON-RPC Methods:
eth_requestAccounts
Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses).
This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts.
Returns
Promise<RequestAddressesReturnType>
List of accounts managed by a wallet RequestAddressesReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const accounts = await client.requestAddresses()requestPermissions()
requestPermissions: (args) => Promise<RequestPermissionsReturnType>;Requests permissions for a wallet.
- Docs: https://viem.sh/docs/actions/wallet/requestPermissions
- JSON-RPC Methods:
wallet_requestPermissions
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { [key: string]: Record<string, any>; eth_accounts: Record<string, any>; } | RequestPermissionsParameters |
args.eth_accounts | Record<string, any> | - |
Returns
Promise<RequestPermissionsReturnType>
The wallet permissions. RequestPermissionsReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const permissions = await client.requestPermissions({
eth_accounts: {}
})sendCalls()
sendCalls: <calls, chainOverride>(parameters) => Promise<{
capabilities?: {
[key: string]: any;
};
id: string;
}>;Requests the connected wallet to send a batch of calls.
- Docs: https://viem.sh/docs/actions/wallet/sendCalls
- JSON-RPC Methods:
wallet_sendCalls
Type Parameters
| Type Parameter | Default type |
|---|---|
calls extends readonly unknown[] | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
parameters | SendCallsParameters<Chain, Account, chainOverride, calls> |
Returns
Promise<{ capabilities?: { [key: string]: any; }; id: string; }>
Transaction identifier. SendCallsReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const id = await client.sendCalls({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
calls: [
{
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 69420n,
},
],
})sendCallsSync()
sendCallsSync: <calls, chainOverride>(parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block.
- Docs: https://viem.sh/docs/actions/wallet/sendCallsSync
- JSON-RPC Methods:
wallet_sendCalls
Type Parameters
| Type Parameter | Default type |
|---|---|
calls extends readonly unknown[] | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
parameters | SendCallsSyncParameters<Chain, Account, chainOverride, calls> |
Returns
Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>
Calls status. SendCallsSyncReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const status = await client.sendCallsSync({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
calls: [
{
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 69420n,
},
],
})sendRawTransaction()
sendRawTransaction: (args) => Promise<`0x${string}`>;Sends a signed transaction to the network
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction
- JSON-RPC Method:
eth_sendRawTransaction
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionParameters |
Returns
Promise<`0x${string}`>
The transaction hash. SendRawTransactionReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransaction } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.sendRawTransaction({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})sendRawTransactionSync()
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;Sends a signed transaction to the network synchronously, and waits for the transaction to be included in a block.
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync
- JSON-RPC Method:
eth_sendRawTransactionSync
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionSyncParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. SendRawTransactionSyncReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransactionSync } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.sendRawTransactionSync({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})sendTransaction()
sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>;Creates, signs, and sends a new transaction to the network.
- Docs: https://viem.sh/docs/actions/wallet/sendTransaction
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_sendTransaction - Local Accounts:
eth_sendRawTransaction
- JSON-RPC Accounts:
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SendTransactionParameters<Chain, Account, chainOverride, request> | SendTransactionParameters |
Returns
Promise<`0x${string}`>
The Transaction hash. SendTransactionReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.sendTransaction({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const hash = await client.sendTransaction({
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})sendTransactionSync()
sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>;Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt.
- Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_sendTransaction - Local Accounts:
eth_sendRawTransaction
- JSON-RPC Accounts:
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SendTransactionSyncParameters<Chain, Account, chainOverride, request> | SendTransactionParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. SendTransactionReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.sendTransactionSync({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const receipt = await client.sendTransactionSync({
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})showCallsStatus()
showCallsStatus: (parameters) => Promise<void>;Requests for the wallet to show information about a call batch that was sent via sendCalls.
- Docs: https://viem.sh/docs/actions/wallet/showCallsStatus
- JSON-RPC Methods:
wallet_showCallsStatus
Parameters
| Parameter | Type |
|---|---|
parameters | ShowCallsStatusParameters |
Returns
Promise<void>
Displays status of the calls in wallet. ShowCallsStatusReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
await client.showCallsStatus({ id: '0xdeadbeef' })signAuthorization()
signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>;Signs an EIP-7702 Authorization object.
With the calculated signature, you can:
- use
verifyAuthorizationto verify the signed Authorization object, - use
recoverAuthorizationAddressto recover the signing address from the signed Authorization object.
Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | SignAuthorizationParameters<Account> | SignAuthorizationParameters |
Returns
Promise<SignAuthorizationReturnType>
The signed Authorization object. SignAuthorizationReturnType
Examples
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: http(),
})
const signature = await client.signAuthorization({
account: privateKeyToAccount('0x..'),
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const signature = await client.signAuthorization({
contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})signMessage()
signMessage: (args) => Promise<`0x${string}`>;Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)).
- Docs: https://viem.sh/docs/actions/wallet/signMessage
- JSON-RPC Methods:
- JSON-RPC Accounts:
personal_sign - Local Accounts: Signs locally. No JSON-RPC request.
- JSON-RPC Accounts:
With the calculated signature, you can:
- use
verifyMessageto verify the signature, - use
recoverMessageAddressto recover the signing address from a signature.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SignMessageParameters<Account> | SignMessageParameters |
Returns
Promise<`0x${string}`>
The signed message. SignMessageReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const signature = await client.signMessage({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
message: 'hello world',
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const signature = await client.signMessage({
message: 'hello world',
})signTransaction()
signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never>,
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never
| GetTransactionType<request,
| request extends LegacyProperties ? "legacy" : never
| request extends EIP1559Properties ? "eip1559" : never
| request extends EIP2930Properties ? "eip2930" : never
| request extends EIP4844Properties ? "eip4844" : never
| request extends EIP7702Properties ? "eip7702" : never
| request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>;Signs a transaction.
- Docs: https://viem.sh/docs/actions/wallet/signTransaction
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_signTransaction - Local Accounts: Signs locally. No JSON-RPC request.
- JSON-RPC Accounts:
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | - |
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${string}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> | UnionOmit<ExtractChainFormatterParameters<DeriveChain<Chain, chainOverride>, "transactionRequest", TransactionRequest>, "from"> |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SignTransactionParameters<Chain, Account, chainOverride, request> | SignTransactionParameters |
Returns
Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>>
The signed message. SignTransactionReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})
const signature = await client.signTransaction(request)// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})
const signature = await client.signTransaction(request)signTypedData()
signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>;Signs typed data and calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)).
- Docs: https://viem.sh/docs/actions/wallet/signTypedData
- JSON-RPC Methods:
- JSON-RPC Accounts:
eth_signTypedData_v4 - Local Accounts: Signs locally. No JSON-RPC request.
- JSON-RPC Accounts:
Type Parameters
| Type Parameter |
|---|
typedData extends | { [key: string]: readonly TypedDataParameter[]; [key: `string[${string}]`]: undefined; [key: `function[${string}]`]: undefined; [key: `address[${string}]`]: undefined; [key: `bool[${string}]`]: undefined; [key: `bytes[${string}]`]: undefined; [key: `bytes2[${string}]`]: undefined; [key: `bytes1[${string}]`]: undefined; [key: `bytes10[${string}]`]: undefined; [key: `bytes32[${string}]`]: undefined; [key: `bytes16[${string}]`]: undefined; [key: `bytes8[${string}]`]: undefined; [key: `bytes4[${string}]`]: undefined; [key: `bytes3[${string}]`]: undefined; [key: `bytes15[${string}]`]: undefined; [key: `bytes26[${string}]`]: undefined; [key: `bytes18[${string}]`]: undefined; [key: `bytes27[${string}]`]: undefined; [key: `bytes28[${string}]`]: undefined; [key: `bytes12[${string}]`]: undefined; [key: `bytes6[${string}]`]: undefined; [key: `bytes5[${string}]`]: undefined; [key: `bytes31[${string}]`]: undefined; [key: `bytes7[${string}]`]: undefined; [key: `bytes22[${string}]`]: undefined; [key: `bytes9[${string}]`]: undefined; [key: `bytes11[${string}]`]: undefined; [key: `bytes13[${string}]`]: undefined; [key: `bytes14[${string}]`]: undefined; [key: `bytes17[${string}]`]: undefined; [key: `bytes19[${string}]`]: undefined; [key: `bytes20[${string}]`]: undefined; [key: `bytes21[${string}]`]: undefined; [key: `bytes23[${string}]`]: undefined; [key: `bytes24[${string}]`]: undefined; [key: `bytes25[${string}]`]: undefined; [key: `bytes29[${string}]`]: undefined; [key: `bytes30[${string}]`]: undefined; [key: `int[${string}]`]: undefined; [key: `int48[${string}]`]: undefined; [key: `int32[${string}]`]: undefined; [key: `int256[${string}]`]: undefined; [key: `int16[${string}]`]: undefined; [key: `int8[${string}]`]: undefined; [key: `int64[${string}]`]: undefined; [key: `int40[${string}]`]: undefined; [key: `int88[${string}]`]: undefined; [key: `int160[${string}]`]: undefined; [key: `int96[${string}]`]: undefined; [key: `int128[${string}]`]: undefined; [key: `int192[${string}]`]: undefined; [key: `int24[${string}]`]: undefined; [key: `int56[${string}]`]: undefined; [key: `int72[${string}]`]: undefined; [key: `int80[${string}]`]: undefined; [key: `int104[${string}]`]: undefined; [key: `int112[${string}]`]: undefined; [key: `int120[${string}]`]: undefined; [key: `int136[${string}]`]: undefined; [key: `int144[${string}]`]: undefined; [key: `int152[${string}]`]: undefined; [key: `int168[${string}]`]: undefined; [key: `int176[${string}]`]: undefined; [key: `int184[${string}]`]: undefined; [key: `int200[${string}]`]: undefined; [key: `int208[${string}]`]: undefined; [key: `int216[${string}]`]: undefined; [key: `int224[${string}]`]: undefined; [key: `int232[${string}]`]: undefined; [key: `int240[${string}]`]: undefined; [key: `int248[${string}]`]: undefined; [key: `uint[${string}]`]: undefined; [key: `uint48[${string}]`]: undefined; [key: `uint32[${string}]`]: undefined; [key: `uint256[${string}]`]: undefined; [key: `uint16[${string}]`]: undefined; [key: `uint8[${string}]`]: undefined; [key: `uint64[${string}]`]: undefined; [key: `uint40[${string}]`]: undefined; [key: `uint88[${string}]`]: undefined; [key: `uint160[${string}]`]: undefined; [key: `uint96[${string}]`]: undefined; [key: `uint128[${string}]`]: undefined; [key: `uint192[${string}]`]: undefined; [key: `uint24[${string}]`]: undefined; [key: `uint56[${string}]`]: undefined; [key: `uint72[${string}]`]: undefined; [key: `uint80[${string}]`]: undefined; [key: `uint104[${string}]`]: undefined; [key: `uint112[${string}]`]: undefined; [key: `uint120[${string}]`]: undefined; [key: `uint136[${string}]`]: undefined; [key: `uint144[${string}]`]: undefined; [key: `uint152[${string}]`]: undefined; [key: `uint168[${string}]`]: undefined; [key: `uint176[${string}]`]: undefined; [key: `uint184[${string}]`]: undefined; [key: `uint200[${string}]`]: undefined; [key: `uint208[${string}]`]: undefined; [key: `uint216[${string}]`]: undefined; [key: `uint224[${string}]`]: undefined; [key: `uint232[${string}]`]: undefined; [key: `uint240[${string}]`]: undefined; [key: `uint248[${string}]`]: undefined; address?: undefined; bool?: undefined; bytes?: undefined; bytes1?: undefined; bytes10?: undefined; bytes11?: undefined; bytes12?: undefined; bytes13?: undefined; bytes14?: undefined; bytes15?: undefined; bytes16?: undefined; bytes17?: undefined; bytes18?: undefined; bytes19?: undefined; bytes2?: undefined; bytes20?: undefined; bytes21?: undefined; bytes22?: undefined; bytes23?: undefined; bytes24?: undefined; bytes25?: undefined; bytes26?: undefined; bytes27?: undefined; bytes28?: undefined; bytes29?: undefined; bytes3?: undefined; bytes30?: undefined; bytes31?: undefined; bytes32?: undefined; bytes4?: undefined; bytes5?: undefined; bytes6?: undefined; bytes7?: undefined; bytes8?: undefined; bytes9?: undefined; int104?: undefined; int112?: undefined; int120?: undefined; int128?: undefined; int136?: undefined; int144?: undefined; int152?: undefined; int16?: undefined; int160?: undefined; int168?: undefined; int176?: undefined; int184?: undefined; int192?: undefined; int200?: undefined; int208?: undefined; int216?: undefined; int224?: undefined; int232?: undefined; int24?: undefined; int240?: undefined; int248?: undefined; int256?: undefined; int32?: undefined; int40?: undefined; int48?: undefined; int56?: undefined; int64?: undefined; int72?: undefined; int8?: undefined; int80?: undefined; int88?: undefined; int96?: undefined; string?: undefined; uint104?: undefined; uint112?: undefined; uint120?: undefined; uint128?: undefined; uint136?: undefined; uint144?: undefined; uint152?: undefined; uint16?: undefined; uint160?: undefined; uint168?: undefined; uint176?: undefined; uint184?: undefined; uint192?: undefined; uint200?: undefined; uint208?: undefined; uint216?: undefined; uint224?: undefined; uint232?: undefined; uint24?: undefined; uint240?: undefined; uint248?: undefined; uint256?: undefined; uint32?: undefined; uint40?: undefined; uint48?: undefined; uint56?: undefined; uint64?: undefined; uint72?: undefined; uint8?: undefined; uint80?: undefined; uint88?: undefined; uint96?: undefined; } | { [key: string]: unknown; } |
primaryType extends string |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SignTypedDataParameters<typedData, primaryType, Account> | SignTypedDataParameters |
Returns
Promise<`0x${string}`>
The signed data. SignTypedDataReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const signature = await client.signTypedData({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
domain: {
name: 'Ether Mail',
version: '1',
chainId: 1,
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
},
types: {
Person: [
{ name: 'name', type: 'string' },
{ name: 'wallet', type: 'address' },
],
Mail: [
{ name: 'from', type: 'Person' },
{ name: 'to', type: 'Person' },
{ name: 'contents', type: 'string' },
],
},
primaryType: 'Mail',
message: {
from: {
name: 'Cow',
wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
},
to: {
name: 'Bob',
wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
},
contents: 'Hello, Bob!',
},
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: http(),
})
const signature = await client.signTypedData({
domain: {
name: 'Ether Mail',
version: '1',
chainId: 1,
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
},
types: {
Person: [
{ name: 'name', type: 'string' },
{ name: 'wallet', type: 'address' },
],
Mail: [
{ name: 'from', type: 'Person' },
{ name: 'to', type: 'Person' },
{ name: 'contents', type: 'string' },
],
},
primaryType: 'Mail',
message: {
from: {
name: 'Cow',
wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
},
to: {
name: 'Bob',
wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
},
contents: 'Hello, Bob!',
},
})switchChain()
switchChain: (args) => Promise<void>;Switch the target chain in a wallet.
- Docs: https://viem.sh/docs/actions/wallet/switchChain
- JSON-RPC Methods:
eth_switchEthereumChain
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SwitchChainParameters | SwitchChainParameters |
Returns
Promise<void>
Example
import { createWalletClient, custom } from 'viem'
import { mainnet, optimism } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
await client.switchChain({ id: optimism.id })transport
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;The RPC transport
type
type: string;The type of client.
uid
uid: string;A unique ID for the client.
waitForCallsStatus()
waitForCallsStatus: (parameters) => Promise<{
atomic: boolean;
capabilities?: | {
[key: string]: any;
}
| {
[key: string]: any;
};
chainId: number;
id: string;
receipts?: WalletCallReceipt<bigint, "success" | "reverted">[];
status: "pending" | "success" | "failure" | undefined;
statusCode: number;
version: string;
}>;Waits for the status & receipts of a call bundle that was sent via sendCalls.
- Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus
- JSON-RPC Methods:
wallet_getCallsStatus
Parameters
| Parameter | Type | Description |
|---|---|---|
parameters | WaitForCallsStatusParameters | WaitForCallsStatusParameters |
Returns
Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>
Status & receipts of the call bundle. WaitForCallsStatusReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })watchAsset()
watchAsset: (args) => Promise<boolean>;Adds an EVM chain to the wallet.
- Docs: https://viem.sh/docs/actions/wallet/watchAsset
- JSON-RPC Methods:
eth_switchEthereumChain
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchAssetParams | WatchAssetParameters |
Returns
Promise<boolean>
Boolean indicating if the token was successfully added. WatchAssetReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const success = await client.watchAsset({
type: 'ERC20',
options: {
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
decimals: 18,
symbol: 'WETH',
},
})writeContract()
writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>;Executes a write function on a contract.
- Docs: https://viem.sh/docs/contract/writeContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts
A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state.
Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data.
Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
functionName extends string | - |
args extends unknown | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WriteContractParameters<abi, functionName, args, Chain, Account, chainOverride> | WriteContractParameters |
Returns
Promise<`0x${string}`>
A Transaction Hash. WriteContractReturnType
Examples
import { createWalletClient, custom, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.writeContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
functionName: 'mint',
args: [69420],
})// With Validation
import { createWalletClient, custom, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const { request } = await client.simulateContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
functionName: 'mint',
args: [69420],
}
const hash = await client.writeContract(request)writeContractSync()
writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>;Executes a write function on a contract synchronously. Returns the transaction receipt.
A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a Transaction is needed to be broadcast in order to change the state.
Internally, uses a Wallet Client to call the sendTransaction action with ABI-encoded data.
Warning: The write internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to simulate the contract write with contract.simulate before you execute it.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
functionName extends string | - |
args extends unknown | - |
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WriteContractSyncParameters<abi, functionName, args, Chain, Account, chainOverride> | WriteContractSyncParameters |
Returns
Promise<TransactionReceipt>
A Transaction Receipt. WriteContractSyncReturnType
Example
import { createWalletClient, custom, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.writeContractSync({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
functionName: 'mint',
args: [69420],
})entryPointAddress?
optional entryPointAddress: `0x${string}`;Defined in: packages/core/src/clients/types.ts:46
ethUsdPriceFeedAddress?
optional ethUsdPriceFeedAddress: `0x${string}`;Defined in: packages/core/src/clients/types.ts:45
gTokenAddress?
optional gTokenAddress: `0x${string}`;Defined in: packages/core/src/clients/types.ts:31
GToken contract address. Required for operations involving token approvals and transfers.
gTokenStakingAddress?
optional gTokenStakingAddress: `0x${string}`;Defined in: packages/core/src/clients/types.ts:37
GTokenStaking contract address. Required for role registration that involves staking.
paymasterFactoryAddress?
optional paymasterFactoryAddress: `0x${string}`;Defined in: packages/core/src/clients/types.ts:43
PaymasterFactory contract address. Required for deploying new PaymasterV4 instances.
publicClient?
optional publicClient: object;Defined in: packages/core/src/clients/types.ts:19
Optional PublicClient for read operations. If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider. However, explicitly accepting PublicClient encourages separation.
account
account: undefined;The Account of the Client.
batch?
optional batch: object;Flags for batch settings.
batch.multicall?
optional multicall:
| boolean
| {
batchSize?: number;
deployless?: boolean;
wait?: number;
};Toggle to enable eth_call multicall aggregation.
Type Declaration
boolean
{
batchSize?: number;
deployless?: boolean;
wait?: number;
}cacheTime
cacheTime: number;Time (in ms) that cached data will remain in memory.
call()
call: (parameters) => Promise<CallReturnType>;Executes a new message call immediately without submitting a transaction to the network.
- Docs: https://viem.sh/docs/actions/public/call
- JSON-RPC Methods:
eth_call
Parameters
| Parameter | Type |
|---|---|
parameters | CallParameters<Chain | undefined> |
Returns
Promise<CallReturnType>
The call data. CallReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const data = await client.call({
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
})ccipRead?
optional ccipRead:
| false
| {
request?: (parameters) => Promise<`0x${string}`>;
};CCIP Read configuration.
Type Declaration
false
{
request?: (parameters) => Promise<`0x${string}`>;
}chain
chain: Chain | undefined;Chain for the client.
createAccessList()
createAccessList: (parameters) => Promise<{
accessList: AccessList;
gasUsed: bigint;
}>;Creates an EIP-2930 access list that you can include in a transaction.
- Docs: https://viem.sh/docs/actions/public/createAccessList
- JSON-RPC Methods:
eth_createAccessList
Parameters
| Parameter | Type |
|---|---|
parameters | CreateAccessListParameters<Chain | undefined> |
Returns
Promise<{ accessList: AccessList; gasUsed: bigint; }>
The call data. CreateAccessListReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const data = await client.createAccessList({
data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
})createBlockFilter()
createBlockFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "block";
}>;Creates a Filter to listen for new block hashes that can be used with getFilterChanges.
- Docs: https://viem.sh/docs/actions/public/createBlockFilter
- JSON-RPC Methods:
eth_newBlockFilter
Returns
Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${(...)}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }>
Filter. CreateBlockFilterReturnType
Example
import { createPublicClient, createBlockFilter, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await createBlockFilter(client)
// { id: "0x345a6572337856574a76364e457a4366", type: 'block' }createContractEventFilter()
createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>;Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
eventName extends string | undefined | - |
args extends readonly unknown[] | Record<string, unknown> | undefined | - |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | CreateContractEventFilterParameters<abi, eventName, args, strict, fromBlock, toBlock> | CreateContractEventFilterParameters |
Returns
Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>
Filter. CreateContractEventFilterReturnType
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createContractEventFilter({
abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
})createEventFilter()
createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>;Creates a Filter to listen for new events that can be used with getFilterChanges.
- Docs: https://viem.sh/docs/actions/public/createEventFilter
- JSON-RPC Methods:
eth_newFilter
Type Parameters
| Type Parameter | Default type |
|---|---|
abiEvent extends AbiEvent | undefined | undefined |
abiEvents extends readonly unknown[] | readonly AbiEvent[] | undefined | abiEvent extends AbiEvent ? [abiEvent<abiEvent>] : undefined |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
_EventName extends string | undefined | MaybeAbiEventName<abiEvent> |
_Args extends readonly unknown[] | Record<string, unknown> | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | CreateEventFilterParameters<abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args> | CreateEventFilterParameters |
Returns
Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>
Filter. CreateEventFilterReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2',
})createPendingTransactionFilter()
createPendingTransactionFilter: () => Promise<{
id: `0x${string}`;
request: EIP1193RequestFn<readonly [{
Method: "eth_getFilterChanges";
Parameters: [`0x${string}`];
ReturnType: `0x${(...)}`[] | RpcLog[];
}, {
Method: "eth_getFilterLogs";
Parameters: [`0x${string}`];
ReturnType: RpcLog[];
}, {
Method: "eth_uninstallFilter";
Parameters: [`0x${string}`];
ReturnType: boolean;
}]>;
type: "transaction";
}>;Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges.
- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter
- JSON-RPC Methods:
eth_newPendingTransactionFilter
Returns
Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${(...)}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }>
Filter. CreateBlockFilterReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createPendingTransactionFilter()
// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }estimateContractGas()
estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>;Estimates the gas required to successfully execute a contract write function call.
Type Parameters
| Type Parameter |
|---|
chain extends Chain | undefined |
abi extends readonly unknown[] | Abi |
functionName extends string |
args extends unknown |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | EstimateContractGasParameters<abi, functionName, args, chain> | EstimateContractGasParameters |
Returns
Promise<bigint>
The gas estimate (in wei). EstimateContractGasReturnType
Remarks
Internally, uses a Public Client to call the estimateGas action with ABI-encoded data.
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gas = await client.estimateContractGas({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint() public']),
functionName: 'mint',
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
})estimateFeesPerGas()
estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>;Returns an estimate for the fees per gas for a transaction to be included in the next block.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
type extends FeeValuesType | "eip1559" |
Parameters
| Parameter | Type |
|---|---|
args? | EstimateFeesPerGasParameters<Chain | undefined, chainOverride, type> |
Returns
Promise<EstimateFeesPerGasReturnType<type>>
An estimate (in wei) for the fees per gas. EstimateFeesPerGasReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const maxPriorityFeePerGas = await client.estimateFeesPerGas()
// { maxFeePerGas: ..., maxPriorityFeePerGas: ... }estimateGas()
estimateGas: (args) => Promise<bigint>;Estimates the gas necessary to complete a transaction without submitting it to the network.
- Docs: https://viem.sh/docs/actions/public/estimateGas
- JSON-RPC Methods:
eth_estimateGas
Parameters
| Parameter | Type | Description |
|---|---|---|
args | EstimateGasParameters<Chain | undefined> | EstimateGasParameters |
Returns
Promise<bigint>
The gas estimate (in wei). EstimateGasReturnType
Example
import { createPublicClient, http, parseEther } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gasEstimate = await client.estimateGas({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
})estimateMaxPriorityFeePerGas()
estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>;Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args? | { chain: chainOverride | null; } |
args.chain? | chainOverride | null |
Returns
Promise<bigint>
An estimate (in wei) for the max priority fee per gas. EstimateMaxPriorityFeePerGasReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas()
// 10000000nexperimental_blockTag?
optional experimental_blockTag: BlockTag;Default block tag to use for RPC requests.
extend()
extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>;Type Parameters
| Type Parameter |
|---|
client extends object & ExactPartial<ExtendableProtectedActions<Transport, Chain | undefined, undefined>> |
Parameters
| Parameter | Type |
|---|---|
fn | (client) => client |
Returns
Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>
fillTransaction()
fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>;Fills a transaction request with the necessary fields to be signed over.
Type Parameters
| Type Parameter | Default type |
|---|---|
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args | FillTransactionParameters<Chain | undefined, Account | undefined, chainOverride, accountOverride> |
Returns
Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>
The filled transaction. FillTransactionReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.fillTransaction({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
})getBalance()
getBalance: (args) => Promise<bigint>;Returns the balance of an address in wei.
- Docs: https://viem.sh/docs/actions/public/getBalance
- JSON-RPC Methods:
eth_getBalance
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetBalanceParameters | GetBalanceParameters |
Returns
Promise<bigint>
The balance of the address in wei. GetBalanceReturnType
Remarks
You can convert the balance to ether units with formatEther.
const balance = await getBalance(client, {
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
blockTag: 'safe'
})
const balanceAsEther = formatEther(balance)
// "6.942"Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const balance = await client.getBalance({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})
// 10000000000000000000000n (wei)getBlobBaseFee()
getBlobBaseFee: () => Promise<bigint>;Returns the base fee per blob gas in wei.
- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee
- JSON-RPC Methods:
eth_blobBaseFee
Returns
Promise<bigint>
The blob base fee (in wei). GetBlobBaseFeeReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { getBlobBaseFee } from 'viem/public'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const blobBaseFee = await client.getBlobBaseFee()getBlock()
getBlock: <includeTransactions, blockTag>(args?) => Promise<{
baseFeePerGas: bigint | null;
blobGasUsed: bigint;
difficulty: bigint;
excessBlobGas: bigint;
extraData: `0x${string}`;
gasLimit: bigint;
gasUsed: bigint;
hash: blockTag extends "pending" ? null : `0x${string}`;
logsBloom: blockTag extends "pending" ? null : `0x${string}`;
miner: `0x${string}`;
mixHash: `0x${string}`;
nonce: blockTag extends "pending" ? null : `0x${string}`;
number: blockTag extends "pending" ? null : bigint;
parentBeaconBlockRoot?: `0x${string}`;
parentHash: `0x${string}`;
receiptsRoot: `0x${string}`;
sealFields: `0x${string}`[];
sha3Uncles: `0x${string}`;
size: bigint;
stateRoot: `0x${string}`;
timestamp: bigint;
totalDifficulty: bigint | null;
transactions: includeTransactions extends true ? (
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "legacy";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip2930";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip1559";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${(...)}`[];
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip4844";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`;
blockNumber: ... extends ... ? ... : ... extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${(...)}` | null;
transactionIndex: ... extends ... ? ... : ... extends true ? null : number;
type: "eip7702";
typeHex: `0x${(...)}` | null;
v: bigint;
value: bigint;
yParity: number;
})[] : `0x${string}`[];
transactionsRoot: `0x${string}`;
uncles: `0x${string}`[];
withdrawals?: Withdrawal[];
withdrawalsRoot?: `0x${string}`;
}>;Returns information about a block at a block number, hash, or tag.
- Docs: https://viem.sh/docs/actions/public/getBlock
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks
- JSON-RPC Methods:
- Calls
eth_getBlockByNumberforblockNumber&blockTag. - Calls
eth_getBlockByHashforblockHash.
- Calls
Type Parameters
| Type Parameter | Default type |
|---|---|
includeTransactions extends boolean | false |
blockTag extends BlockTag | "latest" |
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetBlockParameters<includeTransactions, blockTag> | GetBlockParameters |
Returns
Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "legacy"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip2930"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip1559"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${(...)}`[]; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip4844"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ... extends true ? null : `0x${(...)}`; blockNumber: ... extends ... ? ... : ... extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${(...)}` | null; transactionIndex: ... extends ... ? ... : ... extends true ? null : number; type: "eip7702"; typeHex: `0x${(...)}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>
Information about the block. GetBlockReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const block = await client.getBlock()getBlockNumber()
getBlockNumber: (args?) => Promise<bigint>;Returns the number of the most recent block seen.
- Docs: https://viem.sh/docs/actions/public/getBlockNumber
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks
- JSON-RPC Methods:
eth_blockNumber
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetBlockNumberParameters | GetBlockNumberParameters |
Returns
Promise<bigint>
The number of the block. GetBlockNumberReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const blockNumber = await client.getBlockNumber()
// 69420ngetBlockTransactionCount()
getBlockTransactionCount: (args?) => Promise<number>;Returns the number of Transactions at a block number, hash, or tag.
- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount
- JSON-RPC Methods:
- Calls
eth_getBlockTransactionCountByNumberforblockNumber&blockTag. - Calls
eth_getBlockTransactionCountByHashforblockHash.
- Calls
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetBlockTransactionCountParameters | GetBlockTransactionCountParameters |
Returns
Promise<number>
The block transaction count. GetBlockTransactionCountReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const count = await client.getBlockTransactionCount()getBytecode()
getBytecode: (args) => Promise<GetCodeReturnType>;Parameters
| Parameter | Type |
|---|---|
args | GetCodeParameters |
Returns
Promise<GetCodeReturnType>
Deprecated
Use getCode instead.
getChainId()
getChainId: () => Promise<number>;Returns the chain ID associated with the current network.
- Docs: https://viem.sh/docs/actions/public/getChainId
- JSON-RPC Methods:
eth_chainId
Returns
Promise<number>
The current chain ID. GetChainIdReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const chainId = await client.getChainId()
// 1getCode()
getCode: (args) => Promise<GetCodeReturnType>;Retrieves the bytecode at an address.
- Docs: https://viem.sh/docs/contract/getCode
- JSON-RPC Methods:
eth_getCode
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetCodeParameters | GetBytecodeParameters |
Returns
Promise<GetCodeReturnType>
The contract's bytecode. GetBytecodeReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const code = await client.getCode({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
})getContractEvents()
getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>;Returns a list of event logs emitted by a contract.
- Docs: https://viem.sh/docs/actions/public/getContractEvents
- JSON-RPC Methods:
eth_getLogs
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
eventName extends string | undefined | undefined |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type |
|---|---|
args | GetContractEventsParameters<abi, eventName, strict, fromBlock, toBlock> |
Returns
Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>
A list of event logs. GetContractEventsReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { wagmiAbi } from './abi'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const logs = await client.getContractEvents(client, {
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: wagmiAbi,
eventName: 'Transfer'
})getEip712Domain()
getEip712Domain: (args) => Promise<GetEip712DomainReturnType>;Reads the EIP-712 domain from a contract, based on the ERC-5267 specification.
Parameters
| Parameter | Type |
|---|---|
args | GetEip712DomainParameters |
Returns
Promise<GetEip712DomainReturnType>
The EIP-712 domain, fields, and extensions. GetEip712DomainReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const domain = await client.getEip712Domain({
address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
})
// {
// domain: {
// name: 'ExampleContract',
// version: '1',
// chainId: 1,
// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
// },
// fields: '0x0f',
// extensions: [],
// }getEnsAddress()
getEnsAddress: (args) => Promise<GetEnsAddressReturnType>;Gets address for ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsAddress
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { blockNumber?: bigint; blockTag?: BlockTag; coinType?: bigint; gatewayUrls?: string[]; name: string; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsAddressParameters |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.coinType? | bigint | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the coinType for a chain id, use the toCoinType function: import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id) Default 60n |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.name | string | Name to get the address for. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsAddressReturnType>
Address for ENS name or null if not found. GetEnsAddressReturnType
Remarks
Calls resolve(bytes, bytes) on ENS Universal Resolver Contract.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensAddress = await client.getEnsAddress({
name: normalize('wevm.eth'),
})
// '0xd2135CfB216b74109775236E36d4b433F1DF507B'getEnsAvatar()
getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>;Gets the avatar of an ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { assetGatewayUrls?: AssetGatewayUrls; blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: string[]; name: string; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsAvatarParameters |
args.assetGatewayUrls? | AssetGatewayUrls | Gateway urls to resolve IPFS and/or Arweave assets. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.name | string | ENS name to get Text for. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsAvatarReturnType>
Avatar URI or null if not found. GetEnsAvatarReturnType
Remarks
Calls getEnsText with key set to 'avatar'.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensAvatar = await client.getEnsAvatar({
name: normalize('wevm.eth'),
})
// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'getEnsName()
getEnsName: (args) => Promise<GetEnsNameReturnType>;Gets primary name for specified address.
- Docs: https://viem.sh/docs/ens/actions/getEnsName
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { address: `0x${string}`; blockNumber?: bigint; blockTag?: BlockTag; coinType?: bigint; gatewayUrls?: string[]; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsNameParameters |
args.address | `0x${string}` | Address to get ENS name for. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.coinType? | bigint | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the coinType for a chain id, use the toCoinType function: import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id) Default 60n |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsNameReturnType>
Name or null if not found. GetEnsNameReturnType
Remarks
Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensName = await client.getEnsName({
address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
})
// 'wevm.eth'getEnsResolver()
getEnsResolver: (args) => Promise<`0x${string}`>;Gets resolver for ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsResolver
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { blockNumber?: bigint; blockTag?: BlockTag; name: string; universalResolverAddress?: `0x${string}`; } | GetEnsResolverParameters |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.name | string | Name to get the address for. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<`0x${string}`>
Address for ENS resolver. GetEnsResolverReturnType
Remarks
Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const resolverAddress = await client.getEnsResolver({
name: normalize('wevm.eth'),
})
// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'getEnsText()
getEnsText: (args) => Promise<GetEnsTextReturnType>;Gets a text record for specified ENS name.
- Docs: https://viem.sh/docs/ens/actions/getEnsResolver
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: string[]; key: string; name: string; strict?: boolean; universalResolverAddress?: `0x${string}`; } | GetEnsTextParameters |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.gatewayUrls? | string[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. |
args.key | string | Text record to retrieve. |
args.name | string | ENS name to get Text for. |
args.strict? | boolean | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. |
args.universalResolverAddress? | `0x${string}` | Address of ENS Universal Resolver Contract. |
Returns
Promise<GetEnsTextReturnType>
Address for ENS resolver. GetEnsTextReturnType
Remarks
Calls resolve(bytes, bytes) on ENS Universal Resolver Contract.
Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const twitterRecord = await client.getEnsText({
name: normalize('wevm.eth'),
key: 'com.twitter',
})
// 'wevm_dev'getFeeHistory()
getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>;Returns a collection of historical gas information.
- Docs: https://viem.sh/docs/actions/public/getFeeHistory
- JSON-RPC Methods:
eth_feeHistory
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetFeeHistoryParameters | GetFeeHistoryParameters |
Returns
Promise<GetFeeHistoryReturnType>
The gas estimate (in wei). GetFeeHistoryReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const feeHistory = await client.getFeeHistory({
blockCount: 4,
rewardPercentiles: [25, 75],
})getFilterChanges()
getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>;Returns a list of logs or hashes based on a Filter since the last time it was called.
- Docs: https://viem.sh/docs/actions/public/getFilterChanges
- JSON-RPC Methods:
eth_getFilterChanges
Type Parameters
| Type Parameter | Default type |
|---|---|
filterType extends FilterType | - |
abi extends readonly unknown[] | Abi | undefined | - |
eventName extends string | undefined | - |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetFilterChangesParameters<filterType, abi, eventName, strict, fromBlock, toBlock> | GetFilterChangesParameters |
Returns
Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>
Logs or hashes. GetFilterChangesReturnType
Remarks
A Filter can be created from the following actions:
Depending on the type of filter, the return value will be different:
- If the filter was created with
createContractEventFilterorcreateEventFilter, it returns a list of logs. - If the filter was created with
createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with
createBlockFilter, it returns a list of block hashes.
Examples
// Blocks
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createBlockFilter()
const hashes = await client.getFilterChanges({ filter })// Contract Events
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createContractEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
eventName: 'Transfer',
})
const logs = await client.getFilterChanges({ filter })// Raw Events
import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
})
const logs = await client.getFilterChanges({ filter })// Transactions
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createPendingTransactionFilter()
const hashes = await client.getFilterChanges({ filter })getFilterLogs()
getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>;Returns a list of event logs since the filter was created.
- Docs: https://viem.sh/docs/actions/public/getFilterLogs
- JSON-RPC Methods:
eth_getFilterLogs
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | undefined | - |
eventName extends string | undefined | - |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetFilterLogsParameters<abi, eventName, strict, fromBlock, toBlock> | GetFilterLogsParameters |
Returns
Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>
A list of event logs. GetFilterLogsReturnType
Remarks
getFilterLogs is only compatible with event filters.
Example
import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
})
const logs = await client.getFilterLogs({ filter })getGasPrice()
getGasPrice: () => Promise<bigint>;Returns the current price of gas (in wei).
- Docs: https://viem.sh/docs/actions/public/getGasPrice
- JSON-RPC Methods:
eth_gasPrice
Returns
Promise<bigint>
The gas price (in wei). GetGasPriceReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gasPrice = await client.getGasPrice()getLogs()
getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>;Returns a list of event logs matching the provided parameters.
- Docs: https://viem.sh/docs/actions/public/getLogs
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs
- JSON-RPC Methods:
eth_getLogs
Type Parameters
| Type Parameter | Default type |
|---|---|
abiEvent extends AbiEvent | undefined | undefined |
abiEvents extends readonly unknown[] | readonly AbiEvent[] | undefined | abiEvent extends AbiEvent ? [abiEvent<abiEvent>] : undefined |
strict extends boolean | undefined | undefined |
fromBlock extends bigint | BlockTag | undefined | undefined |
toBlock extends bigint | BlockTag | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args? | GetLogsParameters<abiEvent, abiEvents, strict, fromBlock, toBlock> | GetLogsParameters |
Returns
Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>
A list of event logs. GetLogsReturnType
Example
import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const logs = await client.getLogs()getProof()
getProof: (args) => Promise<GetProofReturnType>;Returns the account and storage values of the specified account including the Merkle-proof.
- Docs: https://viem.sh/docs/actions/public/getProof
- JSON-RPC Methods:
- Calls
eth_getProof
- Calls
Parameters
| Parameter | Type |
|---|---|
args | GetProofParameters |
Returns
Promise<GetProofReturnType>
Proof data. GetProofReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const block = await client.getProof({
address: '0x...',
storageKeys: ['0x...'],
})getStorageAt()
getStorageAt: (args) => Promise<GetStorageAtReturnType>;Returns the value from a storage slot at a given address.
- Docs: https://viem.sh/docs/contract/getStorageAt
- JSON-RPC Methods:
eth_getStorageAt
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetStorageAtParameters | GetStorageAtParameters |
Returns
Promise<GetStorageAtReturnType>
The value of the storage slot. GetStorageAtReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { getStorageAt } from 'viem/contract'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const code = await client.getStorageAt({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
slot: toHex(0),
})getTransaction()
getTransaction: <blockTag>(args) => Promise<
| {
accessList?: undefined;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId?: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "legacy";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity?: undefined;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice: bigint;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas?: undefined;
maxPriorityFeePerGas?: undefined;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip2930";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip1559";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList?: undefined;
blobVersionedHashes: readonly `0x${string}`[];
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip4844";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}
| {
accessList: AccessList;
authorizationList: SignedAuthorizationList;
blobVersionedHashes?: undefined;
blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`;
blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint;
chainId: number;
from: `0x${string}`;
gas: bigint;
gasPrice?: undefined;
hash: `0x${string}`;
input: `0x${string}`;
maxFeePerBlobGas?: undefined;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
nonce: number;
r: `0x${string}`;
s: `0x${string}`;
to: `0x${string}` | null;
transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number;
type: "eip7702";
typeHex: `0x${string}` | null;
v: bigint;
value: bigint;
yParity: number;
}>;Returns information about a Transaction given a hash or block identifier.
- Docs: https://viem.sh/docs/actions/public/getTransaction
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions
- JSON-RPC Methods:
eth_getTransactionByHash
Type Parameters
| Type Parameter | Default type |
|---|---|
blockTag extends BlockTag | "latest" |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionParameters<blockTag> | GetTransactionParameters |
Returns
Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>
The transaction information. GetTransactionReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transaction = await client.getTransaction({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})getTransactionConfirmations()
getTransactionConfirmations: (args) => Promise<bigint>;Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions
- JSON-RPC Methods:
eth_getTransactionConfirmations
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionConfirmationsParameters<Chain | undefined> | GetTransactionConfirmationsParameters |
Returns
Promise<bigint>
The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. GetTransactionConfirmationsReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const confirmations = await client.getTransactionConfirmations({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})getTransactionCount()
getTransactionCount: (args) => Promise<number>;Returns the number of Transactions an Account has broadcast / sent.
- Docs: https://viem.sh/docs/actions/public/getTransactionCount
- JSON-RPC Methods:
eth_getTransactionCount
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionCountParameters | GetTransactionCountParameters |
Returns
Promise<number>
The number of transactions an account has sent. GetTransactionCountReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionCount = await client.getTransactionCount({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})getTransactionReceipt()
getTransactionReceipt: (args) => Promise<TransactionReceipt>;Returns the Transaction Receipt given a Transaction hash.
- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions
- JSON-RPC Methods:
eth_getTransactionReceipt
Parameters
| Parameter | Type | Description |
|---|---|---|
args | GetTransactionReceiptParameters | GetTransactionReceiptParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. GetTransactionReceiptReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionReceipt = await client.getTransactionReceipt({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})key
key: string;A key for the client.
multicall()
multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>;Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract.
Type Parameters
| Type Parameter | Default type |
|---|---|
contracts extends readonly unknown[] | - |
allowFailure extends boolean | true |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | MulticallParameters<contracts, allowFailure> | MulticallParameters |
Returns
Promise<MulticallReturnType<contracts, allowFailure>>
An array of results with accompanying status. MulticallReturnType
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const abi = parseAbi([
'function balanceOf(address) view returns (uint256)',
'function totalSupply() view returns (uint256)',
])
const result = await client.multicall({
contracts: [
{
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi,
functionName: 'balanceOf',
args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
},
{
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi,
functionName: 'totalSupply',
},
],
})
// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]name
name: string;A name for the client.
pollingInterval
pollingInterval: number;Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds.
prepareTransactionRequest()
prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>;Prepares a transaction request for signing.
Type Parameters
| Type Parameter | Default type |
|---|---|
request extends | Omit<{ accessList?: undefined; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "legacy"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: bigint; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip2930"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip1559"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs?: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${(...)}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: undefined; blobs: readonly `0x${string}`[] | readonly ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[]; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: Kzg; maxFeePerBlobGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: readonly BlobSidecar<`0x${(...)}`>[]; to: `0x${string}` | null; type?: "eip4844"; value?: bigint; }, "from"> | Omit<{ accessList?: AccessList; authorizationList?: AuthorizationList<number, boolean>; blobs?: undefined; blobVersionedHashes?: undefined; data?: `0x${string}`; from?: `0x${string}`; gas?: bigint; gasPrice?: undefined; kzg?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce?: number; sidecars?: undefined; to?: `0x${string}` | null; type?: "eip7702"; value?: bigint; }, "from"> & object & object | - |
chainOverride extends Chain | undefined | undefined |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | PrepareTransactionRequestParameters<Chain | undefined, Account | undefined, chainOverride, accountOverride, request> | PrepareTransactionRequestParameters |
Returns
Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...) & (...) & (...), (...) extends (...) ? (...) : (...)> & { chainId?: (...) | (...) }, ParameterTypeToParameters<(...)[(...)] extends readonly (...)[] ? (...)[(...)] : (...) | (...) | (...) | (...) | (...) | (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>
The transaction request. PrepareTransactionRequestReturnType
Examples
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})readContract()
readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>;Calls a read-only function on a contract, and returns the response.
- Docs: https://viem.sh/docs/contract/readContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts
Type Parameters
| Type Parameter |
|---|
abi extends readonly unknown[] | Abi |
functionName extends string |
args extends unknown |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | ReadContractParameters<abi, functionName, args> | ReadContractParameters |
Returns
Promise<ReadContractReturnType<abi, functionName, args>>
The response from the contract. Type is inferred. ReadContractReturnType
Remarks
A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.
Internally, uses a Public Client to call the call action with ABI-encoded data.
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
import { readContract } from 'viem/contract'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.readContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function balanceOf(address) view returns (uint256)']),
functionName: 'balanceOf',
args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
})
// 424122nrequest
request: EIP1193RequestFn<PublicRpcSchema>;Request function wrapped with friendly error handling
sendRawTransaction()
sendRawTransaction: (args) => Promise<`0x${string}`>;Sends a signed transaction to the network
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction
- JSON-RPC Method:
eth_sendRawTransaction
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionParameters |
Returns
Promise<`0x${string}`>
The transaction hash. SendRawTransactionReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransaction } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.sendRawTransaction({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})sendRawTransactionSync()
sendRawTransactionSync: (args) => Promise<TransactionReceipt>;Sends a signed transaction to the network
- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync
- JSON-RPC Method:
eth_sendRawTransactionSync
Parameters
| Parameter | Type |
|---|---|
args | SendRawTransactionSyncParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. SendRawTransactionSyncReturnType
Example
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransactionSync } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const receipt = await client.sendRawTransactionSync({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})simulate()
simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;Type Parameters
| Type Parameter |
|---|
calls extends readonly unknown[] |
Parameters
| Parameter | Type |
|---|---|
args | SimulateBlocksParameters<calls> |
Returns
Promise<SimulateBlocksReturnType<calls>>
Deprecated
Use simulateBlocks instead.
simulateBlocks()
simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>;Simulates a set of calls on block(s) with optional block and state overrides.
Type Parameters
| Type Parameter |
|---|
calls extends readonly unknown[] |
Parameters
| Parameter | Type |
|---|---|
args | SimulateBlocksParameters<calls> |
Returns
Promise<SimulateBlocksReturnType<calls>>
Simulated blocks. SimulateReturnType
Example
import { createPublicClient, http, parseEther } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.simulateBlocks({
blocks: [{
blockOverrides: {
number: 69420n,
},
calls: [{
{
account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
},
}],
stateOverrides: [{
address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
balance: parseEther('10'),
}],
}]
})simulateCalls()
simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>;Simulates a set of calls.
Type Parameters
| Type Parameter |
|---|
calls extends readonly unknown[] |
Parameters
| Parameter | Type |
|---|---|
args | SimulateCallsParameters<calls> |
Returns
Promise<SimulateCallsReturnType<calls>>
Results. SimulateCallsReturnType
Example
import { createPublicClient, http, parseEther } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.simulateCalls({
account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929',
calls: [{
{
data: '0xdeadbeef',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
},
{
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
},
]
})simulateContract()
simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>;Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions.
- Docs: https://viem.sh/docs/contract/simulateContract
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
functionName extends string | - |
args extends unknown | - |
chainOverride extends Chain | undefined | - |
accountOverride extends `0x${string}` | Account | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | SimulateContractParameters<abi, functionName, args, Chain | undefined, chainOverride, accountOverride> | SimulateContractParameters |
Returns
Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>
The simulation result and write request. SimulateContractReturnType
Remarks
This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions.
Internally, uses a Public Client to call the call action with ABI-encoded data.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.simulateContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32) view returns (uint32)']),
functionName: 'mint',
args: ['69420'],
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})transport
transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>;The RPC transport
type
type: string;The type of client.
uid
uid: string;A unique ID for the client.
uninstallFilter()
uninstallFilter: (args) => Promise<boolean>;Destroys a Filter that was created from one of the following Actions:
JSON-RPC Methods:
eth_uninstallFilter
Parameters
| Parameter | Type | Description |
|---|---|---|
args | UninstallFilterParameters | UninstallFilterParameters |
Returns
Promise<boolean>
A boolean indicating if the Filter was successfully uninstalled. UninstallFilterReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { createPendingTransactionFilter, uninstallFilter } from 'viem/public'
const filter = await client.createPendingTransactionFilter()
const uninstalled = await client.uninstallFilter({ filter })
// trueverifyHash()
verifyHash: (args) => Promise<boolean>;Verify that a hash was signed by the provided address.
Parameters
| Parameter | Type |
|---|---|
args | VerifyHashParameters |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifyHashReturnType
verifyMessage()
verifyMessage: (args) => Promise<boolean>;Verify that a message was signed by the provided address.
Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { address: `0x${string}`; blockNumber?: bigint; blockTag?: BlockTag; chain?: Chain | null; erc6492VerifierAddress?: `0x${string}`; factory?: `0x${string}`; factoryData?: `0x${string}`; message: SignableMessage; multicallAddress?: `0x${string}`; signature: `0x${string}` | Signature | ByteArray; universalSignatureVerifierAddress?: `0x${string}`; } | - |
args.address | `0x${string}` | The address that signed the original message. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.chain? | Chain | null | The chain to use. |
args.erc6492VerifierAddress? | `0x${string}` | The address of the ERC-6492 signature verifier contract. |
args.factory? | `0x${string}` | - |
args.factoryData? | `0x${string}` | - |
args.message | SignableMessage | The message to be verified. |
args.multicallAddress? | `0x${string}` | Multicall3 address for ERC-8010 verification. |
args.signature | `0x${string}` | Signature | ByteArray | The signature that was generated by signing the message with the address's private key. |
args.universalSignatureVerifierAddress? | `0x${string}` | Deprecated use erc6492VerifierAddress instead. |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifyMessageReturnType
verifySiweMessage()
verifySiweMessage: (args) => Promise<boolean>;Verifies EIP-4361 formatted message was signed.
Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { address?: `0x${string}`; blockNumber?: bigint; blockTag?: BlockTag; domain?: string; message: string; nonce?: string; scheme?: string; signature: `0x${string}`; time?: Date; } | - |
args.address? | `0x${string}` | Ethereum address to check against. |
args.blockNumber? | bigint | The balance of the account at a block number. |
args.blockTag? | BlockTag | The balance of the account at a block tag. Default 'latest' |
args.domain? | string | RFC 3986 authority to check against. |
args.message | string | EIP-4361 formatted message. |
args.nonce? | string | Random string to check against. |
args.scheme? | string | RFC 3986 URI scheme to check against. |
args.signature | `0x${string}` | Signature to check against. |
args.time? | Date | Current time to check optional expirationTime and notBefore fields. Default new Date() |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifySiweMessageReturnType
verifyTypedData()
verifyTypedData: (args) => Promise<boolean>;Verify that typed data was signed by the provided address.
Parameters
| Parameter | Type |
|---|---|
args | VerifyTypedDataParameters |
Returns
Promise<boolean>
Whether or not the signature is valid. VerifyTypedDataReturnType
waitForTransactionReceipt()
waitForTransactionReceipt: (args) => Promise<TransactionReceipt>;Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error.
- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt
- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions
- JSON-RPC Methods:
- Polls
eth_getTransactionReceipton each block until it has been processed. - If a Transaction has been replaced:
- Calls
eth_getBlockByNumberand extracts the transactions - Checks if one of the Transactions is a replacement
- If so, calls
eth_getTransactionReceipt.
- Calls
- Polls
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WaitForTransactionReceiptParameters<Chain | undefined> | WaitForTransactionReceiptParameters |
Returns
Promise<TransactionReceipt>
The transaction receipt. WaitForTransactionReceiptReturnType
Remarks
The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions).
Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce.
There are 3 types of Transaction Replacement reasons:
repriced: The gas price has been modified (e.g. differentmaxFeePerGas)cancelled: The Transaction has been cancelled (e.g.value === 0n)replaced: The Transaction has been replaced (e.g. differentvalueordata)
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionReceipt = await client.waitForTransactionReceipt({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})watchBlockNumber()
watchBlockNumber: (args) => WatchBlockNumberReturnType;Watches and returns incoming block numbers.
- Docs: https://viem.sh/docs/actions/public/watchBlockNumber
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks
- JSON-RPC Methods:
- When
poll: true, callseth_blockNumberon a polling interval. - When
poll: false& WebSocket Transport, uses a WebSocket subscription viaeth_subscribeand the"newHeads"event.
- When
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchBlockNumberParameters | WatchBlockNumberParameters |
Returns
WatchBlockNumberReturnType
A function that can be invoked to stop watching for new block numbers. WatchBlockNumberReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchBlockNumber({
onBlockNumber: (blockNumber) => console.log(blockNumber),
})watchBlocks()
watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType;Watches and returns information for incoming blocks.
- Docs: https://viem.sh/docs/actions/public/watchBlocks
- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks
- JSON-RPC Methods:
- When
poll: true, callseth_getBlockByNumberon a polling interval. - When
poll: false& WebSocket Transport, uses a WebSocket subscription viaeth_subscribeand the"newHeads"event.
- When
Type Parameters
| Type Parameter | Default type |
|---|---|
includeTransactions extends boolean | false |
blockTag extends BlockTag | "latest" |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchBlocksParameters<Transport, Chain | undefined, includeTransactions, blockTag> | WatchBlocksParameters |
Returns
WatchBlocksReturnType
A function that can be invoked to stop watching for new block numbers. WatchBlocksReturnType
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchBlocks({
onBlock: (block) => console.log(block),
})watchContractEvent()
watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType;Watches and returns emitted contract event logs.
Type Parameters
| Type Parameter | Default type |
|---|---|
abi extends readonly unknown[] | Abi | - |
eventName extends string | - |
strict extends boolean | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchContractEventParameters<abi, eventName, strict, Transport> | WatchContractEventParameters |
Returns
WatchContractEventReturnType
A function that can be invoked to stop watching for new event logs. WatchContractEventReturnType
Remarks
This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs.
watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead.
Example
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = client.watchContractEvent({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']),
eventName: 'Transfer',
args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },
onLogs: (logs) => console.log(logs),
})watchEvent()
watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType;Watches and returns emitted Event Logs.
- Docs: https://viem.sh/docs/actions/public/watchEvent
- JSON-RPC Methods:
- RPC Provider supports
eth_newFilter:- Calls
eth_newFilterto create a filter (called on initialize). - On a polling interval, it will call
eth_getFilterChanges.
- Calls
- RPC Provider does not support
eth_newFilter:- Calls
eth_getLogsfor each block between the polling interval.
- Calls
- RPC Provider supports
Type Parameters
| Type Parameter | Default type |
|---|---|
abiEvent extends AbiEvent | undefined | undefined |
abiEvents extends readonly unknown[] | readonly AbiEvent[] | undefined | abiEvent extends AbiEvent ? [abiEvent<abiEvent>] : undefined |
strict extends boolean | undefined | undefined |
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchEventParameters<abiEvent, abiEvents, strict, Transport> | WatchEventParameters |
Returns
WatchEventReturnType
A function that can be invoked to stop watching for new Event Logs. WatchEventReturnType
Remarks
This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs.
watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = client.watchEvent({
onLogs: (logs) => console.log(logs),
})watchPendingTransactions()
watchPendingTransactions: (args) => WatchPendingTransactionsReturnType;Watches and returns pending transaction hashes.
- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions
- JSON-RPC Methods:
- When
poll: true- Calls
eth_newPendingTransactionFilterto initialize the filter. - Calls
eth_getFilterChangeson a polling interval.
- Calls
- When
poll: false& WebSocket Transport, uses a WebSocket subscription viaeth_subscribeand the"newPendingTransactions"event.
- When
Parameters
| Parameter | Type | Description |
|---|---|---|
args | WatchPendingTransactionsParameters<Transport> | WatchPendingTransactionsParameters |
Returns
WatchPendingTransactionsReturnType
A function that can be invoked to stop watching for new pending transaction hashes. WatchPendingTransactionsReturnType
Remarks
This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions.
Example
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchPendingTransactions({
onTransactions: (hashes) => console.log(hashes),
})registryAddress?
optional registryAddress: `0x${string}`;Defined in: packages/core/src/clients/types.ts:25
Registry contract address. Essential for looking up other contracts if not provided explicitly.
xpntsFactoryAddress?
optional xpntsFactoryAddress: `0x${string}`;Defined in: packages/core/src/clients/types.ts:44
CommunityConfig
Defined in: packages/core/src/communities.ts:15
Properties
address
address: string;Defined in: packages/core/src/communities.ts:18
allowPermissionlessMint
allowPermissionlessMint: boolean;Defined in: packages/core/src/communities.ts:23
ensName
ensName: string;Defined in: packages/core/src/communities.ts:17
isActive
isActive: boolean;Defined in: packages/core/src/communities.ts:22
name
name: string;Defined in: packages/core/src/communities.ts:16
nodeType
nodeType: NodeType;Defined in: packages/core/src/communities.ts:21
registeredAt
registeredAt: number;Defined in: packages/core/src/communities.ts:25
stakedAmount
stakedAmount: string;Defined in: packages/core/src/communities.ts:24
supportedSBTs
supportedSBTs: string[];Defined in: packages/core/src/communities.ts:20
xPNTsToken
xPNTsToken: string;Defined in: packages/core/src/communities.ts:19
DeploymentValidationParams
Defined in: packages/core/src/actions/StateValidator.ts:26
Interface definitions
Extends
Properties
chain
chain: Chain;Defined in: packages/core/src/actions/StateValidator.ts:8
Inherited from
contractAddress
contractAddress: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:27
rpcUrl
rpcUrl: string;Defined in: packages/core/src/actions/StateValidator.ts:7
Inherited from
RoleConfig
Defined in: packages/core/src/roles.ts:112
Role configuration structure (matches Registry.sol RoleConfig struct)
Properties
description
description: string;Defined in: packages/core/src/roles.ts:122
entryBurn
entryBurn: bigint;Defined in: packages/core/src/roles.ts:114
exitFeePercent
exitFeePercent: bigint;Defined in: packages/core/src/roles.ts:119
isActive
isActive: boolean;Defined in: packages/core/src/roles.ts:121
minExitFee
minExitFee: bigint;Defined in: packages/core/src/roles.ts:120
minStake
minStake: bigint;Defined in: packages/core/src/roles.ts:113
slashBase
slashBase: number;Defined in: packages/core/src/roles.ts:116
slashIncrement
slashIncrement: number;Defined in: packages/core/src/roles.ts:117
slashMax
slashMax: number;Defined in: packages/core/src/roles.ts:118
slashThreshold
slashThreshold: number;Defined in: packages/core/src/roles.ts:115
RoleRequirement
Defined in: packages/core/src/roles.ts:128
Role requirement check result
Properties
hasEnoughAPNTs
hasEnoughAPNTs: boolean;Defined in: packages/core/src/roles.ts:131
hasEnoughGToken
hasEnoughGToken: boolean;Defined in: packages/core/src/roles.ts:130
hasRole
hasRole: boolean;Defined in: packages/core/src/roles.ts:129
hasSBT
hasSBT: boolean;Defined in: packages/core/src/roles.ts:132
missingRequirements
missingRequirements: string[];Defined in: packages/core/src/roles.ts:133
RoleValidationParams
Defined in: packages/core/src/actions/StateValidator.ts:11
Interface definitions
Extends
Properties
chain
chain: Chain;Defined in: packages/core/src/actions/StateValidator.ts:8
Inherited from
registryAddress
registryAddress: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:12
roleId
roleId: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:13
rpcUrl
rpcUrl: string;Defined in: packages/core/src/actions/StateValidator.ts:7
Inherited from
userAddress
userAddress: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:14
SuperPaymasterConfig
Defined in: packages/core/src/config/ContractConfigManager.ts:4
Properties
entryPoint
entryPoint: `0x${string}`;Defined in: packages/core/src/config/ContractConfigManager.ts:11
gToken
gToken: `0x${string}`;Defined in: packages/core/src/config/ContractConfigManager.ts:6
gTokenStaking
gTokenStaking: `0x${string}`;Defined in: packages/core/src/config/ContractConfigManager.ts:7
paymasterFactory
paymasterFactory: `0x${string}`;Defined in: packages/core/src/config/ContractConfigManager.ts:9
paymasterV4
paymasterV4: `0x${string}`;Defined in: packages/core/src/config/ContractConfigManager.ts:10
registry
registry: `0x${string}`;Defined in: packages/core/src/config/ContractConfigManager.ts:5
superPaymaster
superPaymaster: `0x${string}`;Defined in: packages/core/src/config/ContractConfigManager.ts:8
TokenBalanceValidationParams
Defined in: packages/core/src/actions/StateValidator.ts:22
Interface definitions
Extends
Properties
address
address: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:18
Inherited from
BalanceValidationParams.address
chain
chain: Chain;Defined in: packages/core/src/actions/StateValidator.ts:8
Inherited from
minBalance?
optional minBalance: string;Defined in: packages/core/src/actions/StateValidator.ts:19
Inherited from
BalanceValidationParams.minBalance
rpcUrl
rpcUrl: string;Defined in: packages/core/src/actions/StateValidator.ts:7
Inherited from
BalanceValidationParams.rpcUrl
tokenAddress
tokenAddress: `0x${string}`;Defined in: packages/core/src/actions/StateValidator.ts:23
TransactionOptions
Defined in: packages/core/src/clients/types.ts:52
Common options for transaction methods
Properties
account?
optional account: `0x${string}` | Account;Defined in: packages/core/src/clients/types.ts:57
Override the account to use for the transaction. If not provided, uses the account from the WalletClient.
value?
optional value: bigint;Defined in: packages/core/src/clients/types.ts:62
Optional value to send with the transaction (in wei)
ValidationParams
Defined in: packages/core/src/actions/StateValidator.ts:6
Interface definitions
Extended by
Properties
chain
chain: Chain;Defined in: packages/core/src/actions/StateValidator.ts:8
rpcUrl
rpcUrl: string;Defined in: packages/core/src/actions/StateValidator.ts:7
ValidationResult
Defined in: packages/core/src/actions/StateValidator.ts:30
Properties
data?
optional data: any;Defined in: packages/core/src/actions/StateValidator.ts:33
message?
optional message: string;Defined in: packages/core/src/actions/StateValidator.ts:32
valid
valid: boolean;Defined in: packages/core/src/actions/StateValidator.ts:31
Type Aliases
AccountActions
type AccountActions = object;Defined in: packages/core/src/actions/account.ts:5
Properties
addDeposit()
addDeposit: (args) => Promise<Hash>;Defined in: packages/core/src/actions/account.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
entryPoint()
entryPoint: () => Promise<Address>;Defined in: packages/core/src/actions/account.ts:9
Returns
Promise<Address>
execute()
execute: (args) => Promise<Hash>;Defined in: packages/core/src/actions/account.ts:6
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; dest: Address; func: Hex; value: bigint; } |
args.account? | Account | Address |
args.dest | Address |
args.func | Hex |
args.value | bigint |
Returns
Promise<Hash>
executeBatch()
executeBatch: (args) => Promise<Hash>;Defined in: packages/core/src/actions/account.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; dest: Address[]; func: Hex[]; value: bigint[]; } |
args.account? | Account | Address |
args.dest | Address[] |
args.func | Hex[] |
args.value | bigint[] |
Returns
Promise<Hash>
getDeposit()
getDeposit: () => Promise<bigint>;Defined in: packages/core/src/actions/account.ts:12
Returns
Promise<bigint>
getNonce()
getNonce: () => Promise<bigint>;Defined in: packages/core/src/actions/account.ts:8
Returns
Promise<bigint>
initialize()
initialize: (args) => Promise<Hash>;Defined in: packages/core/src/actions/account.ts:16
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; owner: Address; } |
args.account? | Account | Address |
args.owner | Address |
Returns
Promise<Hash>
owner()
owner: () => Promise<Address>;Defined in: packages/core/src/actions/account.ts:13
Returns
Promise<Address>
proxiableUUID()
proxiableUUID: () => Promise<Hex>;Defined in: packages/core/src/actions/account.ts:18
Returns
Promise<Hex>
supportsInterface()
supportsInterface: (args) => Promise<boolean>;Defined in: packages/core/src/actions/account.ts:19
Parameters
| Parameter | Type |
|---|---|
args | { interfaceId: Hex; } |
args.interfaceId | Hex |
Returns
Promise<boolean>
UPGRADE_INTERFACE_VERSION()
UPGRADE_INTERFACE_VERSION: () => Promise<string>;Defined in: packages/core/src/actions/account.ts:20
Returns
Promise<string>
upgradeToAndCall()
upgradeToAndCall: (args) => Promise<Hash>;Defined in: packages/core/src/actions/account.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; data: Hex; newImplementation: Address; } |
args.account? | Account | Address |
args.data | Hex |
args.newImplementation | Address |
Returns
Promise<Hash>
withdrawDepositTo()
withdrawDepositTo: (args) => Promise<Hash>;Defined in: packages/core/src/actions/account.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; withdrawAddress: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.withdrawAddress | Address |
Returns
Promise<Hash>
AccountFactoryActions
type AccountFactoryActions = object;Defined in: packages/core/src/actions/account.ts:24
Properties
accountImplementation()
accountImplementation: () => Promise<Address>;Defined in: packages/core/src/actions/account.ts:29
Returns
Promise<Address>
createAccount()
createAccount: (args) => Promise<Hash>;Defined in: packages/core/src/actions/account.ts:25
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; owner: Address; salt: bigint; } |
args.account? | Account | Address |
args.owner | Address |
args.salt | bigint |
Returns
Promise<Hash>
getAddress()
getAddress: (args) => Promise<Address>;Defined in: packages/core/src/actions/account.ts:26
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; salt: bigint; } |
args.owner | Address |
args.salt | bigint |
Returns
Promise<Address>
AggregatorActions
type AggregatorActions = object;Defined in: packages/core/src/actions/aggregator.ts:4
Properties
getBLSThreshold()
getBLSThreshold: (args) => Promise<bigint>;Defined in: packages/core/src/actions/aggregator.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { address: Address; } |
args.address | Address |
Returns
Promise<bigint>
registerBLSPublicKey()
registerBLSPublicKey: (args) => Promise<Hash>;Defined in: packages/core/src/actions/aggregator.ts:5
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; address: Address; publicKey: Hex; } |
args.account? | Account | Address |
args.address | Address |
args.publicKey | Hex |
Returns
Promise<Hash>
setBLSThreshold()
setBLSThreshold: (args) => Promise<Hash>;Defined in: packages/core/src/actions/aggregator.ts:6
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; address: Address; threshold: number; } |
args.account? | Account | Address |
args.address | Address |
args.threshold | number |
Returns
Promise<Hash>
BusinessResult
type BusinessResult<T> = Promise<T>;Defined in: packages/core/src/clients/types.ts:69
Generic result wrapper for business operations Currently just returns the type directly, but can be expanded for metadata.
Type Parameters
| Type Parameter |
|---|
T |
ContractCategory
type ContractCategory =
| "core"
| "tokens"
| "testTokens"
| "testAccounts"
| "paymaster"
| "monitoring"
| "official"
| "communities";Defined in: packages/core/src/contracts.ts:25
Contract category types
ContractNetwork
type ContractNetwork = keyof typeof CONTRACTS;Defined in: packages/core/src/contracts.ts:111
Supported network types for contracts
DVTActions
type DVTActions = object;Defined in: packages/core/src/actions/dvt.ts:4
Properties
createSlashProposal()
createSlashProposal: (args) => Promise<Hash>;Defined in: packages/core/src/actions/dvt.ts:5
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; address: Address; level: number; operator: Address; reason: string; } |
args.account? | Account | Address |
args.address | Address |
args.level | number |
args.operator | Address |
args.reason | string |
Returns
Promise<Hash>
executeSlashWithProof()
executeSlashWithProof: (args) => Promise<Hash>;Defined in: packages/core/src/actions/dvt.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; address: Address; epoch: bigint; newScores: bigint[]; proof: Hex; proposalId: bigint; repUsers: Address[]; } |
args.account? | Account | Address |
args.address | Address |
args.epoch | bigint |
args.newScores | bigint[] |
args.proof | Hex |
args.proposalId | bigint |
args.repUsers | Address[] |
Returns
Promise<Hash>
isValidator()
isValidator: (args) => Promise<boolean>;Defined in: packages/core/src/actions/dvt.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { address: Address; user: Address; } |
args.address | Address |
args.user | Address |
Returns
Promise<boolean>
signSlashProposal()
signSlashProposal: (args) => Promise<Hash>;Defined in: packages/core/src/actions/dvt.ts:6
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; address: Address; proposalId: bigint; signature: Hex; } |
args.account? | Account | Address |
args.address | Address |
args.proposalId | bigint |
args.signature | Hex |
Returns
Promise<Hash>
EntryPointActions
type EntryPointActions = object;Defined in: packages/core/src/actions/entryPoint.ts:9
Properties
addStake()
addStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:16
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; unstakeDelaySec: number; } |
args.account? | Account | Address |
args.amount | bigint |
args.unstakeDelaySec | number |
Returns
Promise<Hash>
balanceOf()
balanceOf: (args) => Promise<bigint>;Defined in: packages/core/src/actions/entryPoint.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; } |
args.account | Address |
Returns
Promise<bigint>
delegateAndRevert()
delegateAndRevert: (args) => Promise<void>;Defined in: packages/core/src/actions/entryPoint.ts:25
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; data: Hex; target: Address; } |
args.account? | Account | Address |
args.data | Hex |
args.target | Address |
Returns
Promise<void>
depositTo()
depositTo: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; amount: bigint; txAccount?: Account | Address; } |
args.account | Address |
args.amount | bigint |
args.txAccount? | Account | Address |
Returns
Promise<Hash>
eip712Domain()
eip712Domain: () => Promise<any>;Defined in: packages/core/src/actions/entryPoint.ts:34
Returns
Promise<any>
getCurrentUserOpHash()
getCurrentUserOpHash: () => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:35
Returns
Promise<Hash>
getDepositInfo()
getDepositInfo: (args) => Promise<{
deposit: bigint;
stake: bigint;
staked: boolean;
unstakeDelaySec: number;
withdrawTime: number;
}>;Defined in: packages/core/src/actions/entryPoint.ts:13
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; } |
args.account | Address |
Returns
Promise<{ deposit: bigint; stake: bigint; staked: boolean; unstakeDelaySec: number; withdrawTime: number; }>
getDomainSeparatorV4()
getDomainSeparatorV4: () => Promise<Hex>;Defined in: packages/core/src/actions/entryPoint.ts:36
Returns
Promise<Hex>
getNonce()
getNonce: (args) => Promise<bigint>;Defined in: packages/core/src/actions/entryPoint.ts:12
Parameters
| Parameter | Type |
|---|---|
args | { key: bigint; sender: Address; } |
args.key | bigint |
args.sender | Address |
Returns
Promise<bigint>
getPackedUserOpTypeHash()
getPackedUserOpTypeHash: () => Promise<Hex>;Defined in: packages/core/src/actions/entryPoint.ts:37
Returns
Promise<Hex>
getSenderAddress()
getSenderAddress: (args) => Promise<Address>;Defined in: packages/core/src/actions/entryPoint.ts:29
Parameters
| Parameter | Type |
|---|---|
args | { initCode: Hex; } |
args.initCode | Hex |
Returns
Promise<Address>
getUserOpHash()
getUserOpHash: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:28
Parameters
| Parameter | Type |
|---|---|
args | { op: any; } |
args.op | any |
Returns
Promise<Hash>
handleAggregatedOps()
handleAggregatedOps: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:23
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; beneficiary: Address; opsPerAggregator: any[]; } |
args.account? | Account | Address |
args.beneficiary | Address |
args.opsPerAggregator | any[] |
Returns
Promise<Hash>
handleOps()
handleOps: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; beneficiary: Address; ops: any[]; } |
args.account? | Account | Address |
args.beneficiary | Address |
args.ops | any[] |
Returns
Promise<Hash>
incrementNonce()
incrementNonce: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:31
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; key: bigint; } |
args.account? | Account | Address |
args.key | bigint |
Returns
Promise<Hash>
innerHandleOp()
innerHandleOp: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:24
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; callData: Hex; context: Hex; opInfo: any; } |
args.account? | Account | Address |
args.callData | Hex |
args.context | Hex |
args.opInfo | any |
Returns
Promise<Hash>
nonceSequenceNumber()
nonceSequenceNumber: (args) => Promise<bigint>;Defined in: packages/core/src/actions/entryPoint.ts:32
Parameters
| Parameter | Type |
|---|---|
args | { key: bigint; sender: Address; } |
args.key | bigint |
args.sender | Address |
Returns
Promise<bigint>
senderCreator()
senderCreator: () => Promise<Address>;Defined in: packages/core/src/actions/entryPoint.ts:30
Returns
Promise<Address>
supportsInterface()
supportsInterface: (args) => Promise<boolean>;Defined in: packages/core/src/actions/entryPoint.ts:33
Parameters
| Parameter | Type |
|---|---|
args | { interfaceId: Hex; } |
args.interfaceId | Hex |
Returns
Promise<boolean>
unlockStake()
unlockStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
version
version: EntryPointVersion;Defined in: packages/core/src/actions/entryPoint.ts:39
withdrawStake()
withdrawStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; withdrawAddress: Address; } |
args.account? | Account | Address |
args.withdrawAddress | Address |
Returns
Promise<Hash>
withdrawTo()
withdrawTo: (args) => Promise<Hash>;Defined in: packages/core/src/actions/entryPoint.ts:19
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; withdrawAddress: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.withdrawAddress | Address |
Returns
Promise<Hash>
GTokenExtendedActions
type GTokenExtendedActions = object;Defined in: packages/core/src/actions/gtokenExtended.ts:5
Properties
burn()
burn: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
burnFrom()
burnFrom: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; from: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.from | Address |
Returns
Promise<Hash>
cap()
cap: () => Promise<bigint>;Defined in: packages/core/src/actions/gtokenExtended.ts:14
Returns
Promise<bigint>
mint()
mint: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:9
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; to: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.to | Address |
Returns
Promise<Hash>
minter()
minter: () => Promise<Address>;Defined in: packages/core/src/actions/gtokenExtended.ts:15
Returns
Promise<Address>
owner()
owner: () => Promise<Address>;Defined in: packages/core/src/actions/gtokenExtended.ts:24
Returns
Promise<Address>
pause()
pause: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:19
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
paused()
paused: () => Promise<boolean>;Defined in: packages/core/src/actions/gtokenExtended.ts:21
Returns
Promise<boolean>
renounceOwnership()
renounceOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:26
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
setMinter()
setMinter: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:16
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; minter: Address; } |
args.account? | Account | Address |
args.minter | Address |
Returns
Promise<Hash>
transferOwnership()
transferOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:25
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
unpause()
unpause: (args) => Promise<Hash>;Defined in: packages/core/src/actions/gtokenExtended.ts:20
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
NetworkContracts
type NetworkContracts = typeof SEPOLIA_CONTRACTS;Defined in: packages/core/src/contracts.ts:116
Contract addresses for a specific network
PaymasterFactoryActions
type PaymasterFactoryActions = object;Defined in: packages/core/src/actions/factory.ts:70
Properties
addImplementation()
addImplementation: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:103
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; implementation: Address; version: string; } |
args.account? | Account | Address |
args.implementation | Address |
args.version | string |
Returns
Promise<Hash>
calculateAddress()
calculateAddress: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:78
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; } |
args.owner | Address |
Returns
Promise<Address>
defaultVersion()
defaultVersion: () => Promise<string>;Defined in: packages/core/src/actions/factory.ts:117
Returns
Promise<string>
deployPaymaster()
deployPaymaster: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:73
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; initData?: Hex; owner: Address; version?: string; } |
args.account? | Account | Address |
args.initData? | Hex |
args.owner | Address |
args.version? | string |
Returns
Promise<Hash>
deployPaymasterDeterministic()
deployPaymasterDeterministic: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:74
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; initData?: Hex; owner: Address; salt: Hex; version?: string; } |
args.account? | Account | Address |
args.initData? | Hex |
args.owner | Address |
args.salt | Hex |
args.version? | string |
Returns
Promise<Hash>
ENTRY_POINT()
ENTRY_POINT: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:109
Returns
Promise<Address>
getAllPaymasters()
getAllPaymasters: () => Promise<Address[]>;Defined in: packages/core/src/actions/factory.ts:81
Returns
Promise<Address[]>
getImplementationV4()
getImplementationV4: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:100
Returns
Promise<Address>
getOperatorByPaymaster()
getOperatorByPaymaster: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:89
Parameters
| Parameter | Type |
|---|---|
args | { paymaster: Address; } |
args.paymaster | Address |
Returns
Promise<Address>
getPaymaster()
getPaymaster: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:79
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; } |
args.owner | Address |
Returns
Promise<Address>
getPaymasterByOperator()
getPaymasterByOperator: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:91
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<Address>
getPaymasterCount()
getPaymasterCount: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:80
Returns
Promise<bigint>
getPaymasterInfo()
getPaymasterInfo: (args) => Promise<any>;Defined in: packages/core/src/actions/factory.ts:93
Parameters
| Parameter | Type |
|---|---|
args | { paymaster: Address; } |
args.paymaster | Address |
Returns
Promise<any>
getPaymasterList()
getPaymasterList: (args) => Promise<Address[]>;Defined in: packages/core/src/actions/factory.ts:85
Parameters
| Parameter | Type |
|---|---|
args | { limit: bigint; offset: bigint; } |
args.limit | bigint |
args.offset | bigint |
Returns
Promise<Address[]>
hasImplementation()
hasImplementation: (args) => Promise<boolean>;Defined in: packages/core/src/actions/factory.ts:95
Parameters
| Parameter | Type |
|---|---|
args | { version: string; } |
args.version | string |
Returns
Promise<boolean>
hasPaymaster()
hasPaymaster: (args) => Promise<boolean>;Defined in: packages/core/src/actions/factory.ts:84
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; } |
args.owner | Address |
Returns
Promise<boolean>
implementations()
implementations: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:96
Parameters
| Parameter | Type |
|---|---|
args | { version: string; } |
args.version | string |
Returns
Promise<Address>
isPaymasterDeployed()
isPaymasterDeployed: (args) => Promise<boolean>;Defined in: packages/core/src/actions/factory.ts:82
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; } |
args.owner | Address |
Returns
Promise<boolean>
operatorByPaymaster()
operatorByPaymaster: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:90
Parameters
| Parameter | Type |
|---|---|
args | { paymaster: Address; } |
args.paymaster | Address |
Returns
Promise<Address>
paymasterByOperator()
paymasterByOperator: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:92
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<Address>
paymasterFactoryOwner()
paymasterFactoryOwner: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:112
Returns
Promise<Address>
paymasterFactoryVersion()
paymasterFactoryVersion: () => Promise<string>;Defined in: packages/core/src/actions/factory.ts:118
Returns
Promise<string>
paymasterList()
paymasterList: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:86
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; } |
args.index | bigint |
Returns
Promise<Address>
predictPaymasterAddress()
predictPaymasterAddress: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:75
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; salt: Hex; } |
args.owner | Address |
args.salt | Hex |
Returns
Promise<Address>
REGISTRY()
REGISTRY: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:108
Returns
Promise<Address>
renouncePaymasterFactoryOwnership()
renouncePaymasterFactoryOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:114
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
setDefaultVersion()
setDefaultVersion: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:105
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; version: string; } |
args.account? | Account | Address |
args.version | string |
Returns
Promise<Hash>
setImplementationV4()
setImplementationV4: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:99
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; impl: Address; } |
args.account? | Account | Address |
args.impl | Address |
Returns
Promise<Hash>
setRegistry()
setRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:101
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; registry: Address; } |
args.account? | Account | Address |
args.registry | Address |
Returns
Promise<Hash>
totalDeployed()
totalDeployed: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:87
Returns
Promise<bigint>
transferPaymasterFactoryOwnership()
transferPaymasterFactoryOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:113
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
upgradeImplementation()
upgradeImplementation: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:104
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newImplementation: Address; version: string; } |
args.account? | Account | Address |
args.newImplementation | Address |
args.version | string |
Returns
Promise<Hash>
PaymasterV4Actions
type PaymasterV4Actions = object;Defined in: packages/core/src/actions/paymasterV4.ts:5
Properties
paymasterV4AddDeposit()
paymasterV4AddDeposit: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:67
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
paymasterV4AddGasToken()
paymasterV4AddGasToken: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; priceFeed: Address; token: Address; } |
args.account? | Account | Address |
args.priceFeed | Address |
args.token | Address |
Returns
Promise<Hash>
Deprecated
V4 uses depositFor + tokenPrices instead
paymasterV4AddSBT()
paymasterV4AddSBT: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:26
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; sbt: Address; } |
args.account? | Account | Address |
args.sbt | Address |
Returns
Promise<Hash>
Deprecated
V4 does not use SBT whitelist
paymasterV4AddStake()
paymasterV4AddStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:41
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; unstakeDelaySec: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
args.unstakeDelaySec | bigint |
Returns
Promise<Hash>
paymasterV4Balances()
paymasterV4Balances: (args) => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; user: Address; } |
args.token | Address |
args.user | Address |
Returns
Promise<bigint>
paymasterV4CachedPriceView()
paymasterV4CachedPriceView: (args) => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:79
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
paymasterV4CalculateCost()
paymasterV4CalculateCost: (args) => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:75
Parameters
| Parameter | Type |
|---|---|
args | { gasCost: bigint; param: any; token: Address; } |
args.gasCost | bigint |
args.param | any |
args.token | Address |
Returns
Promise<bigint>
paymasterV4DeactivateFromRegistry()
paymasterV4DeactivateFromRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:88
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
paymasterV4Deposit()
paymasterV4Deposit: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:39
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
paymasterV4DepositFor()
paymasterV4DepositFor: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; token: Address; user: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.token | Address |
args.user | Address |
Returns
Promise<Hash>
paymasterV4EntryPoint()
paymasterV4EntryPoint: () => Promise<Address>;Defined in: packages/core/src/actions/paymasterV4.ts:47
Returns
Promise<Address>
paymasterV4EthUsdPriceFeed()
paymasterV4EthUsdPriceFeed: () => Promise<Address>;Defined in: packages/core/src/actions/paymasterV4.ts:71
Returns
Promise<Address>
paymasterV4GetDeposit()
paymasterV4GetDeposit: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:44
Returns
Promise<bigint>
paymasterV4GetRealtimeTokenCost()
paymasterV4GetRealtimeTokenCost: (args) => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:76
Parameters
| Parameter | Type |
|---|---|
args | { gasCost: bigint; token: Address; } |
args.gasCost | bigint |
args.token | Address |
Returns
Promise<bigint>
paymasterV4GetSupportedGasTokens()
paymasterV4GetSupportedGasTokens: () => Promise<Address[]>;Defined in: packages/core/src/actions/paymasterV4.ts:22
Returns
Promise<Address[]>
Deprecated
V4 uses depositFor + tokenPrices instead
paymasterV4GetSupportedSBTs()
paymasterV4GetSupportedSBTs: () => Promise<Address[]>;Defined in: packages/core/src/actions/paymasterV4.ts:30
Returns
Promise<Address[]>
Deprecated
V4 does not use SBT whitelist
paymasterV4Initialize()
paymasterV4Initialize: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:89
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; owner: Address; } |
args.account? | Account | Address |
args.owner | Address |
Returns
Promise<Hash>
paymasterV4IsActiveInRegistry()
paymasterV4IsActiveInRegistry: () => Promise<boolean>;Defined in: packages/core/src/actions/paymasterV4.ts:77
Returns
Promise<boolean>
paymasterV4IsGasTokenSupported()
paymasterV4IsGasTokenSupported: (args) => Promise<boolean>;Defined in: packages/core/src/actions/paymasterV4.ts:24
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<boolean>
Deprecated
V4 uses depositFor + tokenPrices instead
paymasterV4IsRegistrySet()
paymasterV4IsRegistrySet: () => Promise<boolean>;Defined in: packages/core/src/actions/paymasterV4.ts:78
Returns
Promise<boolean>
paymasterV4IsSBTSupported()
paymasterV4IsSBTSupported: (args) => Promise<boolean>;Defined in: packages/core/src/actions/paymasterV4.ts:32
Parameters
| Parameter | Type |
|---|---|
args | { sbt: Address; } |
args.sbt | Address |
Returns
Promise<boolean>
Deprecated
V4 does not use SBT whitelist
paymasterV4MaxEthUsdPrice()
paymasterV4MaxEthUsdPrice: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:59
Returns
Promise<bigint>
paymasterV4MaxGasCostCap()
paymasterV4MaxGasCostCap: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:58
Returns
Promise<bigint>
paymasterV4MaxGasTokens()
paymasterV4MaxGasTokens: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:60
Returns
Promise<bigint>
paymasterV4MaxSbts()
paymasterV4MaxSbts: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:61
Returns
Promise<bigint>
paymasterV4MaxServiceFee()
paymasterV4MaxServiceFee: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:62
Returns
Promise<bigint>
paymasterV4MinEthUsdPrice()
paymasterV4MinEthUsdPrice: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:63
Returns
Promise<bigint>
paymasterV4OracleDecimals()
paymasterV4OracleDecimals: () => Promise<number>;Defined in: packages/core/src/actions/paymasterV4.ts:72
Returns
Promise<number>
paymasterV4Owner()
paymasterV4Owner: () => Promise<Address>;Defined in: packages/core/src/actions/paymasterV4.ts:50
Returns
Promise<Address>
paymasterV4Paused()
paymasterV4Paused: () => Promise<boolean>;Defined in: packages/core/src/actions/paymasterV4.ts:57
Returns
Promise<boolean>
paymasterV4PostOp()
paymasterV4PostOp: (args) => Promise<void>;Defined in: packages/core/src/actions/paymasterV4.ts:36
Parameters
| Parameter | Type |
|---|---|
args | { actualGasCost: bigint; actualUserOpFeePerGas: bigint; context: Hex; mode: number; } |
args.actualGasCost | bigint |
args.actualUserOpFeePerGas | bigint |
args.context | Hex |
args.mode | number |
Returns
Promise<void>
paymasterV4PriceStalenessThreshold()
paymasterV4PriceStalenessThreshold: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:64
Returns
Promise<bigint>
paymasterV4Registry()
paymasterV4Registry: () => Promise<Address>;Defined in: packages/core/src/actions/paymasterV4.ts:55
Returns
Promise<Address>
paymasterV4RemoveGasToken()
paymasterV4RemoveGasToken: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:20
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; token: Address; } |
args.account? | Account | Address |
args.token | Address |
Returns
Promise<Hash>
Deprecated
V4 uses depositFor + tokenPrices instead
paymasterV4RemoveSBT()
paymasterV4RemoveSBT: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:28
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; sbt: Address; } |
args.account? | Account | Address |
args.sbt | Address |
Returns
Promise<Hash>
Deprecated
V4 does not use SBT whitelist
paymasterV4RenounceOwnership()
paymasterV4RenounceOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:52
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
paymasterV4ServiceFeeRate()
paymasterV4ServiceFeeRate: () => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:74
Returns
Promise<bigint>
paymasterV4SetCachedPrice()
paymasterV4SetCachedPrice: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:82
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; price: bigint; token: Address; } |
args.account? | Account | Address |
args.price | bigint |
args.token | Address |
Returns
Promise<Hash>
paymasterV4SetMaxGasCostCap()
paymasterV4SetMaxGasCostCap: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:84
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; cap: bigint; } |
args.account? | Account | Address |
args.cap | bigint |
Returns
Promise<Hash>
paymasterV4SetPriceStalenessThreshold()
paymasterV4SetPriceStalenessThreshold: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:85
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; threshold: bigint; } |
args.account? | Account | Address |
args.threshold | bigint |
Returns
Promise<Hash>
paymasterV4SetServiceFeeRate()
paymasterV4SetServiceFeeRate: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:83
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; rate: bigint; } |
args.account? | Account | Address |
args.rate | bigint |
Returns
Promise<Hash>
paymasterV4SetTokenPrice()
paymasterV4SetTokenPrice: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:13
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; price: bigint; token: Address; } |
args.account? | Account | Address |
args.price | bigint |
args.token | Address |
Returns
Promise<Hash>
paymasterV4SetTreasury()
paymasterV4SetTreasury: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:86
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; treasury: Address; } |
args.account? | Account | Address |
args.treasury | Address |
Returns
Promise<Hash>
paymasterV4TokenDecimals()
paymasterV4TokenDecimals: (args) => Promise<number>;Defined in: packages/core/src/actions/paymasterV4.ts:73
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<number>
paymasterV4TokenPrices()
paymasterV4TokenPrices: (args) => Promise<bigint>;Defined in: packages/core/src/actions/paymasterV4.ts:14
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
paymasterV4TransferOwnership()
paymasterV4TransferOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:51
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
paymasterV4Treasury()
paymasterV4Treasury: () => Promise<Address>;Defined in: packages/core/src/actions/paymasterV4.ts:56
Returns
Promise<Address>
paymasterV4UnlockPaymasterStake()
paymasterV4UnlockPaymasterStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:42
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
paymasterV4UnlockStake()
paymasterV4UnlockStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:68
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
paymasterV4UpdatePrice()
paymasterV4UpdatePrice: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:87
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; token: Address; } |
args.account? | Account | Address |
args.token | Address |
Returns
Promise<Hash>
paymasterV4ValidatePaymasterUserOp()
paymasterV4ValidatePaymasterUserOp: (args) => Promise<any>;Defined in: packages/core/src/actions/paymasterV4.ts:35
Parameters
| Parameter | Type |
|---|---|
args | { maxCost: bigint; userOp: any; userOpHash: Hex; } |
args.maxCost | bigint |
args.userOp | any |
args.userOpHash | Hex |
Returns
Promise<any>
paymasterV4Version()
paymasterV4Version: () => Promise<string>;Defined in: packages/core/src/actions/paymasterV4.ts:91
Returns
Promise<string>
paymasterV4Withdraw()
paymasterV4Withdraw: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:9
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.token | Address |
Returns
Promise<Hash>
paymasterV4WithdrawStake()
paymasterV4WithdrawStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:43
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; to: Address; } |
args.account? | Account | Address |
args.to | Address |
Returns
Promise<Hash>
paymasterV4WithdrawTo()
paymasterV4WithdrawTo: (args) => Promise<Hash>;Defined in: packages/core/src/actions/paymasterV4.ts:40
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; to: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.to | Address |
Returns
Promise<Hash>
RegistryActions
type RegistryActions = object;Defined in: packages/core/src/actions/registry.ts:14
Properties
registryAccountToUser()
registryAccountToUser: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:89
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; } |
args.account | Address |
Returns
Promise<Address>
registryAddLevelThreshold()
registryAddLevelThreshold: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:87
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; threshold: bigint; } |
args.account? | Account | Address |
args.threshold | bigint |
Returns
Promise<Hash>
registryAdminConfigureRole()
registryAdminConfigureRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:97
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; entryBurn: bigint; exitFeePercent: number; minExitFee: bigint; minStake: bigint; roleId: Hex; } |
args.account? | Account | Address |
args.entryBurn | bigint |
args.exitFeePercent | number |
args.minExitFee | bigint |
args.minStake | bigint |
args.roleId | Hex |
Returns
Promise<Hash>
registryBatchUpdateGlobalReputation()
registryBatchUpdateGlobalReputation: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:48
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; epoch: bigint; proof: Hex; scores: bigint[]; users: Address[]; } |
args.account? | Account | Address |
args.epoch | bigint |
args.proof | Hex |
args.scores | bigint[] |
args.users | Address[] |
Returns
Promise<Hash>
registryBlsAggregator()
registryBlsAggregator: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:62
Returns
Promise<Address>
registryBlsValidator()
registryBlsValidator: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:61
Returns
Promise<Address>
registryCalculateExitFee()
registryCalculateExitFee: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:86
Parameters
| Parameter | Type |
|---|---|
args | { amount: bigint; roleId: Hex; } |
args.amount | bigint |
args.roleId | Hex |
Returns
Promise<bigint>
registryCommunityByENS()
registryCommunityByENS: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:27
Parameters
| Parameter | Type |
|---|---|
args | { ensName: string; } |
args.ensName | string |
Returns
Promise<Address>
registryCommunityByENSV3()
registryCommunityByENSV3: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:29
Parameters
| Parameter | Type |
|---|---|
args | { ensName: string; } |
args.ensName | string |
Returns
Promise<Address>
registryCommunityByName()
registryCommunityByName: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:26
Parameters
| Parameter | Type |
|---|---|
args | { name: string; } |
args.name | string |
Returns
Promise<Address>
registryCommunityByNameV3()
registryCommunityByNameV3: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:28
Parameters
| Parameter | Type |
|---|---|
args | { name: string; } |
args.name | string |
Returns
Promise<Address>
registryConfigureRole()
registryConfigureRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:16
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; config: RoleConfig; roleId: Hex; } |
args.account? | Account | Address |
args.config | RoleConfig |
args.roleId | Hex |
Returns
Promise<Hash>
registryCreateNewRole()
registryCreateNewRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:98
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; config: RoleConfig; roleId: Hex; roleOwner: Address; } |
args.account? | Account | Address |
args.config | RoleConfig |
args.roleId | Hex |
args.roleOwner | Address |
Returns
Promise<Hash>
registryCreditTierConfig()
registryCreditTierConfig: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:94
Parameters
| Parameter | Type |
|---|---|
args | { level: bigint; } |
args.level | bigint |
Returns
Promise<bigint>
registryExecutedProposals()
registryExecutedProposals: (args) => Promise<boolean>;Defined in: packages/core/src/actions/registry.ts:31
Parameters
| Parameter | Type |
|---|---|
args | { proposalId: bigint; } |
args.proposalId | bigint |
Returns
Promise<boolean>
registryExitRole()
registryExitRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:85
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; roleId: Hex; } |
args.account? | Account | Address |
args.roleId | Hex |
Returns
Promise<Hash>
registryGetAccountCommunity()
registryGetAccountCommunity: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:34
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; } |
args.account | Address |
Returns
Promise<Address>
registryGetCreditLimit()
registryGetCreditLimit: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:92
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
registryGetRoleConfig()
registryGetRoleConfig: (args) => Promise<any>;Defined in: packages/core/src/actions/registry.ts:21
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<any>
registryGetRoleMemberCount()
registryGetRoleMemberCount: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:75
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<bigint>
registryGetRoleMembers()
registryGetRoleMembers: (args) => Promise<Address[]>;Defined in: packages/core/src/actions/registry.ts:81
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<Address[]>
registryGetRoleUserCount()
registryGetRoleUserCount: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:82
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<bigint>
registryGetUserRoles()
registryGetUserRoles: (args) => Promise<Hex[]>;Defined in: packages/core/src/actions/registry.ts:83
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<Hex[]>
registryGlobalReputation()
registryGlobalReputation: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:47
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
registryGTOKEN_STAKING()
registryGTOKEN_STAKING: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:109
Returns
Promise<Address>
registryHasRole()
registryHasRole: (args) => Promise<boolean>;Defined in: packages/core/src/actions/registry.ts:19
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<boolean>
registryIsCommunityMember()
registryIsCommunityMember: (args) => Promise<boolean>;Defined in: packages/core/src/actions/registry.ts:25
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; user: Address; } |
args.community | Address |
args.user | Address |
Returns
Promise<boolean>
registryIsOperatorBlacklisted()
registryIsOperatorBlacklisted: (args) => Promise<boolean>;Defined in: packages/core/src/actions/registry.ts:52
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<boolean>
registryIsReputationSource()
registryIsReputationSource: (args) => Promise<boolean>;Defined in: packages/core/src/actions/registry.ts:36
Parameters
| Parameter | Type |
|---|---|
args | { source: Address; } |
args.source | Address |
Returns
Promise<boolean>
registryLastReputationEpoch()
registryLastReputationEpoch: () => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:35
Returns
Promise<bigint>
registryLevelThresholds()
registryLevelThresholds: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:76
Parameters
| Parameter | Type |
|---|---|
args | { level: bigint; } |
args.level | bigint |
Returns
Promise<bigint>
registryMySBT()
registryMySBT: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:63
Returns
Promise<Address>
registryMYSBT()
registryMYSBT: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:110
Returns
Promise<Address>
registryOwner()
registryOwner: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:70
Returns
Promise<Address>
registryProposedRoleNames()
registryProposedRoleNames: (args) => Promise<string>;Defined in: packages/core/src/actions/registry.ts:30
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<string>
registryRegisterRole()
registryRegisterRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; data: Hex; roleId: Hex; user: Address; } |
args.account? | Account | Address |
args.data | Hex |
args.roleId | Hex |
args.user | Address |
Returns
Promise<Hash>
registryRegisterRoleSelf()
registryRegisterRoleSelf: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; data: Hex; roleId: Hex; } |
args.account? | Account | Address |
args.data | Hex |
args.roleId | Hex |
Returns
Promise<Hash>
registryRenounceOwnership()
registryRenounceOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:71
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
registryReputationSource()
registryReputationSource: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:66
Returns
Promise<Address>
registryROLE_ANODE()
registryROLE_ANODE: () => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:108
Returns
Promise<Hex>
registryROLE_COMMUNITY()
registryROLE_COMMUNITY: () => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:102
Returns
Promise<Hex>
registryROLE_DVT()
registryROLE_DVT: () => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:106
Returns
Promise<Hex>
registryROLE_ENDUSER()
registryROLE_ENDUSER: () => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:103
Returns
Promise<Hex>
registryROLE_KMS()
registryROLE_KMS: () => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:107
Returns
Promise<Hex>
registryROLE_PAYMASTER_AOA()
registryROLE_PAYMASTER_AOA: () => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:105
Returns
Promise<Hex>
registryROLE_PAYMASTER_SUPER()
registryROLE_PAYMASTER_SUPER: () => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:104
Returns
Promise<Hex>
registryRoleConfigs()
registryRoleConfigs: (args) => Promise<any>;Defined in: packages/core/src/actions/registry.ts:74
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<any>
registryRoleCounts()
registryRoleCounts: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:37
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<bigint>
registryRoleLockDurations()
registryRoleLockDurations: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:79
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<bigint>
registryRoleMemberIndex()
registryRoleMemberIndex: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:39
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<bigint>
registryRoleMembers()
registryRoleMembers: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:38
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; roleId: Hex; } |
args.index | bigint |
args.roleId | Hex |
Returns
Promise<Address>
registryRoleMetadata()
registryRoleMetadata: (args) => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:40
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user?: Address; } |
args.roleId | Hex |
args.user? | Address |
Returns
Promise<Hex>
registryRoleOwners()
registryRoleOwners: (args) => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:80
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<Address>
registryRoleSBTTokenIds()
registryRoleSBTTokenIds: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:42
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<bigint>
registryRoleStakes()
registryRoleStakes: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:41
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<bigint>
registrySafeMintForRole()
registrySafeMintForRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:99
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; data: Hex; roleId: Hex; user: Address; } |
args.account? | Account | Address |
args.data | Hex |
args.roleId | Hex |
args.user | Address |
Returns
Promise<Hash>
registrySetBLSAggregator()
registrySetBLSAggregator: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:56
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; aggregator: Address; } |
args.account? | Account | Address |
args.aggregator | Address |
Returns
Promise<Hash>
registrySetBLSValidator()
registrySetBLSValidator: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:55
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; validator: Address; } |
args.account? | Account | Address |
args.validator | Address |
Returns
Promise<Hash>
registrySetCreditTier()
registrySetCreditTier: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:93
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; level: bigint; limit: bigint; } |
args.account? | Account | Address |
args.level | bigint |
args.limit | bigint |
Returns
Promise<Hash>
registrySetLevelThreshold()
registrySetLevelThreshold: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:88
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; index: bigint; threshold: bigint; } |
args.account? | Account | Address |
args.index | bigint |
args.threshold | bigint |
Returns
Promise<Hash>
registrySetMySBT()
registrySetMySBT: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:57
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; sbt: Address; } |
args.account? | Account | Address |
args.sbt | Address |
Returns
Promise<Hash>
registrySetReputationSource()
registrySetReputationSource: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:60
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; source: Address; } |
args.account? | Account | Address |
args.source | Address |
Returns
Promise<Hash>
registrySetRoleLockDuration()
registrySetRoleLockDuration: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; duration: bigint; roleId: Hex; } |
args.account? | Account | Address |
args.duration | bigint |
args.roleId | Hex |
Returns
Promise<Hash>
registrySetRoleOwner()
registrySetRoleOwner: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:23
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; roleId: Hex; } |
args.account? | Account | Address |
args.newOwner | Address |
args.roleId | Hex |
Returns
Promise<Hash>
registrySetStaking()
registrySetStaking: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:59
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; staking: Address; } |
args.account? | Account | Address |
args.staking | Address |
Returns
Promise<Hash>
registrySetSuperPaymaster()
registrySetSuperPaymaster: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:58
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; paymaster: Address; } |
args.account? | Account | Address |
args.paymaster | Address |
Returns
Promise<Hash>
registryStaking()
registryStaking: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:65
Returns
Promise<Address>
registrySUPER_PAYMASTER()
registrySUPER_PAYMASTER: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:111
Returns
Promise<Address>
registrySuperPaymaster()
registrySuperPaymaster: () => Promise<Address>;Defined in: packages/core/src/actions/registry.ts:64
Returns
Promise<Address>
registryTransferOwnership()
registryTransferOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:69
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
registryUnRegisterRole()
registryUnRegisterRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:20
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; roleId: Hex; user: Address; } |
args.account? | Account | Address |
args.roleId | Hex |
args.user | Address |
Returns
Promise<Hash>
registryUpdateOperatorBlacklist()
registryUpdateOperatorBlacklist: (args) => Promise<Hash>;Defined in: packages/core/src/actions/registry.ts:51
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; operator: Address; proof: Hex; statuses: boolean[]; users: Address[]; } |
args.account? | Account | Address |
args.operator | Address |
args.proof | Hex |
args.statuses | boolean[] |
args.users | Address[] |
Returns
Promise<Hash>
registryUserRoleCount()
registryUserRoleCount: (args) => Promise<bigint>;Defined in: packages/core/src/actions/registry.ts:44
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
registryUserRoles()
registryUserRoles: (args) => Promise<Hex>;Defined in: packages/core/src/actions/registry.ts:43
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; user: Address; } |
args.index | bigint |
args.user | Address |
Returns
Promise<Hex>
registryVersion()
registryVersion: () => Promise<string>;Defined in: packages/core/src/actions/registry.ts:114
Returns
Promise<string>
ReputationActions
type ReputationActions = object;Defined in: packages/core/src/actions/reputation.ts:4
Properties
batchSyncToRegistry()
batchSyncToRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:27
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; users: Address[]; } |
args.account? | Account | Address |
args.users | Address[] |
Returns
Promise<Hash>
batchUpdateScores()
batchUpdateScores: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:26
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; scores: bigint[]; users: Address[]; } |
args.account? | Account | Address |
args.scores | bigint[] |
args.users | Address[] |
Returns
Promise<Hash>
boostedCollections()
boostedCollections: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:60
Parameters
| Parameter | Type |
|---|---|
args | { collection: Address; } |
args.collection | Address |
Returns
Promise<bigint>
calculateReputation()
calculateReputation: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; user: Address; } |
args.community | Address |
args.user | Address |
Returns
Promise<bigint>
communityActiveRules()
communityActiveRules: (args) => Promise<boolean>;Defined in: packages/core/src/actions/reputation.ts:61
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; ruleId: Hex; } |
args.community | Address |
args.ruleId | Hex |
Returns
Promise<boolean>
communityReputations()
communityReputations: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; user: Address; } |
args.community | Address |
args.user | Address |
Returns
Promise<bigint>
communityRules()
communityRules: (args) => Promise<boolean>;Defined in: packages/core/src/actions/reputation.ts:56
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; ruleId: Hex; } |
args.community | Address |
args.ruleId | Hex |
Returns
Promise<boolean>
computeScore()
computeScore: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:15
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; user: Address; } |
args.community | Address |
args.user | Address |
Returns
Promise<bigint>
defaultRule()
defaultRule: () => Promise<Hex>;Defined in: packages/core/src/actions/reputation.ts:57
Returns
Promise<Hex>
disableRule()
disableRule: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:9
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; ruleId: Hex; } |
args.account? | Account | Address |
args.ruleId | Hex |
Returns
Promise<Hash>
enableRule()
enableRule: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; ruleId: Hex; } |
args.account? | Account | Address |
args.ruleId | Hex |
Returns
Promise<Hash>
entropyFactors()
entropyFactors: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:58
Parameters
| Parameter | Type |
|---|---|
args | { factorId: bigint; } |
args.factorId | bigint |
Returns
Promise<bigint>
getActiveRules()
getActiveRules: (args) => Promise<Hex[]>;Defined in: packages/core/src/actions/reputation.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<Hex[]>
getCommunityScore()
getCommunityScore: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<bigint>
getEntropyFactor()
getEntropyFactor: () => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:41
Returns
Promise<bigint>
getReputationBreakdown()
getReputationBreakdown: (args) => Promise<any>;Defined in: packages/core/src/actions/reputation.ts:62
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; user: Address; } |
args.community | Address |
args.user | Address |
Returns
Promise<any>
getReputationRule()
getReputationRule: (args) => Promise<any>;Defined in: packages/core/src/actions/reputation.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { ruleId: Hex; } |
args.ruleId | Hex |
Returns
Promise<any>
getRuleCount()
getRuleCount: () => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:12
Returns
Promise<bigint>
getUserScore()
getUserScore: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:16
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
isRuleActive()
isRuleActive: (args) => Promise<boolean>;Defined in: packages/core/src/actions/reputation.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { ruleId: Hex; } |
args.ruleId | Hex |
Returns
Promise<boolean>
nftCollectionBoost()
nftCollectionBoost: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:23
Parameters
| Parameter | Type |
|---|---|
args | { collection: Address; } |
args.collection | Address |
Returns
Promise<bigint>
nftHoldStart()
nftHoldStart: (args) => Promise<bigint>;Defined in: packages/core/src/actions/reputation.ts:59
Parameters
| Parameter | Type |
|---|---|
args | { collection: Address; user: Address; } |
args.collection | Address |
args.user | Address |
Returns
Promise<bigint>
REGISTRY()
REGISTRY: () => Promise<Address>;Defined in: packages/core/src/actions/reputation.ts:44
Returns
Promise<Address>
renounceReputationOwnership()
renounceReputationOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:49
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
reputationOwner()
reputationOwner: () => Promise<Address>;Defined in: packages/core/src/actions/reputation.ts:47
Returns
Promise<Address>
reputationVersion()
reputationVersion: () => Promise<string>;Defined in: packages/core/src/actions/reputation.ts:66
Returns
Promise<string>
setCommunityReputation()
setCommunityReputation: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:52
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; community: Address; reputation: bigint; } |
args.account? | Account | Address |
args.community | Address |
args.reputation | bigint |
Returns
Promise<Hash>
setEntropyFactor()
setEntropyFactor: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:40
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; factor: bigint; } |
args.account? | Account | Address |
args.factor | bigint |
Returns
Promise<Hash>
setNFTBoost()
setNFTBoost: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:63
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; boost: bigint; collection: Address; } |
args.account? | Account | Address |
args.boost | bigint |
args.collection | Address |
Returns
Promise<Hash>
setRegistry()
setRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:39
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; registry: Address; } |
args.account? | Account | Address |
args.registry | Address |
Returns
Promise<Hash>
setReputationRule()
setReputationRule: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:6
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; rule: any; ruleId: Hex; } |
args.account? | Account | Address |
args.rule | any |
args.ruleId | Hex |
Returns
Promise<Hash>
setRule()
setRule: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:21
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; rule: any; ruleId: Hex; } |
args.account? | Account | Address |
args.rule | any |
args.ruleId | Hex |
Returns
Promise<Hash>
syncToRegistry()
syncToRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:28
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; activities: bigint[][]; communities: Address[]; epoch: bigint; proof: Hex; ruleIds: Hex[][]; user: Address; } |
args.account? | Account | Address |
args.activities | bigint[][] |
args.communities | Address[] |
args.epoch | bigint |
args.proof | Hex |
args.ruleIds | Hex[][] |
args.user | Address |
Returns
Promise<Hash>
transferReputationOwnership()
transferReputationOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:48
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
updateNFTHoldStart()
updateNFTHoldStart: (args) => Promise<Hash>;Defined in: packages/core/src/actions/reputation.ts:53
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; collection: Address; start: bigint; user: Address; } |
args.account? | Account | Address |
args.collection | Address |
args.start | bigint |
args.user | Address |
Returns
Promise<Hash>
SBTActions
type SBTActions = object;Defined in: packages/core/src/actions/sbt.ts:5
Properties
sbtAirdropMint()
sbtAirdropMint: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; roleId: Hex; to: Address; tokenURI: string; } |
args.account? | Account | Address |
args.roleId | Hex |
args.to | Address |
args.tokenURI | string |
Returns
Promise<Hash>
sbtApprove()
sbtApprove: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:25
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; to: Address; tokenId: bigint; } |
args.account? | Account | Address |
args.to | Address |
args.tokenId | bigint |
Returns
Promise<Hash>
sbtBalanceOf()
sbtBalanceOf: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:21
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; } |
args.owner | Address |
Returns
Promise<bigint>
sbtBurn()
sbtBurn: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:44
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; tokenId: bigint; } |
args.account? | Account | Address |
args.tokenId | bigint |
Returns
Promise<Hash>
sbtBurnSBT()
sbtBurnSBT: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:45
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; tokenId: bigint; } |
args.account? | Account | Address |
args.tokenId | bigint |
Returns
Promise<Hash>
sbtDaoMultisig()
sbtDaoMultisig: () => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:72
Returns
Promise<Address>
sbtDeactivateAllMemberships()
sbtDeactivateAllMemberships: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:46
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; user: Address; } |
args.account? | Account | Address |
args.user | Address |
Returns
Promise<Hash>
sbtDeactivateMembership()
sbtDeactivateMembership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:51
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; tokenId: bigint; } |
args.account? | Account | Address |
args.tokenId | bigint |
Returns
Promise<Hash>
sbtGetActiveMemberships()
sbtGetActiveMemberships: (args) => Promise<any[]>;Defined in: packages/core/src/actions/sbt.ts:14
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<any[]>
sbtGetApproved()
sbtGetApproved: (args) => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:27
Parameters
| Parameter | Type |
|---|---|
args | { tokenId: bigint; } |
args.tokenId | bigint |
Returns
Promise<Address>
sbtGetCommunityMembership()
sbtGetCommunityMembership: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:12
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; user: Address; } |
args.community | Address |
args.user | Address |
Returns
Promise<bigint>
sbtGetMemberships()
sbtGetMemberships: (args) => Promise<any[]>;Defined in: packages/core/src/actions/sbt.ts:13
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<any[]>
sbtGetSBTData()
sbtGetSBTData: (args) => Promise<any>;Defined in: packages/core/src/actions/sbt.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { tokenId: bigint; } |
args.tokenId | bigint |
Returns
Promise<any>
sbtGetUserSBT()
sbtGetUserSBT: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<bigint>
sbtGTOKEN()
sbtGTOKEN: () => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:83
Returns
Promise<Address>
sbtGTOKEN_STAKING()
sbtGTOKEN_STAKING: () => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:82
Returns
Promise<Address>
sbtIsApprovedForAll()
sbtIsApprovedForAll: (args) => Promise<boolean>;Defined in: packages/core/src/actions/sbt.ts:28
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; owner: Address; } |
args.operator | Address |
args.owner | Address |
Returns
Promise<boolean>
sbtLastActivityTime()
sbtLastActivityTime: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:55
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
sbtLeaveCommunity()
sbtLeaveCommunity: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:50
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; community: Address; } |
args.account? | Account | Address |
args.community | Address |
Returns
Promise<Hash>
sbtMembershipIndex()
sbtMembershipIndex: (args) => Promise<any>;Defined in: packages/core/src/actions/sbt.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; user: Address; } |
args.index | bigint |
args.user | Address |
Returns
Promise<any>
sbtMinLockAmount()
sbtMinLockAmount: () => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:63
Returns
Promise<bigint>
sbtMint()
sbtMint: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:43
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; to: Address; tokenURI: string; } |
args.account? | Account | Address |
args.to | Address |
args.tokenURI | string |
Returns
Promise<Hash>
sbtMintFee()
sbtMintFee: () => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:61
Returns
Promise<bigint>
sbtMintForRole()
sbtMintForRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:9
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; roleId: Hex; to: Address; } |
args.account? | Account | Address |
args.roleId | Hex |
args.to | Address |
Returns
Promise<Hash>
sbtName()
sbtName: () => Promise<string>;Defined in: packages/core/src/actions/sbt.ts:31
Returns
Promise<string>
sbtNextTokenId()
sbtNextTokenId: () => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:40
Returns
Promise<bigint>
sbtOwner()
sbtOwner: () => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:87
Returns
Promise<Address>
sbtOwnerOf()
sbtOwnerOf: (args) => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { tokenId: bigint; } |
args.tokenId | bigint |
Returns
Promise<Address>
sbtPause()
sbtPause: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:67
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
sbtPaused()
sbtPaused: () => Promise<boolean>;Defined in: packages/core/src/actions/sbt.ts:69
Returns
Promise<boolean>
sbtRecordActivity()
sbtRecordActivity: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:54
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; user: Address; } |
args.account? | Account | Address |
args.user | Address |
Returns
Promise<Hash>
sbtREGISTRY()
sbtREGISTRY: () => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:81
Returns
Promise<Address>
sbtRenounceOwnership()
sbtRenounceOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:89
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
sbtReputationCalculator()
sbtReputationCalculator: () => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:57
Returns
Promise<Address>
sbtSafeMintForRole()
sbtSafeMintForRole: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; roleId: Hex; to: Address; tokenURI: string; } |
args.account? | Account | Address |
args.roleId | Hex |
args.to | Address |
args.tokenURI | string |
Returns
Promise<Hash>
sbtSafeTransferFrom()
sbtSafeTransferFrom: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:23
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; from: Address; to: Address; tokenId: bigint; } |
args.account? | Account | Address |
args.from | Address |
args.to | Address |
args.tokenId | bigint |
Returns
Promise<Hash>
sbtSbtData()
sbtSbtData: (args) => Promise<any>;Defined in: packages/core/src/actions/sbt.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { tokenId: bigint; } |
args.tokenId | bigint |
Returns
Promise<any>
sbtSetApprovalForAll()
sbtSetApprovalForAll: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:26
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; approved: boolean; operator: Address; } |
args.account? | Account | Address |
args.approved | boolean |
args.operator | Address |
Returns
Promise<Hash>
sbtSetBaseURI()
sbtSetBaseURI: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:47
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; baseURI: string; } |
args.account? | Account | Address |
args.baseURI | string |
Returns
Promise<Hash>
sbtSetDAOMultisig()
sbtSetDAOMultisig: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:73
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; multisig: Address; } |
args.account? | Account | Address |
args.multisig | Address |
Returns
Promise<Hash>
sbtSetMinLockAmount()
sbtSetMinLockAmount: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:64
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
sbtSetMintFee()
sbtSetMintFee: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:62
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; fee: bigint; } |
args.account? | Account | Address |
args.fee | bigint |
Returns
Promise<Hash>
sbtSetRegistry()
sbtSetRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:74
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; registry: Address; } |
args.account? | Account | Address |
args.registry | Address |
Returns
Promise<Hash>
sbtSetReputationCalculator()
sbtSetReputationCalculator: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:58
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; calculator: Address; } |
args.account? | Account | Address |
args.calculator | Address |
Returns
Promise<Hash>
sbtSetSuperPaymaster()
sbtSetSuperPaymaster: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:75
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; paymaster: Address; } |
args.account? | Account | Address |
args.paymaster | Address |
Returns
Promise<Hash>
sbtSUPER_PAYMASTER()
sbtSUPER_PAYMASTER: () => Promise<Address>;Defined in: packages/core/src/actions/sbt.ts:84
Returns
Promise<Address>
sbtSupportsInterface()
sbtSupportsInterface: (args) => Promise<boolean>;Defined in: packages/core/src/actions/sbt.ts:39
Parameters
| Parameter | Type |
|---|---|
args | { interfaceId: Hex; } |
args.interfaceId | Hex |
Returns
Promise<boolean>
sbtSymbol()
sbtSymbol: () => Promise<string>;Defined in: packages/core/src/actions/sbt.ts:32
Returns
Promise<string>
sbtTokenByIndex()
sbtTokenByIndex: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:37
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; } |
args.index | bigint |
Returns
Promise<bigint>
sbtTokenOfOwnerByIndex()
sbtTokenOfOwnerByIndex: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:38
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; owner: Address; } |
args.index | bigint |
args.owner | Address |
Returns
Promise<bigint>
sbtTokenURI()
sbtTokenURI: (args) => Promise<string>;Defined in: packages/core/src/actions/sbt.ts:33
Parameters
| Parameter | Type |
|---|---|
args | { tokenId: bigint; } |
args.tokenId | bigint |
Returns
Promise<string>
sbtTotalSupply()
sbtTotalSupply: () => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:36
Returns
Promise<bigint>
sbtTransferFrom()
sbtTransferFrom: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:24
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; from: Address; to: Address; tokenId: bigint; } |
args.account? | Account | Address |
args.from | Address |
args.to | Address |
args.tokenId | bigint |
Returns
Promise<Hash>
sbtTransferSBTOwnership()
sbtTransferSBTOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:88
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
sbtUnpause()
sbtUnpause: (args) => Promise<Hash>;Defined in: packages/core/src/actions/sbt.ts:68
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
sbtUserToSBT()
sbtUserToSBT: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:16
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
sbtVerifyCommunityMembership()
sbtVerifyCommunityMembership: (args) => Promise<boolean>;Defined in: packages/core/src/actions/sbt.ts:15
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; user: Address; } |
args.community | Address |
args.user | Address |
Returns
Promise<boolean>
sbtVersion()
sbtVersion: () => Promise<string>;Defined in: packages/core/src/actions/sbt.ts:78
Returns
Promise<string>
sbtWeeklyActivity()
sbtWeeklyActivity: (args) => Promise<bigint>;Defined in: packages/core/src/actions/sbt.ts:56
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
StakingActions
type StakingActions = object;Defined in: packages/core/src/actions/staking.ts:4
Properties
authorizedSlashers()
authorizedSlashers: (args) => Promise<boolean>;Defined in: packages/core/src/actions/staking.ts:38
Parameters
| Parameter | Type |
|---|---|
args | { slasher: Address; } |
args.slasher | Address |
Returns
Promise<boolean>
availableBalance()
availableBalance: (args) => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:24
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
balanceOf()
balanceOf: (args) => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:40
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; } |
args.account | Address |
Returns
Promise<bigint>
getLockedStake()
getLockedStake: (args) => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:21
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<bigint>
getStake()
getStake: (args) => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:39
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; } |
args.account | Address |
Returns
Promise<bigint>
getStakeInfo()
getStakeInfo: (args) => Promise<any>;Defined in: packages/core/src/actions/staking.ts:19
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; roleId: Hex; } |
args.operator | Address |
args.roleId | Hex |
Returns
Promise<any>
getStakingBalance()
getStakingBalance: (args) => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:20
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
getTotalStaked()
getTotalStaked: () => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:42
Returns
Promise<bigint>
getUserRoleLocks()
getUserRoleLocks: (args) => Promise<any[]>;Defined in: packages/core/src/actions/staking.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<any[]>
GTOKEN()
GTOKEN: () => Promise<Address>;Defined in: packages/core/src/actions/staking.ts:55
Returns
Promise<Address>
hasRoleLock()
hasRoleLock: (args) => Promise<boolean>;Defined in: packages/core/src/actions/staking.ts:23
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<boolean>
lockStake()
lockStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:6
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; entryBurn: bigint; payer: Address; roleId: Hex; stakeAmount: bigint; user: Address; } |
args.account? | Account | Address |
args.entryBurn | bigint |
args.payer | Address |
args.roleId | Hex |
args.stakeAmount | bigint |
args.user | Address |
Returns
Promise<Hash>
owner()
owner: () => Promise<Address>;Defined in: packages/core/src/actions/staking.ts:44
Returns
Promise<Address>
previewExitFee()
previewExitFee: (args) => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:25
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<bigint>
REGISTRY()
REGISTRY: () => Promise<Address>;Defined in: packages/core/src/actions/staking.ts:54
Returns
Promise<Address>
renounceOwnership()
renounceOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:48
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
roleExitConfigs()
roleExitConfigs: (args) => Promise<any>;Defined in: packages/core/src/actions/staking.ts:36
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; } |
args.roleId | Hex |
Returns
Promise<any>
roleLocks()
roleLocks: (args) => Promise<any>;Defined in: packages/core/src/actions/staking.ts:35
Parameters
| Parameter | Type |
|---|---|
args | { roleId: Hex; user: Address; } |
args.roleId | Hex |
args.user | Address |
Returns
Promise<any>
setAuthorizedSlasher()
setAuthorizedSlasher: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:16
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; authorized: boolean; slasher: Address; } |
args.account? | Account | Address |
args.authorized | boolean |
args.slasher | Address |
Returns
Promise<Hash>
setRegistry()
setRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:28
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; registry: Address; } |
args.account? | Account | Address |
args.registry | Address |
Returns
Promise<Hash>
setRoleExitFee()
setRoleExitFee: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:30
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; feePercent: bigint; roleId: Hex; } |
args.account? | Account | Address |
args.feePercent | bigint |
args.roleId | Hex |
Returns
Promise<Hash>
setTreasury()
setTreasury: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:31
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; treasury: Address; } |
args.account? | Account | Address |
args.treasury | Address |
Returns
Promise<Hash>
slash()
slash: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:14
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; reason: string; roleId: Hex; user: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.reason | string |
args.roleId | Hex |
args.user | Address |
Returns
Promise<Hash>
slashByDVT()
slashByDVT: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:15
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; reason: string; roleId: Hex; user: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.reason | string |
args.roleId | Hex |
args.user | Address |
Returns
Promise<Hash>
stake()
stake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:9
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
stakes()
stakes: (args) => Promise<any>;Defined in: packages/core/src/actions/staking.ts:34
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<any>
topUpStake()
topUpStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
totalStaked()
totalStaked: () => Promise<bigint>;Defined in: packages/core/src/actions/staking.ts:41
Returns
Promise<bigint>
transferOwnership()
transferOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:29
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
transferStakingOwnership()
transferStakingOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:47
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
treasury()
treasury: () => Promise<Address>;Defined in: packages/core/src/actions/staking.ts:43
Returns
Promise<Address>
unlockAndTransfer()
unlockAndTransfer: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; roleId: Hex; user: Address; } |
args.account? | Account | Address |
args.roleId | Hex |
args.user | Address |
Returns
Promise<Hash>
unlockStake()
unlockStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; roleId: Hex; user: Address; } |
args.account? | Account | Address |
args.roleId | Hex |
args.user | Address |
Returns
Promise<Hash>
unstake()
unstake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/staking.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
userActiveRoles()
userActiveRoles: (args) => Promise<Hex>;Defined in: packages/core/src/actions/staking.ts:37
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; user: Address; } |
args.index | bigint |
args.user | Address |
Returns
Promise<Hex>
version()
version: () => Promise<string>;Defined in: packages/core/src/actions/staking.ts:51
Returns
Promise<string>
SuperPaymasterActions
type SuperPaymasterActions = object;Defined in: packages/core/src/actions/superPaymaster.ts:4
Properties
renounceSuperPaymasterOwnership()
renounceSuperPaymasterOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:95
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
superPaymasterAddStake()
superPaymasterAddStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:98
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
superPaymasterAddSuperStake()
superPaymasterAddSuperStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:12
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
superPaymasterAPNTS_TOKEN()
superPaymasterAPNTS_TOKEN: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:80
Returns
Promise<Address>
superPaymasterAPNTsPriceUSD()
superPaymasterAPNTsPriceUSD: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:43
Returns
Promise<bigint>
superPaymasterBalanceOfOperator()
superPaymasterBalanceOfOperator: (args) => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:42
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<bigint>
superPaymasterBlockedUsers()
superPaymasterBlockedUsers: (args) => Promise<boolean>;Defined in: packages/core/src/actions/superPaymaster.ts:41
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<boolean>
superPaymasterBlockUser()
superPaymasterBlockUser: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:30
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; blocked: boolean; user: Address; } |
args.account? | Account | Address |
args.blocked | boolean |
args.user | Address |
Returns
Promise<Hash>
superPaymasterBLS_AGGREGATOR()
superPaymasterBLS_AGGREGATOR: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:82
Returns
Promise<Address>
superPaymasterBPS_DENOMINATOR()
superPaymasterBPS_DENOMINATOR: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:86
Returns
Promise<bigint>
superPaymasterCachedPrice()
superPaymasterCachedPrice: () => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:44
Returns
Promise<any>
superPaymasterConfigureOperator()
superPaymasterConfigureOperator: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; exchangeRate: bigint; treasury: Address; xPNTsToken: Address; } |
args.account? | Account | Address |
args.exchangeRate | bigint |
args.treasury | Address |
args.xPNTsToken | Address |
Returns
Promise<Hash>
superPaymasterDeposit()
superPaymasterDeposit: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:6
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
superPaymasterDepositAPNTs()
superPaymasterDepositAPNTs: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
Deprecated
Use superPaymasterDeposit for clarity
superPaymasterDepositETH()
superPaymasterDepositETH: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:9
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; value: bigint; } |
args.account? | Account | Address |
args.value | bigint |
Returns
Promise<Hash>
superPaymasterDepositFor()
superPaymasterDepositFor: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; operator: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.operator | Address |
Returns
Promise<Hash>
superPaymasterDepositForAlias()
superPaymasterDepositForAlias: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:99
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; operator: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.operator | Address |
Returns
Promise<Hash>
superPaymasterEntryPoint()
superPaymasterEntryPoint: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:50
Returns
Promise<Address>
superPaymasterETH_USD_PRICE_FEED()
superPaymasterETH_USD_PRICE_FEED: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:83
Returns
Promise<Address>
superPaymasterExecuteSlashWithBLS()
superPaymasterExecuteSlashWithBLS: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:21
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; blsSignature: Hex; operator: Address; reason: string; roleId: Hex; } |
args.account? | Account | Address |
args.amount | bigint |
args.blsSignature | Hex |
args.operator | Address |
args.reason | string |
args.roleId | Hex |
Returns
Promise<Hash>
superPaymasterGetAvailableCredit()
superPaymasterGetAvailableCredit: (args) => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:40
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; user: Address; } |
args.operator | Address |
args.user | Address |
Returns
Promise<bigint>
superPaymasterGetDeposit()
superPaymasterGetDeposit: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:39
Returns
Promise<bigint>
superPaymasterGetLatestSlash()
superPaymasterGetLatestSlash: (args) => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:57
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<any>
superPaymasterGetSlashCount()
superPaymasterGetSlashCount: (args) => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:56
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<bigint>
superPaymasterGetSlashHistory()
superPaymasterGetSlashHistory: (args) => Promise<any[]>;Defined in: packages/core/src/actions/superPaymaster.ts:55
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<any[]>
superPaymasterLastUserOpTimestamp()
superPaymasterLastUserOpTimestamp: (args) => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:52
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<bigint>
superPaymasterMAX_ETH_USD_PRICE()
superPaymasterMAX_ETH_USD_PRICE: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:89
Returns
Promise<bigint>
superPaymasterMAX_PROTOCOL_FEE()
superPaymasterMAX_PROTOCOL_FEE: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:105
Returns
Promise<bigint>
superPaymasterMIN_ETH_USD_PRICE()
superPaymasterMIN_ETH_USD_PRICE: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:90
Returns
Promise<bigint>
superPaymasterOnTransferReceived()
superPaymasterOnTransferReceived: (args) => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:74
Parameters
| Parameter | Type |
|---|---|
args | { amount: bigint; data: Hex; from: Address; } |
args.amount | bigint |
args.data | Hex |
args.from | Address |
Returns
Promise<any>
superPaymasterOperators()
superPaymasterOperators: (args) => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:38
Parameters
| Parameter | Type |
|---|---|
args | { operator: Address; } |
args.operator | Address |
Returns
Promise<any>
superPaymasterOwner()
superPaymasterOwner: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:94
Returns
Promise<Address>
superPaymasterPAYMASTER_DATA_OFFSET()
superPaymasterPAYMASTER_DATA_OFFSET: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:84
Returns
Promise<bigint>
superPaymasterPostOp()
superPaymasterPostOp: (args) => Promise<void>;Defined in: packages/core/src/actions/superPaymaster.ts:35
Parameters
| Parameter | Type |
|---|---|
args | { actualGasCost: bigint; actualUserOpFeePerGas: bigint; context: Hex; mode: number; } |
args.actualGasCost | bigint |
args.actualUserOpFeePerGas | bigint |
args.context | Hex |
args.mode | number |
Returns
Promise<void>
superPaymasterPRICE_CACHE_DURATION()
superPaymasterPRICE_CACHE_DURATION: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:87
Returns
Promise<bigint>
superPaymasterPRICE_STALENESS_THRESHOLD()
superPaymasterPRICE_STALENESS_THRESHOLD: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:88
Returns
Promise<bigint>
superPaymasterPriceStalenessThreshold()
superPaymasterPriceStalenessThreshold: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:107
Returns
Promise<bigint>
superPaymasterProtocolFee()
superPaymasterProtocolFee: () => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:45
Returns
Promise<any>
superPaymasterProtocolFeeBPS()
superPaymasterProtocolFeeBPS: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:46
Returns
Promise<bigint>
superPaymasterProtocolRevenue()
superPaymasterProtocolRevenue: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:47
Returns
Promise<bigint>
superPaymasterRATE_OFFSET()
superPaymasterRATE_OFFSET: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:85
Returns
Promise<bigint>
superPaymasterREGISTRY()
superPaymasterREGISTRY: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:81
Returns
Promise<Address>
superPaymasterSbtHolders()
superPaymasterSbtHolders: (args) => Promise<boolean>;Defined in: packages/core/src/actions/superPaymaster.ts:108
Parameters
| Parameter | Type |
|---|---|
args | { user: Address; } |
args.user | Address |
Returns
Promise<boolean>
superPaymasterSetAPNTsPrice()
superPaymasterSetAPNTsPrice: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:25
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; priceUSD: bigint; } |
args.account? | Account | Address |
args.priceUSD | bigint |
Returns
Promise<Hash>
superPaymasterSetAPNTsToken()
superPaymasterSetAPNTsToken: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:70
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; token: Address; } |
args.account? | Account | Address |
args.token | Address |
Returns
Promise<Hash>
superPaymasterSetBLSAggregator()
superPaymasterSetBLSAggregator: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:71
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; aggregator: Address; } |
args.account? | Account | Address |
args.aggregator | Address |
Returns
Promise<Hash>
superPaymasterSetCachedPrice()
superPaymasterSetCachedPrice: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:26
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; price: bigint; } |
args.account? | Account | Address |
args.price | bigint |
Returns
Promise<Hash>
superPaymasterSetOperatorLimits()
superPaymasterSetOperatorLimits: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:19
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; limits: any; operator: Address; } |
args.account? | Account | Address |
args.limits | any |
args.operator | Address |
Returns
Promise<Hash>
superPaymasterSetOperatorPaused()
superPaymasterSetOperatorPaused: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; operator: Address; paused: boolean; } |
args.account? | Account | Address |
args.operator | Address |
args.paused | boolean |
Returns
Promise<Hash>
superPaymasterSetProtocolFee()
superPaymasterSetProtocolFee: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:27
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; feeBps: bigint; feeRecipient: Address; } |
args.account? | Account | Address |
args.feeBps | bigint |
args.feeRecipient | Address |
Returns
Promise<Hash>
superPaymasterSetTreasury()
superPaymasterSetTreasury: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:65
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; treasury: Address; } |
args.account? | Account | Address |
args.treasury | Address |
Returns
Promise<Hash>
superPaymasterSetXPNTsFactory()
superPaymasterSetXPNTsFactory: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:69
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; factory: Address; } |
args.account? | Account | Address |
args.factory | Address |
Returns
Promise<Hash>
superPaymasterSlashHistory()
superPaymasterSlashHistory: (args) => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:58
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; operator: Address; } |
args.index | bigint |
args.operator | Address |
Returns
Promise<any>
superPaymasterSlashOperator()
superPaymasterSlashOperator: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; operator: Address; reason: string; } |
args.account? | Account | Address |
args.amount | bigint |
args.operator | Address |
args.reason | string |
Returns
Promise<Hash>
superPaymasterTotalTrackedBalance()
superPaymasterTotalTrackedBalance: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:51
Returns
Promise<bigint>
superPaymasterTreasury()
superPaymasterTreasury: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:48
Returns
Promise<Address>
superPaymasterUnlockStake()
superPaymasterUnlockStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:100
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
superPaymasterUnlockSuperStake()
superPaymasterUnlockSuperStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:13
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
superPaymasterUpdateBlockedStatus()
superPaymasterUpdateBlockedStatus: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:31
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; blocked: boolean; user: Address; } |
args.account? | Account | Address |
args.blocked | boolean |
args.user | Address |
Returns
Promise<Hash>
superPaymasterUpdatePrice()
superPaymasterUpdatePrice: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:61
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
superPaymasterUpdatePriceDVT()
superPaymasterUpdatePriceDVT: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:62
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; price: bigint; proof: Hex; } |
args.account? | Account | Address |
args.price | bigint |
args.proof | Hex |
Returns
Promise<Hash>
superPaymasterUpdateReputation()
superPaymasterUpdateReputation: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:20
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newReputation: bigint; operator: Address; } |
args.account? | Account | Address |
args.newReputation | bigint |
args.operator | Address |
Returns
Promise<Hash>
superPaymasterUpdateSBTStatus()
superPaymasterUpdateSBTStatus: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:110
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; hasSBT: boolean; user: Address; } |
args.account? | Account | Address |
args.hasSBT | boolean |
args.user | Address |
Returns
Promise<Hash>
superPaymasterUserOpState()
superPaymasterUserOpState: (args) => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:109
Parameters
| Parameter | Type |
|---|---|
args | { userOpHash: Hex; } |
args.userOpHash | Hex |
Returns
Promise<any>
superPaymasterValidatePaymasterUserOp()
superPaymasterValidatePaymasterUserOp: (args) => Promise<any>;Defined in: packages/core/src/actions/superPaymaster.ts:34
Parameters
| Parameter | Type |
|---|---|
args | { maxCost: bigint; userOp: any; userOpHash: Hex; } |
args.maxCost | bigint |
args.userOp | any |
args.userOpHash | Hex |
Returns
Promise<any>
superPaymasterVALIDATION_BUFFER_BPS()
superPaymasterVALIDATION_BUFFER_BPS: () => Promise<bigint>;Defined in: packages/core/src/actions/superPaymaster.ts:106
Returns
Promise<bigint>
superPaymasterVersion()
superPaymasterVersion: () => Promise<string>;Defined in: packages/core/src/actions/superPaymaster.ts:112
Returns
Promise<string>
superPaymasterWithdraw()
superPaymasterWithdraw: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:101
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
superPaymasterWithdrawAlias()
superPaymasterWithdrawAlias: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:102
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
superPaymasterWithdrawAPNTs()
superPaymasterWithdrawAPNTs: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:77
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; } |
args.account? | Account | Address |
args.amount | bigint |
Returns
Promise<Hash>
superPaymasterWithdrawProtocolRevenue()
superPaymasterWithdrawProtocolRevenue: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:66
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; to: Address; } |
args.account? | Account | Address |
args.to | Address |
Returns
Promise<Hash>
superPaymasterWithdrawStake()
superPaymasterWithdrawStake: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:14
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; to: Address; } |
args.account? | Account | Address |
args.to | Address |
Returns
Promise<Hash>
superPaymasterWithdrawTo()
superPaymasterWithdrawTo: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; to: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.to | Address |
Returns
Promise<Hash>
superPaymasterXpntsFactory()
superPaymasterXpntsFactory: () => Promise<Address>;Defined in: packages/core/src/actions/superPaymaster.ts:49
Returns
Promise<Address>
transferSuperPaymasterOwnership()
transferSuperPaymasterOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/superPaymaster.ts:93
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
SupportedNetwork
type SupportedNetwork = keyof typeof NETWORKS;Defined in: packages/core/src/networks.ts:30
TokenActions
type TokenActions = object;Defined in: packages/core/src/actions/tokens.ts:5
Properties
tokenAddAutoApprovedSpender()
tokenAddAutoApprovedSpender: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:38
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; spender: Address; token: Address; } |
args.account? | Account | Address |
args.spender | Address |
args.token | Address |
Returns
Promise<Hash>
tokenAllowance()
tokenAllowance: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:14
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; spender: Address; token: Address; } |
args.owner | Address |
args.spender | Address |
args.token | Address |
Returns
Promise<bigint>
tokenApprove()
tokenApprove: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:13
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; spender: Address; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.spender | Address |
args.token | Address |
Returns
Promise<Hash>
tokenAutoApprovedSpenders()
tokenAutoApprovedSpenders: (args) => Promise<boolean>;Defined in: packages/core/src/actions/tokens.ts:66
Parameters
| Parameter | Type |
|---|---|
args | { spender: Address; token: Address; } |
args.spender | Address |
args.token | Address |
Returns
Promise<boolean>
tokenBalanceOf()
tokenBalanceOf: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; token: Address; } |
args.account | Address |
args.token | Address |
Returns
Promise<bigint>
tokenBurn()
tokenBurn: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.token | Address |
Returns
Promise<Hash>
tokenBurnFrom()
tokenBurnFrom: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:19
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; from: Address; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.from | Address |
args.token | Address |
Returns
Promise<Hash>
tokenBurnFromWithOpHash()
tokenBurnFromWithOpHash: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:67
Parameters
| Parameter | Type |
|---|---|
args | { account: Address; amount: bigint; opHash: Hex; token: Address; userOpAccount?: Account | Address; } |
args.account | Address |
args.amount | bigint |
args.opHash | Hex |
args.token | Address |
args.userOpAccount? | Account | Address |
Returns
Promise<Hash>
tokenCap()
tokenCap: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:9
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
tokenCommunityENS()
tokenCommunityENS: (args) => Promise<string>;Defined in: packages/core/src/actions/tokens.ts:52
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<string>
tokenCommunityName()
tokenCommunityName: (args) => Promise<string>;Defined in: packages/core/src/actions/tokens.ts:51
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<string>
tokenCommunityOwner()
tokenCommunityOwner: (args) => Promise<Address>;Defined in: packages/core/src/actions/tokens.ts:68
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<Address>
tokenCumulativeSpent()
tokenCumulativeSpent: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:56
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; user: Address; } |
args.token | Address |
args.user | Address |
Returns
Promise<bigint>
tokenDebts()
tokenDebts: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:57
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; user: Address; } |
args.token | Address |
args.user | Address |
Returns
Promise<bigint>
tokenDecimals()
tokenDecimals: (args) => Promise<number>;Defined in: packages/core/src/actions/tokens.ts:24
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<number>
tokenDEFAULT_SPENDING_LIMIT_APNTS()
tokenDEFAULT_SPENDING_LIMIT_APNTS: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:74
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
tokenDefaultSpendingLimitXPNTs()
tokenDefaultSpendingLimitXPNTs: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:55
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
tokenDOMAIN_SEPARATOR()
tokenDOMAIN_SEPARATOR: (args) => Promise<Hex>;Defined in: packages/core/src/actions/tokens.ts:61
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<Hex>
tokenEip712Domain()
tokenEip712Domain: (args) => Promise<any>;Defined in: packages/core/src/actions/tokens.ts:69
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<any>
tokenExchangeRate()
tokenExchangeRate: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:53
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
tokenFACTORY()
tokenFACTORY: (args) => Promise<Address>;Defined in: packages/core/src/actions/tokens.ts:44
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<Address>
tokenGetDebt()
tokenGetDebt: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:33
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; user: Address; } |
args.token | Address |
args.user | Address |
Returns
Promise<bigint>
tokenGetDefaultSpendingLimitXPNTs()
tokenGetDefaultSpendingLimitXPNTs: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:70
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
tokenGetMetadata()
tokenGetMetadata: (args) => Promise<string>;Defined in: packages/core/src/actions/tokens.ts:71
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<string>
tokenIsAutoApprovedSpender()
tokenIsAutoApprovedSpender: (args) => Promise<boolean>;Defined in: packages/core/src/actions/tokens.ts:40
Parameters
| Parameter | Type |
|---|---|
args | { spender: Address; token: Address; } |
args.spender | Address |
args.token | Address |
Returns
Promise<boolean>
tokenMint()
tokenMint: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; to: Address; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.to | Address |
args.token | Address |
Returns
Promise<Hash>
tokenName()
tokenName: (args) => Promise<string>;Defined in: packages/core/src/actions/tokens.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<string>
tokenNeedsApproval()
tokenNeedsApproval: (args) => Promise<boolean>;Defined in: packages/core/src/actions/tokens.ts:72
Parameters
| Parameter | Type |
|---|---|
args | { amount: bigint; owner: Address; spender: Address; token: Address; } |
args.amount | bigint |
args.owner | Address |
args.spender | Address |
args.token | Address |
Returns
Promise<boolean>
tokenNonces()
tokenNonces: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:62
Parameters
| Parameter | Type |
|---|---|
args | { owner: Address; token: Address; } |
args.owner | Address |
args.token | Address |
Returns
Promise<bigint>
tokenOwner()
tokenOwner: (args) => Promise<Address>;Defined in: packages/core/src/actions/tokens.ts:27
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<Address>
tokenPermit()
tokenPermit: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:63
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; deadline: bigint; owner: Address; r: Hex; s: Hex; spender: Address; token: Address; v: number; value: bigint; } |
args.account? | Account | Address |
args.deadline | bigint |
args.owner | Address |
args.r | Hex |
args.s | Hex |
args.spender | Address |
args.token | Address |
args.v | number |
args.value | bigint |
Returns
Promise<Hash>
tokenRecordDebt()
tokenRecordDebt: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:73
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; token: Address; user: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.token | Address |
args.user | Address |
Returns
Promise<Hash>
tokenRemainingMintableSupply()
tokenRemainingMintableSupply: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:10
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
tokenRemoveAutoApprovedSpender()
tokenRemoveAutoApprovedSpender: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:39
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; spender: Address; token: Address; } |
args.account? | Account | Address |
args.spender | Address |
args.token | Address |
Returns
Promise<Hash>
tokenRenounceOwnership()
tokenRenounceOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:29
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; token: Address; } |
args.account? | Account | Address |
args.token | Address |
Returns
Promise<Hash>
tokenRepayDebt()
tokenRepayDebt: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:34
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.token | Address |
Returns
Promise<Hash>
tokenSetPaymasterLimit()
tokenSetPaymasterLimit: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:77
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; limit: bigint; token: Address; user: Address; } |
args.account? | Account | Address |
args.limit | bigint |
args.token | Address |
args.user | Address |
Returns
Promise<Hash>
tokenSetSuperPaymasterAddress()
tokenSetSuperPaymasterAddress: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:78
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; superPaymaster: Address; token: Address; } |
args.account? | Account | Address |
args.superPaymaster | Address |
args.token | Address |
Returns
Promise<Hash>
tokenSpendingLimits()
tokenSpendingLimits: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:54
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; user: Address; } |
args.token | Address |
args.user | Address |
Returns
Promise<bigint>
tokenSUPERPAYMASTER_ADDRESS()
tokenSUPERPAYMASTER_ADDRESS: (args) => Promise<Address>;Defined in: packages/core/src/actions/tokens.ts:43
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<Address>
tokenSymbol()
tokenSymbol: (args) => Promise<string>;Defined in: packages/core/src/actions/tokens.ts:23
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<string>
tokenTotalSupply()
tokenTotalSupply: (args) => Promise<bigint>;Defined in: packages/core/src/actions/tokens.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<bigint>
tokenTransfer()
tokenTransfer: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; to: Address; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.to | Address |
args.token | Address |
Returns
Promise<Hash>
tokenTransferAndCall()
tokenTransferAndCall: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:35
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; data?: Hex; to: Address; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.data? | Hex |
args.to | Address |
args.token | Address |
Returns
Promise<Hash>
tokenTransferCommunityOwnership()
tokenTransferCommunityOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:48
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; token: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
args.token | Address |
Returns
Promise<Hash>
tokenTransferFrom()
tokenTransferFrom: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:12
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; amount: bigint; from: Address; to: Address; token: Address; } |
args.account? | Account | Address |
args.amount | bigint |
args.from | Address |
args.to | Address |
args.token | Address |
Returns
Promise<Hash>
tokenTransferOwnership()
tokenTransferOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:47
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; token: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
args.token | Address |
Returns
Promise<Hash>
tokenTransferTokenOwnership()
tokenTransferTokenOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:28
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; token: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
args.token | Address |
Returns
Promise<Hash>
tokenUpdateExchangeRate()
tokenUpdateExchangeRate: (args) => Promise<Hash>;Defined in: packages/core/src/actions/tokens.ts:32
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newRate: bigint; token: Address; } |
args.account? | Account | Address |
args.newRate | bigint |
args.token | Address |
Returns
Promise<Hash>
tokenUsedOpHashes()
tokenUsedOpHashes: (args) => Promise<boolean>;Defined in: packages/core/src/actions/tokens.ts:58
Parameters
| Parameter | Type |
|---|---|
args | { hash: Hex; token: Address; } |
args.hash | Hex |
args.token | Address |
Returns
Promise<boolean>
tokenVersion()
tokenVersion: (args) => Promise<string>;Defined in: packages/core/src/actions/tokens.ts:79
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<string>
XPNTsFactoryActions
type XPNTsFactoryActions = object;Defined in: packages/core/src/actions/factory.ts:5
Properties
aPNTsPriceUSD()
aPNTsPriceUSD: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:44
Returns
Promise<bigint>
communityToToken()
communityToToken: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:18
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<Address>
createToken()
createToken: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:7
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; community: Address; name: string; symbol: string; } |
args.account? | Account | Address |
args.community | Address |
args.name | string |
args.symbol | string |
Returns
Promise<Hash>
DEFAULT_SAFETY_FACTOR()
DEFAULT_SAFETY_FACTOR: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:62
Returns
Promise<bigint>
deployedTokens()
deployedTokens: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:17
Parameters
| Parameter | Type |
|---|---|
args | { index: bigint; } |
args.index | bigint |
Returns
Promise<Address>
deployForCommunity()
deployForCommunity: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:8
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; community: Address; } |
args.account? | Account | Address |
args.community | Address |
Returns
Promise<Hash>
deployxPNTsToken()
deployxPNTsToken: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:37
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; community: Address; name: string; symbol: string; } |
args.account? | Account | Address |
args.community | Address |
args.name | string |
args.symbol | string |
Returns
Promise<Hash>
getAllTokens()
getAllTokens: () => Promise<Address[]>;Defined in: packages/core/src/actions/factory.ts:15
Returns
Promise<Address[]>
getAPNTsPrice()
getAPNTsPrice: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:43
Returns
Promise<bigint>
getCommunityByToken()
getCommunityByToken: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:14
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<Address>
getDeployedCount()
getDeployedCount: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:55
Returns
Promise<bigint>
getDepositBreakdown()
getDepositBreakdown: (args) => Promise<any>;Defined in: packages/core/src/actions/factory.ts:42
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<any>
getImplementation()
getImplementation: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:24
Returns
Promise<Address>
getIndustryMultiplier()
getIndustryMultiplier: (args) => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:57
Parameters
| Parameter | Type |
|---|---|
args | { industry: string; } |
args.industry | string |
Returns
Promise<bigint>
getPredictionParams()
getPredictionParams: (args) => Promise<any>;Defined in: packages/core/src/actions/factory.ts:41
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<any>
getTokenAddress()
getTokenAddress: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:11
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<Address>
getTokenCount()
getTokenCount: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:16
Returns
Promise<bigint>
hasToken()
hasToken: (args) => Promise<boolean>;Defined in: packages/core/src/actions/factory.ts:54
Parameters
| Parameter | Type |
|---|---|
args | { token: Address; } |
args.token | Address |
Returns
Promise<boolean>
industryMultipliers()
industryMultipliers: (args) => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:56
Parameters
| Parameter | Type |
|---|---|
args | { industry: string; } |
args.industry | string |
Returns
Promise<bigint>
isTokenDeployed()
isTokenDeployed: (args) => Promise<boolean>;Defined in: packages/core/src/actions/factory.ts:13
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<boolean>
MIN_SUGGESTED_AMOUNT()
MIN_SUGGESTED_AMOUNT: () => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:61
Returns
Promise<bigint>
predictAddress()
predictAddress: (args) => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:12
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; salt?: bigint; } |
args.community | Address |
args.salt? | bigint |
Returns
Promise<Address>
predictDepositAmount()
predictDepositAmount: (args) => Promise<bigint>;Defined in: packages/core/src/actions/factory.ts:40
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; userCount: bigint; } |
args.community | Address |
args.userCount | bigint |
Returns
Promise<bigint>
predictions()
predictions: (args) => Promise<any>;Defined in: packages/core/src/actions/factory.ts:58
Parameters
| Parameter | Type |
|---|---|
args | { community: Address; } |
args.community | Address |
Returns
Promise<any>
REGISTRY()
REGISTRY: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:27
Returns
Promise<Address>
renounceXPNTsFactoryOwnership()
renounceXPNTsFactoryOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:34
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; } |
args.account? | Account | Address |
Returns
Promise<Hash>
setImplementation()
setImplementation: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:23
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; impl: Address; } |
args.account? | Account | Address |
args.impl | Address |
Returns
Promise<Hash>
setIndustryMultiplier()
setIndustryMultiplier: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:47
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; industry: string; multiplier: bigint; } |
args.account? | Account | Address |
args.industry | string |
args.multiplier | bigint |
Returns
Promise<Hash>
setRegistry()
setRegistry: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:21
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; registry: Address; } |
args.account? | Account | Address |
args.registry | Address |
Returns
Promise<Hash>
setSuperPaymaster()
setSuperPaymaster: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:22
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; paymaster: Address; } |
args.account? | Account | Address |
args.paymaster | Address |
Returns
Promise<Hash>
setSuperPaymasterAddress()
setSuperPaymasterAddress: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:48
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; paymaster: Address; } |
args.account? | Account | Address |
args.paymaster | Address |
Returns
Promise<Hash>
SUPER_PAYMASTER()
SUPER_PAYMASTER: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:28
Returns
Promise<Address>
SUPERPAYMASTER()
SUPERPAYMASTER: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:63
Returns
Promise<Address>
tokenImplementation()
tokenImplementation: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:29
Returns
Promise<Address>
transferXPNTsFactoryOwnership()
transferXPNTsFactoryOwnership: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:33
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newOwner: Address; } |
args.account? | Account | Address |
args.newOwner | Address |
Returns
Promise<Hash>
updateAPNTsPrice()
updateAPNTsPrice: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:49
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; newPrice: bigint; } |
args.account? | Account | Address |
args.newPrice | bigint |
Returns
Promise<Hash>
updatePrediction()
updatePrediction: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:50
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; community: Address; userCount: bigint; } |
args.account? | Account | Address |
args.community | Address |
args.userCount | bigint |
Returns
Promise<Hash>
updatePredictionCustom()
updatePredictionCustom: (args) => Promise<Hash>;Defined in: packages/core/src/actions/factory.ts:51
Parameters
| Parameter | Type |
|---|---|
args | { account?: Account | Address; community: Address; params: any; } |
args.account? | Account | Address |
args.community | Address |
args.params | any |
Returns
Promise<Hash>
xPNTsFactoryOwner()
xPNTsFactoryOwner: () => Promise<Address>;Defined in: packages/core/src/actions/factory.ts:32
Returns
Promise<Address>
xPNTsFactoryVersion()
xPNTsFactoryVersion: () => Promise<string>;Defined in: packages/core/src/actions/factory.ts:66
Returns
Promise<string>
Variables
AASTAR_COMMUNITY
const AASTAR_COMMUNITY: CommunityConfig;Defined in: packages/core/src/communities.ts:34
AAstar Community
- SuperPaymaster shared mode (AOA+)
- Uses aPNTs for gas payments
- MySBT for identity verification
Abis
const Abis: object;Defined in: packages/core/src/abis/index.ts:84
Type Declaration
ALL_ADDRESSES
const ALL_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:117
All Addresses Combined (for reference)
Type Declaration
ALL_ROLES
const ALL_ROLES: readonly [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`];Defined in: packages/core/src/roles.ts:247
All defined roles array (for iteration)
APNTS_ADDRESS
const APNTS_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:63
BLS_AGGREGATOR_ADDRESS
const BLS_AGGREGATOR_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:57
BLS_VALIDATOR_ADDRESS
const BLS_VALIDATOR_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:58
BLSAggregatorABI
const BLSAggregatorABI: any;Defined in: packages/core/src/abis/index.ts:61
BLSAggregatorArtifact
const BLSAggregatorArtifact: object = BLSAggregatorABIData;Defined in: packages/core/src/abis/index.ts:80
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/BLSAggregator.json:2 |
bytecode | string | "0x60a03461014057601f6122a838819003918201601f19168301916001600160401b03831184841017610144578084926060946040528339810103126101405761004781610158565b90610060604061005960208401610158565b9201610158565b90331561012d575f8054336001600160a01b0319821681178355604051959290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055600360085560076009556001600160a01b0316801561011a57608052600280546001600160a01b039283166001600160a01b0319918216179091556003805493909216921691909117905561213b908161016d82396080518181816116290152611ae20152f35b634726455360e11b5f525f60045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101405756fe60a0806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b14611ad05750806322c70bbb146118c05780632399c30914610ef1578063300b0b3514610e865780633b60288a14610e5757806353f10a4b14610e3957806354fd4d5014610dde5780635ae48ba414610db55780635e1a03a2146104bd5780636578b0cc14610478578063714897df1461045c578063715018a6146104155780637f39a939146103855780638da5cb5b1461035e578063a74c1ca814610334578063bc8efe751461030b578063c5246bf514610240578063c85501bb14610222578063e79e9739146101dd578063f2fde38b1461016a5763f42cc34e14610105575f80fd5b346101675760203660031901126101675761015b906040906001600160a01b0361012d611b11565b16815260046020522060ff600161014383611c2c565b92015416604051928392604084526040840190611ccc565b90151560208301520390f35b80fd5b503461016757602036600319011261016757610184611b11565b61018c611dc9565b6001600160a01b031680156101c95781546001600160a01b03198116821783556001600160a01b03165f5160206120865f395f51905f528380a380f35b631e4fbdf760e01b82526004829052602482fd5b5034610167576020366003190112610167576101f7611b11565b6101ff611dc9565b600280546001600160a01b0319166001600160a01b039290921691909117905580f35b50346101675780600319360112610167576020600854604051908152f35b50346101675760203660031901126101675760043561025d611dc9565b60085481106102d057600d8111610293575f5160206120a65f395f51905f5260406009548151908152836020820152a160095580f35b6040516305519d6f60e51b815260206004820152600f60248201526e0a8d0e4cae6d0ded8c8407c409ac2f608b1b604482015280606481015b0390fd5b6040516305519d6f60e51b815260206004820152601260248201527110995b1bddc81b5a5b951a1c995cda1bdb1960721b6044820152606490fd5b50346101675780600319360112610167576003546040516001600160a01b039091168152602090f35b50346101675760203660031901126101675760406020916004358152600783522054604051908152f35b5034610167578060031936011261016757546040516001600160a01b039091168152602090f35b5034610167576020366003190112610167576004356103a2611dc9565b600281106103d757600d8111610293575f5160206120a65f395f51905f5260406008548151908152836020820152a160085580f35b6040516305519d6f60e51b81526020600482015260156024820152744d696e207468726573686f6c6420746f6f206c6f7760581b6044820152606490fd5b503461016757806003193601126101675761042e611dc9565b80546001600160a01b03198116825581906001600160a01b03165f5160206120865f395f51905f528280a380f35b50346101675780600319360112610167576020604051600d8152f35b503461016757602036600319011261016757610492611b11565b61049a611dc9565b600380546001600160a01b0319166001600160a01b039290921691909117905580f35b50346101675760a0366003190112610167576104d7611b27565b6044356001600160401b038111610bd2576104f6903690600401611b3d565b90916084356001600160401b038111610cdb57610517903690600401611b3d565b929094610522611def565b6003546001600160a01b031633141580610da1575b610d8e576001600160a01b03831615610d72576004358152600660205260ff604082205416610d5d5760085460643510610d1d57600d60643511610cdf57610580368387611d0b565b602081519101206040516020810191600435835260018060a01b0386166040830152606082015260643560808201524660a082015260a081526105c460c082611c09565b51902093860193608087860312610b505786356001600160401b038111610bd257856105f1918901611e0f565b9460208801356001600160401b038111610b415781610611918a01611e0f565b9060408901356001600160401b038111610cdb5790610631918a01611e0f565b976040519260208401526020835261064a604084611c09565b610652611eb6565b926106b56067604051809360403661010084013780518160200161014084015e518101600160f81b610140820152886101428201535f5160206120665f395f51905f5261014382015263554c5f2360e01b61016382015203016101008301611f4c565b806020528061010083015260016101208301535f5160206120665f395f51905f5261012183015263554c5f2360e01b6101418301526020866045610100850160025afa60203d141615610cd75785518252600260016020845b80518518610100870152019161073b60ff198661072f846101208301611f23565b03016101008701611f4c565b8352019160098314610753579160206001919261070e565b5050506107fe9060406101008201526020610120820152604061014082015260016101a08201526f1a0111ea397fe69a4b1ba7b6434bacd76101c08201525f5160206120c65f395f51905f526101e08201526107b3816101008101611f64565b6107c4604082016101008301611f64565b6107d5608082016101008301611f64565b6107e660c082016101008301611f64565b6107f08582611f82565b846101000190608001611f82565b6101008361020081600d5afa6101003d141615610cca5788519261082a6020808c01958c010185611e2d565b81518151149182610cb7575b82610ca4575b82610c91575b82610c7e575b82610c6b575b82610c58575b82610c45575b505015610c3657606001358084915b610bee57506064358110610bd65750608086805181010312610bd2579060206108cc6108d79360806040519961089e8b611bd2565b848101518b526040810151858c0152606081015160408c0152015160608a0152828082518301019101611e2d565b988051010190611e2d565b92606093604051956108e98688611c09565b60028752601f19860198845b8a8110610bbb57506040519961090b888c611c09565b60028b52855b818110610ba3575050906109a291610927611e92565b6f17f1d3a73197d7942695638c4fa9ac0f81525f5160206120e65f395f51905f5260208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201525f5160206120265f395f51905f528982015261097e8a611ef2565b5261098889611ef2565b506109928b611ef2565b5261099c8a611ef2565b50611fa7565b6109ab87611f13565b526109b586611f13565b506109bf88611f13565b526109c987611f13565b50849285519660405196890395845b868a8214610a09579061010060206001930198608060208d85610180020192828d51855e8d01015191015e016109d8565b5050888a6020878b846101800290600f5afa9160203d14915114161615610b9657845115610b875784806040518585823780868101838152039082885af1903d15610b8157503d90610a5a82611cf0565b91610a686040519384611c09565b82523d86602084013e5b15610b5457506004358452600660205260408420805460ff1916600117905560035484906001600160a01b031680610afa575b5050610ab2913691611d0b565b80516020918201206040519081526001600160a01b0390921691600435917ff75669458e39b3e450bebdf8e3f8396a4ca0b4057017be244aa5af43321b280791a36001805580f35b803b15610b505781809160246040518094819363424a3d7760e01b835260043560048401525af18015610b455715610aa55781610b3691611c09565b610b41578385610aa5565b8380fd5b6040513d84823e3d90fd5b5080fd5b6102cc9060405191829163020c65b360e11b83526004356004840152604060248401526044830190611ccc565b90610a72565b63729d0f6b60e01b8552600485fd5b634df45e2f85526004601cfd5b808c60208093610bb1611eb6565b9201015201610911565b602090610bc6611e92565b82828c010152016108f5565b8280fd5b636b01174760e11b8452600452606435602452604483fd5b5f19810190808211610c225716905f198114610c0e576001019080610869565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b86526011600452602486fd5b63729d0f6b60e01b8452600484fd5b60e0919250810151910151145f8061085a565b915060c082015160c08201511491610854565b915060a082015160a0820151149161084e565b9150608082015160808201511491610848565b9150606082015160608201511491610842565b915060408201516040820151149161083c565b9150602082015160208201511491610836565b63c55e5e3384526004601cfd5b8580fd5b8480fd5b6040516305519d6f60e51b81526020600482015260156024820152740a8d0e4cae6d0ded8c840caf0c6cacac8e640dac2f605b1b6044820152606490fd5b6040516305519d6f60e51b81526020600482015260176024820152765468726573686f6c642062656c6f77206d696e696d756d60481b6044820152606490fd5b632776407360e11b8152600480359052602490fd5b63d08525e960e01b81526001600160a01b038316600452602490fd5b63d86ad9cf60e01b815233600452602490fd5b5080546001600160a01b0316331415610537565b50346101675780600319360112610167576002546040516001600160a01b039091168152602090f35b503461016757806003193601126101675750610e35604051610e01604082611c09565b6013815272424c5341676772656761746f722d332e322e3160681b6020820152604051918291602083526020830190611ccc565b0390f35b50346101675780600319360112610167576020600954604051908152f35b50346101675760203660031901126101675760ff60406020926004358152600684522054166040519015158152f35b5034610167576020366003190112610167576040610edb916004358152600560205220610eb281611c2c565b9060028101549060ff600460038301549201541690604051948594608086526080860190611ccc565b9260208501526040840152151560608301520390f35b503461172b5760e036600319011261172b57610f0b611b27565b9060443560ff8116810361172b576064356001600160401b03811161172b57610f38903690600401611b6a565b90916084356001600160401b03811161172b57610f59903690600401611b6a565b94909160c4356001600160401b03811161172b57610f7b903690600401611b3d565b979094610f86611def565b6003546001600160a01b0316331415806118ac575b611899576004355f52600660205260ff60405f2054168061188e575b6118795760408051600435602082019081526001600160a01b0385169282019290925260ff8516606082015260e0608082015261102f816110136110006101008301878e611d61565b828103601f190160a08401528d8b611da5565b60a43560c08301524660e083015203601f198101835282611c09565b5190209560095499808201976080838a031261172b5782356001600160401b03811161172b5789611061918501611e0f565b9060208401356001600160401b03811161172b578a611081918601611e0f565b996040850135906001600160401b03821161172b576110a1918601611e0f565b9c604051916020830152602082526110ba604083611c09565b6110c2611eb6565b91604051610100810191604036843761112560678383519361014082019481602001865e518101600160f81b6101408201525f6101428201535f5160206120665f395f51905f5261014382015263554c5f2360e01b610163820152030184611f4c565b9283602052838152610120830193600185535f5160206120665f395f51905f5261012185015263554c5f2360e01b61014185015260205f60458460025afa60203d14161561172b575f518452600260016020865b805185188652019161119a60ff1988611192848c611f23565b030186611f4c565b83520191600983146111b25791602060019192611179565b505050604061122792602061123f96838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401525f5160206120c65f395f51905f526101e08401526112038382611f64565b6112106040840182611f64565b61121d6080840182611f64565b60c0830190611f64565b6112318482611f82565b836101000190608001611f82565b6101008261020081600d5afa6101003d14161561186c578d9161126b6020845181860195010184611e2d565b81518151149182611859575b82611846575b82611833575b82611820575b8261180d575b826117fa575b826117e7575b50501561172f575f6060860135805b6117b3575081811061179e57505060808280518101031261172b57604051989c989a999394929390916112dc8c611bd2565b60208101518c52604081015160208d0152606081015160408d01526080015160608c015280518101602001906020019061131591611e2d565b9780510160200161132591611e2d565b606099604051986113368c8b611c09565b60028a525f5b601f198d01811061176f5750908b959493929161135c6040519d8e611c09565b60028d525f5b601f198801811061174b5750906113f0916113e68e6113e08e611383611e92565b6f17f1d3a73197d7942695638c4fa9ac0f81525f5160206120e65f395f51905f5260208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201525f5160206120265f395f51905f528d8201526113da82611ef2565b52611ef2565b50611ef2565b5261099c8d611ef2565b6113f98a611f13565b5261140389611f13565b5061140d8b611f13565b526114178a611f13565b50879b8851996040516080528d5f905b9e8c821461146a579c809e9f60208d9e9f019c8d928461018002608051019351608090855e0301602001519060800190610100915e6001018a9e9d9c9b9a611427565b50508c8b8d60205f8361018002608051600f5afa9160203d1491511416161561173e575f511561172f5783611627575b5050506001600160a01b0385169050611540575b50505050506004356114c2575b6001805580f35b6004358152600660205260408120805460ff1916600117905560035481906001600160a01b0316806114f6575b50506114bb565b803b1561153d5781809160246040518094819363424a3d7760e01b835260043560048401525af18015610b4557156114ef578161153291611c09565b6101675780826114ef565b50fd5b600360ff861610156116135760025486939291906001600160a01b0316803b15610cdb576040516303ce96a160e11b81526001600160a01b038716600482015260ff881660248201526044810194909452849284928391859183916115a9916064840191611d41565b03925af18015610b45576115fe575b505060ff6040519216825260018060a01b0316907f85137418138b73abf7daf3f3556f050e536be403436e0ee7649eaee69d1faaca602060043592a381808080806114ae565b8161160891611c09565b610bd25782846115b8565b634e487b7160e01b86526021600452602486fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b1561172b576116925f80946116bf6116a460405198899788968795631b02e44f60e01b8752600435600488015260a060248801528d60a4880191611d61565b85810360031901604487015291611da5565b60a43560648401528281036003190160848401528a8c611d41565b03925af180156117205761170a575b5060407f5ce6898a418ad55caa812016e4cdd4a200158714e584a9627d17df3369316ef39181519060a43582526020820152a18680808061149a565b6117179197505f90611c09565b5f9560406116ce565b6040513d5f823e3d90fd5b5f80fd5b63729d0f6b60e01b5f5260045ffd5b634df45e2f5f526004601cfd5b8d9e9f9b9c9d90602091828261175f611eb6565b92010152019e9d9c9b9a9e611362565b808b929f9b60209d9e9897969594939d8093611789611e92565b92010152019d9091929394959b9a999d61133c565b636b01174760e11b5f5260045260245260445ffd5b5f198101908082116117d35716905f1981146117d35760010190806112aa565b634e487b7160e01b5f52601160045260245ffd5b60e0919250810151910151145f8061129b565b915060c082015160c08201511491611295565b915060a082015160a0820151149161128f565b9150608082015160808201511491611289565b9150606082015160608201511491611283565b915060408201516040820151149161127d565b9150602082015160208201511491611277565b63c55e5e335f526004601cfd5b632776407360e11b5f5260043560045260245ffd5b506004351515610fb7565b63d86ad9cf60e01b5f523360045260245ffd5b505f546001600160a01b0316331415610f9b565b3461172b57604036600319011261172b576118d9611b11565b6024356001600160401b03811161172b576118f8903690600401611b3d565b9190611902611dc9565b60308303611ac15760408051939084016001600160401b03811185821017611aad57604052611932368284611d0b565b8452600160208086019182526001600160a01b039094165f81815260049095526040909420945180519095906001600160401b038111611aad576119768254611b9a565b601f8111611a68575b506020601f82116001146119f5579080600193925f5160206120465f395f51905f5298995f926119ea575b50505f19600383901b1c191690831b1781555b019051151560ff801983541691161790556119e5604051928392602084526020840191611d41565b0390a2005b0151905089806119aa565b601f19821690835f52805f20915f5b818110611a5057509183915f5160206120465f395f51905f52999a60019695879510611a38575b505050811b0181556119bd565b01515f1960f88460031b161c19169055898080611a2b565b9192602060018192868e015181550194019201611a04565b825f5260205f20601f830160051c81019160208410611aa3575b601f0160051c01905b818110611a98575061197f565b5f8155600101611a8b565b9091508190611a82565b634e487b7160e01b5f52604160045260245ffd5b63222a023b60e21b5f5260045ffd5b3461172b575f36600319011261172b577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b600435906001600160a01b038216820361172b57565b602435906001600160a01b038216820361172b57565b9181601f8401121561172b578235916001600160401b03831161172b576020838186019501011161172b57565b9181601f8401121561172b578235916001600160401b03831161172b576020808501948460051b01011161172b57565b90600182811c92168015611bc8575b6020831014611bb457565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611ba9565b608081019081106001600160401b03821117611aad57604052565b61010081019081106001600160401b03821117611aad57604052565b601f909101601f19168101906001600160401b03821190821017611aad57604052565b9060405191825f825492611c3f84611b9a565b8084529360018116908115611caa5750600114611c66575b50611c6492500383611c09565b565b90505f9291925260205f20905f915b818310611c8e575050906020611c64928201015f611c57565b6020919350806001915483858901015201910190918492611c75565b905060209250611c6494915060ff191682840152151560051b8201015f611c57565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b6001600160401b038111611aad57601f01601f191660200190565b929192611d1782611cf0565b91611d256040519384611c09565b82948184528183011161172b578281602093845f960137010152565b908060209392818452848401375f828201840152601f01601f1916010190565b916020908281520191905f905b808210611d7b5750505090565b90919283359060018060a01b03821680920361172b57602081600193829352019401920190611d6e565b81835290916001600160fb1b03831161172b5760209260051b809284830137010190565b5f546001600160a01b03163303611ddc57565b63118cdaa760e01b5f523360045260245ffd5b600260015414611e00576002600155565b633ee5aeb560e01b5f5260045ffd5b9080601f8301121561172b57816020611e2a93359101611d0b565b90565b908161010091031261172b5760e060405191611e4883611bed565b805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b60405190611e9f82611bd2565b5f6060838281528260208201528260408201520152565b60405190611ec382611bed565b5f60e0838281528260208201528260408201528260608201528260808201528260a08201528260c08201520152565b805115611eff5760200190565b634e487b7160e01b5f52603260045260245ffd5b805160011015611eff5760400190565b9081535f5160206120665f395f51905f52600182015263554c5f2360e01b602182015260250190565b6020915f9160025afa60203d14161561172b575f5190565b906101006040928383606083015e60055afa60403d14161561172b57565b9060806101009260115afa6101003d141615611f9a57565b6389083b915f526004601cfd5b611faf611e92565b50604081018051606083019182519180158061201d575b612016575f5160206120c65f395f51905f5283111561200e5760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390525f5160206120c65f395f51905f5203905290565b60ff5f611fe4565b5050505090565b508215611fc656fefcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e1472da4d064218fa97032725fbcff922201fa643fed0765b5ffe0ceef63d7b3dc424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0b06a54caabe58475c86c2bf9df3f2f06dd1213e9e10659c293117fe4893b274b64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bba26469706673582212204d5a11d5132b0f6a21e9a90255938dc9ab153a0760f589552ed198301590e22f64736f6c634300081c0033" | packages/core/src/abis/BLSAggregator.json:685 |
BLSHelpers
const BLSHelpers: object;Defined in: packages/core/src/crypto/blsSigner.ts:76
Helper functions for creating BLS proofs for Registry and BLSAggregator operations
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
createReputationUpdateMessage() | ( users, scores, epoch) => `0x${string}` | Create message hash for reputation update | packages/core/src/crypto/blsSigner.ts:87 |
createSlashProposalMessage() | (proposalId) => `0x${string}` | Create message hash for slash proposal | packages/core/src/crypto/blsSigner.ts:80 |
encodeBLSProof() | ( aggregatedPublicKey, aggregatedSignature, messageMappingG2, signerMask) => `0x${string}` | Encode BLS proof for Registry/Aggregator (v3 format) Proof structure: (bytes pkG1, bytes sigG2, bytes msgG2, uint256 signerMask) | packages/core/src/crypto/blsSigner.ts:98 |
encodeReputationProof() | ( signature, publicKey, signerMask) => `0x${string}` | Encode Reputation Proof (for test compatibility) Matches format: (signature, publicKey, signerMask) | packages/core/src/crypto/blsSigner.ts:114 |
BLSValidatorABI
const BLSValidatorABI: any;Defined in: packages/core/src/abis/index.ts:62
BLSValidatorArtifact
const BLSValidatorArtifact: object = BLSValidatorABIData;Defined in: packages/core/src/abis/index.ts:81
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | object[] | - | packages/core/src/abis/BLSValidator.json:2 |
bytecode | string | "0x6080806040523460155761096e908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c806354fd4d501461009b5763b8e72af61461002f575f80fd5b34610097576040366003190112610097576004356001600160401b0381116100975761005f903690600401610103565b602435906001600160401b0382116100975760209261008561008d933690600401610103565b9290916102f0565b6040519015158152f35b5f80fd5b34610097575f3660031901126100975760406100b681610183565b9060128252602082019171212629ab30b634b230ba37b916981719971960711b83528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b9181601f84011215610097578235916001600160401b038311610097576020838186019501011161009757565b6040519061010082016001600160401b0381118382101761015057604052565b634e487b7160e01b5f52604160045260245ffd5b60405190608082016001600160401b0381118382101761015057604052565b6040519190601f01601f191682016001600160401b0381118382101761015057604052565b9192916001600160401b038211610150576101cc601f8301601f1916602001610183565b938285528282011161009757815f926020928387013784010152565b9080601f8301121561009757816020610203933591016101a8565b90565b90816101009103126100975760e061021c610130565b91805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b61026f610164565b905f82525f60208301525f60408301525f6060830152565b61028f610130565b905f82525f60208301525f60408301525f60608301525f60808301525f60a08301525f60c08301525f60e0830152565b8051156102cc5760200190565b634e487b7160e01b5f52603260045260245ffd5b8051600110156102cc5760400190565b93929060c081106108175781156108175784016080858203126100975784356001600160401b03811161009757816103299187016101e8565b9460208101356001600160401b03811161009757826103499183016101e8565b9160408201356001600160401b0381116100975761036792016101e8565b92608086805181010312610097576103cb6103bb6103d3936080610389610164565b9960208101518b52604081015160208c0152606081015160408c0152015160608a015260208082518301019101610206565b9460208082518301019101610206565b9236916101a8565b6103db610287565b90604051610100810191604036843761043e60678383519361014082019481602001865e518101600160f81b6101408201525f6101428201535f5160206108f95f395f51905f5261014382015263554c5f2360e01b61016382015203018461081f565b9283602052838152610120830193600185536101218401905f5160206108f95f395f51905f52825261014185019163554c5f2360e01b835260205f60458660025afa60203d141615610097575f51865290916045916101458701919060026020895b8051881889520190808b535f5160206108f95f395f51905f52835263554c5f2360e01b845260205f878a60025afa60203d141615610097575f51825260010195600987146104f25795906020906104a0565b50505050505050604061056b92602061058396838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401525f5160206109195f395f51905f526101e08401526105478382610837565b6105546040840182610837565b6105616080840182610837565b60c0830190610837565b6105758382610855565b826101000190608001610855565b6101008161020081600d5afa6101003d14161561080a57805182511490816107f7575b816107e4575b816107d1575b816107be575b816107ab575b81610798575b81610786575b501561077f576105da6060610183565b60028152936040925f5b84811061076857506105f66060610183565b93600285525f5b818110610751575050906106b591610613610267565b6f17f1d3a73197d7942695638c4fa9ac0f81527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e16060820152610691886102bf565b5261069b876102bf565b506106a5856102bf565b526106af846102bf565b5061087a565b6106be856102e0565b526106c8846102e0565b506106d2826102e0565b526106dc816102e0565b508291835192604051948303915f5b8286821461071c5790610100602060019301946080602084610180028c0192828951855e8901015191015e016106eb565b505094602092505f9150846101800290600f5afa9160203d14915114161615610744575f5190565b634df45e2f5f526004601cfd5b60209061075c610287565b828289010152016105fd565b602090610773610267565b82828a010152016105e4565b505f925050565b60e09150015160e0820151145f6105ca565b905060c081015160c083015114906105c4565b905060a081015160a083015114906105be565b90506080810151608083015114906105b8565b90506060810151606083015114906105b2565b90506040810151604083015114906105ac565b90506020810151602083015114906105a6565b63c55e5e335f526004601cfd5b505f93505050565b6020915f9160025afa60203d141615610097575f5190565b906101006040928383606083015e60055afa60403d14161561009757565b9060806101009260115afa6101003d14161561086d57565b6389083b915f526004601cfd5b610882610267565b5060408101805160608301918251918015806108f0575b6108e9575f5160206109195f395f51905f528311156108e15760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390525f5160206109195f395f51905f5203905290565b60ff5f6108b7565b5050505090565b50821561089956fe424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaaba2646970667358221220dc14c4d7a698e46db06cab7ab7892911d35b0c970ac809d0ba17396635901a1d64736f6c634300081c0033" | packages/core/src/abis/BLSValidator.json:41 |
BPS_DENOMINATOR
const BPS_DENOMINATOR: 10000 = 10000;Defined in: packages/core/src/constants.ts:87
Basis points denominator (100% = 10000 basis points)
BRANDING
const BRANDING: object;Defined in: packages/core/src/branding.ts:5
AAStar Community Branding Configuration
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
colors | object | - | packages/core/src/branding.ts:8 |
colors.error | "#F44336" | "#F44336" | packages/core/src/branding.ts:15 |
colors.gray100 | "#F3F4F6" | "#F3F4F6" | packages/core/src/branding.ts:17 |
colors.gray50 | "#F9FAFB" | "#F9FAFB" | packages/core/src/branding.ts:16 |
colors.gray700 | "#374151" | "#374151" | packages/core/src/branding.ts:18 |
colors.gray800 | "#1F2937" | "#1F2937" | packages/core/src/branding.ts:19 |
colors.gray900 | "#111827" | "#111827" | packages/core/src/branding.ts:20 |
colors.primary | "#FF6B35" | "#FF6B35" | packages/core/src/branding.ts:9 |
colors.primaryLight | "#FF8C42" | "#FF8C42" | packages/core/src/branding.ts:10 |
colors.secondary | "#4A90E2" | "#4A90E2" | packages/core/src/branding.ts:11 |
colors.secondaryDark | "#357ABD" | "#357ABD" | packages/core/src/branding.ts:12 |
colors.success | "#4CAF50" | "#4CAF50" | packages/core/src/branding.ts:13 |
colors.warning | "#FFC107" | "#FFC107" | packages/core/src/branding.ts:14 |
icon | "https://www.aastar.io/favicon.ico" | "https://www.aastar.io/favicon.ico" | packages/core/src/branding.ts:7 |
logo | "https://raw.githubusercontent.com/jhfnetboy/MarkDownImg/main/img/202505031325963.png" | "https://raw.githubusercontent.com/jhfnetboy/MarkDownImg/main/img/202505031325963.png" | packages/core/src/branding.ts:6 |
BREAD_COMMUNITY
const BREAD_COMMUNITY: CommunityConfig;Defined in: packages/core/src/communities.ts:53
Bread Community
- Independent AOA Paymaster mode
- Uses bPNTs for gas payments
- MySBT for identity verification
CHAIN_MAINNET
const CHAIN_MAINNET: 1 = 1;Defined in: packages/core/src/constants.ts:127
CHAIN_SEPOLIA
const CHAIN_SEPOLIA: 11155111 = 11155111;Defined in: packages/core/src/constants.ts:126
Network Chain IDs
COMMUNITIES
const COMMUNITIES: Record<string, CommunityConfig>;Defined in: packages/core/src/communities.ts:69
All communities indexed by address
COMMUNITY_OWNERS
const COMMUNITY_OWNERS: object;Defined in: packages/core/src/contract-addresses.ts:100
Community Owner Addresses
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
aastarOwner | "0x411BD567E46C0781248dbB6a9211891C032885e5" | '0x411BD567E46C0781248dbB6a9211891C032885e5' | packages/core/src/contract-addresses.ts:101 |
breadCommunityOwner | "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA" | '0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA' | packages/core/src/contract-addresses.ts:102 |
CONTRACT_METADATA
const CONTRACT_METADATA: object;Defined in: packages/core/src/contracts.ts:332
Contract deployment metadata
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
sepolia | object | - | packages/core/src/contracts.ts:333 |
sepolia.deploymentDates | object | - | packages/core/src/contracts.ts:336 |
sepolia.deploymentDates.aPNTs | "2025-10-30" | '2025-10-30' | packages/core/src/contracts.ts:351 |
sepolia.deploymentDates.blsAggregator | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:358 |
sepolia.deploymentDates.dvtValidator | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:357 |
sepolia.deploymentDates.gToken | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:338 |
sepolia.deploymentDates.gTokenStaking | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:341 |
sepolia.deploymentDates.mySBT | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:345 |
sepolia.deploymentDates.paymasterFactory | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:354 |
sepolia.deploymentDates.paymasterV4_1 | "2025-10-15" | '2025-10-15' | packages/core/src/contracts.ts:348 |
sepolia.deploymentDates.registry | "2025-11-02" | '2025-11-02' | packages/core/src/contracts.ts:340 |
sepolia.deploymentDates.superPaymaster | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:339 |
sepolia.deploymentDates.xPNTsFactory | "2025-11-01" | '2025-11-01' | packages/core/src/contracts.ts:344 |
sepolia.lastUpdated | "2025-11-02" | '2025-11-02' | packages/core/src/contracts.ts:334 |
sepolia.networkId | 11155111 | 11155111 | packages/core/src/contracts.ts:335 |
CONTRACT_SRC_HASH
const CONTRACT_SRC_HASH: any = config.srcHash;Defined in: packages/core/src/constants.ts:47
Contract Addresses (loaded from config.{network}.json)
CONTRACTS
const CONTRACTS: object;Defined in: packages/core/src/contracts.ts:101
All supported networks
Type Declaration
| Name | Type | Default value | Description | Defined in |
|---|---|---|---|---|
sepolia | object | SEPOLIA_CONTRACTS | - | packages/core/src/contracts.ts:102 |
sepolia.communities | object | - | - | packages/core/src/contracts.ts:77 |
sepolia.communities.aastar | object | - | AAStar Community - Test community for development (registered: 2025-11-01) | packages/core/src/contracts.ts:79 |
sepolia.communities.aastar.ensName | "aastar.eth" | 'aastar.eth' | - | packages/core/src/contracts.ts:82 |
sepolia.communities.aastar.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.apnts | - | packages/core/src/contracts.ts:81 |
sepolia.communities.aastar.name | "AAStar" | 'AAStar' | - | packages/core/src/contracts.ts:83 |
sepolia.communities.aastar.owner | "0x411BD567E46C0781248dbB6a9211891C032885e5" | COMMUNITY_OWNERS.aastarOwner | - | packages/core/src/contracts.ts:80 |
sepolia.communities.aastar.stake | "50" | '50' | - | packages/core/src/contracts.ts:84 |
sepolia.communities.breadCommunity | object | - | BreadCommunity - Test community for development (registered: 2025-11-03) | packages/core/src/contracts.ts:88 |
sepolia.communities.breadCommunity.ensName | "bread.eth" | 'bread.eth' | - | packages/core/src/contracts.ts:91 |
sepolia.communities.breadCommunity.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.bpnts | - | packages/core/src/contracts.ts:90 |
sepolia.communities.breadCommunity.name | "BreadCommunity" | 'BreadCommunity' | - | packages/core/src/contracts.ts:92 |
sepolia.communities.breadCommunity.owner | "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA" | COMMUNITY_OWNERS.breadCommunityOwner | - | packages/core/src/contracts.ts:89 |
sepolia.communities.breadCommunity.stake | "50" | '50' | - | packages/core/src/contracts.ts:93 |
sepolia.core | object | CORE_ADDRESSES | - | packages/core/src/contracts.ts:42 |
sepolia.core.aPNTs | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:35 |
sepolia.core.dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:39 |
sepolia.core.entryPoint | `0x${string}` | ENTRY_POINT_ADDRESS | - | packages/core/src/contract-addresses.ts:40 |
sepolia.core.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:31 |
sepolia.core.gTokenStaking | `0x${string}` | GTOKEN_STAKING_ADDRESS | - | packages/core/src/contract-addresses.ts:32 |
sepolia.core.mySBT | `0x${string}` | SBT_ADDRESS | - | packages/core/src/contract-addresses.ts:36 |
sepolia.core.paymasterFactory | `0x${string}` | PAYMASTER_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:34 |
sepolia.core.paymasterV4 | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:38 |
sepolia.core.registry | `0x${string}` | REGISTRY_ADDRESS | - | packages/core/src/contract-addresses.ts:30 |
sepolia.core.reputationSystem | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:42 |
sepolia.core.superPaymaster | `0x${string}` | SUPER_PAYMASTER_ADDRESS | - | packages/core/src/contract-addresses.ts:33 |
sepolia.core.xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:41 |
sepolia.monitoring | object | MONITORING_ADDRESSES | - | packages/core/src/contracts.ts:67 |
sepolia.monitoring.blsAggregator | `0x${string}` | BLS_AGGREGATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:87 |
sepolia.monitoring.dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:86 |
sepolia.official | object | OFFICIAL_ADDRESSES | - | packages/core/src/contracts.ts:72 |
sepolia.official.entryPoint | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:94 |
sepolia.paymaster | object | PAYMASTER_ADDRESSES | - | packages/core/src/contracts.ts:62 |
sepolia.paymaster.paymasterV4_1 | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:78 |
sepolia.paymaster.paymasterV4_1iImplementation | `0x${string}` | PAYMASTER_V4_IMPL_ADDRESS | - | packages/core/src/contract-addresses.ts:79 |
sepolia.testAccounts | object | TEST_ACCOUNT_ADDRESSES | - | packages/core/src/contracts.ts:57 |
sepolia.testAccounts.simpleAccountFactory | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:71 |
sepolia.testTokens | object | TEST_TOKEN_ADDRESSES | - | packages/core/src/contracts.ts:52 |
sepolia.testTokens.apnts | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:60 |
sepolia.testTokens.bpnts | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:62 |
sepolia.testTokens.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:61 |
sepolia.testTokens.mockUSDT | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:59 |
sepolia.testTokens.pimToken | `0x${string}` | TOKEN_ADDRESSES.pimToken | - | packages/core/src/contract-addresses.ts:63 |
sepolia.tokens | object | TOKEN_ADDRESSES | - | packages/core/src/contracts.ts:47 |
sepolia.tokens.aPNTs | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:50 |
sepolia.tokens.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:51 |
sepolia.tokens.pimToken | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:52 |
sepolia.tokens.xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:49 |
CORE_ADDRESSES
const CORE_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:29
Core System Addresses
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
aPNTs | `0x${string}` | APNTS_ADDRESS | packages/core/src/contract-addresses.ts:35 |
dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | packages/core/src/contract-addresses.ts:39 |
entryPoint | `0x${string}` | ENTRY_POINT_ADDRESS | packages/core/src/contract-addresses.ts:40 |
gToken | `0x${string}` | GTOKEN_ADDRESS | packages/core/src/contract-addresses.ts:31 |
gTokenStaking | `0x${string}` | GTOKEN_STAKING_ADDRESS | packages/core/src/contract-addresses.ts:32 |
mySBT | `0x${string}` | SBT_ADDRESS | packages/core/src/contract-addresses.ts:36 |
paymasterFactory | `0x${string}` | PAYMASTER_FACTORY_ADDRESS | packages/core/src/contract-addresses.ts:34 |
paymasterV4 | `0x${string}` | - | packages/core/src/contract-addresses.ts:38 |
registry | `0x${string}` | REGISTRY_ADDRESS | packages/core/src/contract-addresses.ts:30 |
reputationSystem | `0x${string}` | - | packages/core/src/contract-addresses.ts:42 |
superPaymaster | `0x${string}` | SUPER_PAYMASTER_ADDRESS | packages/core/src/contract-addresses.ts:33 |
xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | packages/core/src/contract-addresses.ts:41 |
DEFAULT_ADMIN_ROLE
const DEFAULT_ADMIN_ROLE: Hash = '0x0000000000000000000000000000000000000000000000000000000000000000';Defined in: packages/core/src/roles.ts:19
Default Admin Role (OpenZeppelin AccessControl)
Remarks
- Description: Highest privilege, can grant/revoke all roles
- Permission: Protocol governance only
- Source: OpenZeppelin AccessControl DEFAULT_ADMIN_ROLE
DEFAULT_APNTS_PRICE_USD
const DEFAULT_APNTS_PRICE_USD: "0.02" = "0.02";Defined in: packages/core/src/constants.ts:121
Default aPNTs price in USD (0.02 USD per aPNT)
DEFAULT_CALL_GAS_LIMIT
const DEFAULT_CALL_GAS_LIMIT: 100000n = 100000n;Defined in: packages/core/src/constants.ts:139
DEFAULT_GAS_TOKEN_MINT_AMOUNT
const DEFAULT_GAS_TOKEN_MINT_AMOUNT: "100" = "100";Defined in: packages/core/src/constants.ts:92
Default amount of gas tokens to mint for testing (in token units)
DEFAULT_PRE_VERIFICATION_GAS
const DEFAULT_PRE_VERIFICATION_GAS: 50000n = 50000n;Defined in: packages/core/src/constants.ts:140
DEFAULT_TIMEOUT_MS
const DEFAULT_TIMEOUT_MS: 30000 = 30000;Defined in: packages/core/src/constants.ts:145
Timeouts
DEFAULT_TOKEN_NAME
const DEFAULT_TOKEN_NAME: "Governance Token" = 'Governance Token';Defined in: packages/core/src/constants.ts:133
DEFAULT_TOKEN_SYMBOL
const DEFAULT_TOKEN_SYMBOL: "GT" = 'GT';Defined in: packages/core/src/constants.ts:132
Default Values
DEFAULT_USDT_MINT_AMOUNT
const DEFAULT_USDT_MINT_AMOUNT: "10" = "10";Defined in: packages/core/src/constants.ts:97
Default amount of USDT to mint for testing (in USDT)
DEFAULT_VERIFICATION_GAS_LIMIT
const DEFAULT_VERIFICATION_GAS_LIMIT: 200000n = 200000n;Defined in: packages/core/src/constants.ts:138
Gas Limits
DVT_VALIDATOR_ADDRESS
const DVT_VALIDATOR_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:59
DVTValidatorABI
const DVTValidatorABI: any;Defined in: packages/core/src/abis/index.ts:60
DVTValidatorArtifact
const DVTValidatorArtifact: object = DVTValidatorABIData;Defined in: packages/core/src/abis/index.ts:79
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/DVTValidator.json:2 |
bytecode | string | "0x60a0346100cf57601f610b8f38819003918201601f19168301916001600160401b038311848410176100d3578084926020946040528339810103126100cf57516001600160a01b038116908190036100cf5733156100bc575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600455608052610aa790816100e88239608051816107d30152f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f905f3560e01c908163013cf08b146108025750806306433b1b146107be57806308f41334146105f05780632ab09d14146105d2578063424a3d771461052e5780634d238c8e146104ea57806354fd4d501461046d578063715018a6146104265780638da5cb5b146103ff5780638e24bc9a146101da578063bc95910114610195578063c06f58e81461016c578063f2fde38b146100f95763facd743b146100b8575f80fd5b346100f65760203660031901126100f65760209060ff906040906001600160a01b036100e26109f5565b168152600284522054166040519015158152f35b80fd5b50346100f65760203660031901126100f6576101136109f5565b61011b610a0b565b6001600160a01b031680156101585781546001600160a01b03198116821783556001600160a01b03165f516020610a525f395f51905f528380a380f35b631e4fbdf760e01b82526004829052602482fd5b50346100f657806003193601126100f6576001546040516001600160a01b039091168152602090f35b50346100f65760203660031901126100f6576101af6109f5565b6101b7610a0b565b600180546001600160a01b0319166001600160a01b039290921691909117905580f35b50346100f65760603660031901126100f6576101f46109f5565b60243560ff81168082036103fb576044356001600160401b0381116103f7576102219036906004016109c8565b338652600260205260ff604087205416156103e857600454945f1986146103d457600186810160045586885260036020526040882080546001600160a81b0319166001600160a01b0390931692831760a09790971b60ff60a01b16969096178655909401916001600160401b0382116103c05761029e8354610905565b601f811161037b575b506020968694939291816001601f851114610306579289949281925f516020610a325f395f51905f529795926102fb575b50508160011b915f199060031b1c19161790555b604051908152a3604051908152f35b013590505f806102d8565b91601f1984168584528a8420935b81811061036157509260019285925f516020610a325f395f51905f5298968d989610610348575b505050811b0190556102ec565b01355f19600384901b60f8161c191690555f808061033b565b8284013585558a9850600190940193918b01918b01610314565b83885260208820601f840160051c810191602085106103b6575b601f0160051c01905b8181106103ab57506102a7565b88815560010161039e565b9091508190610395565b634e487b7160e01b87526041600452602487fd5b634e487b7160e01b87526011600452602487fd5b632ec5b44960e01b8652600486fd5b8480fd5b8380fd5b50346100f657806003193601126100f657546040516001600160a01b039091168152602090f35b50346100f657806003193601126100f65761043f610a0b565b80546001600160a01b03198116825581906001600160a01b03165f516020610a525f395f51905f528280a380f35b50346100f657806003193601126100f657604080519081016001600160401b038111828210176104d6576104d292506040526012815271222b2a2b30b634b230ba37b916981719971960711b6020820152604051918291602083526020830190610974565b0390f35b634e487b7160e01b83526041600452602483fd5b50346100f65760203660031901126100f6576105046109f5565b61050c610a0b565b6001600160a01b03168152600260205260408120805460ff1916600117905580f35b50346100f65760203660031901126100f657600154600435906001600160a01b0316330361059757808252600360205260408220600201805460ff191660011790557f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8280a280f35b60405162461bcd60e51b815260206004820152601360248201527227b7363c902126299020b3b3b932b3b0ba37b960691b6044820152606490fd5b50346100f657806003193601126100f6576020600454604051908152f35b50346107815760a0366003190112610781576004356024356001600160401b03811161078157610624903690600401610998565b906044356001600160401b03811161078157610644903690600401610998565b9092906084356001600160401b038111610781576106669036906004016109c8565b9091865f52600360205260405f209360ff6002860154166107af5760018060a01b0360015416945497853b1561078157604051632399c30960e01b815260048101919091526001600160a01b038916602482015260a09890981c60ff16604489015260e0606489015260e48801819052610104880195905f905b808210610785575050508685036003190160848801528085526001600160fb1b03811161078157866020819694845f99958a968598859760051b809287830137019260643560a487015260031985878603010160c48701528185850152604084013781810183018301869052601f01601f191601010301925af1801561077657610768575080f35b61077491505f9061093d565b005b6040513d5f823e3d90fd5b5f80fd5b90919687359060018060a01b038216809203610781576020816001938293520198019201906106e0565b634cbd1fab60e11b5f5260045ffd5b34610781575f366003190112610781576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610781576020366003190112610781576004355f52600360205260405f2090815490600183015f9080549061083782610905565b80855291600181169081156108de57506001146108a1575b505060ff600281956108668561089595038661093d565b0154169160405194859460018060a01b038116865260a01c166020850152608060408501526080840190610974565b90151560608301520390f35b5f908152602081209092505b8183106108c4575050810160200160ff600261084f565b6001816020929493945483858801015201910191906108ad565b60ff191660208087019190915292151560051b8501909201925060ff91506002905061084f565b90600182811c92168015610933575b602083101461091f57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610914565b601f909101601f19168101906001600160401b0382119082101761096057604052565b634e487b7160e01b5f52604160045260245ffd5b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f84011215610781578235916001600160401b038311610781576020808501948460051b01011161078157565b9181601f84011215610781578235916001600160401b038311610781576020838186019501011161078157565b600435906001600160a01b038216820361078157565b5f546001600160a01b03163303610a1e57565b63118cdaa760e01b5f523360045260245ffdfe876b000c101c27e7aaff6a3254ea503d0e9bf516112d43803bd82989b13552358be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a26469706673582212209b03881e70b9c04a19bca810af8ee4e39a4fe6c1d7045db11145bc272338226464736f6c634300081c0033" | packages/core/src/abis/DVTValidator.json:367 |
ENTRY_POINT_0_8_ADDRESS
const ENTRY_POINT_0_8_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:61
ENTRY_POINT_0_9_ADDRESS
const ENTRY_POINT_0_9_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:62
ENTRY_POINT_ADDRESS
const ENTRY_POINT_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:60
EntryPointABI
const EntryPointABI: any;Defined in: packages/core/src/abis/index.ts:53
EntryPointArtifact
const EntryPointArtifact: object = EntryPointABIData;Defined in: packages/core/src/abis/index.ts:72
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: never[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs?: undefined; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: ( | { components?: undefined; internalType: string; name: string; type: string; } | { components: ( | { components: ...[]; internalType: string; name: string; type: string; } | { components?: undefined; internalType: string; name: string; type: string; })[]; internalType: string; name: string; type: string; })[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/EntryPoint.json:2 |
bytecode | string | "0x6101806040523461019557604051610018604082610199565b600781526020810190664552433433333760c81b82526040519161003d604084610199565b600183526020830191603160f81b8352610056816101bc565b6101205261006384610357565b61014052519020918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526100cc60c082610199565b5190206080523060c0526040516103a48082016001600160401b0381118382101761018157829161439c833903905ff080156101765761016052604051613f0c9081610490823960805181612509015260a051816125c6015260c051816124d3015260e051816125580152610100518161257e0152610120518161115b0152610140518161118401526101605181818161101f015281816116b601528181613a1c0152613c6e0152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b601f909101601f19168101906001600160401b0382119082101761018157604052565b908151602081105f14610236575090601f8151116101f65760208151910151602082106101e7571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b03811161018157600254600181811c9116801561034d575b602082101461033957601f8111610306575b50602092601f82116001146102a557928192935f9261029a575b50508160011b915f199060031b1c19161760025560ff90565b015190505f80610281565b601f1982169360025f52805f20915f5b8681106102ee57508360019596106102d6575b505050811b0160025560ff90565b01515f1960f88460031b161c191690555f80806102c8565b919260206001819286850151815501940192016102b5565b60025f52601f60205f20910160051c810190601f830160051c015b81811061032e5750610267565b5f8155600101610321565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610255565b908151602081105f14610382575090601f8151116101f65760208151910151602082106101e7571790565b6001600160401b03811161018157600354600181811c91168015610485575b602082101461033957601f8111610452575b50602092601f82116001146103f157928192935f926103e6575b50508160011b915f199060031b1c19161760035560ff90565b015190505f806103cd565b601f1982169360035f52805f20915f5b86811061043a5750836001959610610422575b505050811b0160035560ff90565b01515f1960f88460031b161c191690555f8080610414565b91926020600181928685015181550194019201610401565b60035f52601f60205f20910160051c810190601f830160051c015b81811061047a57506103b3565b5f815560010161046d565b90607f16906103a156fe6101806040526004361015610024575b3615610019575f80fd5b6100223361228f565b005b5f610140525f3560e01c806242dc531461190057806301ffc9a7146118625780630396cb60146116e557806309ccb8801461169e5780630bd28e3b1461164357806313c65a6e14611626578063154e58dc146115fc5780631b2e01b8146115a4578063205c2878146114c657806322cdde4c1461147f57806335567e1a146114135780635287ce121461132057806370a08231146112e0578063765e827f1461124657806384b0196e14611140578063850aaf62146110b45780639b249f6914610fb8578063b0a398d114610f96578063b760faf914610f7a578063bb9fe6bf14610e9b578063c23a5cea14610d635763dbed18e00361000f5734610bb55761012c36611e6f565b6101005260e05233321480610d5a575b15610d45576101405190815b60e0518110610bd5575061015b82612153565b61012052610140516080526101405160c0525b60e05160c05110610266575f516020613df75f395f51905f526101405161014051a161014051608081905290815b60e05181106101b9576101b2836101005161336a565b6101405180f35b61020e6101c98260e0518561230b565b6001600160a01b036101dd60208301612362565b167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d6101405161014051a28061232d565b9061014051915b8083106102275750505060010161019c565b90919460019061025461023b888587612205565b61024a6080516101205161223c565b5190608051612fe1565b01958160805101608052019190610215565b61027560c05160e0518361230b565b61027f818061232d565b60a052906001600160a01b039061029890602001612362565b61014051911691905b60a05181106102c55750505060a05160805101608052600160c0510160c05261016e565b6102d681608051016101205161223c565b516102e48260a05185612205565b61014051915a8151926001600160a01b036102fe82612362565b168452602081810135908501526001600160801b036080808301358281166060880152811c604087015260a083013560c0808801919091528301359182166101008701521c61012085015261035660e0820182612376565b9081610b41575b50506040519361036c8261203f565b6020850152846040526040810151948560c08301511760608301511760808301511760a0830151176101008301511760018060781b03906101208401511711610af95750604081015160608201510160808201510160a08201510160c0820151016101008201510294856040860152845160018060a01b03815116906104046103f86040870187612376565b90898d6080510161399b565b60e001516101405197906001600160a01b03168015610ac8575b8751604080820151915190516020808c01516306608bdf60e21b918301918252919c6001600160a01b03909316939290918d9161045f918c60248501613d50565b03601f1981018d52610471908d611da2565b61014051908c5190846101405190602095f161014051519a3d602003610abd575b60405215610a0f5750156109b0575b505060018060a01b03825116602083015190610140515260016020526040610140512060018060c01b038260401c165f5260205260405f20908154916104e683611fa9565b90556001600160401b031603610963575a8403116109265760e001516060906001600160a01b031661070a575b606084015261053293929160809160a00135905a9003019101526137cd565b916001600160a01b031686036106c35761063a5750610550906137cd565b916001600160a01b03166105f35761056b57506001016102a1565b6105b65760408051631101335b60e11b815260805190920160048301526024820152602160448201525f516020613e175f395f51905f526064820152606560f81b608482015260a490fd5b60408051631101335b60e11b815260805190920160048301526024820152602060448201525f516020613e575f395f51905f526064820152608490fd5b60848360405190631101335b60e11b825260805101600482015260406024820152601460448201527320a0999a1039b4b3b730ba3ab9329032b93937b960611b6064820152fd5b826084916106895760408051631101335b60e11b8152608051909201600483015260248201526017604482015276414132322065787069726564206f72206e6f742064756560481b6064820152fd5b60408051631101335b60e11b815260805190920160048301526024820152601e60448201525f516020613e975f395f51905f526064820152fd5b60848460405190631101335b60e11b825260805101600482015260406024820152601460448201527320a0991a1039b4b3b730ba3ab9329032b93937b960611b6064820152fd5b94505a835160e0810151604086015192979261072e916001600160a01b0316613d72565b156108e9576080015195604051966020860151976107768161076860408a0151602083019c8d6314add44b60e21b90528960248501613d50565b03601f198101835282611da2565b8651608060018060a01b0360e08301511691015161014051918b61014051928551926101405191f1983d908161014051843e519482519a604084019b8c519115610890576040149081159161087c575b506108235750601f01601f1916016040819052915a9003116107e9575094610513565b631101335b60e11b81526080518801600482015260406024820152602060448201525f516020613dd75f395f51905f526064820152608490fd5b8b61087861082f6124a3565b6040519384936365c8fd4d60e01b85526080510160048501526024840152601d60648401525f516020613e775f395f51905f52608484015260a0604484015260a4830190611ed5565b0390fd5b601f01601f1916820183141590505f6107c6565b828e61087861089d6124a3565b6040519384936365c8fd4d60e01b85526080510160048501526024840152600d60648401526c10504cccc81c995d995c9d1959609a1b608484015260a0604484015260a4830190611ed5565b60848860405190631101335b60e11b825260805101600482015260406024820152601e60448201525f516020613db75f395f51905f526064820152fd5b60848760405190631101335b60e11b825260805101600482015260406024820152601e60448201525f516020613d975f395f51905f526064820152fd5b60848860405190631101335b60e11b825260805101600482015260406024820152601a6044820152794141323520696e76616c6964206163636f756e74206e6f6e636560301b6064820152fd5b6109b991613d72565b156109c5578b806104a1565b60848860405190631101335b60e11b825260805101600482015260406024820152601760448201527610504c8c48191a591b89dd081c185e481c1c99599d5b99604a1b6064820152fd5b8b903b610a625760408051631101335b60e11b815260805190920160048301526024820152601960448201527810504c8c081858d8dbdd5b9d081b9bdd0819195c1b1bde5959603a1b6064820152608490fd5b610a6a6124a3565b6040516365c8fd4d60e01b8152608051909201600483015260606024830152600d60648301526c10504c8cc81c995d995c9d1959609a1b608483015260a0604483015281906108789060a4830190611ed5565b610140519150610492565b6101408051849052516020819052604090205490985081811115610af25750610140515b9761041e565b8103610aec565b631101335b60e11b81526080518801600482015260406024820152601860448201527741413934206761732076616c756573206f766572666c6f7760401b6064820152608490fd5b60348210610bbc5781601411610bb55780359160248110610bb557603411610bb5576024810135608090811c60a0880152601490910135811c90860152606081901c15610b975760601c60e0850152898061035d565b6101408051636c66594960e11b905260609190911c60045251602490fd5b6101405180fd5b5063120aaab560e01b6101405152600452602461014051fd5b610be28160e0518461230b565b92610bed848061232d565b91906001600160a01b03610c0360208801612362565b169560018714610d2c5786610c20575b5050019250600101610148565b806040610c2e920190612376565b91873b15610bb55791604051928391632dd8113360e01b835286604484016040600486015252606483019160648860051b85010192816101405161011e1982360301915b8b8210610cf05750505050508291610c9a91600319848303016024850152610140519561226f565b0381610140518a5af19081610cd5575b50610cc8578463086a9f7560e41b6101405152600452602461014051fd5b929350839260015f610c13565b61014051610ce291611da2565b61014051610bb5575f610caa565b91939650919394606319898203018552863584811215610bb5576020610d1b600193858394016123da565b980195019201889695949391610c72565b8663086a9f7560e41b6101405152600452602461014051fd5b63558a1e0360e11b6101405152600461014051fd5b50333b1561013c565b34610bb5576020366003190112610bb557610d7c611e16565b33610140515261014051602052600160406101405120019081549165ffffffffffff60018060701b038460081c1693610dc560ff821663ffffffff8360781c16878015156122d1565b60981c168015610e7f57428111610e6357508054610100600160c81b031916905560405133907fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda39080610e19868683611fc4565b0390a261014051808080856001600160a01b0386165af1610e38611fdf565b9015610e45576101405180f35b61087890604051938493630373c21f60e21b8552336004860161200e565b632b0e998960e11b610140515260045242602452604461014051fd5b637de810eb60e11b610140515260045242602452604461014051fd5b34610bb55761014051366003190112610bb55733610140515261014051602052600160406101405120018054610efb63ffffffff8260781c16918260ff60018060701b038360081c16921691610ef58383838115156122d1565b826122d1565b65ffffffffffff4216019065ffffffffffff8211610f6057610f1d8282611f82565b60ff19815416905565ffffffffffff604051911681527ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a60203392a26101405180f35b634e487b7160e01b61014051526011600452602461014051fd5b6020366003190112610bb5576101b2610f91611e16565b61228f565b34610bb55761014051366003190112610bb5576020610140515c604051908152f35b34610bb5576020366003190112610bb5576004356001600160401b038111610bb5576020610fed611010923690600401611e2c565b604051632b870d1b60e11b8152600481018490529384928392602484019161226f565b03816101405160018060a01b037f0000000000000000000000000000000000000000000000000000000000000000165af19081156110a6576101405191611077575b506101408051633653dc0360e11b90526001600160a01b039190911660045251602490fd5b611099915060203d60201161109f575b6110918183611da2565b810190612250565b81611052565b503d611087565b6040513d61014051823e3d90fd5b34610bb5576040366003190112610bb5576110cd611e16565b6024356001600160401b038111610bb5576110ec903690600401611e2c565b604051929181908437820190610140518252610140519280610140519303915af4611115611fdf565b60408051632650415560e21b8152921515600484015260248301528190610878906044830190611ed5565b34610bb55761014051366003190112610bb5576111e461117f7f0000000000000000000000000000000000000000000000000000000000000000613591565b6111a87f00000000000000000000000000000000000000000000000000000000000000006136b7565b604051906020906111f2906111bd8385611da2565b6101405184525f368137604051958695600f60f81b875260e08588015260e0870190611ed5565b908582036040870152611ed5565b4660608501523060808501526101405160a085015283810360c0850152818084519283815201930191610140515b82811061122f57505050500390f35b835185528695509381019392810192600101611220565b34610bb55761125436611e6f565b919091333214806112d7575b15610d455761126e83612153565b6112798185856126c0565b5061014051925f516020613df75f395f51905f528480a161014051915b8583106112a7576101b2858561336a565b9091936001906112cd6112bb878987612205565b6112c5888661223c565b519088612fe1565b0194019190611296565b50333b15611260565b34610bb5576020366003190112610bb5576001600160a01b03611301611e16565b1661014051526101405160205260206040610140512054604051908152f35b34610bb5576020366003190112610bb557611339611e16565b60405161134581611d3c565b61014051815261014051602082015261014051604082015261014051606082015260806101405191015260018060a01b031661014051526101405160205260a06040610140512065ffffffffffff60405161139f81611d3c565b63ffffffff60018454948584520154916020810160ff841615158152604082019060018060701b038560081c1682528560806060850194868860781c168652019560981c168552604051968752511515602087015260018060701b0390511660408601525116606084015251166080820152f35b34610bb5576040366003190112610bb557602061142e611e16565b611436611e59565b61014080516001600160a01b039093169092526001835290516040908190206001600160c01b0383165f9081529084528190205481519290911b6001600160401b031916178152f35b34610bb5576020366003190112610bb5576004356001600160401b038111610bb5576101206003198236030112610bb5576114be60209160040161203f565b604051908152f35b34610bb5576040366003190112610bb5576114df611e16565b602435903361014051526101405160205260406101405120828154808211611589579061150b91611fb7565b90556040517fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb33918061153f868683611fc4565b0390a261014051808080856001600160a01b0386165af161155e611fdf565b901561156b576101405180f35b61087890604051938493639f3d693360e01b8552336004860161200e565b6312e1fa3760e11b6101405152600452602452604461014051fd5b34610bb5576040366003190112610bb5576115bd611e16565b6115c5611e59565b9060018060a01b031661014051526001602052604061014051209060018060c01b03165f52602052602060405f2054604051908152f35b34610bb55761014051366003190112610bb55760206040515f516020613e375f395f51905f528152f35b34610bb55761014051366003190112610bb55760206114be6124d0565b34610bb5576020366003190112610bb5576004356001600160c01b0381168103610bb5573361014051526001602052604061014051209060018060c01b03165f5260205260405f206116958154611fa9565b90556101405180f35b34610bb55761014051366003190112610bb5576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6020366003190112610bb55760043563ffffffff8116808203610bb5573361014051526101405160205261182a604061014051209261174460018501549163ffffffff8360781c169061173b8282881515611f13565b81861015611f13565b60081c6001600160701b03169261177d61175e3486611f3b565b9461176c8134881515611f5c565b346001600160701b03871115611f5c565b546040519061178b82611d3c565b8152600160208083018281526001600160701b0387166040808601918252606086018881526101408051608089019081528151339052905195869052919094209551865591519490930180549351925163ffffffff60781b60789190911b16610100600160781b0360089490941b9390931694151560ff166001600160981b03199094169390931793909317178155905165ffffffffffff1690611f82565b60405191825260208201527fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c0160403392a26101405180f35b34610bb5576020366003190112610bb55760043563ffffffff60e01b8116809103610bb55760209063d9934b3f60e01b81149081156118ef575b81156118de575b81156118cd575b81156118bc575b506040519015158152f35b6301ffc9a760e01b149050826118b1565b633e84f02160e01b811491506118aa565b63cf28ef9760e01b811491506118a3565b63283f548960e01b8114915061189c565b34611c6057610200366003190112611c60576004356001600160401b038111611c605736602382011215611c6057611942903690602481600401359101611de0565b36602319016101c08112611c60576101406040519161196083611d3c565b12611c605760405161197181611d6b565b6024356001600160a01b0381168103611c6057815260443560208201526064356040820152608435606082015260a435608082015260c43560a082015260e43560c0820152610104356001600160a01b0381168103611c605760e082015261012435610100820152610144356101208201528152610164356020820190815261018435604083019081526101a43560608401526101c435608084019081529193906101e4356001600160401b038111611c6057611a32903690600401611e2c565b955a90303303611d2d578651606081015195603f5a0260061c61271060a084015189010111611d1e575f9681519182611c80575b505050505090611a7e915a9003855101963691611de0565b925a93855161010081015161012082015148018082105f14611c785750975b611abc60018060a01b0360e084015116945182036060840151906133f4565b01925f9281611b6e575050516001600160a01b0316945b5a900301019485029051928184105f14611b3f5750506003811015611b2557600203611b1057602092816114be9293611b0b816134b7565b613413565b63deadaa5160e01b6101405152602061014051fd5b634e487b7160e01b61014051526021600452602461014051fd5b81611b5092959496939603906133d8565b506003841015611b255782611b69926020951590613465565b6114be565b909691878251611b81575b505050611ad3565b90919293505a926003881015611c645760028803611bb7575b505060a0611bae925a9003910151906133f4565b90888080611b79565b60a083015191803b15611c60578b925f9283611bfa938c8b88604051998a9889978895637c627b2160e01b87526004870152608060248701526084860190611ed5565b9202604484015260648301520393f19081611c4b575b50611c4157610878611c206124a3565b604051632b5e552f60e21b8152602060048201529182916024830190611ed5565b60a0611bae611b9a565b5f611c5591611da2565b5f610140528a611c10565b5f80fd5b634e487b7160e01b5f52602160045260245ffd5b905097611a9d565b915f9291838093602060018060a01b03885116910192f115611ca5575b808080611a66565b611a7e9392955060405191611cb86124a3565b908151611cd1575b505050604052600193909188611c9d565b7f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a201905191602060018060a01b03855116940151611d1360405192839283611ef9565b0390a3888080611cc0565b63deaddead60e01b5f5260205ffd5b639fbdaa0960e01b5f5260045ffd5b60a081019081106001600160401b03821117611d5757604052565b634e487b7160e01b5f52604160045260245ffd5b61014081019081106001600160401b03821117611d5757604052565b606081019081106001600160401b03821117611d5757604052565b601f909101601f19168101906001600160401b03821190821017611d5757604052565b6001600160401b038111611d5757601f01601f191660200190565b929192611dec82611dc5565b91611dfa6040519384611da2565b829481845281830111611c60578281602093845f960137010152565b600435906001600160a01b0382168203611c6057565b9181601f84011215611c60578235916001600160401b038311611c605760208381860195010111611c6057565b602435906001600160c01b0382168203611c6057565b906040600319830112611c60576004356001600160401b038111611c605760040182601f82011215611c60578035926001600160401b038411611c60576020808301928560051b010111611c605791906024356001600160a01b0381168103611c605790565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b604090611f10939281528160208201520190611ed5565b90565b15611f1c575050565b9063ffffffff80926370c11de760e11b5f52166004521660245260445ffd5b91908201809211611f4857565b634e487b7160e01b5f52601160045260245ffd5b15611f65575050565b630384002760e21b5f5260045260018060701b031660245260445ffd5b805465ffffffffffff60981b191660989290921b65ffffffffffff60981b16919091179055565b5f198114611f485760010190565b91908203918211611f4857565b6001600160a01b039091168152602081019190915260400190565b3d15612009573d90611ff082611dc5565b91611ffe6040519384611da2565b82523d5f602084013e565b606090565b6001600160a01b039182168152911660208201526040810191909152608060608201819052611f1092910190611ed5565b60429061204b81612604565b6120536124d0565b9161205d81612362565b91801561211f57905b60c06120756060830183612376565b9081604051918237209161209561208f60e0830183612376565b90613787565b926040519460208601965f516020613e375f395f51905f52885260018060a01b0316604087015260208301356060870152608086015260a085015260808101358285015260a081013560e08501520135610100830152610120820152610120815261210261014082611da2565b5190206040519161190160f01b8352600283015260228201522090565b5061212d6040820182612376565b90816040519182372090612066565b6001600160401b038111611d575760051b60200190565b9061215d8261213c565b61216a6040519182611da2565b828152809261217b601f199161213c565b01905f5b82811061218b57505050565b60209060405161219a81611d3c565b6040516121a681611d6b565b5f81525f848201525f60408201525f60608201525f60808201525f60a08201525f60c08201525f60e08201525f6101008201525f61012082015281525f838201525f60408201525f60608201525f60808201528282850101520161217f565b91908110156122285760051b8101359061011e1981360301821215611c60570190565b634e487b7160e01b5f52603260045260245ffd5b80518210156122285760209160051b010190565b90816020910312611c6057516001600160a01b0381168103611c605790565b908060209392818452848401375f828201840152601f01601f1916010190565b7f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460206122bc34846133d8565b6040519081526001600160a01b0390931692a2565b156122db57505050565b638421e8e560e01b5f9081526001600160701b0390911660045263ffffffff909116602452901515604452606490fd5b91908110156122285760051b81013590605e1981360301821215611c60570190565b903590601e1981360301821215611c6057018035906001600160401b038211611c6057602001918160051b36038313611c6057565b356001600160a01b0381168103611c605790565b903590601e1981360301821215611c6057018035906001600160401b038211611c6057602001918136038313611c6057565b9035601e1982360301811215611c60570160208101919035906001600160401b038211611c60578136038313611c6057565b8035916001600160a01b0383168303611c60576001600160a01b03909216825260208181013590830152611f109161249461248861244f61243461242160408701876123a8565b610120604088015261012087019161226f565b61244160608701876123a8565b90868303606088015261226f565b6080850135608085015260a085013560a085015260c085013560c085015261247a60e08601866123a8565b9085830360e087015261226f565b926101008101906123a8565b9161010081850391015261226f565b3d61080081116124c7575b604051906020818301016040528082525f602083013e90565b506108006124ae565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614806125c3575b1561252b577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a081526125bd60c082611da2565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614612502565b90939293848311611c60578411611c60578101920390565b6126116040820182612376565b909161261d82846134f9565b156126b95761262e61263391612362565b61351b565b916014821161266857505060405160609190911b6001600160601b0319166020820190815260148252906125bd603482611da2565b81601411611c605760405160609390931b6001600160601b03191660208481019182529093926125bd92849190601319820190601401603484013781015f838201520301601f198101835282611da2565b5050505f90565b92919092835f5b8181106126d45750505050565b6126de818561223c565b516126ea828486612205565b5f915a8151906001600160a01b0361270185612362565b1682526020820191602085013583526080850135948560801c9560018060801b031693604083019660608401958652875260a08201359460c0840186815260c0840135908160801c9160018060801b0316916101208701906101008801938452815261277060e0870187612376565b80612ecc575b50506040516127848761203f565b9460208c01958652816040528c519c8d8551178251179260808b01938451179460a08c019586511788511760018060781b0391511711612e855750519051019051019051019051019051029760408801928984528b89516127ff8b60018060a01b03835116936127f760408b018b612376565b92909161399b565b60e001515f9b906001600160a01b03168015612e5e575b8b519c60408e01519d600160a01b600190039051169d8e916040516101605288518b61016051602001926306608bdf60e21b84526101605192610160516024019261286093613d50565b03601f1981016101605152610160519061287991611da2565b6101605151905f6020948194f19c5f519d3d602003612e57575b6101605160405215612db2575015612d57575b5050855190516001600160a01b039091165f90815260016020908152604080832084821c84529091529020805491906128de83611fa9565b90556001600160401b031603612d0e575a860311612cd55760e090930151606093906001600160a01b0316612ae9575b505050606084015261292b9392916080915a9003019101526137cd565b916001600160a01b0316612aa657612a255750612947906137cd565b916001600160a01b03166129e25761296257506001016126c7565b6129a95760a49060405190631101335b60e11b8252600482015260406024820152602160448201525f516020613e175f395f51905f526064820152606560f81b6084820152fd5b60849060405190631101335b60e11b8252600482015260406024820152602060448201525f516020613e575f395f51905f526064820152fd5b60848360405190631101335b60e11b8252600482015260406024820152601460448201527320a0999a1039b4b3b730ba3ab9329032b93937b960611b6064820152fd5b82608491612a705760405190631101335b60e11b82526004820152604060248201526017604482015276414132322065787069726564206f72206e6f742064756560481b6064820152fd5b60405190631101335b60e11b8252600482015260406024820152601e60448201525f516020613e975f395f51905f526064820152fd5b60848460405190631101335b60e11b8252600482015260406024820152601460448201527320a0991a1039b4b3b730ba3ab9329032b93937b960611b6064820152fd5b909197505a865160e08101518451929492612b0c916001600160a01b0316613d72565b15612c9c576080612b409101519261076860405193849251905190602084019d8e6314add44b60e21b905260248501613d50565b5f8088518b82608060018060a01b0360e08501511693015192865193f1983d90815f843e519482519a604084019b8c519115612c475760401490811591612c33575b50612be25750601f01601f1916016040819052915a900311612bab5750948161292b608061290e565b631101335b60e11b81526004810188905260406024820152602060448201525f516020613dd75f395f51905f526064820152608490fd5b8b610878612bee6124a3565b6040519384936365c8fd4d60e01b855260048501526024840152601d60648401525f516020613e775f395f51905f52608484015260a0604484015260a4830190611ed5565b601f01601f1916820183141590505f612b82565b828e610878612c546124a3565b6040519384936365c8fd4d60e01b855260048501526024840152600d60648401526c10504cccc81c995d995c9d1959609a1b608484015260a0604484015260a4830190611ed5565b60848b60405190631101335b60e11b8252600482015260406024820152601e60448201525f516020613db75f395f51905f526064820152fd5b60848a60405190631101335b60e11b8252600482015260406024820152601e60448201525f516020613d975f395f51905f526064820152fd5b60848b60405190631101335b60e11b8252600482015260406024820152601a6044820152794141323520696e76616c6964206163636f756e74206e6f6e636560301b6064820152fd5b612d6091613d72565b15612d6c575f806128a6565b60848c60405190631101335b60e11b8252600482015260406024820152601760448201527610504c8c48191a591b89dd081c185e481c1c99599d5b99604a1b6064820152fd5b8f903b612e015760849060405190631101335b60e11b8252600482015260406024820152601960448201527810504c8c081858d8dbdd5b9d081b9bdd0819195c1b1bde5959603a1b6064820152fd5b612e096124a3565b906108786040519283926365c8fd4d60e01b8452600484015260606024840152600d60648401526c10504c8cc81c995d995c9d1959609a1b608484015260a0604484015260a4830190611ed5565b505f612893565b9b50815f525f60205260405f20548181115f14612e7e57505f5b9b612816565b8103612e78565b90508f60849250631101335b60e11b8252600482015260406024820152601860448201527741413934206761732076616c756573206f766572666c6f7760401b6064820152fd5b60348110612f305780601411611c6057813560601c9160248210611c6057601481013591603411611c605760240135608090811c60a08b015290811c908901528015612f1e5760e08801525f80612776565b636c66594960e11b5f5260045260245ffd5b63120aaab560e01b5f5260045260245ffd5b60806101a091610120815160018060a01b038151168652602081015160208701526040810151604087015260608101516060870152838101518487015260a081015160a087015260c081015160c087015260018060a01b0360e08201511660e087015261010081015161010087015201516101208501526020810151610140850152604081015161016085015260608101516101808501520151910152565b9092915a6020820180515f5d60608301519060405196876130056060830183612376565b5f60038211613362575b6001600160e01b031916638dd7712f60e01b036132ff575050505f6130996130b961305e6130726020958751604051938492638dd7712f60e01b8a8501526040602485015260648401906123da565b90604483015203601f198101835282611da2565b6107686040519384926242dc5360e01b888501526102006024850152610224840190611ed5565b6130a6604484018c612f42565b8281036023190161020484015288611ed5565b828151910182305af15f5197604052156130d5575b5050505050565b909192939495505f3d6020146132f2575b63deaddead60e01b81036131325760848660405190631101335b60e11b8252600482015260406024820152600f60448201526e41413935206f7574206f662067617360881b6064820152fd5b939450919290919063deadaa5160e01b0361318157505061316561315a613175925a90611fb7565b608084015190611f3b565b604083015183611b0b82956134b7565b905b5f808080806130ce565b916131e4919260405190518551907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f4792602060018060a01b038451169301516131c76124a3565b906131d760405192839283611ef9565b0390a36040525a90611fb7565b6131f46080840191825190611f3b565b915f905a92855161010081015161012082015148018082105f146132ea5750955b61323460018060a01b0360e084015116935182036060840151906133f4565b01925f92806132bb575050516001600160a01b0316935b5a900301019283026040850151928184105f14613294575050806132805750908161327a9293611b0b816134b7565b90613177565b634e487b7160e01b81526021600452602490fd5b6132a490828493979503906133d8565b50613280575090825f6132b693613465565b61327a565b959190516132ca575b5061324b565b935090506132e35a9360a05f955a9003910151906133f4565b905f6132c4565b905095613215565b5060205f803e5f516130e6565b6242dc5360e01b60208401526102006024840152613359935061334b9161332b9161022485019161226f565b6133386044840189612f42565b8281036023190161020484015285611ed5565b03601f198101895288611da2565b60205f886130b9565b50813561300f565b6001600160a01b031680156133c6575f805d5f80808085855af161338c611fdf565b901561339757505050565b610878906040519384936340848e6160e01b855260048501526024840152606060448401526064830190611ed5565b631a3b45fd60e01b5f5260045260245ffd5b60018060a01b03165f525f60205260405f209081540180915590565b90619c40820181111561340d57606491600a9103020490565b50505f90565b9190915f516020613eb75f395f51905f526080602083015192519460018060a01b0386511694602060018060a01b0360e089015116970151916040519283525f602084015260408301526060820152a4565b9060805f516020613eb75f395f51905f5291602084015193519560018060a01b0387511695602060018060a01b0360e08a015116980151926040519384521515602084015260408301526060820152a4565b60208101519051907f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e60208060018060a01b03855116940151604051908152a3565b9060021161351657356001600160601b031916613b8160f11b1490565b505f90565b60175f80833c5f51906110ff60f01b6001600160e81b031983160161354a575060481c6001600160a01b031690565b803b1561357157639f4e4cc960e01b5f9081526001600160a01b0391909116600452602490fd5b63e5819b9560e01b5f9081526001600160a01b0391909116600452602490fd5b60ff81146135d75760ff811690601f82116135c857604051916135b5604084611da2565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b506040515f6002548060011c91600182169182156136ad575b60208410831461369957838552849290811561367a575060011461361b575b611f1092500382611da2565b5060025f90815290917f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b81831061365e575050906020611f109282010161360f565b6020919350806001915483858801015201910190918392613646565b60209250611f1094915060ff191682840152151560051b82010161360f565b634e487b7160e01b5f52602260045260245ffd5b92607f16926135f0565b60ff81146136db5760ff811690601f82116135c857604051916135b5604084611da2565b506040515f6003548060011c916001821691821561377d575b60208410831461369957838552849290811561367a575060011461371e57611f1092500382611da2565b5060035f90815290917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b818310613761575050906020611f109282010161360f565b6020919350806001915483858801015201910190918392613749565b92607f16926136f4565b61379182826138bb565b806137a25750816040519182372090565b604051920390600919820190833767117192d14ba1cb2b60c11b828201600919015260011901902090565b80156138b2575f604080516137e181611d87565b8281526020810183905201526001600160a01b0381169060a081901c65ffffffffffff169081156138a4575b60409060d01c91815161381f81611d87565b8481526020810184905265ffffffffffff821692018290526001602f1b83101580613896575b1561387957657fffffffffff9150164311908115613866575b509060019092565b657fffffffffff9150164311155f61385e565b50421190811561388b575b50905f9092565b90504211155f613884565b506001602f1b821015613845565b65ffffffffffff915061380d565b505f905f905f90565b603e821061340d576138d382600719810181846125ec565b6001600160c01b03199135918216916008821061397b575b50506001600160c01b031916676e8e6d2eb45e34d560c11b0161340d578161391991816009198101916125ec565b6001600160f01b03199135918216916002821061395b575b505060f01c90603d1981018211613946575090565b6307b9a19160e01b5f5260045260245260445ffd5b6001600160f01b031960029290920360031b82901b161690505f80613931565b6001600160c01b031960089290920360031b82901b161690505f806138eb565b929091925f826139ac575050505050565b835180516001600160a01b031695906139c585836134f9565b613c4b575060148410613c055783601411613c0157803560601c93863b613bcb57613a18916020916040885101519085604051809681958294632b870d1b60e11b8452886004850152602484019161226f565b03927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690f1918215613bbf5791613ba0575b506001600160a01b0381168015613b56578503613b0a573b15613abe575060407fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d9160208401519360e060018060a01b03915101511682519182526020820152a35f808080806130ce565b60849060405190631101335b60e11b8252600482015260406024820152602060448201527f4141313520696e6974436f6465206d757374206372656174652073656e6465726064820152fd5b60848260405190631101335b60e11b8252600482015260406024820152602060448201527f4141313420696e6974436f6465206d7573742072657475726e2073656e6465726064820152fd5b60848360405190631101335b60e11b8252600482015260406024820152601b60448201527a4141313320696e6974436f6465206661696c6564206f72204f4f4760281b6064820152fd5b613bb9915060203d60201161109f576110918183611da2565b5f613a53565b604051903d90823e3d90fd5b50505050906020807fa39bcda08ffd11bafb11c4f170ef24fc6dc1a9d1b0394d90dbd19e0b919050e992015192604051908152a3565b5080fd5b60848360405190631101335b60e11b8252600482015260406024820152601760448201527610504e4e481a5b9a5d10dbd919481d1bdbc81cdb585b1b604a1b6064820152fd5b9195949390925060148111613c63575b505050505050565b604060018060a01b037f00000000000000000000000000000000000000000000000000000000000000001692015181601411611c6057823b15611c6057613cd9935f809460405180978196829563c09ad0d960e01b84528c6004850152604060248501526014604485019260131901910161226f565b0393f18015613d4557613d30575b507f7c9f9ade6a03a0bba484e52df872467a270e798ffc1adab9dfaa8d0e627f05446020613d148461351b565b9201516001600160a01b039092169380a45f8080808080613c5b565b613d3d9193505f90611da2565b5f915f613ce7565b6040513d5f823e3d90fd5b613d68604092959493956060835260608301906123da565b9460208201520152565b60018060a01b03165f525f60205260405f209081548181106126b95703905560019056fe41413236206f76657220766572696669636174696f6e4761734c696d6974000041413331207061796d6173746572206465706f73697420746f6f206c6f77000041413336206f76657220706d566572696669636174696f6e4761734c696d6974bb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97241413332207061796d61737465722065787069726564206f72206e6f7420647529a0bca4af4be3421398da00295e58e6d7de38cb492214754cb6a47507dd6f8e41413337207061796d617374657220696e76616c20626c6f636b2072616e676541413335206d616c666f726d6564207061796d6173746572206461746100000041413237206f7574736964652076616c696420626c6f636b2072616e6765000049628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419fa2646970667358221220e358b8d7d86f46202a6c6fb60cc1850637d2693226428cb183464bbd0b5709f064736f6c634300081c003360a08060405234602f57336080526103709081610034823960805181818160970152818161019301526102160152f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c8063570e1a36146101c2578063b0d691fe1461017e5763c09ad0d91461003a575f80fd5b3461017a57604036600319011261017a576004356001600160a01b038116810361017a576024356001600160401b03811161017a573660238201121561017a575f916100918392369060248160040135910161029a565b906100c97f000000000000000000000000000000000000000000000000000000000000000030336001600160a01b0383168114610304565b82602083519301915af1156100da57005b3d6108008111610171575b60c460405160208382010160405282815260208101925f843e6040519283916365c8fd4d60e01b83525f600484015260606024840152601f60648401527f4141313320454950373730322073656e64657220696e6974206661696c656400608484015260a060448401525180918160a48501528484015e5f828201840152601f01601f19168101030190fd5b506108006100e5565b5f80fd5b3461017a575f36600319011261017a576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461017a57602036600319011261017a576004356001600160401b03811161017a573660238201121561017a576004810135906001600160401b03821161017a57366024838301011161017a575f916102487f000000000000000000000000000000000000000000000000000000000000000030336001600160a01b0383168114610304565b8060141161017a576020916102675f923690601319016038840161029a565b90826024858451940192013560601c5af1610292575b6040516001600160a01b039091168152602090f35b505f5161027d565b9192916001600160401b0382116102f05760405191601f8101601f19908116603f011683016001600160401b038111848210176102f05760405282948184528183011161017a578281602093845f960137010152565b634e487b7160e01b5f52604160045260245ffd5b1561030e57505050565b63fe34a6d360e01b5f9081526001600160a01b0391821660045291811660245291909116604452606490fdfea264697066735822122096d692b1528737701f5ba5b3263e189297f7691543036742bdccc75be0644a7964736f6c634300081c0033" | packages/core/src/abis/EntryPoint.json:1381 |
FAUCET_API_URL
const FAUCET_API_URL: "https://faucet-aastar.vercel.app" = "https://faucet-aastar.vercel.app";Defined in: packages/core/src/constants.ts:72
Default faucet API URL for testnet token requests
GTOKEN_ADDRESS
const GTOKEN_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:49
GTOKEN_STAKING_ADDRESS
const GTOKEN_STAKING_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:50
GTokenABI
const GTokenABI: any;Defined in: packages/core/src/abis/index.ts:47
GTokenArtifact
const GTokenArtifact: object = GTokenABIData;Defined in: packages/core/src/abis/index.ts:66
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/GToken.json:2 |
bytecode | string | "0x60a0604052346103b057610e016020813803918261001c816103b4565b9384928339810103126103b0575161003460406103b4565b90601082526f23b7bb32b93730b731b2902a37b5b2b760811b602083015261005c60406103b4565b600681526523aa37b5b2b760d11b602082015282519091906001600160401b0381116102c157600354600181811c911680156103a6575b60208210146102a357601f8111610343575b506020601f82116001146102e057819293945f926102d5575b50508160011b915f199060031b1c1916176003555b81516001600160401b0381116102c157600454600181811c911680156102b7575b60208210146102a357601f8111610240575b50602092601f82116001146101df57928192935f926101d4575b50508160011b915f199060031b1c1916176004555b80156101c15760805233156101ae5760058054336001600160a01b03198216811790925560405191906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3610a2790816103da82396080518181816104b00152818161052e01526105630152f35b631e4fbdf760e01b5f525f60045260245ffd5b63392e1e2760e01b5f525f60045260245ffd5b015190505f80610120565b601f1982169360045f52805f20915f5b8681106102285750836001959610610210575b505050811b01600455610135565b01515f1960f88460031b161c191690555f8080610202565b919260206001819286850151815501940192016101ef565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c81019160208410610299575b601f0160051c01905b81811061028e5750610106565b5f8155600101610281565b9091508190610278565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100f4565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100be565b601f1982169060035f52805f20915f5b81811061032b57509583600195969710610313575b505050811b016003556100d3565b01515f1960f88460031b161c191690555f8080610305565b9192602060018192868b0151815501940192016102f0565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c8101916020841061039c575b601f0160051c01905b81811061039157506100a5565b5f8155600101610384565b909150819061037b565b90607f1690610093565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102c15760405256fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106b157508063095ea7b31461060957806318160ddd146105ec57806323b872dd146105b4578063313ce56714610599578063349f0b9014610551578063355274ea1461051757806340c10f191461043e57806342966c681461042157806354fd4d50146103b757806370a0823114610380578063715018a61461033857806379cc6790146103065780638da5cb5b146102de57806395d89b41146101da578063a9059cbb146101a9578063dd62ed3e146101595763f2fde38b146100e2575f80fd5b34610155576020366003190112610155576100fb610793565b610103610919565b6001600160a01b0316801561014257600580546001600160a01b0319811683179091556001600160a01b03165f5160206109b25f395f51905f525f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b3461015557604036600319011261015557610172610793565b61017a6107a9565b6001600160a01b039182165f908152600160209081526040808320949093168252928352819020549051908152f35b34610155576040366003190112610155576101cf6101c5610793565b6024359033610882565b602060405160018152f35b34610155575f366003190112610155576040515f6004548060011c906001811680156102d4575b6020831081146102c05782855290811561029c575060011461023e575b61023a8361022e818503826107bf565b60405191829182610769565b0390f35b60045f9081527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b939250905b8082106102825750909150810160200161022e61021e565b91926001816020925483858801015201910190929161026a565b60ff191660208086019190915291151560051b8401909101915061022e905061021e565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610201565b34610155575f366003190112610155576005546040516001600160a01b039091168152602090f35b3461015557604036600319011261015557610336610322610793565b602435906103318233836107e2565b610940565b005b34610155575f36600319011261015557610350610919565b600580546001600160a01b031981169091555f906001600160a01b03165f5160206109b25f395f51905f528280a3005b34610155576020366003190112610155576001600160a01b036103a1610793565b165f525f602052602060405f2054604051908152f35b34610155575f3660031901126101555760408051908101906001600160401b0382118183101761040d5761023a91604052600c81526b23aa37b5b2b716991718971960a11b602082015260405191829182610769565b634e487b7160e01b5f52604160045260245ffd5b346101555760203660031901126101555761033660043533610940565b3461015557604036600319011261015557610457610793565b60243590610463610919565b6001600160a01b031690811561050457600254908082018092116104f05760205f5160206109d25f395f51905f52915f9360025584845283825260408420818154019055604051908152a37f00000000000000000000000000000000000000000000000000000000000000006002548181116104db57005b63279e7e1560e21b5f5260045260245260445ffd5b634e487b7160e01b5f52601160045260245ffd5b63ec442f0560e01b5f525f60045260245ffd5b34610155575f3660031901126101555760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610155575f366003190112610155577f000000000000000000000000000000000000000000000000000000000000000060025481039081116104f057602090604051908152f35b34610155575f36600319011261015557602060405160128152f35b34610155576060366003190112610155576101cf6105d0610793565b6105d86107a9565b604435916105e78333836107e2565b610882565b34610155575f366003190112610155576020600254604051908152f35b3461015557604036600319011261015557610622610793565b60243590331561069e576001600160a01b031690811561068b57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b34610155575f366003190112610155575f6003548060011c9060018116801561075f575b6020831081146102c05782855290811561029c57506001146107015761023a8361022e818503826107bf565b60035f9081527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b939250905b8082106107455750909150810160200161022e61021e565b91926001816020925483858801015201910190929161072d565b91607f16916106d5565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361015557565b602435906001600160a01b038216820361015557565b601f909101601f19168101906001600160401b0382119082101761040d57604052565b6001600160a01b039081165f8181526001602081815260408084209587168452949052929020549392918401610819575b50505050565b82841061085f57801561069e576001600160a01b0382161561068b575f52600160205260405f209060018060a01b03165f5260205260405f20910390555f808080610813565b508290637dc7a0d960e11b5f5260018060a01b031660045260245260445260645ffd5b6001600160a01b0316908115610906576001600160a01b031691821561050457815f525f60205260405f20548181106108ed57815f5160206109d25f395f51905f5292602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b8263391434e360e21b5f5260045260245260445260645ffd5b634b637e8f60e11b5f525f60045260245ffd5b6005546001600160a01b0316330361092d57565b63118cdaa760e01b5f523360045260245ffd5b9091906001600160a01b0316801561090657805f525f60205260405f2054838110610997576020845f94955f5160206109d25f395f51905f52938587528684520360408620558060025403600255604051908152a3565b915063391434e360e21b5f5260045260245260445260645ffdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220f69a1c3b1b1062c0c3b4427ba6b9f70f4b0bd5df138bf8aeef13a9b5b4fea3dc64736f6c634300081c0033" | packages/core/src/abis/GToken.json:512 |
GTokenStakingABI
const GTokenStakingABI: any;Defined in: packages/core/src/abis/index.ts:48
GTokenStakingArtifact
const GTokenStakingArtifact: object = GTokenStakingABIData;Defined in: packages/core/src/abis/index.ts:67
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/GTokenStaking.json:2 |
bytecode | string | "0x60a03461019c57601f6120f438819003918201601f19168301916001600160401b038311848410176101a057808492604094855283398101031261019c57610052602061004b836101b4565b92016101b4565b60015f5533156101895760018054336001600160a01b0319821681179092556040519391906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36001600160a01b031691821561015657506001600160a01b031690811561011e57608052600380546001600160a01b031916919091179055604051611f2b90816101c982396080518181816104b501528181610e0701528181610ed6015281816111a2015281816113fa0152818161170801526117470152f35b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420547265617375727960801b6044820152606490fd5b62461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21023aa37b5b2b760911b6044820152606490fd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820361019c5756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b146119715750806316934fc41461192257806330b039ee1461189057806336cb2b821461183d578063374e4d73146114f45780634bcb80a21461137357806354fd4d501461132057806361d027b3146112f8578063678b3ee2146110775780636d265c11146110295780636da12d0c14610fd157806370a0823114610f99578063715018a614610f515780637c50309f14610f055780637f6b337b14610ec1578063817b1cd214610ea45780638da5cb5b14610e7c5780638f76484814610ce957806391b65cd614610ac857806394e2b21e14610a95578063a0821be314610a71578063a91ee0dc146109f3578063aed2d908146109b6578063b4d81fb314610901578063befa570e14610420578063d64c66aa1461038e578063f0f442601461030e578063f2fde38b146102985763f50102c01461015d575f80fd5b3461029557604036600319011261029557608090610179611994565b81606060405161018881611a48565b828152826020820152826040820152015260018060a01b03169081815260056020526040812060243582526020526040812091604051906101c882611a2d565b8354600180871b0381168352851c6020830152610205600365ffffffffffff60018701541695604085019687526002810154606086015201611a86565b858301528252600460205265ffffffffffff604083209160405161022881611a48565b8354815260606003600186015495866020850152600281015460408501520154910152600180871b0390511693511690606060405161026681611a48565b858152602081019283526040810193845201928352604051938452516020840152516040830152516060820152f35b80fd5b5034610295576020366003190112610295576102b2611994565b6102ba611c9b565b6001600160a01b031680156102fa57600180546001600160a01b0319811683179091556001600160a01b03165f516020611e965f395f51905f528380a380f35b631e4fbdf760e01b82526004829052602482fd5b503461029557602036600319011261029557610328611994565b610330611c9b565b6001600160a01b0316801561035657600380546001600160a01b03191691909117905580f35b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420547265617375727960801b6044820152606490fd5b5034610295576060366003190112610295576002546001600160a01b03163314158061040b575b6103d75760043581526007602052604081206024358155600160443591015580f35b60405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606490fd5b506001546001600160a01b03163314156103b5565b503461088d5760a036600319011261088d5761043a611994565b606435916024359160843590604435906001600160a01b038316830361088d57610462611cc2565b6002546001600160a01b031633036108cc576001600160a01b03165f8181526005602090815260408083208884529091529020549092906001600160801b0316610891576104dd6104b38784611bd6565b7f000000000000000000000000000000000000000000000000000000000000000092309084611d20565b856107e0575b508183526004602052604083206104fb828254611bd6565b905581835260046020526002604084200154156107ca575b6001600160801b03811161078c576001600160801b03851161078c576040519461053c86611a2d565b6001600160801b038281168752811660208088019182524265ffffffffffff166040808a0191825260608a0189815290519299929360039392906105808c87611a63565b8986526080848101968752898b5260058d526040808c208d8d528e528b2094519151901b6001600160801b0319166001600160801b03919091161783555160018301805465ffffffffffff191665ffffffffffff929092169190911790555160028201559151805191909201916001600160401b03821161077857819061060784546119c6565b601f811161073f575b508990601f83116001146106dd5788926106d2575b50508160011b915f199060031b1c19161790555b8284526006865260408420805490600160401b8210156106be57869360019695938561069361067d866060968c5f516020611eb65f395f51905f5299018155611b77565b819391549060031b91821b915f19901b19161790565b90556106a182600854611bd6565b60085560405191825289820152426040820152a355604051908152f35b634e487b7160e01b86526041600452602486fd5b015190505f80610625565b8489528a89209250601f198416895b8c828210610729575050908460019594939210610711575b505050811b019055610639565b01515f1960f88460031b161c191690555f8080610704565b60018596829396860151815501950193016106ec565b61076890858a528b8a20601f850160051c8101918d861061076e575b601f0160051c0190611ba0565b5f610610565b909150819061075b565b634e487b7160e01b87526041600452602487fd5b60405162461bcd60e51b8152602060048201526016602482015275082dadeeadce840caf0c6cacac8e640ead2dce86264760531b6044820152606490fd5b8183526004602052426002604085200155610513565b6001600160a01b0316803b1561088d575f8091602460405180948193630852cd8d60e31b83528b60048401525af180156108825761086d575b5083827fbbd5bd0123b04ed83c5d79cf2f6fca38e7b242f17f09d9eea712fb1cbe2fb861608060405189815260406020820152600a60408201526922b73a393c90213ab93760b11b6060820152a35f6104e3565b61087a9193505f90611a63565b5f915f610819565b6040513d5f823e3d90fd5b5f80fd5b60405162461bcd60e51b8152602060048201526013602482015272149bdb1948185b1c9958591e481b1bd8dad959606a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920526567697374727960981b6044820152606490fd5b3461088d57604036600319011261088d57604061091c611994565b6001600160a01b03165f9081526005602090815282822060243583528152828220546007909152908290208251916001600160801b0316906127109061097c90610965856119fe565b602060018254928388520154950194855283611bb6565b0491518083106109ae575b508082116109a6575b8161099a91611bc9565b82519182526020820152f35b905080610990565b915083610987565b3461088d57602036600319011261088d576001600160a01b036109d7611994565b165f526009602052602060ff60405f2054166040519015158152f35b3461088d57602036600319011261088d57610a0c611994565b610a14611c9b565b6001600160a01b03168015610a3957600280546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420526567697374727960801b6044820152606490fd5b3461088d57602036600319011261088d57610a8a611994565b5060206040515f8152f35b3461088d57602036600319011261088d576004355f5260076020526040805f206001815491015482519182526020820152f35b3461088d57602036600319011261088d576001600160a01b03610ae9611994565b16805f52600660205260405f2090604051808360208295549384815201905f5260205f20925f5b818110610cd0575050610b2592500383611a63565b815191610b3183611c70565b92610b3f6040519485611a63565b808452610b4e601f1991611c70565b015f5b818110610c9a5750505f5b8151811015610bf057600190835f52600560205260405f20610b7e8285611c87565b515f5260205260405f20610bcf600360405192610b9a84611a2d565b8054868060801b038116855260801c602085015265ffffffffffff868201541660408501526002810154606085015201611a86565b6080820152610bde8287611c87565b52610be98186611c87565b5001610b5c565b836040518091602082016020835281518091526040830190602060408260051b8601019301915f905b828210610c2857505050500390f35b91936001919395506020610c8a8192603f198a820301865260a060808a518780831b0381511684528780831b0386820151168685015265ffffffffffff6040820151166040850152606081015160608501520151918160808201520190611b26565b9601920192018594939192610c19565b602090604051610ca981611a2d565b5f81525f838201525f60408201525f60608201526060608082015282828801015201610b51565b8454835260019485019487945060209093019201610b10565b3461088d57608036600319011261088d57610d02611994565b604435906064356001600160401b03811161088d57610d25903690600401611b4a565b90335f52600960205260ff60405f20541615610e3e57610e395f516020611e765f395f51905f529360018060a01b031694855f52600560205260405f206024355f5260205260405f2060018060801b03815416610d8483821015611c2f565b6001600160801b0390610d9a9084831690611be3565b82546001600160801b03191691161790555f8681526004602052604090208054610de2908390610dcc82821015611c2f565b60018401610ddb838254611bd6565b9055611bc9565b9055610df081600854611bc9565b600855600354610e2b9082906001600160a01b03167f0000000000000000000000000000000000000000000000000000000000000000611ce0565b604051938493429285611bfc565b0390a2005b60405162461bcd60e51b81526020600482015260166024820152752737ba1030baba3437b934bd32b21039b630b9b432b960511b6044820152606490fd5b3461088d575f36600319011261088d576001546040516001600160a01b039091168152602090f35b3461088d575f36600319011261088d576020600854604051908152f35b3461088d575f36600319011261088d576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461088d57604036600319011261088d576001600160a01b03610f26611994565b165f52600560205260405f206024355f52602052602060018060801b0360405f205416604051908152f35b3461088d575f36600319011261088d57610f69611c9b565b600180546001600160a01b031981169091555f906001600160a01b03165f516020611e965f395f51905f528280a3005b3461088d57602036600319011261088d576001600160a01b03610fba611994565b165f526004602052602060405f2054604051908152f35b3461088d57604036600319011261088d57610fea611994565b6001600160a01b03165f9081526006602052604090208054602435919082101561088d5760209161101a91611b77565b90549060031b1c604051908152f35b3461088d57604036600319011261088d576001600160a01b0361104a611994565b165f52600560205260405f206024355f52602052602060018060801b0360405f2054161515604051908152f35b3461088d57606036600319011261088d57611090611994565b6024356044356001600160401b03811161088d576110b2903690600401611b4a565b926110bb611cc2565b6002546001600160a01b0316331415806112e1575b61129e576001600160a01b03165f818152600460205260409020805493919291848111156112985750835b84611136575b50505f516020611e765f395f51905f529060209461112760405192839242918885611bfc565b0390a260015f55604051908152f35b8461114a9160018401610ddb838254611bd6565b815561115884600854611bc9565b600855825f5260066020526111728460405f209254611bd6565b80159182156111cf575b5050505f516020611e765f395f51905f52906020946111c68560018060a01b03600354167f0000000000000000000000000000000000000000000000000000000000000000611ce0565b94819250611101565b919594925f9491945b835481101561127757825f52600560205260405f206111f78286611b77565b90549060031b1c5f5260205260405f209060018060801b038254169161121d8784611bb6565b928a6112635788600194049080821161125b575b608085901b859003916112479190831690611be3565b16838060801b0319825416179055016111d8565b905080611231565b634e487b7160e01b5f52601260045260245ffd5b5091509250602094505f516020611e765f395f51905f52919394819261117c565b936110fb565b60405162461bcd60e51b815260206004820152601b60248201527a13db9b1e48149959da5cdd1c9e481bdc88185d5d1a1bdc9a5e9959602a1b6044820152606490fd5b50335f52600960205260ff60405f205416156110d0565b3461088d575f36600319011261088d576003546040516001600160a01b039091168152602090f35b3461088d575f36600319011261088d5761136f604051611341604082611a63565b600d81526c29ba30b5b4b73396999718971960991b6020820152604051918291602083526020830190611b26565b0390f35b3461088d57608036600319011261088d5761138c611994565b6024359060443590606435906001600160a01b038216820361088d576113b0611cc2565b6002546001600160a01b031633036108cc5760018060a01b031691825f52600560205260405f20845f5260205260405f209160018060801b03835416156114bd578161141e9130907f0000000000000000000000000000000000000000000000000000000000000000611d20565b81546001600160801b0390811682821601919082116114a95765ffffffffffff60015f516020611eb65f395f51905f5294606094828060801b0316828060801b0319825416178155865f52600460205260405f2061147d858254611bd6565b905561148b84600854611bd6565b6008550154166040519182525f60208301526040820152a360015f55005b634e487b7160e01b5f52601160045260245ffd5b60405162461bcd60e51b815260206004820152600f60248201526e149bdb19481b9bdd081b1bd8dad959608a1b6044820152606490fd5b3461088d57604036600319011261088d5761150d611994565b60243590611519611cc2565b6002546001600160a01b031633036108cc5760018060a01b03811691825f52600560205260405f20815f5260205260405f2065ffffffffffff600182015416156118085760018060801b0390541690835f52600560205260405f20815f52602052600360405f205f81555f60018201555f60028201550161159a81546119c6565b90816117c5575b5050835f52600660205260405f20935f5b8554808210156117a857836115c78389611b77565b90549060031b1c146115dc57506001016115b2565b5f95929394951981019081116114a95761067d6115fc61160a9289611b77565b90549060031b1c9288611b77565b90558454908115611794576020955f516020611ed65f395f51905f52925f1901906116358282611b77565b8154905f199060031b1b19169055555b825f526004865260405f2061165b868254611bc9565b9055825f526004865260405f20541561177f575b61167b85600854611bc9565b600855835f526007865260405f206127106116b26040519261169c846119fe565b8960018254928387520154940193845288611bb6565b049051808210611777575b50858111611770575b6116f36116d38288611bc9565b96879383611733575b8480611702575b50506040519384934292856119aa565b0390a360015f55604051908152f35b61172c917f0000000000000000000000000000000000000000000000000000000000000000611ce0565b89846116e3565b60035461176b9085906001600160a01b03167f0000000000000000000000000000000000000000000000000000000000000000611ce0565b6116dc565b50846116c6565b9050876116bd565b825f52600486525f600160408220015561166f565b634e487b7160e01b5f52603160045260245ffd5b5050909192602094505f516020611ed65f395f51905f5290611645565b81601f5f93116001146117dc5750555b84806115a1565b818352602083206117f891601f0160051c810190600101611ba0565b80825281602081209155556117d5565b60405162461bcd60e51b815260206004820152600d60248201526c139bc81b1bd8dac8199bdd5b99609a1b6044820152606490fd5b3461088d57604036600319011261088d57611856611994565b6024359081151580920361088d5761186c611c9b565b60018060a01b03165f52600960205260405f209060ff801983541691161790555f80f35b3461088d57604036600319011261088d576001600160a01b036118b1611994565b165f52600560205260405f206024355f5260205260405f20805461136f65ffffffffffff600184015416926118ed600360028301549201611a86565b9060405194859460018060801b038116865260801c60208601526040850152606084015260a0608084015260a0830190611b26565b3461088d57602036600319011261088d576001600160a01b03611943611994565b165f52600460205260405f20805461136f6001830154926003600282015491015490604051948594856119aa565b3461088d575f36600319011261088d576002546001600160a01b03168152602090f35b600435906001600160a01b038216820361088d57565b9094939260609260808301968352602083015260408201520152565b90600182811c921680156119f4575b60208310146119e057565b634e487b7160e01b5f52602260045260245ffd5b91607f16916119d5565b604081019081106001600160401b03821117611a1957604052565b634e487b7160e01b5f52604160045260245ffd5b60a081019081106001600160401b03821117611a1957604052565b608081019081106001600160401b03821117611a1957604052565b601f909101601f19168101906001600160401b03821190821017611a1957604052565b9060405191825f825492611a99846119c6565b8084529360018116908115611b045750600114611ac0575b50611abe92500383611a63565b565b90505f9291925260205f20905f915b818310611ae8575050906020611abe928201015f611ab1565b6020919350806001915483858901015201910190918492611acf565b905060209250611abe94915060ff191682840152151560051b8201015f611ab1565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f8401121561088d578235916001600160401b03831161088d576020838186019501011161088d57565b8054821015611b8c575f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b818110611bab575050565b5f8155600101611ba0565b818102929181159184041417156114a957565b919082039182116114a957565b919082018092116114a957565b6001600160801b0391821690821603919082116114a957565b94939280604093608093885260606020890152816060890152838801375f828288010152601f8019910116850101930152565b15611c3657565b60405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e74207374616b6560701b6044820152606490fd5b6001600160401b038111611a195760051b60200190565b8051821015611b8c5760209160051b010190565b6001546001600160a01b03163303611caf57565b63118cdaa760e01b5f523360045260245ffd5b60025f5414611cd15760025f55565b633ee5aeb560e01b5f5260045ffd5b60405163a9059cbb60e01b60208201526001600160a01b039092166024830152604480830193909352918152611abe91611d1b606483611a63565b611d64565b6040516323b872dd60e01b60208201526001600160a01b039283166024820152929091166044830152606480830193909352918152611abe91611d1b608483611a63565b81516001600160a01b03909116915f91829160200182855af13d15611e0b573d6001600160401b038111611a1957604051611dbf929091611daf601f8201601f191660200184611a63565b82523d5f602084013e5b83611e17565b8051908115159182611de7575b5050611dd55750565b635274afe760e01b5f5260045260245ffd5b819250906020918101031261088d576020015180159081150361088d575f80611dcc565b611dbf90606090611db9565b90611e3b5750805115611e2c57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580611e6c575b611e4c575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15611e4456fe6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa0748be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0e4c76dcad70ec0bf6b921afbe6bb7b4950aedf705245ec68942ea9ecf00f8a0c9cadbc33680e22a2f04ed8eb0d7cc7f218ee9231b3473ed05904c7ec5e2d483da26469706673582212202b02889027c7547c7f85c863dc6a1a547412a5b58bf0673f5d104e22cfaed3a564736f6c634300081c0033" | packages/core/src/abis/GTokenStaking.json:948 |
INITIAL_ROLE_STAKES
const INITIAL_ROLE_STAKES: object;Defined in: packages/core/src/roles.ts:183
Exact stake requirements from Registry.sol constructor (lines 92-100)
Index Signature
[key: string]:
| {
additionalRequirement?: undefined;
entryBurn: "3 GT";
exitFeePercent: "10%";
line: 92;
lockDuration: "30 days";
minExitFee: "1 GT";
minStake: "30 GT";
}
| {
additionalRequirement: "aPNTs collateral in SuperPaymaster";
entryBurn: "5 GT";
exitFeePercent: "10%";
line: 93;
lockDuration: "30 days";
minExitFee: "2 GT";
minStake: "50 GT";
}
| {
additionalRequirement?: undefined;
entryBurn: "3 GT";
exitFeePercent: "10%";
line: 94;
lockDuration: "30 days";
minExitFee: "1 GT";
minStake: "30 GT";
}
| {
additionalRequirement?: undefined;
entryBurn: "2 GT";
exitFeePercent: "10%";
line: 95;
lockDuration: "30 days";
minExitFee: "1 GT";
minStake: "20 GT";
}
| {
additionalRequirement?: undefined;
entryBurn: "10 GT";
exitFeePercent: "10%";
line: 98;
lockDuration: "30 days";
minExitFee: "5 GT";
minStake: "100 GT";
}
| {
additionalRequirement?: undefined;
entryBurn: "3 GT";
exitFeePercent: "5%";
line: 99;
lockDuration: "30 days";
minExitFee: "1 GT";
minStake: "30 GT";
}
| {
additionalRequirement: "Must hold MySBT from community";
entryBurn: "0.05 GT";
exitFeePercent: "10%";
line: 100;
lockDuration: "7 days";
minExitFee: "0.05 GT";
minStake: "0.3 GT";
}Remarks
Warning: These are initial values, always query contract for current configuration
LINKS
const LINKS: object;Defined in: packages/core/src/branding.ts:24
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
airAccount | "https://airAccount.aastar.io" | "https://airAccount.aastar.io" | packages/core/src/branding.ts:26 |
demo | "https://aastar.io/demo" | "https://aastar.io/demo" | packages/core/src/branding.ts:28 |
discord | "https://discord.gg/aastar" | "https://discord.gg/aastar" | packages/core/src/branding.ts:30 |
github | "https://github.com/AAStarCommunity" | "https://github.com/AAStarCommunity" | packages/core/src/branding.ts:29 |
main | "https://aastar.io" | "https://aastar.io" | packages/core/src/branding.ts:25 |
superPaymaster | "https://superpaymaster.aastar.io" | "https://superpaymaster.aastar.io" | packages/core/src/branding.ts:27 |
twitter | "https://twitter.com/AAStarCommunity" | "https://twitter.com/AAStarCommunity" | packages/core/src/branding.ts:31 |
MAX_SERVICE_FEE
const MAX_SERVICE_FEE: 1000 = 1000;Defined in: packages/core/src/constants.ts:82
Maximum service fee in basis points (1000 = 10%)
MONITORING_ADDRESSES
const MONITORING_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:85
Monitoring System Addresses
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
blsAggregator | `0x${string}` | BLS_AGGREGATOR_ADDRESS | packages/core/src/contract-addresses.ts:87 |
dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | packages/core/src/contract-addresses.ts:86 |
MySBTABI
const MySBTABI: any;Defined in: packages/core/src/abis/index.ts:58
MySBTArtifact
const MySBTArtifact: object = MySBTABIData;Defined in: packages/core/src/abis/index.ts:77
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/MySBT.json:2 |
bytecode | string | "0x60c06040523461020a576132a36080813803918261001c81610428565b93849283398101031261020a576100328161044d565b9061003f6020820161044d565b61005760606100506040850161044d565b930161044d565b926100626040610428565b601981527f4d7963656c69756d20536f756c20426f756e6420546f6b656e0000000000000060208201526100966040610428565b6005815264135e54d09560da1b6020820152815190916001600160401b03821161032f575f5490600182811c9216801561041e575b60208310146103115781601f8493116103b1575b50602090601f831160011461034e575f92610343575b50508160011b915f199060031b1c1916175f555b8051906001600160401b03821161032f5760015490600182811c92168015610325575b60208310146103115781601f8493116102a3575b50602090601f831160011461023d575f92610232575b50508160011b915f199060031b1c1916176001555b600160068190556007805460ff19169055601255670429d069189e000060135567016345785d8a00006014556001600160a01b038116151580610220575b8061020e575b1561020a5760805260a052600e80546001600160a01b039283166001600160a01b031991821617909155600f8054939092169216919091179055604051612e419081610462823960805181610d70015260a05181610cf40152f35b5f80fd5b506001600160a01b03841615156101af565b506001600160a01b03821615156101a9565b015190505f80610156565b60015f9081528281209350601f198516905b81811061028b5750908460019594939210610273575b505050811b0160015561016b565b01515f1960f88460031b161c191690555f8080610265565b9293602060018192878601518155019501930161024f565b60015f529091507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f840160051c81019160208510610307575b90601f859493920160051c01905b8181106102f95750610140565b5f81558493506001016102ec565b90915081906102de565b634e487b7160e01b5f52602260045260245ffd5b91607f169161012c565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100f5565b5f8080528281209350601f198516905b8181106103995750908460019594939210610381575b505050811b015f55610109565b01515f1960f88460031b161c191690555f8080610374565b9293602060018192878601518155019501930161035e565b5f80529091507f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563601f840160051c81019160208510610414575b90601f859493920160051c01905b81811061040657506100df565b5f81558493506001016103f9565b90915081906103eb565b91607f16916100cb565b6040519190601f01601f191682016001600160401b0381118382101761032f57604052565b51906001600160a01b038216820361020a5756fe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714611a535750806306433b1b14611a2b57806306fdde0314611989578063081812fc1461194d5780630880427514611930578063095ea7b3146118465780630f68ae40146117dc57806313966db5146117bf57806323b872dd146117a85780632d5a7f4f14610d235780632f7c88f514611650578063374e7fa3146114515780633e3e6842146114125780633f4ba83a1461137357806342842e0e1461134a5780634f8cc065146112ca57806354fd4d501461127d578063556697da146111a757806355f804b31461103f5780635afc4b5c146110095780635bb5bf0c14610fd35780635c975abb14610fb15780636352211e14610f8157806370a0823114610f3057806371eb90a114610e6d57806375794a3c14610e50578063776fafac14610df45780637e21579114610d9f5780637f6b337b14610d5b57806380f4b8c814610d23578063826600ce14610cdf5780638456cb5914610c4d5780638ceebd8f14610ac6578063908c101814610a8257806395d89b41146109b8578063a1141b0714610974578063a22cb465146108d0578063a610965014610851578063a91ee0dc146107c6578063b88d4fde14610767578063bead05131461072e578063bf1fb0f214610689578063c0d0aa6914610661578063c580163e1461060b578063c87b56dd14610363578063ccbc10d01461033b578063d977b66b146102fa578063e985e9c5146102a35763eddd0d9c14610237575f80fd5b3461029f57602036600319011261029f577fd3950a5507479ea19c5c7766f5191546ace60f0a00dc360d52ce083b58f2233160043561028160018060a01b03600f54163314611cf8565b601454908060145561029a604051928392429184611d2f565b0390a1005b5f80fd5b3461029f57604036600319011261029f576102bc611ae2565b6102c4611af8565b9060018060a01b03165f52600560205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b3461029f57604036600319011261029f57610339610316611ae2565b61031e611af8565b9061033460018060a01b03600e54163314611f10565b612cb2565b005b3461029f575f36600319011261029f576010546040516001600160a01b039091168152602090f35b3461029f57602036600319011261029f5760043561038081612a5a565b5060405160115490915f8361039484611cc0565b9182825260208201946001811690815f146105ef57506001146105a3575b6103be92500384611c4c565b82511561058757915f90838072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b811015610561575b50600a906904ee2d6d415b85acef8160201b811015610545575b662386f26fc10000811015610531575b6305f5e100811015610520575b612710811015610511575b6064811015610503575b10156104f9575b6001820193600a602161046761045188611c6f565b9761045f604051998a611c4c565b808952611c6f565b602088019590601f19013687378701015b5f1901916f181899199a1a9b1b9c1cb0b131b232b360811b8282061a8353049081156104a657600a90610478565b505060206104e1926104f5956040519586945180918587015e840190838201905f8252519283915e01015f815203601f198101835282611c4c565b604051918291602083526020830190611abe565b0390f35b906001019061043c565b606460029104930192610435565b6127106004910493019261042b565b6305f5e10060089104930192610420565b662386f26fc1000060109104930192610413565b602093909301926904ee2d6d415b85acef8160201b9004610403565b6040935072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b90049050600a6103e9565b5050506104f560405161059b602082611c4c565b5f81526104e1565b5060115f90815290915f516020612d8c5f395f51905f525b8183106105d35750509060206103be928201016103b2565b6020919350806001915483858a010152019101909185926105bb565b60ff19168652506103be92151560051b820160200190506103b2565b3461029f5761064a61061c36611b89565b92909150610628612a8e565b610630612bb8565b61064560018060a01b03600e54163314611f10565b6128b5565b600160065560408051928352901515602083015290f35b3461029f575f36600319011261029f57600f546040516001600160a01b039091168152602090f35b3461029f57602036600319011261029f575f60606040516106a981611c31565b82815282602082015282604082015201526004355f526009602052608060405f206040516106d681611c31565b81546001600160a01b0390811680835260018401548216602080850191825260028601546040808701918252600390970154606096870190815287519485529251909416908301529151938101939093525190820152f35b3461029f57602036600319011261029f5761076061074a611ae2565b610752612a8e565b61075a612bb8565b33612cb2565b6001600655005b3461029f57608036600319011261029f57610780611ae2565b610788611af8565b606435916001600160401b03831161029f573660238401121561029f576107bc610339933690602481600401359101611c8a565b9160443591612775565b3461029f57602036600319011261029f576107df611ae2565b6107f460018060a01b03600f54163314611cf8565b6001600160a01b0316801561029f57600e80546001600160a01b0319811683179091556040514281526001600160a01b03909116907f724c89272c35417e239c6cd89ada342e0717632938f38b47eaacecacf291ace290602090a3005b3461029f57602036600319011261029f5761086a611ae2565b61087f60018060a01b03600f54163314611cf8565b601080546001600160a01b039283166001600160a01b031982168117909255604051428152919216907fb71a92720c720f655d24a8ebbeeb4c9875d85189ca58d32cb0e6997aa5e6c29190602090a3005b3461029f57604036600319011261029f576108e9611ae2565b602435908115159081830361029f576001600160a01b03169182156109615761093390335f52600560205260405f20845f5260205260405f209060ff801983541691151516179055565b6040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b82630b61174360e31b5f5260045260245ffd5b3461029f57604036600319011261029f5761098d611af8565b6004355f52600b60205260405f209060018060a01b03165f52602052602060405f2054604051908152f35b3461029f575f36600319011261029f576040515f6001546109d881611cc0565b8084529060018116908115610a5e5750600114610a00575b6104f5836104e181850382611c4c565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b808210610a44575090915081016020016104e16109f0565b919260018160209254838588010152019101909291610a2c565b60ff191660208086019190915291151560051b840190910191506104e190506109f0565b3461029f57604036600319011261029f57610a9b611af8565b6004355f52600d60205260405f209060018060a01b03165f52602052602060405f2054604051908152f35b3461029f57602036600319011261029f576004355f52600a60205260405f208054610af081612520565b91610afe6040519384611c4c565b81835260208301905f5260205f205f915b838310610c2f575f85815b8151811015610b53576060610b2f8284612761565b510151610b3f575b600101610b1a565b91610b4b60019161215f565b929050610b37565b50610b76610b6083612520565b92610b6e6040519485611c4c565b808452612520565b602083019190601f19013683375f5f5b8251811015610be0576060610b9b8285612761565b510151610bab575b600101610b86565b90600190610bd8906001600160a01b03610bc58587612761565b515116610bd28289612761565b5261215f565b919050610ba3565b50505090604051918291602083019060208452518091526040830191905f5b818110610c0d575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610bff565b60056020600192610c3f85612537565b815201920192019190610b0f565b3461029f575f36600319011261029f57610c7260018060a01b03600f54163314611cf8565b610c7a612a8e565b600160ff1960075416176007557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a16040514281527f80170b5fcdd2bf1e0660ef4b8851f86685f64d41b1a19de1471947ece8725aac60203392a2005b3461029f575f36600319011261029f576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461029f57602036600319011261029f576001600160a01b03610d44611ae2565b165f526008602052602060405f2054604051908152f35b3461029f575f36600319011261029f576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461029f57606036600319011261029f57610db8611af8565b6004355f52600c60205260405f209060018060a01b03165f5260205260405f206044355f52602052602060ff60405f2054166040519015158152f35b3461029f57602036600319011261029f576004355f526009602052608060405f2060018060a01b038154169060018060a01b03600182015416906003600282015491015491604051938452602084015260408301526060820152f35b3461029f575f36600319011261029f576020601254604051908152f35b3461029f57604036600319011261029f57600435610e89611af8565b9060606080604051610e9a81611c16565b5f81525f60208201525f60408201525f838201520152805f52600b60205260405f2060018060a01b0383165f5260205260405f205490805f52600a60205260405f205482101561029f57610f0291610efc915f52600a60205260405f20611ee3565b50612537565b805190916001600160a01b0391821691160361029f576104f590604051918291602083526020830190611bcf565b3461029f57602036600319011261029f576001600160a01b03610f51611ae2565b168015610f6e575f526003602052602060405f2054604051908152f35b6322718ad960e21b5f525f60045260245ffd5b3461029f57602036600319011261029f576020610f9f600435612a5a565b6040516001600160a01b039091168152f35b3461029f575f36600319011261029f57602060ff600754166040519015158152f35b3461029f57604036600319011261029f576020610fff610ff1611ae2565b610ff9611af8565b906126c3565b6040519015158152f35b3461029f57602036600319011261029f57610339611025611ae2565b61103a60018060a01b03600e54163314611f10565b61261f565b3461029f57602036600319011261029f576004356001600160401b03811161029f5761106f903690600401611b5c565b61108460018060a01b03600f54163314611cf8565b6001600160401b0381116111935761109d601154611cc0565b601f8111611143575b505f601f82116001146110e45781906110d4935f926110d9575b50508160011b915f199060031b1c19161790565b601155005b0135905083806110c0565b601f1982169260115f5260205f20915f5b85811061112b57508360019510611112575b505050811b01601155005b01355f19600384901b60f8161c19169055828080611107565b909260206001819286860135815501940191016110f5565b60115f525f516020612d8c5f395f51905f52601f830160051c81019160208410611189575b601f0160051c01905b81811061117e57506110a6565b5f8155600101611171565b9091508190611168565b634e487b7160e01b5f52604160045260245ffd5b3461029f57602036600319011261029f576004355f52600a60205260405f208054906111d282612520565b916111e06040519384611c4c565b8083526020830180925f5260205f205f915b83831061125f57848660405191829160208301906020845251809152604083019060408160051b85010192915f905b82821061123057505050500390f35b9193600191939550602061124f8192603f198a82030186528851611bcf565b9601920192018594939192611221565b6005602060019261126f85612537565b8152019201920191906111f2565b3461029f575f36600319011261029f576104f560405161129e604082611c4c565b600b81526a26bca9a12a16999718971960a91b6020820152604051918291602083526020830190611abe565b3461029f57602036600319011261029f576112e3611ae2565b600f54906001600160a01b038216906112fd338314611cf8565b6001600160a01b031691821561029f576001600160a01b0319168217600f556040514281527f90de8705b1aaf3966be0e8ec8acf9aed10a6d3d0d572ec8f96112409e2820c6190602090a3005b3461029f5761033961135b36611b22565b906040519261136b602085611c4c565b5f8452612775565b3461029f575f36600319011261029f5761139860018060a01b03600f54163314611cf8565b60075460ff8116156114035760ff19166007557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16040514281527f107553d8191d85b405879cf752997865edd48d94e20bda4dd27223c94b31a7cc60203392a2005b638dfc202b60e01b5f5260045ffd5b3461029f5761064a61142336611b89565b9290915061142f612a8e565b611437612bb8565b61144c60018060a01b03600e54163314611f10565b612189565b3461029f57602036600319011261029f5761146a611ae2565b611472612a8e565b61147a612bb8565b61148f60018060a01b03600e54163314611f10565b6001600160a01b03165f818152600860205260409020549081151580611636575b1561029f57815f52600a60205260405f205f5b8154811015611533578060ff60036114dd60019486611ee3565b500154166114ec575b016114c3565b60036114f88285611ee3565b5001805460ff1916905561150c8184611ee3565b50828060a01b03905416855f516020612dac5f395f51905f526020604051428152a36114e6565b5050805f5260086020525f6040812055815f52600260205260018060a01b0360405f20541615801561162e575b1561029f575f828152600260205260409020546001600160a01b0316801590811561160d575b5f84815260026020526040812080546001600160a01b03191690558490825f516020612dcc5f395f51905f528280a4506115fa577f108d98610c6944880c68d31a01ab6252b635e7c7a9728687f31e68a76538c86560606013546040519081525f6020820152426040820152a36001600655005b50637e27328960e01b5f5260045260245ffd5b61161684612d6e565b805f52600360205260405f205f198154019055611586565b506001611560565b50806001600160a01b0361164984612a5a565b16146114b0565b3461029f57602036600319011261029f57611669611ae2565b611671612a8e565b61167a33612ac1565b1561029f576001600160a01b03165f90815260086020526040902054801561029f575f818152600b60209081526040808320338452825280832054848452600a909252909120548110908161177f575b501561029f575f818152600d602090815260408083203384529091529020548015908115611754575b501561029f57805f52600d60205260405f2060018060a01b0333165f5260205260405f204290556040519062093a80420482524260208301527f0bd2c5444bc0126737809a3970e1c3bc8cf29e5efb7d5448cbaa6a9c1af8120760403393a3005b905061012c810180911161176b57421015826116f3565b634e487b7160e01b5f52601160045260245ffd5b6117959150825f52600a60205260405f20611ee3565b50546001600160a01b03163314826116ca565b3461029f576103396117b936611b22565b91611d45565b3461029f575f36600319011261029f576020601454604051908152f35b3461029f57602036600319011261029f5760043561180560018060a01b03600f54163314611cf8565b801561029f577f5d1f56e31e5dc1f29354822b887b1463ececf7edfad7c39216980b7dfd7ea97d90601354908060135561029a604051928392429184611d2f565b3461029f57604036600319011261029f5761185f611ae2565b60243561186b81612a5a565b3315158061191d575b806118f0575b6118dd5781906001600160a01b0384811691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f90815260046020526040902080546001600160a01b0319166001600160a01b03909216919091179055005b63a9fbf51f60e01b5f523360045260245ffd5b506001600160a01b0381165f90815260056020908152604080832033845290915290205460ff161561187a565b506001600160a01b038116331415611874565b3461029f575f36600319011261029f576020601354604051908152f35b3461029f57602036600319011261029f5760043561196a81612a5a565b505f526004602052602060018060a01b0360405f205416604051908152f35b3461029f575f36600319011261029f576040515f5f546119a881611cc0565b8084529060018116908115610a5e57506001146119cf576104f5836104e181850382611c4c565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210611a11575090915081016020016104e16109f0565b9192600181602092548385880101520191019092916119f9565b3461029f575f36600319011261029f57600e546040516001600160a01b039091168152602090f35b3461029f57602036600319011261029f576004359063ffffffff60e01b821680920361029f576020916380ac58cd60e01b8114908115611aad575b8115611a9c575b5015158152f35b6301ffc9a760e01b14905083611a95565b635b5e139f60e01b81149150611a8e565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361029f57565b602435906001600160a01b038216820361029f57565b35906001600160a01b038216820361029f57565b606090600319011261029f576004356001600160a01b038116810361029f57906024356001600160a01b038116810361029f579060443590565b9181601f8401121561029f578235916001600160401b03831161029f576020838186019501011161029f57565b606060031982011261029f576004356001600160a01b038116810361029f579160243591604435906001600160401b03821161029f57611bcb91600401611b5c565b9091565b9060a06080611c1393600180841b03815116845260208101516020850152604081015160408501526060810151151560608501520151918160808201520190611abe565b90565b60a081019081106001600160401b0382111761119357604052565b608081019081106001600160401b0382111761119357604052565b601f909101601f19168101906001600160401b0382119082101761119357604052565b6001600160401b03811161119357601f01601f191660200190565b929192611c9682611c6f565b91611ca46040519384611c4c565b82948184528183011161029f578281602093845f960137010152565b90600182811c92168015611cee575b6020831014611cda57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611ccf565b15611cff57565b60405162461bcd60e51b81526020600482015260086024820152674f6e6c792044414f60c01b6044820152606490fd5b6040919493926060820195825260208201520152565b6001600160a01b0390911691908215611ed0575f828152600260205260409020546001600160a01b0316158015611ec9575b1561029f575f828152600260205260409020546001600160a01b031692829033151580611e34575b5084611e13575b805f52600360205260405f2060018154019055815f52600260205260405f208160018060a01b0319825416179055845f516020612dcc5f395f51905f525f80a46001600160a01b0316808303611dfb57505050565b6364283d7b60e01b5f5260045260245260445260645ffd5b611e1c82612d6e565b845f52600360205260405f205f198154019055611da6565b90915080611e78575b15611e4a5782905f611d9f565b8284611e6257637e27328960e01b5f5260045260245ffd5b63177e802f60e01b5f523360045260245260445ffd5b503384148015611ea7575b80611e3d57505f838152600460205260409020546001600160a01b03163314611e3d565b505f84815260056020908152604080832033845290915290205460ff16611e83565b505f611d77565b633250574960e11b5f525f60045260245ffd5b8054821015611efc575f52600560205f20910201905f90565b634e487b7160e01b5f52603260045260245ffd5b15611f1757565b60405162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920526567697374727960981b6044820152606490fd5b15611f5357565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b6044820152606490fd5b919060408382031261029f57611f9c83611b0e565b926020810135906001600160401b03821161029f57019080601f8301121561029f57816020611c1393359101611c8a565b8054919291600160401b81101561119357611fed91600182018155611ee3565b61214c57825181546001600160a01b039091166001600160a01b03199091161781556020830151600182015560408301516002820155606083015160038201805460ff191691151560ff1691909117905560809060040192015191825160018060401b038111611193576120618254611cc0565b601f8111612107575b506020601f82116001146120a957819061209a9394955f9261209e5750508160011b915f199060031b1c19161790565b9055565b015190505f806110c0565b601f19821690835f52805f20915f5b8181106120ef575095836001959697106120d7575b505050811b019055565b01515f1960f88460031b161c191690555f80806120cd565b9192602060018192868b0151815501940192016120b8565b825f5260205f20601f830160051c81019160208410612142575b601f0160051c01905b818110612137575061206a565b5f815560010161212a565b9091508190612121565b634e487b7160e01b5f525f60045260245ffd5b5f19811461176b5760010190565b929190612184602091604086526040860190611abe565b930152565b919290916001600160a01b0381166121a2811515611f4c565b805f52600860205260405f205480155f146123325750601254906121c58261215f565b60125581956001958181019460208287031261029f577ff5491bdb765a4be5a1bdc9bfd09cf61e1b89962ac33ed2e928f11a59a5e72331926123169186916122f3906001600160a01b0361221887611b0e565b16998c60038c6040519261222b84611c31565b8c84526020808501928352426040808701918252606087018481525f8d815260098552828120985189546001600160a01b03199081166001600160a01b03928316178b559751968a01805490981696169590951790955590516002870155925193909401929092558b825260088352908190208790555190979088906122b18282611c4c565b5f8152931161231f575b5050835f52600a865260405f20604051916122d583611c16565b8b835242888401524260408401528d60608401526080830152611fcd565b5f828152600b855260408082206001600160a01b038b1683528652812055612bd8565b604051428152a4565b6123299250611f87565b90505f806122bb565b94939150505f928082019160208184031261029f576001600160a01b0361235882611b0e565b1692865f52600b60205260405f2060018060a01b0385165f5260205260405f2054875f52600a60205260405f20548110806124f8575b6124765750602091826040516123a48282611c4c565b5f81529411612461575b5050855f52600a81526123eb60405f20604051906123cb82611c16565b858252428483015242604083015260016060830152846080830152611fcd565b855f52600a815260405f2054905f19820191821161176b578692600961245c925f516020612dec5f395f51905f5294865f52600b825260405f2060018060a01b0389165f52825260405f2055855f5252600360405f200161244c815461215f565b905560405191829142908361216d565b0390a3565b61246c929350611f87565b9050905f806123ae565b9394969550505050825f52600a60205260ff60036124978360405f20611ee3565b50015416156124a8575b5050905f90565b6124bf600391845f52600a60205260405f20611ee3565b5001600160ff19825416179055815f516020612dec5f395f51905f526060604051604081525f6040820152426020820152a35f806124a1565b50875f52600a6020528461250f8260405f20611ee3565b50546001600160a01b03161461238e565b6001600160401b0381116111935760051b60200190565b9060405161254481611c16565b6004819360018060a01b038154168352600181015460208401526002810154604084015260ff60038201541615156060840152019060405180925f9080549061258c82611cc0565b80855291600181169081156125f857506001146125b9575b5050608092916125b5910384611c4c565b0152565b5f908152602081209092505b8183106125dc5750508101602001816125b56125a4565b60209193508060019154838589010152019101909184926125c5565b60ff191660208681019190915292151560051b850190920192508391506125b590506125a4565b6001600160a01b03165f9081526008602052604090205480156126c057805f52600a60205260405f20905f5b82548110156126bb578060ff600361266560019487611ee3565b50015416612674575b0161264b565b60036126808286611ee3565b5001805460ff191690556126948185611ee3565b50828060a01b03905416835f516020612dac5f395f51905f526020604051428152a361266e565b505050565b50565b6001600160a01b03165f90815260086020526040902054801561275b57805f52600b60205260405f2060018060a01b0383165f5260205260405f205490805f52600a60205260405f20548210156127545761272c91610efc915f52600a60205260405f20611ee3565b80516001600160a01b039283169216919091149081612749575090565b606091500151151590565b5050505f90565b50505f90565b8051821015611efc5760209160051b010190565b9291612782818386611d45565b813b61278f575b50505050565b604051630a85bd0160e11b81523360048201526001600160a01b03948516602482015260448101919091526080606482015292169190602090829081906127da906084830190611abe565b03815f865af15f9181612870575b5061283d57503d15612836573d6127fe81611c6f565b9061280c6040519283611c4c565b81523d5f602083013e5b805190816128315782633250574960e11b5f5260045260245ffd5b602001fd5b6060612816565b6001600160e01b03191663757a42ff60e11b0161285e57505f808080612789565b633250574960e11b5f5260045260245ffd5b9091506020813d6020116128ad575b8161288c60209383611c4c565b8101031261029f57516001600160e01b03198116810361029f57905f6127e8565b3d915061287f565b919290916001600160a01b0381166128ce811515611f4c565b805f52600860205260405f205480155f146128f15750601254906121c58261215f565b94939150505f928082019160208184031261029f576001600160a01b0361291782611b0e565b16926020918260405161292a8282611c4c565b5f81529411612a45575b50505f868152600b825260408082206001600160a01b0386168352835280822054888352600a8452912054811080612a1e575b6129875750855f52600a81526123eb60405f20604051906123cb82611c16565b9091868096505f9794959752600a835260ff60036129a88460405f20611ee3565b50015416612a14576129f7612a0c92600a5f516020612dec5f395f51905f5295875f5281815260036129dd8460405f20611ee3565b5001600160ff19825416179055875f525260405f20611ee3565b5060014291015560405191829142908361216d565b0390a3905f90565b5050505050905f90565b50865f52600a825283612a348260405f20611ee3565b50546001600160a01b031614612967565b612a50929350611f87565b9050905f80612934565b5f818152600260205260409020546001600160a01b0316908115612a7c575090565b637e27328960e01b5f5260045260245ffd5b60ff60075416612a9a57565b63d93c066560e01b5f5260045ffd5b9081602091031261029f5751801515810361029f5790565b600e546001600160a01b031690811561275b57604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201526001600160a01b039091166024820181905290602081604481865afa5f9181612b97575b50612b915750602090602460405180948193636b10437f60e01b835260048301525afa5f9181612b60575b50611c1357505f90565b612b8391925060203d602011612b8a575b612b7b8183611c4c565b810190612aa9565b905f612b56565b503d612b71565b91505090565b612bb191925060203d602011612b8a57612b7b8183611c4c565b905f612b2b565b600260065414612bc9576002600655565b633ee5aeb560e01b5f5260045ffd5b6001600160a01b0316908115611ed0575f818152600260205260409020546001600160a01b0316158015612cab575b1561029f575f818152600260205260409020546001600160a01b03168015159290919083612c8a575b805f52600360205260405f2060018154019055815f52600260205260405f208160018060a01b0319825416179055825f516020612dcc5f395f51905f525f80a450612c7757565b6339e3563760e11b5f525f60045260245ffd5b612c9382612d6e565b825f52600360205260405f205f198154019055612c30565b505f612c07565b6001600160a01b03165f908152600860205260409020548015612d6a57805f52600b60205260405f2060018060a01b0383165f5260205260405f2054815f52600a60205260405f20548110156126bb57612d1790825f52600a60205260405f20611ee3565b5080546001600160a01b039384169316831480612d5c575b612d3857505050565b60030160ff1981541690555f516020612dac5f395f51905f526020604051428152a3565b5060ff600382015416612d2f565b5050565b5f90815260046020526040902080546001600160a01b031916905556fe31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68ee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba5ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db10a2646970667358221220ccf1375812c47a23400616448c6168badb04bc099d22b7fbdefbdbe2731df4f464736f6c634300081c0033" | packages/core/src/abis/MySBT.json:1517 |
NETWORKS
const NETWORKS: object;Defined in: packages/core/src/networks.ts:5
Blockchain Network Configuration
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
anvil | object | - | packages/core/src/networks.ts:17 |
anvil.blockExplorer | "" | '' | packages/core/src/networks.ts:21 |
anvil.chainId | 31337 | 31337 | packages/core/src/networks.ts:18 |
anvil.name | "Anvil" | 'Anvil' | packages/core/src/networks.ts:19 |
anvil.nativeCurrency | object | - | packages/core/src/networks.ts:22 |
anvil.nativeCurrency.decimals | 18 | 18 | packages/core/src/networks.ts:25 |
anvil.nativeCurrency.name | "ETH" | 'ETH' | packages/core/src/networks.ts:23 |
anvil.nativeCurrency.symbol | "ETH" | 'ETH' | packages/core/src/networks.ts:24 |
anvil.rpcUrl | "http://127.0.0.1:8545" | 'http://127.0.0.1:8545' | packages/core/src/networks.ts:20 |
sepolia | object | - | packages/core/src/networks.ts:6 |
sepolia.blockExplorer | "https://sepolia.etherscan.io" | 'https://sepolia.etherscan.io' | packages/core/src/networks.ts:10 |
sepolia.chainId | 11155111 | 11155111 | packages/core/src/networks.ts:7 |
sepolia.name | "Sepolia" | 'Sepolia' | packages/core/src/networks.ts:8 |
sepolia.nativeCurrency | object | - | packages/core/src/networks.ts:11 |
sepolia.nativeCurrency.decimals | 18 | 18 | packages/core/src/networks.ts:14 |
sepolia.nativeCurrency.name | "Sepolia ETH" | 'Sepolia ETH' | packages/core/src/networks.ts:12 |
sepolia.nativeCurrency.symbol | "ETH" | 'ETH' | packages/core/src/networks.ts:13 |
sepolia.rpcUrl | "https://rpc.sepolia.org" | 'https://rpc.sepolia.org' | packages/core/src/networks.ts:9 |
NODE_STAKE_AMOUNTS
const NODE_STAKE_AMOUNTS: object;Defined in: packages/core/src/constants.ts:107
Minimum stake amounts for different node types (in sGT)
Type Declaration
| Name | Type | Default value | Description | Defined in |
|---|---|---|---|---|
ENTERPRISE | 1000 | 1000 | Enterprise Node: 1000 sGT minimum stake | packages/core/src/constants.ts:115 |
LITE | 30 | 30 | Lite Node: 30 sGT minimum stake | packages/core/src/constants.ts:109 |
STANDARD | 100 | 100 | Standard Node: 100 sGT minimum stake | packages/core/src/constants.ts:111 |
SUPER | 300 | 300 | Super Node: 300 sGT minimum stake | packages/core/src/constants.ts:113 |
OFFICIAL_ADDRESSES
const OFFICIAL_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:93
Official Contract Addresses
Type Declaration
| Name | Type | Defined in |
|---|---|---|
entryPoint | `0x${string}` | packages/core/src/contract-addresses.ts:94 |
PAYMASTER_ADDRESSES
const PAYMASTER_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:77
Paymaster Addresses
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
paymasterV4_1 | `0x${string}` | - | packages/core/src/contract-addresses.ts:78 |
paymasterV4_1iImplementation | `0x${string}` | PAYMASTER_V4_IMPL_ADDRESS | packages/core/src/contract-addresses.ts:79 |
PAYMASTER_FACTORY_ADDRESS
const PAYMASTER_FACTORY_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:54
PAYMASTER_V4_IMPL_ADDRESS
const PAYMASTER_V4_IMPL_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:55
PaymasterABI
const PaymasterABI: any;Defined in: packages/core/src/abis/index.ts:52
PaymasterArtifact
const PaymasterArtifact: object = PaymasterABIData;Defined in: packages/core/src/abis/index.ts:71
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs?: undefined; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: ( | { components: object[]; internalType: string; name: string; type: string; } | { components?: undefined; internalType: string; name: string; type: string; })[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/Paymaster.json:2 |
bytecode | string | "0x60a03461019057601f61222338819003918201601f19168301916001600160401b038311848410176101945780849260209460405283398101031261019057516001600160a01b0381169081900361019057331561017d575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055801561016e576080525f5160206122035f395f51905f525460ff8160401c1661015f576002600160401b03196001600160401b0382160161010c575b60405161205a90816101a98239608051818181610c1601528181610dce0152818161165f0152611ad90152f35b6001600160401b0319166001600160401b039081175f5160206122035f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f806100df565b63f92ee8a960e01b5f5260045ffd5b632462edf160e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f5f3560e01c80630396cb60146118b2578063083e91c41461182c5780630879c4121461180e57806314d90e1b146117f1578063204120bc146117b8578063205c28781461174157806332726684146117215780633400ba521461170557806336f897e71461164457806339788cd91461162357806342f6fb29146115fa578063431f63c9146115295780634915a858146115065780634a58db19146114b157806352b7512c1461119e57806354fd4d50146111445780635c975abb146111215780635dbfc94d14610f8257806361d027b314610f5957806361d1bc9414610f3b578063673a7e2814610e695780636f374b0f14610e44578063715018a614610dfd5780637b10399914610db85780637c627b2114610d175780638da5cb5b14610cf05780638ee573ac14610cb35780639b1d309114610c47578063a032f4b814610c00578063aa51e01514610be4578063b0d691fe14610bbb578063b1f145c5146109a1578063b3db428b146108b1578063bb9fe6bf1461085b578063bd1118701461083d578063c23a5cea146107ae578063c23f001f1461075b578063c9929dad14610706578063e68b52e7146106e2578063e77fc7a414610406578063f0f4426014610383578063f2fde38b14610332578063f3fef3a31461023d5763f60fdcb314610209575061000e565b3461023a578060031936011261023a57600554604080516001600160d01b038316815260d09290921c602083015290f35b80fd5b503461023a57604036600319011261023a57610257611932565b60243590610263611d81565b338352600a6020526040832060018060a01b0382165f526020528160405f20541061032357338352600a6020526040832060018060a01b0382165f5260205260405f206102b1838254611a33565b905560018060a01b0316906102f060405163a9059cbb60e01b6020820152336024820152826044820152604481526102ea6064826119c5565b83611e9c565b6040519081527fa92ff919b850e4909ab2261d907ef955f11bc1716733a6cbece38d163a69af8a60203392a36001805580f35b630a18ee5560e41b8352600483fd5b503461023a57602036600319011261023a5761034c611932565b610354611d5b565b6001600160a01b0381161561036f5761036c90611dc5565b80f35b631e4fbdf760e01b82526004829052602482fd5b503461023a57602036600319011261023a5761039d611932565b6103a5611d5b565b6001600160a01b031680156103f757600654816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a8580a36001600160a01b0319161760065580f35b632462edf160e01b8252600482fd5b503461023a5760e036600319011261023a57610420611932565b610428611948565b6044356001600160a01b038116908190036106de576064356001600160a01b03811691908290036106da5760843560c435915f5160206120055f395f51905f52549560ff8760401c16159660018060401b038116801590816106d2575b60011490816106c8575b1590816106bf575b506106b0576001600160401b031981166001175f5160206120055f395f51905f525587610688575b506001600160a01b0316938415610679576001600160a01b03861694851561066a57821561066a57811561066a576103e8841161065b57600280546001600160a01b0319908116929092179055600380549182168317905560405163313ce56760e01b8152909190602081600481855afa8a918161062a575b506106085750506003805460ff60a01b1916600160a31b179055505b600680546001600160a01b03191691909117905560075560a43560085580156105ff575b60045560ff196009541660095561058e82611dc5565b33036105f0575b5061059d5780f35b60ff60401b195f5160206120055f395f51905f5254165f5160206120055f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6105f990611dc5565b5f610595565b50610e10610578565b6001600160a81b03199092161760a09190911b60ff60a01b1617600355610554565b61064d91925060203d602011610654575b61064581836119c5565b8101906119e8565b905f610538565b503d61063b565b632cbc962760e01b8952600489fd5b632462edf160e01b8952600489fd5b632462edf160e01b8852600488fd5b6001600160481b0319166001600160401b01175f5160206120055f395f51905f52555f6104bf565b63f92ee8a960e01b8952600489fd5b9050155f610497565b303b15915061048f565b899150610485565b8480fd5b8380fd5b503461023a578060031936011261023a57602060ff60035460a01c16604051908152f35b503461023a57602036600319011261023a57600435610723611d5b565b7f49081791577ea5202d6975e5d6ad3a55a49709b1adf70fbd4fbf4b3ffda6e03160406008548151908152836020820152a160085580f35b503461023a57604036600319011261023a576040610777611932565b91610780611948565b9260018060a01b03168152600a602052209060018060a01b03165f52602052602060405f2054604051908152f35b503461023a57602036600319011261023a57806107c9611932565b6107d1611d5b565b6002546001600160a01b031690813b156108395760405163611d2e7560e11b81526001600160a01b0390911660048201529082908290602490829084905af1801561082e5761081d5750f35b81610827916119c5565b61023a5780f35b6040513d84823e3d90fd5b5050fd5b503461023a578060031936011261023a576020600454604051908152f35b503461023a578060031936011261023a57610874611d5b565b60025481906001600160a01b0316803b156108ae5781809160046040518094819363bb9fe6bf60e01b83525af1801561082e5761081d5750f35b50fd5b503461023a57606036600319011261023a576108cb611932565b6108d3611948565b604435906108df611d81565b6001600160a01b0316808452600b6020526040842054909290156109925760207ff0d0e99cae184d0187b093b48894117462462379674a6e11d89c3fbb618e96b09161095a6040516323b872dd60e01b848201526109548161094688303360248501611a54565b03601f1981018352826119c5565b86611e9c565b60018060a01b031692838652600a825260408620855f52825260405f20610982828254611b6d565b9055604051908152a36001805580f35b635f77d0bd60e01b8452600484fd5b503461023a57604036600319011261023a576109bb611948565b303303610bac576001600160a01b0316808252600b60205260408220549091908015610b9d57600354604051633fabe5a360e21b81529060a090829060049082906001600160a01b03165afa908115610b92578391610b5f575b5082811315610b41576402540be40081128015610b50575b610b415760ff60035460a01c16936007548061271001908161271011610b2d57908592918193610afe575b5050610a86610a929392610a8c928752600c602052610a8160ff60408920541694600435611da1565b611da1565b91611db4565b90611da1565b92600a0160ff8111610aea57610aa790611db4565b91612710820291820461271003610ad6576020610ace85610ac88686611da1565b90611df8565b604051908152f35b634e487b7160e01b81526011600452602490fd5b634e487b7160e01b83526011600452602483fd5b612af89192935001809111610b195790610a86610a8c610a58565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b86526011600452602486fd5b6344e30e0360e11b8352600483fd5b506509184e72a0008113610a2d565b610b81915060a03d60a011610b8b575b610b7981836119c5565b810190611a8a565b5092505090610a15565b503d610b6f565b6040513d85823e3d90fd5b635f77d0bd60e01b8252600482fd5b634fd3f39560e01b8252600482fd5b503461023a578060031936011261023a576002546040516001600160a01b039091168152602090f35b503461023a578060031936011261023a57602060405160058152f35b503461023a578060031936011261023a576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615158152602090f35b503461023a57602036600319011261023a57600435610c64611d5b565b6103e88111610ca4577e3b413cf14a67407425bd0b5c065b2de08876554d8489ad7dd4aa95604d280c60406007548151908152836020820152a160075580f35b632cbc962760e01b8252600482fd5b503461023a57602036600319011261023a5760209060ff906040906001600160a01b03610cde611932565b168152600c8452205416604051908152f35b503461023a578060031936011261023a57546040516001600160a01b039091168152602090f35b503461023a57608036600319011261023a576003600435101561023a576024356001600160401b038111610db45736602382011215610db45760048101356001600160401b038111610db0573660248284010111610db0576002546001600160a01b03163303610da15790610d9a91610d8e611d81565b60246044359201611b7a565b6001805580f35b637f3c57b560e01b8352600483fd5b8280fd5b5080fd5b503461023a578060031936011261023a576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461023a578060031936011261023a57610e16611d5b565b80546001600160a01b03198116825581906001600160a01b03165f516020611fe55f395f51905f528280a380f35b503461023a578060031936011261023a576020610e5f611ad7565b6040519015158152f35b503461023a578060031936011261023a57600354604051633fabe5a360e21b81529060a090829060049082906001600160a01b03165afa801561082e5782918391610f15575b5082821315610b4157604080515f516020611fc55f395f51905f52939192906001600160d01b03831690610ee281611996565b81815265ffffffffffff831660209182015260d083901b6001600160d01b0319169091176005558351928352820152a180f35b9050610f30915060a03d60a011610b8b57610b7981836119c5565b50925050905f610eaf565b503461023a578060031936011261023a576020600754604051908152f35b503461023a578060031936011261023a576006546040516001600160a01b039091168152602090f35b503461023a57606036600319011261023a57610f9c611948565b90604435918215158303610db457303303610bac576001600160a01b0316808252600b602052604082205490928115611112578290156110d357600354604051633fabe5a360e21b81529060a090829060049082906001600160a01b03165afa9081156110c85784916110a5575b50905b83821315611087576402540be40082128015611096575b6110875760ff60035460a01c16946007548061271001908161271011611073578193610afe575050610a86610a929392610a8c928752600c602052610a8160ff60408920541694600435611da1565b634e487b7160e01b87526011600452602487fd5b6344e30e0360e11b8452600484fd5b506509184e72a0008213611024565b6110be915060a03d60a011610b8b57610b7981836119c5565b509250509061100a565b6040513d86823e3d90fd5b506040516110e081611996565b6005549060018060d01b038216808252602082019260d01c83521561108757516001600160d01b03169050600161100d565b635f77d0bd60e01b8352600483fd5b503461023a578060031936011261023a57602060ff600954166040519015158152f35b503461023a578060031936011261023a575061119a6040516111676040826119c5565b60128152710504d56342d4465706f7369742d342e332e360741b6020820152604051918291602083526020830190611972565b0390f35b503461023a57606036600319011261023a576004356001600160401b038111610db45780600401906101206003198236030112610db05760025460443591906001600160a01b031633036114a25760ff600954166114935760e490611201611d81565b0190603461120f8385611a01565b905010611484578235916001600160a01b038316918284036114805760085490818111156114785750935b60486112468383611a01565b905010155f14611469579061125a91611a01565b6048116106da576034013560601c808552600b602052604085205490938491801561145a576040519161128c83611996565b6005549260018060d01b038416808252602082019460d01c85521561144b57516001600160d01b031692508783131561142d576402540be4008312801561143c575b61142d5760ff60035460a01c169260075490816127100191826127101161141957612af80180921161140557610a8682610a81610a8c9360ff60408f6113219998508c8152600c60205220541695611da1565b91600a0160ff81116113f15761133690611db4565b906127108102908104612710036113f1576113559291610ac891611da1565b91808652600a60205260408620825f526020528260405f2054106113e2576113c0928694926113b2926113d89852600a60205260408620905f5260205260405f206113a1828254611a33565b905560405195869360208501611a54565b03601f1981018452836119c5565b60018055604051928392604084526040840190611972565b9060208301520390f35b630a18ee5560e41b8652600486fd5b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b8a52601160045260248afd5b634e487b7160e01b8b52601160045260248bfd5b6344e30e0360e11b8852600488fd5b506509184e72a00083136112ce565b6344e30e0360e11b8952600489fd5b635f77d0bd60e01b8752600487fd5b634fd3f39560e01b8652600486fd5b90509361123a565b8580fd5b634fd3f39560e01b8452600484fd5b63026ee64160e51b8452600484fd5b637f3c57b560e01b8452600484fd5b508060031936011261023a576114c5611d5b565b60025481906001600160a01b0316803b156108ae57816024916040519283809263b760faf960e01b825230600483015234905af1801561082e5761081d5750f35b503461023a57602036600319011261023a57611520611d5b565b60043560045580f35b503461023a57604036600319011261023a57611543611932565b7fceb40be0a58aa33916c199e469842b614ef313295573c15d82f85cc9d1a89d326020602435611571611d5b565b60405163313ce56760e01b81526001600160a01b03909416936012908381600481895afa8791816115db575b506115d3575b50848652600c835260ff60408720911660ff19825416179055838552600b8252806040862055604051908152a280f35b90505f6115a3565b6115f3919250853d87116106545761064581836119c5565b905f61159d565b503461023a578060031936011261023a576003546040516001600160a01b039091168152602090f35b503461023a578060031936011261023a5760206040516509184e72a0008152f35b503461023a578060031936011261023a5761165d611d5b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031680156116f6578082913b156108ae578180916004604051809481936251b42b60e81b83525af1801561082e576116e1575b50307fca323d32ea3ada728fbc5a470183af7d4cc49a426cb2bdf68847d6e298576f208280a280f35b816116eb916119c5565b61023a57805f6116b8565b630c96deb560e11b8252600482fd5b503461023a578060031936011261023a576020604051600a8152f35b503461023a578060031936011261023a5760206040516402540be4008152f35b503461023a57604036600319011261023a578061175c611932565b611764611d5b565b6002546001600160a01b031690813b156108395760405163040b850f60e31b81526001600160a01b03909116600482015260248035908201529082908290604490829084905af1801561082e5761081d5750f35b503461023a57602036600319011261023a576020906040906001600160a01b036117e0611932565b168152600b83522054604051908152f35b503461023a578060031936011261023a5760206040516103e88152f35b503461023a578060031936011261023a576020600854604051908152f35b503461023a57604036600319011261023a5760043560243565ffffffffffff8116908181036106de5761185d611d5b565b821561108757916040915f516020611fc55f395f51905f529360018060d01b03831690826020865161188e81611996565b848152015260d01b6001600160d01b0319161760055582519182526020820152a180f35b50602036600319011261192e5760043563ffffffff811680910361192e576118d8611d5b565b6002546001600160a01b031690813b1561192e575f90602460405180948193621cb65b60e51b8352600483015234905af1801561192357611917575080f35b61001891505f906119c5565b6040513d5f823e3d90fd5b5f80fd5b600435906001600160a01b038216820361192e57565b602435906001600160a01b038216820361192e57565b35906001600160a01b038216820361192e57565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b604081019081106001600160401b038211176119b157604052565b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176119b157604052565b9081602091031261192e575160ff8116810361192e5790565b903590601e198136030182121561192e57018035906001600160401b03821161192e5760200191813603831361192e57565b91908203918211611a4057565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03918216815291166020820152604081019190915260600190565b51906001600160501b038216820361192e57565b908160a091031261192e57611a9e81611a76565b91602082015191604081015191611abc608060608401519301611a76565b90565b9081602091031261192e5751801515810361192e5790565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168015611b6857602060249160405192838092634943841160e11b82523060048301525afa5f9181611b37575b50611abc57505f90565b611b5a91925060203d602011611b61575b611b5281836119c5565b810190611abf565b905f611b2d565b503d611b48565b505f90565b91908201809211611a4057565b90915f928015611d5557826060918101031261192e57611b998261195e565b6040611ba76020850161195e565b9301359060018060a01b03169260018060a01b0316935f611bcd60055460d01c42611a33565b60045410611d17575b60405190635dbfc94d60e01b825284600483015286602483015215156044820152602081606481305afa829181611cd6575b5091606093915f516020611fa55f395f51905f529593155f14611cd05750815b808311611cc8575b82611c3a91611a33565b80611c97575b5081611c5c575b506040519182528060208301526040820152a3565b60409060018060a01b03600654168152600a6020522060018060a01b0387165f5260205260405f20611c8f828254611b6d565b90555f611c47565b868252600a6020526040822060018060a01b0389165f52602052611cc060405f20918254611b6d565b90555f611c40565b915081611c30565b91611c28565b9091506020813d602011611d0f575b81611cf2602093836119c5565b81010312610db05751905f516020611fa55f395f51905f52611c08565b3d9150611ce5565b50303b1561192e57604051630ce74fc560e31b81525f8160048183305af1611d42575b506001611bd6565b611d4e91505f906119c5565b5f5f611d3a565b50505050565b5f546001600160a01b03163303611d6e57565b63118cdaa760e01b5f523360045260245ffd5b600260015414611d92576002600155565b633ee5aeb560e01b5f5260045ffd5b81810292918115918404141715611a4057565b60ff16604d8111611a4057600a0a90565b5f80546001600160a01b039283166001600160a01b03198216811783559216905f516020611fe55f395f51905f529080a3565b5f196001820991818084109303928084039314611e7c5782811115611e6d578060018309815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b63227bc15360e01b5f5260045ffd5b80925015611e88570490565b634e487b7160e01b5f52601260045260245ffd5b81516001600160a01b03909116915f91829160200182855af13d15611f3a573d6001600160401b0381116119b157604051611ef7929091611ee7601f8201601f1916602001846119c5565b82523d5f602084013e5b83611f46565b8051908115159182611f1f575b5050611f0d5750565b635274afe760e01b5f5260045260245ffd5b611f329250602080918301019101611abf565b155f80611f04565b611ef790606090611ef1565b90611f6a5750805115611f5b57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580611f9b575b611f7b575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15611f7356fe62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae073945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd6968388be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a26469706673582212200d81ef59c472320427e74a78cabf5722066c9d6fe78a502191e7b05ad2c0b4dc64736f6c634300081c0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00" | packages/core/src/abis/Paymaster.json:1142 |
PaymasterFactoryABI
const PaymasterFactoryABI: any;Defined in: packages/core/src/abis/index.ts:50
PaymasterFactoryArtifact
const PaymasterFactoryArtifact: object = PaymasterFactoryABIData;Defined in: packages/core/src/abis/index.ts:69
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: never[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/PaymasterFactory.json:2 |
bytecode | string | "0x6080806040523460755733156062575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055611536908161007a8239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c80630618f10414610f815780630cfb14b014610f6457806314b1c40114610f475780631798d48214610f1857806341bbe5a814610cac57806354fd4d5014610ebc57806364feab6414610d965780636a18943914610d545780636b68389614610cec5780636c583e5914610cac578063715018a614610c685780637563750514610a475780637857bce91461096f578063821ac3fb1461092d57806385365cbb1461074d5780638da5cb5b14610726578063a87d5a74146106c9578063ad384a9b146103db578063bde9cb2a146102ec578063ce47d467146102ac578063d125531314610240578063dc2a1472146101fa578063f2fde38b146101885763f3bcebbd14610121575f80fd5b34610184576020366003190112610184576004356001600160401b038111610184576101536020913690600401611020565b8160405191805191829101835e600290820190815281900382019020546040516001600160a01b0390911615158152f35b5f80fd5b34610184576020366003190112610184576101a1611164565b6101a961147a565b6001600160a01b031680156101e7575f80546001600160a01b03198116831782556001600160a01b0316905f5160206114c15f395f51905f529080a3005b631e4fbdf760e01b5f525f60045260245ffd5b34610184576020366003190112610184576001600160a01b0361021b611164565b165f526004602052604060018060a01b03815f20541681519080825215156020820152f35b346101845760403660031901126101845761025f60243560043561138a565b6040518091602082016020835281518091526020604084019201905f5b81811061028a575050500390f35b82516001600160a01b031684528594506020938401939092019160010161027c565b34610184576020366003190112610184576001600160a01b036102cd611164565b165f526004602052602060018060a01b0360405f205416604051908152f35b34610184576040366003190112610184576004356001600160401b0381116101845761031c903690600401611020565b60405181518060208401835e60029082019081528190036020019020546001600160a01b03169081156103b25760206055604384604051903060388301526f5af43d82803e903d91602b57fd5bf3ff60248301526014820152733d602d80600a3d3981f3363d3d373d3d3d363d73815260243560588201526037600c820120607882015201206040519060018060a01b03168152f35b60405163ed4fac3760e01b8152602060048201529081906103d7906024830190611140565b0390fd5b34610184576060366003190112610184576004356001600160401b0381116101845761040b903690600401611020565b6044356001600160401b0381116101845761042a903690600401611020565b9061043361145a565b335f908152600360205260409020546001600160a01b03166106b657604051602081835180838601835e600290820190815203019020546001600160a01b038116156106945780763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39360881c16175f5260018060781b03199060781b1617602052602435603760095ff56001600160a01b03811691821561068557835115610630576105bb839261054460205f808983809b51910182875af161053f602d6105046111e7565b6040519485916c024b734ba103330b4b632b21d1609d1b828401528051918291018484015e81015f838201520301601f198101845283610fe2565b611216565b6105825f8060405189810190638da5cb5b60e01b825260048152610569602482610fe2565b5190855afa6105766111e7565b8161060a575b50611261565b335f81815260038852604080822080546001600160a01b0319908116891790915587835260048a529120805490911690911790556112a7565b6105c660075461130c565b6007557fa1ff1ed230517376e0a7481a00b4dfc8f2f2e212bccebd933d567bf5640494c0604051806105fb339442908361132e565b0390a360018055604051908152f35b80513392506001600160a01b03916106289181018b01908b01611242565b16148861057c565b60405162461bcd60e51b815260206004820152602760248201527f696e69744461746120726571756972656420666f7220736563757265206465706044820152661b1bde5b595b9d60ca1b6064820152608490fd5b6330be1a3d60e21b5f5260045ffd5b60405163ed4fac3760e01b815260206004820152806103d76024820185611140565b6369e496ad60e01b5f523360045260245ffd5b34610184576020366003190112610184576001600160a01b036106ea611164565b165f818152600460205260409020546001600160a01b0316801561071357602090604051908152f35b50630a36f2b760e31b5f5260045260245ffd5b34610184575f366003190112610184575f546040516001600160a01b039091168152602090f35b34610184576020366003190112610184576004356001600160401b0381116101845761077d903690600401611020565b61078561147a565b60405181518060208401835e60029082019081528190036020019020546001600160a01b0316156103b2576107b861109c565b8151916001600160401b038311610919576107d4600654611064565b601f81116108c9575b50602092601f811160011461085257610834929181610842925f5160206114a15f395f51905f52965f91610847575b508160011b915f199060031b1c1916176006555b604051938493604085526040850190611140565b908382036020850152611140565b0390a1005b90508201518761080c565b601f19811660065f52845f20905f5b8181106108b15750826108349594925f5160206114a15f395f51905f52976108429560019410610899575b5050811b01600655610820565b8401515f1960f88460031b161c19169055878061088c565b84870151835560209687019660019093019201610861565b60065f525f5160206114e15f395f51905f52601f850160051c8101916020861061090f575b601f0160051c01905b81811061090457506107dd565b5f81556001016108f7565b90915081906108ee565b634e487b7160e01b5f52604160045260245ffd5b3461018457602036600319011261018457600435600554811015610184576109566020916111bb565b905460405160039290921b1c6001600160a01b03168152f35b346101845761097d3661117a565b9061098661147a565b6001600160a01b038216918215908115610a3d575b50610a2a576040519080519160208201928084835e60029082019081528190036020019020546001600160a01b03169182156106945790610a04916020604051809284518091835e60029082019081520301902080546001600160a01b0319168517905561134a565b7f2255c4b39068cc7208e9c29b0fc9a3d106b3a41ada38999656d54aa44a6dc9e85f80a4005b50630c76093760e01b5f5260045260245ffd5b90503b158361099b565b3461018457610a553661117a565b610a5d61147a565b6001600160a01b038116908115908115610c5e575b50610c4c5760405182519060208401918083835e60029082019081528190036020019020546001600160a01b0316610c2a576020604051809285518091835e60029082019081520301902080546001600160a01b0319168217905560065491610ada83611064565b15610b0f575b610ae99061134a565b7f9aa81ca4174435962ad1571b0a59c4440cf6de4a12ba4ed96d6fdf5d346742785f80a3005b8051926001600160401b03841161091957610b2990611064565b601f8111610bda575b50602092601f8111600114610b755780610ae993945f91610b6a575b508160011b915f199060031b1c1916176006555b829150610ae0565b905082015185610b4e565b601f19811660065f52845f20905f5b818110610bc2575090610ae99495836001949310610baa575b5050811b01600655610b62565b8401515f1960f88460031b161c191690558580610b9d565b84870151835560209687019660019093019201610b84565b60065f525f5160206114e15f395f51905f52601f850160051c81019160208610610c20575b601f0160051c01905b818110610c155750610b32565b5f8155600101610c08565b9091508190610bff565b60405163b94f32dd60e01b815260206004820152806103d76024820186611140565b630c76093760e01b5f5260045260245ffd5b90503b1583610a72565b34610184575f36600319011261018457610c8061147a565b5f80546001600160a01b0319811682556001600160a01b03165f5160206114c15f395f51905f528280a3005b34610184576020366003190112610184576001600160a01b03610ccd611164565b165f526003602052602060018060a01b0360405f205416604051908152f35b34610184576020366003190112610184576004356001600160401b03811161018457610d1c903690600401611020565b60405181518060208401835e60029082019081528190036020019020546001600160a01b03169081156103b257602082604051908152f35b34610184576020366003190112610184576001600160a01b03610d75611164565b165f526003602052602060018060a01b0360405f2054161515604051908152f35b34610184576040366003190112610184576004356001600160401b03811161018457610dc6903690600401611020565b6024356001600160401b03811161018457610de5903690600401611020565b90610dee61145a565b335f908152600360205260409020546001600160a01b03166106b657604051602081835180838601835e600290820190815203019020546001600160a01b038116156106945780763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39360881c16175f5260018060781b03199060781b1617602052603760095ff06001600160a01b03811691821561068557835115610630576105bb839261054460205f808983809b51910182875af161053f602d6105046111e7565b34610184575f36600319011261018457610f14604051610edd604082610fe2565b60168152752830bcb6b0b9ba32b92330b1ba37b93c96989718171960511b6020820152604051918291602083526020830190611140565b0390f35b34610184575f36600319011261018457610f14610f3361109c565b604051918291602083526020830190611140565b34610184575f366003190112610184576020600554604051908152f35b34610184575f366003190112610184576020600754604051908152f35b34610184576020366003190112610184576004356001600160401b03811161018457610fb36020913690600401611020565b8160405191805191829101835e600290820190815281900382019020546040516001600160a01b039091168152f35b601f909101601f19168101906001600160401b0382119082101761091957604052565b6001600160401b03811161091957601f01601f191660200190565b81601f820112156101845760208135910161103a82611005565b926110486040519485610fe2565b8284528282011161018457815f92602092838601378301015290565b90600182811c92168015611092575b602083101461107e57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611073565b604051905f82600654916110af83611064565b808352926001811690811561112157506001146110d5575b6110d392500383610fe2565b565b5060065f90815290915f5160206114e15f395f51905f525b8183106111055750509060206110d3928201016110c7565b60209193508060019154838589010152019101909184926110ed565b602092506110d394915060ff191682840152151560051b8201016110c7565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361018457565b604060031982011261018457600435906001600160401b038211610184576111a491600401611020565b906024356001600160a01b03811681036101845790565b6005548110156111d35760055f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b3d15611211573d906111f882611005565b916112066040519384610fe2565b82523d5f602084013e565b606090565b1561121e5750565b60405162461bcd60e51b8152602060048201529081906103d7906024830190611140565b9081602091031261018457516001600160a01b03811681036101845790565b1561126857565b60405162461bcd60e51b81526020600482015260176024820152764f776e6572206e6f742073657420636f72726563746c7960481b6044820152606490fd5b600554600160401b81101561091957600181016005556005548110156111d35760055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b03909216919091179055565b5f19811461131a5760010190565b634e487b7160e01b5f52601160045260245ffd5b929190611345602091604086526040860190611140565b930152565b602090604051918183925191829101835e81015f815203902090565b6001600160401b0381116109195760051b60200190565b9190820180921161131a57565b9190600554908184101561143e576113a2908461137d565b90808211611436575b5082810390811161131a576113bf81611366565b906113cd6040519283610fe2565b808252601f196113dc82611366565b0136602084013781935f5b8281106113f45750505050565b611406611401828461137d565b6111bb565b9054855160039290921b1c6001600160a01b031691908110156111d35760019160208260051b87010152016113e7565b90505f6113ab565b50509050604051611450602082610fe2565b5f81525f36813790565b60026001541461146b576002600155565b633ee5aeb560e01b5f5260045ffd5b5f546001600160a01b0316330361148d57565b63118cdaa760e01b5f523360045260245ffdfef2d0bf91625d9d6f0875b7d42914fd44597c078083d98cb3619c009136be9f6a8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3fa2646970667358221220304d818df54b0f1c789b2529322e67a26254249020532eb4b1a63219f739d3c364736f6c634300081c0033" | packages/core/src/abis/PaymasterFactory.json:639 |
PaymasterV4ABI
const PaymasterV4ABI: any;Defined in: packages/core/src/abis/index.ts:51
PaymasterV4Artifact
const PaymasterV4Artifact: object = PaymasterABIData;Defined in: packages/core/src/abis/index.ts:70
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs?: undefined; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: ( | { components: object[]; internalType: string; name: string; type: string; } | { components?: undefined; internalType: string; name: string; type: string; })[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/Paymaster.json:2 |
bytecode | string | "0x60a03461019057601f61222338819003918201601f19168301916001600160401b038311848410176101945780849260209460405283398101031261019057516001600160a01b0381169081900361019057331561017d575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055801561016e576080525f5160206122035f395f51905f525460ff8160401c1661015f576002600160401b03196001600160401b0382160161010c575b60405161205a90816101a98239608051818181610c1601528181610dce0152818161165f0152611ad90152f35b6001600160401b0319166001600160401b039081175f5160206122035f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f806100df565b63f92ee8a960e01b5f5260045ffd5b632462edf160e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f5f3560e01c80630396cb60146118b2578063083e91c41461182c5780630879c4121461180e57806314d90e1b146117f1578063204120bc146117b8578063205c28781461174157806332726684146117215780633400ba521461170557806336f897e71461164457806339788cd91461162357806342f6fb29146115fa578063431f63c9146115295780634915a858146115065780634a58db19146114b157806352b7512c1461119e57806354fd4d50146111445780635c975abb146111215780635dbfc94d14610f8257806361d027b314610f5957806361d1bc9414610f3b578063673a7e2814610e695780636f374b0f14610e44578063715018a614610dfd5780637b10399914610db85780637c627b2114610d175780638da5cb5b14610cf05780638ee573ac14610cb35780639b1d309114610c47578063a032f4b814610c00578063aa51e01514610be4578063b0d691fe14610bbb578063b1f145c5146109a1578063b3db428b146108b1578063bb9fe6bf1461085b578063bd1118701461083d578063c23a5cea146107ae578063c23f001f1461075b578063c9929dad14610706578063e68b52e7146106e2578063e77fc7a414610406578063f0f4426014610383578063f2fde38b14610332578063f3fef3a31461023d5763f60fdcb314610209575061000e565b3461023a578060031936011261023a57600554604080516001600160d01b038316815260d09290921c602083015290f35b80fd5b503461023a57604036600319011261023a57610257611932565b60243590610263611d81565b338352600a6020526040832060018060a01b0382165f526020528160405f20541061032357338352600a6020526040832060018060a01b0382165f5260205260405f206102b1838254611a33565b905560018060a01b0316906102f060405163a9059cbb60e01b6020820152336024820152826044820152604481526102ea6064826119c5565b83611e9c565b6040519081527fa92ff919b850e4909ab2261d907ef955f11bc1716733a6cbece38d163a69af8a60203392a36001805580f35b630a18ee5560e41b8352600483fd5b503461023a57602036600319011261023a5761034c611932565b610354611d5b565b6001600160a01b0381161561036f5761036c90611dc5565b80f35b631e4fbdf760e01b82526004829052602482fd5b503461023a57602036600319011261023a5761039d611932565b6103a5611d5b565b6001600160a01b031680156103f757600654816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a8580a36001600160a01b0319161760065580f35b632462edf160e01b8252600482fd5b503461023a5760e036600319011261023a57610420611932565b610428611948565b6044356001600160a01b038116908190036106de576064356001600160a01b03811691908290036106da5760843560c435915f5160206120055f395f51905f52549560ff8760401c16159660018060401b038116801590816106d2575b60011490816106c8575b1590816106bf575b506106b0576001600160401b031981166001175f5160206120055f395f51905f525587610688575b506001600160a01b0316938415610679576001600160a01b03861694851561066a57821561066a57811561066a576103e8841161065b57600280546001600160a01b0319908116929092179055600380549182168317905560405163313ce56760e01b8152909190602081600481855afa8a918161062a575b506106085750506003805460ff60a01b1916600160a31b179055505b600680546001600160a01b03191691909117905560075560a43560085580156105ff575b60045560ff196009541660095561058e82611dc5565b33036105f0575b5061059d5780f35b60ff60401b195f5160206120055f395f51905f5254165f5160206120055f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6105f990611dc5565b5f610595565b50610e10610578565b6001600160a81b03199092161760a09190911b60ff60a01b1617600355610554565b61064d91925060203d602011610654575b61064581836119c5565b8101906119e8565b905f610538565b503d61063b565b632cbc962760e01b8952600489fd5b632462edf160e01b8952600489fd5b632462edf160e01b8852600488fd5b6001600160481b0319166001600160401b01175f5160206120055f395f51905f52555f6104bf565b63f92ee8a960e01b8952600489fd5b9050155f610497565b303b15915061048f565b899150610485565b8480fd5b8380fd5b503461023a578060031936011261023a57602060ff60035460a01c16604051908152f35b503461023a57602036600319011261023a57600435610723611d5b565b7f49081791577ea5202d6975e5d6ad3a55a49709b1adf70fbd4fbf4b3ffda6e03160406008548151908152836020820152a160085580f35b503461023a57604036600319011261023a576040610777611932565b91610780611948565b9260018060a01b03168152600a602052209060018060a01b03165f52602052602060405f2054604051908152f35b503461023a57602036600319011261023a57806107c9611932565b6107d1611d5b565b6002546001600160a01b031690813b156108395760405163611d2e7560e11b81526001600160a01b0390911660048201529082908290602490829084905af1801561082e5761081d5750f35b81610827916119c5565b61023a5780f35b6040513d84823e3d90fd5b5050fd5b503461023a578060031936011261023a576020600454604051908152f35b503461023a578060031936011261023a57610874611d5b565b60025481906001600160a01b0316803b156108ae5781809160046040518094819363bb9fe6bf60e01b83525af1801561082e5761081d5750f35b50fd5b503461023a57606036600319011261023a576108cb611932565b6108d3611948565b604435906108df611d81565b6001600160a01b0316808452600b6020526040842054909290156109925760207ff0d0e99cae184d0187b093b48894117462462379674a6e11d89c3fbb618e96b09161095a6040516323b872dd60e01b848201526109548161094688303360248501611a54565b03601f1981018352826119c5565b86611e9c565b60018060a01b031692838652600a825260408620855f52825260405f20610982828254611b6d565b9055604051908152a36001805580f35b635f77d0bd60e01b8452600484fd5b503461023a57604036600319011261023a576109bb611948565b303303610bac576001600160a01b0316808252600b60205260408220549091908015610b9d57600354604051633fabe5a360e21b81529060a090829060049082906001600160a01b03165afa908115610b92578391610b5f575b5082811315610b41576402540be40081128015610b50575b610b415760ff60035460a01c16936007548061271001908161271011610b2d57908592918193610afe575b5050610a86610a929392610a8c928752600c602052610a8160ff60408920541694600435611da1565b611da1565b91611db4565b90611da1565b92600a0160ff8111610aea57610aa790611db4565b91612710820291820461271003610ad6576020610ace85610ac88686611da1565b90611df8565b604051908152f35b634e487b7160e01b81526011600452602490fd5b634e487b7160e01b83526011600452602483fd5b612af89192935001809111610b195790610a86610a8c610a58565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b86526011600452602486fd5b6344e30e0360e11b8352600483fd5b506509184e72a0008113610a2d565b610b81915060a03d60a011610b8b575b610b7981836119c5565b810190611a8a565b5092505090610a15565b503d610b6f565b6040513d85823e3d90fd5b635f77d0bd60e01b8252600482fd5b634fd3f39560e01b8252600482fd5b503461023a578060031936011261023a576002546040516001600160a01b039091168152602090f35b503461023a578060031936011261023a57602060405160058152f35b503461023a578060031936011261023a576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615158152602090f35b503461023a57602036600319011261023a57600435610c64611d5b565b6103e88111610ca4577e3b413cf14a67407425bd0b5c065b2de08876554d8489ad7dd4aa95604d280c60406007548151908152836020820152a160075580f35b632cbc962760e01b8252600482fd5b503461023a57602036600319011261023a5760209060ff906040906001600160a01b03610cde611932565b168152600c8452205416604051908152f35b503461023a578060031936011261023a57546040516001600160a01b039091168152602090f35b503461023a57608036600319011261023a576003600435101561023a576024356001600160401b038111610db45736602382011215610db45760048101356001600160401b038111610db0573660248284010111610db0576002546001600160a01b03163303610da15790610d9a91610d8e611d81565b60246044359201611b7a565b6001805580f35b637f3c57b560e01b8352600483fd5b8280fd5b5080fd5b503461023a578060031936011261023a576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461023a578060031936011261023a57610e16611d5b565b80546001600160a01b03198116825581906001600160a01b03165f516020611fe55f395f51905f528280a380f35b503461023a578060031936011261023a576020610e5f611ad7565b6040519015158152f35b503461023a578060031936011261023a57600354604051633fabe5a360e21b81529060a090829060049082906001600160a01b03165afa801561082e5782918391610f15575b5082821315610b4157604080515f516020611fc55f395f51905f52939192906001600160d01b03831690610ee281611996565b81815265ffffffffffff831660209182015260d083901b6001600160d01b0319169091176005558351928352820152a180f35b9050610f30915060a03d60a011610b8b57610b7981836119c5565b50925050905f610eaf565b503461023a578060031936011261023a576020600754604051908152f35b503461023a578060031936011261023a576006546040516001600160a01b039091168152602090f35b503461023a57606036600319011261023a57610f9c611948565b90604435918215158303610db457303303610bac576001600160a01b0316808252600b602052604082205490928115611112578290156110d357600354604051633fabe5a360e21b81529060a090829060049082906001600160a01b03165afa9081156110c85784916110a5575b50905b83821315611087576402540be40082128015611096575b6110875760ff60035460a01c16946007548061271001908161271011611073578193610afe575050610a86610a929392610a8c928752600c602052610a8160ff60408920541694600435611da1565b634e487b7160e01b87526011600452602487fd5b6344e30e0360e11b8452600484fd5b506509184e72a0008213611024565b6110be915060a03d60a011610b8b57610b7981836119c5565b509250509061100a565b6040513d86823e3d90fd5b506040516110e081611996565b6005549060018060d01b038216808252602082019260d01c83521561108757516001600160d01b03169050600161100d565b635f77d0bd60e01b8352600483fd5b503461023a578060031936011261023a57602060ff600954166040519015158152f35b503461023a578060031936011261023a575061119a6040516111676040826119c5565b60128152710504d56342d4465706f7369742d342e332e360741b6020820152604051918291602083526020830190611972565b0390f35b503461023a57606036600319011261023a576004356001600160401b038111610db45780600401906101206003198236030112610db05760025460443591906001600160a01b031633036114a25760ff600954166114935760e490611201611d81565b0190603461120f8385611a01565b905010611484578235916001600160a01b038316918284036114805760085490818111156114785750935b60486112468383611a01565b905010155f14611469579061125a91611a01565b6048116106da576034013560601c808552600b602052604085205490938491801561145a576040519161128c83611996565b6005549260018060d01b038416808252602082019460d01c85521561144b57516001600160d01b031692508783131561142d576402540be4008312801561143c575b61142d5760ff60035460a01c169260075490816127100191826127101161141957612af80180921161140557610a8682610a81610a8c9360ff60408f6113219998508c8152600c60205220541695611da1565b91600a0160ff81116113f15761133690611db4565b906127108102908104612710036113f1576113559291610ac891611da1565b91808652600a60205260408620825f526020528260405f2054106113e2576113c0928694926113b2926113d89852600a60205260408620905f5260205260405f206113a1828254611a33565b905560405195869360208501611a54565b03601f1981018452836119c5565b60018055604051928392604084526040840190611972565b9060208301520390f35b630a18ee5560e41b8652600486fd5b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b8a52601160045260248afd5b634e487b7160e01b8b52601160045260248bfd5b6344e30e0360e11b8852600488fd5b506509184e72a00083136112ce565b6344e30e0360e11b8952600489fd5b635f77d0bd60e01b8752600487fd5b634fd3f39560e01b8652600486fd5b90509361123a565b8580fd5b634fd3f39560e01b8452600484fd5b63026ee64160e51b8452600484fd5b637f3c57b560e01b8452600484fd5b508060031936011261023a576114c5611d5b565b60025481906001600160a01b0316803b156108ae57816024916040519283809263b760faf960e01b825230600483015234905af1801561082e5761081d5750f35b503461023a57602036600319011261023a57611520611d5b565b60043560045580f35b503461023a57604036600319011261023a57611543611932565b7fceb40be0a58aa33916c199e469842b614ef313295573c15d82f85cc9d1a89d326020602435611571611d5b565b60405163313ce56760e01b81526001600160a01b03909416936012908381600481895afa8791816115db575b506115d3575b50848652600c835260ff60408720911660ff19825416179055838552600b8252806040862055604051908152a280f35b90505f6115a3565b6115f3919250853d87116106545761064581836119c5565b905f61159d565b503461023a578060031936011261023a576003546040516001600160a01b039091168152602090f35b503461023a578060031936011261023a5760206040516509184e72a0008152f35b503461023a578060031936011261023a5761165d611d5b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031680156116f6578082913b156108ae578180916004604051809481936251b42b60e81b83525af1801561082e576116e1575b50307fca323d32ea3ada728fbc5a470183af7d4cc49a426cb2bdf68847d6e298576f208280a280f35b816116eb916119c5565b61023a57805f6116b8565b630c96deb560e11b8252600482fd5b503461023a578060031936011261023a576020604051600a8152f35b503461023a578060031936011261023a5760206040516402540be4008152f35b503461023a57604036600319011261023a578061175c611932565b611764611d5b565b6002546001600160a01b031690813b156108395760405163040b850f60e31b81526001600160a01b03909116600482015260248035908201529082908290604490829084905af1801561082e5761081d5750f35b503461023a57602036600319011261023a576020906040906001600160a01b036117e0611932565b168152600b83522054604051908152f35b503461023a578060031936011261023a5760206040516103e88152f35b503461023a578060031936011261023a576020600854604051908152f35b503461023a57604036600319011261023a5760043560243565ffffffffffff8116908181036106de5761185d611d5b565b821561108757916040915f516020611fc55f395f51905f529360018060d01b03831690826020865161188e81611996565b848152015260d01b6001600160d01b0319161760055582519182526020820152a180f35b50602036600319011261192e5760043563ffffffff811680910361192e576118d8611d5b565b6002546001600160a01b031690813b1561192e575f90602460405180948193621cb65b60e51b8352600483015234905af1801561192357611917575080f35b61001891505f906119c5565b6040513d5f823e3d90fd5b5f80fd5b600435906001600160a01b038216820361192e57565b602435906001600160a01b038216820361192e57565b35906001600160a01b038216820361192e57565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b604081019081106001600160401b038211176119b157604052565b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176119b157604052565b9081602091031261192e575160ff8116810361192e5790565b903590601e198136030182121561192e57018035906001600160401b03821161192e5760200191813603831361192e57565b91908203918211611a4057565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03918216815291166020820152604081019190915260600190565b51906001600160501b038216820361192e57565b908160a091031261192e57611a9e81611a76565b91602082015191604081015191611abc608060608401519301611a76565b90565b9081602091031261192e5751801515810361192e5790565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168015611b6857602060249160405192838092634943841160e11b82523060048301525afa5f9181611b37575b50611abc57505f90565b611b5a91925060203d602011611b61575b611b5281836119c5565b810190611abf565b905f611b2d565b503d611b48565b505f90565b91908201809211611a4057565b90915f928015611d5557826060918101031261192e57611b998261195e565b6040611ba76020850161195e565b9301359060018060a01b03169260018060a01b0316935f611bcd60055460d01c42611a33565b60045410611d17575b60405190635dbfc94d60e01b825284600483015286602483015215156044820152602081606481305afa829181611cd6575b5091606093915f516020611fa55f395f51905f529593155f14611cd05750815b808311611cc8575b82611c3a91611a33565b80611c97575b5081611c5c575b506040519182528060208301526040820152a3565b60409060018060a01b03600654168152600a6020522060018060a01b0387165f5260205260405f20611c8f828254611b6d565b90555f611c47565b868252600a6020526040822060018060a01b0389165f52602052611cc060405f20918254611b6d565b90555f611c40565b915081611c30565b91611c28565b9091506020813d602011611d0f575b81611cf2602093836119c5565b81010312610db05751905f516020611fa55f395f51905f52611c08565b3d9150611ce5565b50303b1561192e57604051630ce74fc560e31b81525f8160048183305af1611d42575b506001611bd6565b611d4e91505f906119c5565b5f5f611d3a565b50505050565b5f546001600160a01b03163303611d6e57565b63118cdaa760e01b5f523360045260245ffd5b600260015414611d92576002600155565b633ee5aeb560e01b5f5260045ffd5b81810292918115918404141715611a4057565b60ff16604d8111611a4057600a0a90565b5f80546001600160a01b039283166001600160a01b03198216811783559216905f516020611fe55f395f51905f529080a3565b5f196001820991818084109303928084039314611e7c5782811115611e6d578060018309815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b63227bc15360e01b5f5260045ffd5b80925015611e88570490565b634e487b7160e01b5f52601260045260245ffd5b81516001600160a01b03909116915f91829160200182855af13d15611f3a573d6001600160401b0381116119b157604051611ef7929091611ee7601f8201601f1916602001846119c5565b82523d5f602084013e5b83611f46565b8051908115159182611f1f575b5050611f0d5750565b635274afe760e01b5f5260045260245ffd5b611f329250602080918301019101611abf565b155f80611f04565b611ef790606090611ef1565b90611f6a5750805115611f5b57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580611f9b575b611f7b575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15611f7356fe62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae073945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd6968388be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a26469706673582212200d81ef59c472320427e74a78cabf5722066c9d6fe78a502191e7b05ad2c0b4dc64736f6c634300081c0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00" | packages/core/src/abis/Paymaster.json:1142 |
REGISTRY_ADDRESS
const REGISTRY_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:48
RegistryABI
const RegistryABI: any;Defined in: packages/core/src/abis/index.ts:46
RegistryArtifact
const RegistryArtifact: object = RegistryABIData;Defined in: packages/core/src/abis/index.ts:65
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: ( | { components?: undefined; internalType: string; name: string; type: string; } | { components: object[]; internalType: string; name: string; type: string; })[]; name: string; outputs: never[]; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: ( | { components?: undefined; indexed: boolean; internalType: string; name: string; type: string; } | { components: object[]; indexed: boolean; internalType: string; name: string; type: string; })[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/Registry.json:2 |
bytecode | string | "0x608080604052346118c9575f90606081616ef8803803809161002182856119ee565b8339810103126118c95761003481611a11565b5061004d604061004660208401611a11565b9201611a11565b9033156119bf575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055600280546001600160a01b039283166001600160a01b031991821617909155600380549390921692169190911790556040805191906100db90836119ee565b600d82526c20a7a0902830bcb6b0b9ba32b960991b6020830152604051610101816119d2565b6801a055690d9db800008152602081016729a2241af62c0000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016103e8815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f516020616e985f395f51905f525f52600760205260405f209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b0381116119ab578154600181811c911680156119a1575b602082101461198d57601f8111611948575b506020601f82116001146118e257819060069697985f926118d7575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b039283161790559051919092015560025416801515806118cd575b611869575b50604051906102f06040836119ee565b600e82526d29bab832b92830bcb6b0b9ba32b960911b6020830152604051610317816119d2565b6802b5e3af16b1880000815260208101674563918244f40000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016103e8815260e087019060018252610100880194671bc16d674ec80000865261012089019a8b526101408901963388526101608a019862278d008a525f516020616e785f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161127e578154600181811c9116801561185f575b602082101461126057601f811161181a575b506020601f82116001146117b5578190879860069798926117aa575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b0392831617905590519190920155600254829116801515806117a0575b61173e575b5050604051906105096040836119ee565b600b82526a11d95b995c9a58c811159560aa1b602083015260405161052d816119d2565b6801a055690d9db800008152602081016729a2241af62c0000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016103e8815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f516020616eb85f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161127e578154600181811c91168015611734575b602082101461126057601f81116116ef575b506020601f821160011461168a5781908798600697989261167f575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b039283161790559051919092015560025482911680151580611675575b611613575b50506040519061071f6040836119ee565b6005825264414e4f444560d81b602083015260405161073d816119d2565b6801158e460913d00000815260208101671bc16d674ec80000815260408201600f8152606083016001815260808401916001835260a08501926005845260c086016103e8815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f516020616ed85f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161127e578154600181811c91168015611609575b602082101461126057601f81116115c4575b506020601f821160011461155f57819087986006979892611554575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b03928316179055905191909201556002548291168015158061154a575b6114e8575b50506040519061092f6040836119ee565b60038252624b4d5360e81b602083015260405161094b816119d2565b68056bc75e2d63100000815260208101678ac7230489e8000081526040820160058152606083016005815260808401916002835260a08501926014845260c086016103e8815260e087019060018252610100880194674563918244f40000865261012089019a8b526101408901963388526101608a019862278d008a525f516020616e185f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161127e578154600181811c911680156114de575b602082101461126057601f8111611499575b506020601f821160011461143457819087986006979892611429575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b03928316179055905191909201556002548291168015158061141f575b6113bd575b505060405190610b3d6040836119ee565b6009825268436f6d6d756e69747960b81b6020830152604051610b5f816119d2565b6801a055690d9db800008152602081016729a2241af62c0000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016101f4815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f516020616e585f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161127e578154600181811c911680156113b3575b602082101461126057601f811161136e575b506020601f8211600114611309578190879860069798926112fe575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b0392831617905590519190920155600254829116801515806112f4575b611292575b505060405190610d516040836119ee565b600782526622b7322ab9b2b960c91b6020830152604051610d71816119d2565b670429d069189e000081526020810166b1a2bc2ec5000081526040820183815260608301848152608084019185835260a085019286845260c086016103e8815260e08701906001825261010088019466b1a2bc2ec50000865261012089019a8b526101408901963388526101608a019862093a808a525f516020616e385f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161127e578154600181811c91168015611274575b602082101461126057601f811161121b575b506020601f82116001146111b6578190879860069798926111ab575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b0392831617905590519190920155600254829116801515806111a1575b61113a575b5060019052601660205280604081205560028152601660205268056bc75e2d631000006040822055600381526016602052681043561a88293000006040822055600481526016602052682086ac3510526000006040822055600581526016602052683635c9adc5dea000006040822055600681526016602052686c6b935b8bbd40000060408220556018546801000000000000000081101561112657600181018060185581101561111257600d9060188352602083200155601854680100000000000000008110156111265760018101806018558110156111125760229060188352602083200155601854680100000000000000008110156111265760018101806018558110156111125760599060188352602083200155601854680100000000000000008110156111265760018101806018558110156111125760e9906018835260208320015560185490680100000000000000008210156110fe5760018201806018558210156110ea5761026260409260188352602083200155338152601760205220600160ff198254161790556040516153f29081611a268239f35b634e487b7160e01b81526032600452602490fd5b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b82526032600452602482fd5b634e487b7160e01b82526041600452602482fd5b803b1561119e57818091606460405180948193636b26335560e11b83525f516020616e385f395f51905f5260048401526103e8602484015266b1a2bc2ec5000060448401525af115610f4b5781611190916119ee565b61119b57805f610f4b565b80fd5b50fd5b50803b1515610f46565b015190505f80610efd565b82875280872097601f198316885b8181106112035750916006979899918460019594106111eb575b505050811b019055610f11565b01515f1960f88460031b161c191690555f80806111de565b838301518b556001909a0199602093840193016111c4565b82875260208720601f830160051c81019160208410611256575b601f0160051c01905b81811061124b5750610ee1565b87815560010161123e565b9091508190611235565b634e487b7160e01b87526022600452602487fd5b90607f1690610ecf565b634e487b7160e01b86526041600452602486fd5b803b1561119e57818091606460405180948193636b26335560e11b83525f516020616e585f395f51905f5260048401526101f46024840152670de0b6b3a764000060448401525af115610d4057816112e9916119ee565b61119b57805f610d40565b50803b1515610d3b565b015190505f80610cf2565b82875280872097601f198316885b81811061135657509160069798999184600195941061133e575b505050811b019055610d06565b01515f1960f88460031b161c191690555f8080611331565b838301518b556001909a019960209384019301611317565b82875260208720601f830160051c810191602084106113a9575b601f0160051c01905b81811061139e5750610cd6565b878155600101611391565b9091508190611388565b90607f1690610cc4565b803b1561119e57818091606460405180948193636b26335560e11b83525f516020616e185f395f51905f5260048401526103e86024840152674563918244f4000060448401525af115610b2c5781611414916119ee565b61119b57805f610b2c565b50803b1515610b27565b015190505f80610ade565b82875280872097601f198316885b818110611481575091600697989991846001959410611469575b505050811b019055610af2565b01515f1960f88460031b161c191690555f808061145c565b838301518b556001909a019960209384019301611442565b82875260208720601f830160051c810191602084106114d4575b601f0160051c01905b8181106114c95750610ac2565b8781556001016114bc565b90915081906114b3565b90607f1690610ab0565b803b1561119e57818091606460405180948193636b26335560e11b83525f516020616ed85f395f51905f5260048401526103e86024840152670de0b6b3a764000060448401525af11561091e578161153f916119ee565b61119b57805f61091e565b50803b1515610919565b015190505f806108d0565b82875280872097601f198316885b8181106115ac575091600697989991846001959410611594575b505050811b0190556108e4565b01515f1960f88460031b161c191690555f8080611587565b838301518b556001909a01996020938401930161156d565b82875260208720601f830160051c810191602084106115ff575b601f0160051c01905b8181106115f457506108b4565b8781556001016115e7565b90915081906115de565b90607f16906108a2565b803b1561119e57818091606460405180948193636b26335560e11b83525f516020616eb85f395f51905f5260048401526103e86024840152670de0b6b3a764000060448401525af11561070e578161166a916119ee565b61119b57805f61070e565b50803b1515610709565b015190505f806106c0565b82875280872097601f198316885b8181106116d75750916006979899918460019594106116bf575b505050811b0190556106d4565b01515f1960f88460031b161c191690555f80806116b2565b838301518b556001909a019960209384019301611698565b82875260208720601f830160051c8101916020841061172a575b601f0160051c01905b81811061171f57506106a4565b878155600101611712565b9091508190611709565b90607f1690610692565b803b1561119e57818091606460405180948193636b26335560e11b83525f516020616e785f395f51905f5260048401526103e86024840152671bc16d674ec8000060448401525af1156104f85781611795916119ee565b61119b57805f6104f8565b50803b15156104f3565b015190505f806104aa565b82875280872097601f198316885b8181106118025750916006979899918460019594106117ea575b505050811b0190556104be565b01515f1960f88460031b161c191690555f80806117dd565b838301518b556001909a0199602093840193016117c3565b82875260208720601f830160051c81019160208410611855575b601f0160051c01905b81811061184a575061048e565b87815560010161183d565b9091508190611834565b90607f169061047c565b803b156118c9575f8091606460405180948193636b26335560e11b83525f516020616e985f395f51905f5260048401526103e86024840152670de0b6b3a764000060448401525af1156102e0576118c291505f906119ee565b5f5f6102e0565b5f80fd5b50803b15156102db565b015190505f80610294565b601f19821697835f52815f20985f5b818110611930575091600697989991846001959410611918575b505050811b0190556102a8565b01515f1960f88460031b161c191690555f808061190b565b838301518b556001909a0199602093840193016118f1565b825f5260205f20601f830160051c81019160208410611983575b601f0160051c01905b8181106119785750610278565b5f815560010161196b565b9091508190611962565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610266565b634e487b7160e01b5f52604160045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b61018081019081106001600160401b038211176119ab57604052565b601f909101601f19168101906001600160401b038211908210176119ab57604052565b51906001600160a01b03821682036118c95756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306a36aee14613fb65750806307cf0ee914613f2d5780630ab0c75e146139435780630dbb4929146138fb57806310fdfea7146138d357806311c85b0b1461389a57806315de32ca1461384557806317e1c595146132c457806319c46e811461329b5780631a08a819146132605780631b02e44f14612cc85780631c5bf6bb14612bfe5780631cae041214612baf5780632822ffce14612b765780632c333e2514612ac857806336db9caf14612a835780633b60288a14612a54578063410087ad146129f257806343e6a160146129ca5780634b8b8a6e146129a057806354fd4d501461294e57806359dc9126146129015780635c445412146128c75780635ee05b17146126305780636229738c146125b1578063669d776214611f64578063682bb1c914611d91578063715018a614611d4a578063727b52a5146115a657806377c0d7e7146115615780637f52815514611516578063826600ce146114ed57806385513971146114355780638da5cb5b1461140e5780638ff39099146113a3578063919d1e2c1461137a57806391d1485414611330578063920983fb146112ef578063995d74ef146112845780639b1465a314611249578063a2d0020e14611221578063a3246ad314611168578063a3b2298814610dd5578063a9d5652314610d71578063aa9e8cf714610d3e578063af5eda0214610d14578063b5e936ab14610b2f578063bc95910114610ac4578063be30742f14610a9b578063bf0cb04214610a73578063bf28c98a14610a34578063c8ee23ef146109ef578063cb31e2f1146108cc578063cd5d1e7414610861578063ce830e7b146105cb578063d12b93ff146105a2578063e350d77b14610578578063e74c7bd71461053f578063e79e9739146104d4578063e7b8913814610472578063e9ebf83114610437578063f2fde38b146103c45763f538e1dc146102d3575f80fd5b346103c15760203660031901126103c1576040906004358152600760205220805460018201549160028101546103b06003830154604051906103238261031c81600489016141d9565b03836142c0565b60ff600660018060a01b03600588015416960154946040519889988952602089015263ffffffff8116604089015263ffffffff8160201c16606089015263ffffffff8160401c16608089015263ffffffff8160601c1660a089015261ffff8160801c1660c089015260901c16151560e08701526101008601526101806101208601526101808501906142e3565b916101408401526101608301520390f35b80fd5b50346103c15760203660031901126103c1576103de614067565b6103e661495e565b6001600160a01b031680156104235781546001600160a01b03198116821783556001600160a01b03165f51602061531d5f395f51905f528380a380f35b631e4fbdf760e01b82526004829052602482fd5b50346103c157806003193601126103c15760206040517f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d8152f35b50346103c15760203660031901126103c157600435906001600160401b0382116103c15760206104a53660048501614322565b8160405191805191829101835e600f90820190815281900382019020546040516001600160a01b039091168152f35b50346103c15760203660031901126103c1576104ee614067565b6104f661495e565b600480546001600160a01b039283166001600160a01b0319821681179092559091167f1f7cd67c986d0cce4aa6f69075b5278a05438ef2a5d1abf6eeded51ba81232458380a380f35b50346103c15760203660031901126103c1576020906040906001600160a01b03610567614067565b168152601583522054604051908152f35b50346103c15760203660031901126103c15760406020916004358152601b83522054604051908152f35b50346103c157806003193601126103c1576006546040516001600160a01b039091168152602090f35b50346103c15760803660031901126103c1576105e5614067565b6024356001600160401b03811161085d57610604903690600401614171565b916044356001600160401b03811161085957610624903690600401614171565b9390926064356001600160401b038111610710576106469036906004016140bd565b919095610651614984565b338852601760205260ff6040892054161561081457610671818514614509565b6004546001600160a01b03169283156107d65781838a99879360018060a01b0360065416918b8b841515806107cd575b610714575b5050505050505050823b156107105786946106d9869260405198899788968795632fa66a7f60e11b8752600487016148fa565b03925af18015610705576106f0575b506001805580f35b816106fa916142c0565b6103c157805f6106e8565b6040513d84823e3d90fd5b8680fd5b61073060209761073e9361075b9a604051998a958c87016148fa565b03601f1981018652856142c0565b604051635c73957b60e11b815295869485938493600485016145a6565b03915afa80156107c2578890610783575b61077691506145cc565b8381835f80808b8b6106a6565b506020813d6020116107ba575b8161079d602093836142c0565b810103126107b6576107b1610776916144bb565b61076c565b8780fd5b3d9150610790565b6040513d8a823e3d90fd5b508315156106a1565b60405162461bcd60e51b815260206004820152601660248201527514dd5c195c94185e5b585cdd195c881b9bdd081cd95d60521b6044820152606490fd5b60405162461bcd60e51b815260206004820152601e60248201527f556e617574686f72697a65642052657075746174696f6e20536f7572636500006044820152606490fd5b8480fd5b8280fd5b50346103c15760203660031901126103c15761087b614067565b61088361495e565b600380546001600160a01b039283166001600160a01b0319821681179092559091167f171f7dbde35aed7cddf3ece2dad8f4eb62443a3d6bf8616586da6fd03c6b4ed98380a380f35b50346103c1576108db366140a7565b906108e461495e565b601854808210156109b45781610976575b5f19810190811161096257811061092e575b610913610929916140ea565b819391549060031b91821b915f19901b19161790565b905580f35b60018101808211610962576109299161095a61094c610913936140ea565b90549060031b1c85106148af565b915050610907565b634e487b7160e01b84526011600452602484fd5b5f1982018281116109a05761098d61099b916140ea565b90549060031b1c84116148af565b6108f5565b634e487b7160e01b85526011600452602485fd5b60405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b6044820152606490fd5b50346103c15760403660031901126103c1576040610a0b61407d565b9160043581526009602052209060018060a01b03165f52602052602060405f2054604051908152f35b50346103c15760203660031901126103c15760209060ff906040906001600160a01b03610a5f614067565b168152601784522054166040519015158152f35b50346103c157806003193601126103c15760206040515f51602061535d5f395f51905f528152f35b50346103c157806003193601126103c1576005546040516001600160a01b039091168152602090f35b50346103c15760203660031901126103c157610ade614067565b610ae661495e565b600580546001600160a01b039283166001600160a01b0319821681179092559091167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b50346103c15760203660031901126103c15780604051610b4e8161425a565b8181528160208201528160408201528160608201528160808201528160a08201528160c08201528160e0820152816101008201526101208101606090528161014082015261016001526004358152600760205260409020604051610bb18161425a565b81548152600182015491602082019283526002810154604083019063ffffffff8116825260608401908060201c63ffffffff16825260808501908060401c63ffffffff16825260a086018160601c63ffffffff16815260c08701908260801c61ffff16825260e088019260901c60ff1615158352600387015493610100890194855260405195868060048b0190610c47916141d9565b03610c5290886142c0565b6101208a01968752600160a01b6001900360058a015416986101408b01998a5260060154976101608b019889526040519b8c9b60208d525160208d01525160408c01525163ffffffff1660608b01525163ffffffff1660808a01525163ffffffff1660a08901525163ffffffff1660c08801525161ffff1660e08701525115156101008601525161012085015251610140840161018090526101a08401610cf8916142e3565b91516001600160a01b0316610160840152516101808301520390f35b50346103c15760203660031901126103c15760406020916004358152601683522054604051908152f35b50346103c15760203660031901126103c1576020906004358152601a8252604060018060a01b0391205416604051908152f35b50346103c15760403660031901126103c157610d8b61407d565b610d9361495e565b610da76001600160a01b0382161515614873565b6004358252601a6020526040822080546001600160a01b0319166001600160a01b0390921691909117905580f35b50346103c15760603660031901126103c157602435906004356001600160401b038311611164578260040183360393610180600319860112611099576044356001600160a01b038116919082900361085957610e2f61495e565b838552601a60205260408520546001600160a01b031661112957610e54821515614873565b838552600760205260408520918335835560248201356001840155600283019263ffffffff610e85604485016146a9565b16845463ffffffff60201b610e9c606487016146a9565b60201b1663ffffffff60401b610eb4608488016146a9565b60401b169163ffffffff60601b610ecd60a489016146a9565b60601b169363ffffffff60601b199160018060601b0319161716171717845560c4830193610f03610efd8661465f565b826146ba565b60e484013580151580910361112557815460ff60901b191660909190911b60ff60901b1617905561010483013560038201819055600482019890939061012482013590602219018112156111255781019860048a01356001600160401b0381116111215780360360248c011361112157610f8781610f8184546141a1565b846143f6565b89601f82116001146110ab5791610fb38260069593610164958e9f8f9d9e9f9261109d575b5050614445565b90555b610fc36101448201614632565b6005850180546001600160a01b03199081166001600160a01b039384161790915592909101359290930191909155878652601a60205260408620805490911690921790915560025416916110169061465f565b90823b1561109957604051636b26335560e11b81526004810187905261ffff92909216602483015260448201529082908290606490829084905af1801561070557611084575b505061107e5f5160206152bd5f395f51905f52916040519182914290836146ea565b0390a280f35b8161108e916142c0565b61085d57825f61105c565b8380fd5b016024013590505f80610fac565b828b5260208b2090601f1983168c5b81811061110657509261016494928d9e6001939d9e9c9d8360069997106110e9575b505050811b019055610fb6565b6024910101355f19600384901b60f8161c191690555f80806110dc565b60248f840101358455600190930192602092830192016110ba565b8980fd5b8880fd5b60405162461bcd60e51b8152602060048201526013602482015272526f6c6520616c72656164792065786973747360681b6044820152606490fd5b5080fd5b50346103c15760203660031901126103c1576004358152600a60205260408120604051908160208254918281520190819285526020852090855b81811061120257505050826111b89103836142c0565b604051928392602084019060208552518091526040840192915b8181106111e0575050500390f35b82516001600160a01b03168452859450602093840193909201916001016111d2565b82546001600160a01b03168452602090930192600192830192016111a2565b50346103c157806003193601126103c15760206040515f5160206152fd5f395f51905f528152f35b50346103c157806003193601126103c15760206040517f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f88152f35b50346103c15760203660031901126103c15761129e614067565b6112a661495e565b600680546001600160a01b039283166001600160a01b0319821681179092559091167f9e5ee21152afb219d78a3588775fe954c5094514af1627c6d4b203175091d3048380a380f35b50346103c15760203660031901126103c1576020906001600160a01b03611314614067565b16815260108252604060018060a01b0391205416604051908152f35b50346103c15760403660031901126103c157604061134c61407d565b9160043581526008602052209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b50346103c157806003193601126103c1576004546040516001600160a01b039091168152602090f35b50346103c15760203660031901126103c1576113bd614067565b6113c561495e565b600280546001600160a01b039283166001600160a01b0319821681179092559091167f7042586b23181180eb30b4798702d7a0233b7fc2551e89806770e8e5d9392e6a8380a380f35b50346103c157806003193601126103c157546040516001600160a01b039091168152602090f35b50346103c157611444366140a7565b818352601a60205260408320546001600160a01b0316331415806114d9575b6114a55760207f13fa7976d19366a82359594f556abe5fe2d49e404db9fc466282cdb6471c629a9183855260078252806006604087200155604051908152a280f35b60405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606490fd5b5082546001600160a01b0316331415611463565b50346103c157806003193601126103c1576002546040516001600160a01b039091168152602090f35b50346103c157611525366140a7565b91908152600a602052604081209081548310156103c15760206115488484614116565b905460405160039290921b1c6001600160a01b03168152f35b50346103c15760403660031901126103c157604061157d61407d565b916004358152600b602052209060018060a01b03165f52602052602060405f2054604051908152f35b50346103c15760203660031901126103c1576004356115c3614984565b808252600860209081526040808420335f908152925290205460ff1615611d34578082526007602052600660408320015480611bfe575b50808252600960209081526040808420335f9081529252902054905f5160206152dd5f395f51905f52810361197b5760035483906001600160a01b0316803b15611164578180916024604051809481936316bf12d760e21b83523360048401525af1801561070557611966575b50505b80604051838152604060208201526004604082015263115e1a5d60e21b60608201527fe80f99d9789e367c229c526d3d3f84d44d3daf77ea65f7bbe8510f176ac45a2360803392a3808352600860209081526040808520335f8181529190935220805460ff191690556116dd9082614ded565b33835260136020526040832054611949575b33835260126020526040832091825492845b8481106118a5575b505090915033835260136020526040832054156117ed575b60025460405163374e4d7360e01b8152919060209083906001600160a01b0316818781611752893360048401614392565b03925af19081156117e25784916117a8575b61176e9250614646565b906040519182524260208301527f0d9361411a652b66cd4aed24a96d36c0b048899896c927d879a9d3ba2790d9c660403393a36001805580f35b90506020823d6020116117da575b816117c3602093836142c0565b810103126117d65761176e915190611764565b5f80fd5b3d91506117b6565b6040513d86823e3d90fd5b60045483906001600160a01b03168061185a575b506003546001600160a01b0316803b156111645781809160246040518094819363374e7fa360e01b83523360048401525af1801561070557611845575b5050611721565b8161184f916142c0565b61085d57825f61183e565b803b15611164578180916044604051809481936351cb857360e11b83523360048401528160248401525af180156107055715611801578161189a916142c0565b61085d57825f611801565b836118b08284614116565b90549060031b1c146118c457600101611701565b909192935f198101908111611935576109136118e36118f19285614116565b90549060031b1c9284614116565b905580548015611921575f1901906119098282614116565b8154905f199060031b1b191690555581905f80611709565b634e487b7160e01b85526031600452602485fd5b634e487b7160e01b86526011600452602486fd5b33835260136020526040832061195f8154614653565b90556116ef565b81611970916142c0565b61085d57825f611667565b5f5160206152fd5f395f51905f52810361166a57808352600d6020526040832060018060a01b0333165f526020526119bf6119c660405f20604051928380926141d9565b03826142c0565b805180611a30575b505060035483906001600160a01b0316803b156111645781809160446040518094819363d977b66b60e01b83523360048401523360248401525af1801561070557611a1b575b505061166a565b81611a25916142c0565b61085d57825f611a14565b8101906020820190602081840312611bfa576020810151906001600160401b03821161071057019160c090839003126108595760405190611a708261428a565b60208301516001600160401b03811161071057816020611a9292860101614859565b825260408301516001600160401b03811161071057816020611ab692860101614859565b6020830190815260608401519093906001600160401b0381116107b657826020611ae292840101614859565b604084015260808101516001600160401b0381116107b657826020611b0992840101614859565b606084015260a08101516001600160401b0381116107b65760c0926020611b3292840101614859565b6080840152015160a0820152805133906001600160a01b0390611b5490614366565b541614611bdc575b5080518051908115159182611bac575b5050611b79575b806119ce565b6020809151604051928184925191829101835e600f9082019081520301902080546001600160a01b03191690555f611b73565b8091925060206040519301835e600f9082019081528190036020019020546001600160a01b031633145f80611b6c565b611be69051614366565b80546001600160a01b03191690555f611b5c565b8580fd5b6002546040516318581cf760e11b815290849082906001600160a01b03168180611c2c883360048401614392565b03915afa80156117e2578490611cae575b65ffffffffffff915016908101809111611c9a574210611c5d575f6115fa565b60405162461bcd60e51b8152602060048201526015602482015274131bd8dac8191d5c985d1a5bdb881b9bdd081b595d605a1b6044820152606490fd5b634e487b7160e01b83526011600452602483fd5b503d8085833e611cbe81836142c0565b81019060a08183031261085957611cd48161480f565b50611ce16020820161480f565b5060408101519065ffffffffffff82168203611bfa576080810151906001600160401b038211610710570182601f82011215611bfa5765ffffffffffff92816020611d2e93519101614823565b50611c3d565b633a401ef360e21b825260045233602452604490fd5b50346103c157806003193601126103c157611d6361495e565b80546001600160a01b03198116825581906001600160a01b03165f51602061531d5f395f51905f528280a380f35b50346103c15760a03660031901126103c157600435606435608435611db461495e565b611dc26107d083111561466e565b82845260076020526040842060243581556001810190604435825561ffff8411611f2857856002820193611dfa61ffff8716866146ba565b600383019581875560018060a01b036002541690813b15611099576064898580946040519687958694636b26335560e11b86526004860152602485015260448401525af1801561070557611f13575b50505f5160206152bd5f395f51905f529360ff60405194859460408652845460408701525460608601525463ffffffff8116608086015263ffffffff8160201c1660a086015263ffffffff8160401c1660c086015263ffffffff8160601c1660e086015261ffff8160801c1661010086015260901c161515610120840152546101408301526101806101608301526006611eea6101c08401600484016141d9565b60058301546001600160a01b03166101808501529101546101a08301524260208301520390a280f35b81611f1d916142c0565b611bfa57855f611e49565b60405162461bcd60e51b81526020600482015260146024820152732b30b63ab29032bc31b2b2b239903ab4b73a189b60611b6044820152606490fd5b50346103c157611f733661412b565b611f809493919294614984565b6001600160a01b03851692831561257b576108008211612544578285526007602052604085209160405191611fb48361425a565b8354835260018401549360208401948552600660028201549163ffffffff8316604087015263ffffffff8360201c16606087015263ffffffff8360401c16608087015263ffffffff8360601c1660a087015261ffff8360801c1660c087015260ff60e087019360901c16151583526003810154610100870152604051612041816119bf81600486016141d9565b61012087015260058101546001600160a01b0316610140870152015461016085015251158061252c5750848752600860205260408720865f5260205260ff60405f20541692838094612515575b6124fe575f51602061533d5f395f51905f52861480156124e8575b612498575b6120b98383886149a4565b90518082106124805750836123de57858852600860205260408820875f5260205260405f20600160ff19825416179055858852600960205260408820875f526020528060405f2055858852600a6020526121168960408a206143ad565b858852600a6020526040882054868952600b60205260408920885f5260205260405f20558688526013602052604088206121508154614499565b9055868852601260205260408820805490600160401b8210156123ca579187612185610913848e966001602097018155614116565b905560018060a01b03600254168751918b8a6121b860405197889687958694635f7d2b8760e11b86528360048701614466565b03925af180156107c25761239b575b505b848752600d602090815260408089205f89815292529020976001600160401b03831161238757612203836121fd8b546141a1565b8b6143f6565b8798601f84116001146123205761222b84808b9c61226598999a9b9c91612315575b50614445565b90555b604061223c8484848b614c1d565b60018060a01b0360035416898c8451809981958294631f1f342160e11b845289600485016144e5565b03925af1801561230a57612298948a916122da575b50878a52600c60205260408a20895f5260205260405f205586614c8a565b156122c357505f51602061537d5f395f51905f526040845b8151908152426020820152a36001805580f35b60405f51602061537d5f395f51905f5291516122b0565b6122fc915060403d604011612303575b6122f481836142c0565b8101906144c8565b505f61227a565b503d6122ea565b6040513d8b823e3d90fd5b90508501355f612225565b80895260208920601f1985169a8a5b8c811061236f5750856122659798999a9b9c10612356575b5050600184811b01905561222e565b8401355f19600387901b60f8161c191690555f80612347565b9091602060018192858901358155019301910161232f565b634e487b7160e01b88526041600452602488fd5b6123bc9060203d6020116123c3575b6123b481836142c0565b810190614457565b505f6121c7565b503d6123aa565b634e487b7160e01b8a52604160045260248afd5b60018060a01b0360025416868952600960205260408920885f5260205261240960405f205483614646565b813b1561112157899060848a8360405195869485936325e5c05160e11b855260048501528d602485015260448401528d60648401525af1801561230a5790899161246b575b50869052600960205260408820875f5260205260405f20556121c9565b81612475916142c0565b6107b657875f61244e565b6322df051360e11b8952600491909152602452604487fd5b5f5160206152fd5f395f51905f528852600860205260408820875f5260205260ff60405f2054166120ae57633a401ef360e21b88525f5160206152fd5f395f51905f526004526024879052604488fd5b505f51602061535d5f395f51905f5286146120a9565b6044888888631b753c1b60e21b8352600452602452fd5b505f5160206152dd5f395f51905f5286141561208e565b63159818c760e11b8852600486905215602452604487fd5b6040516305519d6f60e51b815260206004820152600e60248201526d4461746120746f6f206c6172676560901b6044820152606490fd5b6040516305519d6f60e51b815260206004820152600d60248201526c155cd95c881c995c5d5a5c9959609a1b6044820152606490fd5b50346103c15760403660031901126103c1576125cb614067565b6024359081151580920361085d5760207f6be30291a8f228c9342613e5e66df1a1b85aa570ac1bca9219f3ac7b7f73bbf39161260561495e565b6001600160a01b0316808552601782526040808620805460ff191660ff87161790555193845292a280f35b50346103c15760403660031901126103c157602435906004356001600160401b03831161116457826004018336039361018060031986011261109957828452601a60205260408420546001600160a01b0316331415806128b3575b6114a55760c48101906126ae6107d061ffff6126a68561465f565b16111561466e565b83855260076020526040852083358155602482013560018201556002810163ffffffff6126dd604485016146a9565b16815463ffffffff60201b6126f4606487016146a9565b60201b1663ffffffff60401b61270c608488016146a9565b60401b169163ffffffff60601b61272560a489016146a9565b60601b169363ffffffff60601b199160018060601b03191617161717178155612750610efd8561465f565b60e48301358015158091036107b657815460ff60901b191660909190911b60ff60901b1617905561010482013560038201819055600482019790929061012482013590602219018112156107b65781019760048901356001600160401b0381116111255780360360248b0113611125576127ce81610f8184546141a1565b88601f821160011461283d57916127f98260069593610164958d9e8e9c9d9e9261109d575050614445565b90555b6128096101448201614632565b6005850180546001600160a01b0319166001600160a01b03928316179055910135919092015560025416916110169061465f565b828a5260208a2090601f1983168b5b81811061289857509261016494928c9d600193839d9e9c9d600699971061287b575b505050811b0190556127fc565b6024910101355f19600384901b60f8161c191690555f808061286e565b60248e8401013584556001909301926020928301920161284c565b5083546001600160a01b031633141561268b565b50346103c15760203660031901126103c157600435906018548210156103c15760206128f2836140ea565b90549060031b1c604051908152f35b50346103c15760203660031901126103c1576119bf612936604061294a936004358152601960205220604051928380926141d9565b6040519182916020835260208301906142e3565b0390f35b50346103c157806003193601126103c1575061294a6040516129716040826142c0565b600e81526d2932b3b4b9ba393c96999718171960911b60208201526040519182916020835260208301906142e3565b50346103c15760203660031901126103c15760406020916004358152600a83522054604051908152f35b50346103c157806003193601126103c15760206040515f5160206152dd5f395f51905f528152f35b50346103c15760203660031901126103c157600435906001600160401b0382116103c1576020612a253660048501614322565b8160405191805191829101835e600e90820190815281900382019020546040516001600160a01b039091168152f35b50346103c15760203660031901126103c15760ff60406020926004358152601184522054166040519015158152f35b50346103c15760403660031901126103c1576040612a9f61407d565b916004358152600c602052209060018060a01b03165f52602052602060405f2054604051908152f35b50346103c15760203660031901126103c1576001600160a01b03612aea614067565b16815260146020526040812054600190601854805b612b1a575b6020604085858152601683522054604051908152f35b5f1981018181116109a057612b2e906140ea565b90549060031b1c821015612b4b57612b4590614653565b80612aff565b8092506001915001809111612b6257816040612b04565b634e487b7160e01b82526011600452602482fd5b50346103c15760203660031901126103c1576020906040906001600160a01b03612b9e614067565b168152601383522054604051908152f35b50346103c15760403660031901126103c1576040612bcb61407d565b916004358152600d602052209060018060a01b03165f5260205261294a6119bf61293660405f20604051928380926141d9565b50346103c15760203660031901126103c157600435612c1b61495e565b60185480612c57575b600160401b811015612c435761091381600161092993016018556140ea565b634e487b7160e01b83526041600452602483fd5b5f19810181811161096257612c6b906140ea565b90549060031b1c8211612c245760405162461bcd60e51b815260206004820152602260248201527f5468726573686f6c64206d75737420626520686967686572207468616e206c616044820152611cdd60f21b6064820152608490fd5b50346103c15760a03660031901126103c1576004356024356001600160401b03811161085d57612cfc903690600401614171565b90916044356001600160401b03811161085957612d1d903690600401614171565b9093909160643591906084356001600160401b0381116107b657612d459036906004016140bd565b612d50929192614984565b338952601760205260ff60408a2054161561081457612d70868814614509565b8015613226578083016080848203126111215783356001600160401b0381116130945781612d9f918601614322565b5060208401356001600160401b0381116130945781612dbf918601614322565b506040840135906001600160401b03821161309457612ddf918501614322565b50886060840135805b6131f35750600554600391906001600160a01b031680613191575b501061314d576006546001600160a01b0316156131095781613098575b604051926020840192835289604085015289606085015260e06080850152612e4d61010085018987614547565b848103601f190160a0860152878152926001600160fb1b0388116130945784612e9e6020612ee5978d82988d60051b8092858301378c60c08401524660e0840152010301601f1981018352826142c0565b519020916040519284840152838352612eb86040846142c0565b600654604051635c73957b60e11b81529586946001600160a01b03909216938593849391600485016145a6565b03915afa801561308957879061304e575b612f0091506145cc565b855b848110612f1157866001805580f35b6001600160a01b03612f2c612f27838886614622565b614632565b16808852601560205260408820548411156130445780885260146020526040882054612f5983878a614622565b359080821115612fef576064612f6f8284614646565b11612fbb575b50905f51602061539d5f395f51905f526040600194935b838c52601460205280828d2055838c52601560205287828d20558151908152876020820152a201935b93612f02565b905060648101809111612fdb575f51602061539d5f395f51905f52612f75565b634e487b7160e01b89526011600452602489fd5b818111613012575b50905f51602061539d5f395f51905f52604060019493612f8c565b606461301e8383614646565b1115612ff757606319810191508111612fdb575f51602061539d5f395f51905f52612ff7565b5060010193612fb5565b506020813d602011613081575b81613068602093836142c0565b810103126107105761307c612f00916144bb565b612ef6565b3d915061305b565b6040513d89823e3d90fd5b8a80fd5b818952601160205260ff60408a2054166130c857818952601160205260408920805460ff19166001179055612e20565b60405162461bcd60e51b8152602060048201526019602482015278141c9bdc1bdcd85b08185b1c9958591e48195e1958dd5d1959603a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527b109314c815985b1a59185d1bdc881b9bdd0818dbdb999a59dd5c995960221b6044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f496e73756666696369656e7420636f6e73656e737573207468726573686f6c646044820152fd5b602060049160405192838092630859bc9d60e31b82525afa8c91816131bf575b5015612e035791505f612e03565b9091506020813d6020116131eb575b816131db602093836142c0565b810103126117d65751905f6131b1565b3d91506131ce565b5f19810190808211613212571690819061320c90614499565b91612de8565b634e487b7160e01b8c52601160045260248cfd5b60405162461bcd60e51b8152602060048201526012602482015271109314c8141c9bdbd9881c995c5d5a5c995960721b6044820152606490fd5b50346103c157806003193601126103c15760206040517f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a8152f35b50346103c157806003193601126103c1576003546040516001600160a01b039091168152602090f35b50346103c1576132d33661412b565b6132df94939194614984565b81845260076020526040842090604051956132f98761425a565b8254875260018301549260208801938452600660028201549163ffffffff831660408b015263ffffffff8360201c1660608b015263ffffffff8360401c1660808b015263ffffffff8360601c1660a08b015261ffff8360801c1660c08b015260ff60e08b019360901c161515835260038101546101008b0152604051613386816119bf81600486016141d9565b6101208b015260058101546001600160a01b03166101408b0152015461016089015251158061382d575083865260086020526040862060018060a01b0386165f5260205260ff60405f20541661380c575f5160206152fd5f395f51905f528652600860209081526040808820335f908152925290205460ff16156137cc575f51602061533d5f395f51905f52841480156137b6575b613756575b61342b8282866149a4565b965180881061373f57508386526008602090815260408088206001600160a01b0388165f818152918452828220805460ff19166001179055878a5260098452828a209082528352819020899055858852600a909152862061348d9086906143ad565b838652600a6020908152604080882054868952600b83528189206001600160a01b0389165f81815291855283822092909255878a52600d8452828a20918152925290206001600160401b03831161372b576134f2836134ec83546141a1565b836143f6565b86601f84116001146136c4578798879261351686806020958d916136b95750614445565b90555b60018060a01b03600254168651918a8961354b60405197889687958694635f7d2b8760e11b8652339360048701614466565b03925af1801561308957613686575b506001600160a01b038516808752601360205260408720805491969161357f90614499565b90553386867f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8a80a460406135e66135b98585858a614c1d565b60035483516362c00b1f60e11b81529a8b936001600160a01b0390921692849283918c89600485016144e5565b03925af19687156107c257976020988198613646575b50925f51602061537d5f395f51905f52949261362e9260408689829852600c8d5220895f528b5289865f205587614c8a565b5181519081524287820152a360018055604051908152f35b6040949198509261362e92856136775f51602061537d5f395f51905f529896823d8411612303576122f481836142c0565b509a93965050925092946135fc565b95506020863d6020116136b1575b816136a1602093836142c0565b810103126117d65786955161355a565b3d9150613694565b90508701355f612225565b8188526020882090601f198516895b8181106137135750926020928a9b92878b96106136fa575b5050600186811b019055613519565b8601355f19600389901b60f8161c191690555f806136eb565b919260206001819286890135815501940192016136d3565b634e487b7160e01b87526041600452602487fd5b6322df051360e11b87526004889052602452604486fd5b5f5160206152fd5f395f51905f52865260086020526040862060018060a01b0386165f5260205260ff60405f20541661342057633a401ef360e21b86525f5160206152fd5f395f51905f526004526001600160a01b038516602452604486fd5b505f51602061535d5f395f51905f52841461341b565b60405162461bcd60e51b815260206004820152601860248201527743616c6c6572206d75737420626520436f6d6d756e69747960401b6044820152606490fd5b631b753c1b60e21b865260048490526001600160a01b038516602452604486fd5b63159818c760e11b8752600485905215602452604486fd5b50346103c1577f7e684e0b76ed13bc9cf7e4fbac7d11873036be9c9a83f9958382721eeda460106040613877366140a7565b61387f61495e565b8185526016602052808386205582519182526020820152a180f35b50346103c15760203660031901126103c1576020906040906001600160a01b036138c2614067565b168152601483522054604051908152f35b50346103c157806003193601126103c15760206040515f51602061533d5f395f51905f528152f35b50346103c15760403660031901126103c157613915614067565b6001600160a01b03168152601260205260408120805460243592908310156103c15760206128f28484614116565b50346117d65760403660031901126117d657600435906024356001600160401b0381116117d6576139789036906004016140bd565b9290613982614984565b331561257b57610800841161254457815f52600760205260405f2090604051906139ab8261425a565b8254825260018301549260208301938452600660028201549163ffffffff8316604086015263ffffffff8360201c16606086015263ffffffff8360401c16608086015263ffffffff8360601c1660a086015261ffff8360801c1660c086015260ff60e086019360901c16151583526003810154610100860152604051613a38816119bf81600486016141d9565b61012086015260058101546001600160a01b03166101408601520154610160840152511580613f1657505f84815260086020908152604080832033845290915290205460ff16918280613eff575b613ee8575f51602061533d5f395f51905f5285148015613ed2575b613e8c575b613ab18783876149a4565b9051808210613e76575082613dc257848652600860209081526040808820335f818152918452828220805460ff19166001179055888a5260098452828a20818352845290829020849055878952600a9092528720613b0f91906143ad565b848652600a6020526040862054858752600b6020526040872060018060a01b0333165f5260205260405f2055338652601360205260408620613b518154614499565b9055338652601260205260408620805490600160401b82101561238757613bbf9287613b896109138583956001602098018155614116565b90556002548751604051635f7d2b8760e11b81529586946001600160a01b039093169385938d9385939233928360048701614466565b03925af18015613d1757613da3575b505b838552600d60209081526040808720335f908152925290206001600160401b038711613d8f57613c04876134ec83546141a1565b8587601f8111600114613d2d5780613c22928991613d225750614445565b90555b846040613c64613c378985338a614c1d565b6003548351631f1f342160e11b81529485936001600160a01b0390921692849283918c33600485016144e5565b03925af1908115613d17579160409791613ca4938891613cf9575b50868852600c60205288882060018060a01b0333165f52602052885f20553386614c8a565b15613cf35750815b8351908152426020820152815f51602061537d5f395f51905f52853393a3600180558152600c6020522060018060a01b0333165f52602052602060405f2054604051908152f35b51613cac565b613d109150893d8b11612303576122f481836142c0565b505f613c7f565b6040513d88823e3d90fd5b90508401355f612225565b50818752602087209088601f198116895b818110613d74575010613d5b575b5050600187811b019055613c25565b8301355f1960038a901b60f8161c191690555f80613d4c565b8684013585556001909401936020938401938c935001613d3e565b634e487b7160e01b86526041600452602486fd5b613dbb9060203d6020116123c3576123b481836142c0565b505f613bce565b6002545f8681526009602090815260408083203384529091529020546001600160a01b0390911690613df49083614646565b813b156117d6575f916084839260405194859384926325e5c05160e11b84523360048501528c602485015260448401523360648401525af18015613e6b57613e56575b50848652600960209081526040808820335f9081529252902055613bd0565b613e639196505f906142c0565b5f945f613e37565b6040513d5f823e3d90fd5b906322df051360e11b5f5260045260245260445ffd5b335f9081525f51602061529d5f395f51905f52602052604090205460ff16613aa657633a401ef360e21b5f525f5160206152fd5f395f51905f526004523360245260445ffd5b505f51602061535d5f395f51905f528514613aa1565b84631b753c1b60e21b5f526004523360245260445ffd5b505f5160206152dd5f395f51905f52851415613a86565b8463159818c760e11b5f526004521560245260445ffd5b346117d657613f676040613f40366140a7565b5060018060a01b03600254168251808095819463b4d81fb360e01b83523360048401614392565b03915afa8015613e6b575f90613f83575b602090604051908152f35b506040813d604011613fae575b81613f9d604093836142c0565b810103126117d65760209051613f78565b3d9150613f90565b346117d65760203660031901126117d6576001600160a01b03613fd7614067565b165f52601260205260405f20908154808252602082019081935f5260205f20905f5b818110614051575050508161400f9103826142c0565b604051918291602083019060208452518091526040830191905f5b818110614038575050500390f35b825184528594506020938401939092019160010161402a565b8254845260209093019260019283019201613ff9565b600435906001600160a01b03821682036117d657565b602435906001600160a01b03821682036117d657565b35906001600160a01b03821682036117d657565b60409060031901126117d6576004359060243590565b9181601f840112156117d6578235916001600160401b0383116117d657602083818601950101116117d657565b6018548110156141025760185f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b8054821015614102575f5260205f2001905f90565b60606003198201126117d657600435916024356001600160a01b03811681036117d65791604435906001600160401b0382116117d65761416d916004016140bd565b9091565b9181601f840112156117d6578235916001600160401b0383116117d6576020808501948460051b0101116117d657565b90600182811c921680156141cf575b60208310146141bb57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916141b0565b5f92918154916141e8836141a1565b808352926001811690811561423d575060011461420457505050565b5f9081526020812093945091925b838310614223575060209250010190565b600181602092949394548385870101520191019190614212565b915050602093945060ff929192191683830152151560051b010190565b61018081019081106001600160401b0382111761427657604052565b634e487b7160e01b5f52604160045260245ffd5b60c081019081106001600160401b0382111761427657604052565b60a081019081106001600160401b0382111761427657604052565b601f909101601f19168101906001600160401b0382119082101761427657604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b6001600160401b03811161427657601f01601f191660200190565b81601f820112156117d65760208135910161433c82614307565b9261434a60405194856142c0565b828452828201116117d657815f92602092838601378301015290565b60208091604051928184925191829101835e8101600e81520301902090565b359081151582036117d657565b6001600160a01b039091168152602081019190915260400190565b80549190600160401b83101561427657826143d09160016143f495018155614116565b9080546001600160a01b0360039390931b83811b199091169290931690921b179055565b565b601f821161440357505050565b5f5260205f20906020601f840160051c8301931061443b575b601f0160051c01905b818110614430575050565b5f8155600101614425565b909150819061441c565b8160011b915f199060031b1c19161790565b908160209103126117d6575190565b6001600160a01b039182168152602081019290925260408201929092526060810192909252909116608082015260a00190565b5f1981146144a75760010190565b634e487b7160e01b5f52601160045260245ffd5b519081151582036117d657565b91908260409103126117d6576144e26020835193016144bb565b90565b6144e2939260609260018060a01b03168252602082015281604082015201906142e3565b1561451057565b60405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606490fd5b916020908281520191905f5b8181106145605750505090565b909192602080600192838060a01b0361457888614093565b168152019401929101614553565b908060209392818452848401375f828201840152601f01601f1916010190565b916144e293916145be91604085526040850191614586565b9160208184039101526142e3565b156145d357565b60405162461bcd60e51b815260206004820152602160248201527f52656769737472793a20424c5320566572696669636174696f6e204661696c656044820152601960fa1b6064820152608490fd5b91908110156141025760051b0190565b356001600160a01b03811681036117d65790565b919082039182116144a757565b80156144a7575f190190565b3561ffff811681036117d65790565b1561467557565b60405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606490fd5b3563ffffffff811681036117d65790565b805461ffff60801b191660809290921b61ffff60801b16919091179055565b359063ffffffff821682036117d657565b92919060408452803560408501526020810135606085015263ffffffff614713604083016146d9565b16608085015263ffffffff61472a606083016146d9565b1660a085015263ffffffff614741608083016146d9565b1660c085015263ffffffff61475860a083016146d9565b1660e085015260c081013561ffff81168091036117d65761010085015261478160e08201614385565b1515610120850152610100810135610140850152610120810135601e19823603018112156117d6578101803591906020016001600160401b0383116117d65782360381136117d6576147e561016091602094610180848a01526101c0890191614586565b916001600160a01b036147fb6101408301614093565b1661018088015201356101a0860152930152565b51906001600160801b03821682036117d657565b92919261482f82614307565b9161483d60405193846142c0565b8294818452818301116117d6578281602093845f96015e010152565b9080601f830112156117d65781516144e292602001614823565b1561487a57565b60405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b6044820152606490fd5b156148b657565b60405162461bcd60e51b815260206004820152601c60248201527b5468726573686f6c6473206d75737420626520617363656e64696e6760201b6044820152606490fd5b9160209361491f9296959660018060a01b031684526060858501526060840191614547565b9060408183039101528281520191905f5b81811061493d5750505090565b90919260208060019261494f87614385565b15158152019401929101614930565b5f546001600160a01b0316330361497157565b63118cdaa760e01b5f523360045260245ffd5b600260015414614995576002600155565b633ee5aeb560e01b5f5260045ffd5b9291905f845f52600760205260405f20946006604051966149c48861425a565b805488526001810154602089015260ff600282015463ffffffff811660408b015263ffffffff8160201c1660608b015263ffffffff8160401c1660808b015263ffffffff8160601c1660a08b015261ffff8160801c1660c08b015260901c16151560e08901526003810154610100890152604051614a49816119bf81600486016141d9565b61012089015260058101546001600160a01b031661014089015201546101608701525f5160206152fd5f395f51905f528103614b2a57505090614a8b9161507f565b80515115614af45780516001600160a01b0390614aa790614366565b5416614ac15760a00151915b8215614abc5750565b519150565b6040516305519d6f60e51b815260206004820152600a6024820152692730b6b2903a30b5b2b760b11b6044820152606490fd5b6040516305519d6f60e51b815260206004820152600d60248201526c13985b59481c995c5d5a5c9959609a1b6044820152606490fd5b5f5160206152dd5f395f51905f5203614bd1575090614b4891614ef4565b5f5160206152fd5f395f51905f525f90815260086020908152828101516001600160a01b031682525f51602061529d5f395f51905f529052604090205460ff1615614b97576080015191614ab3565b6040516305519d6f60e51b8152602060048201526011602482015270496e76616c696420636f6d6d756e69747960781b6044820152606490fd5b939160208114614be3575b5050614ab3565b8192945090602091810103126117d65735915f80614bdc565b6001600160a01b0390911681526040602082018190525f9082015260600190565b9092905f5160206152dd5f395f51905f5214614c595750506144e2614c4b9160405192839160208301614bfc565b03601f1981018352826142c0565b614c4b92506144e2916001600160a01b0391602091614c789190614ef4565b01511660405192839160208301614bfc565b600454919392915f91906001600160a01b031680614d95575b505f5160206152fd5f395f51905f528103614d32575050602091614cc69161507f565b614cd08151614366565b80546001600160a01b0319166001600160a01b0385161790550151805180614cf8575b505050565b60209181839260405194859301835e600f9082019081520301902080546001600160a01b0319166001600160a01b03909216919091179055565b9091905f5160206152dd5f395f51905f5214614d4f575b50505050565b6040926001600160a01b0391614d659190614ef4565b5116815260106020522080546001600160a01b0319166001600160a01b039092169190911790555f808080614d49565b803b156117d6576040516351cb857360e11b81526001600160a01b038716600482015260016024820152905f908290604490829084905af18015613e6b5715614ca357614de59192505f906142c0565b5f905f614ca3565b805f52600b60205260405f2060018060a01b0383165f5260205260405f20548015614cf357815f52600a60205260405f20905f1981018181116144a75782545f1981019081116144a757808203614ea1575b50505080548015614e8d575f190190614e588282614116565b81549060018060a01b039060031b1b19169055555f52600b60205260405f209060018060a01b03165f526020525f6040812055565b634e487b7160e01b5f52603160045260245ffd5b6143d091614eb2614ecd9286614116565b905460039190911b1c6001600160a01b031692839186614116565b835f52600b60205260405f209060018060a01b03165f5260205260405f20555f8080614e3f565b90604051614f01816142a5565b5f81525f6020820152606060408201526060808201525f60808201525060208110158061506c575b15614fd5578101906020818303126117d6578035906001600160401b0382116117d657019060a0828203126117d65760405191614f65836142a5565b614f6e81614093565b8352614f7c60208201614093565b602084015260408101356001600160401b0381116117d65782614fa0918301614322565b604084015260608101356001600160401b0381116117d657608092614fc6918301614322565b60608401520135608082015290565b810160a0828203126117d657614fea82614093565b91614ff760208201614093565b60408201356001600160401b0381116117d65783615016918401614322565b60608301356001600160401b0381116117d657608094615037918501614322565b9160405195615045876142a5565b6001600160a01b039081168752166020860152604085015260608401520135608082015290565b50806020116117d6576020823514614f29565b9060405161508c8161428a565b606081526060602082015260606040820152606080820152606060808201525f60a082015250602081101580615289575b156151b3578101906020818303126117d6578035906001600160401b0382116117d657019060c0828203126117d657604051916150f98361428a565b80356001600160401b0381116117d65782615115918301614322565b835260208101356001600160401b0381116117d65782615136918301614322565b602084015260408101356001600160401b0381116117d6578261515a918301614322565b604084015260608101356001600160401b0381116117d6578261517e918301614322565b606084015260808101356001600160401b0381116117d65760a0926151a4918301614322565b6080840152013560a082015290565b810160c0828203126117d65781356001600160401b0381116117d657816151db918401614322565b9160208101356001600160401b0381116117d657826151fb918301614322565b60408201356001600160401b0381116117d6578361521a918401614322565b60608301356001600160401b0381116117d65784615239918501614322565b9060808401356001600160401b0381116117d65760a09561525b918601614322565b92604051966152698861428a565b87526020870152604086015260608501526080840152013560a082015290565b50806020116117d65760208235146150bd56fe2e2141118778e59f80a0cf148a1d7116c470229e7ee2d444743e9072b52a0c8d287e005099116032e1bba9482a5b0df09cc99f7e82a4482fa2810c52158d473d0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3ae94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0748be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e02024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377dbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e8542a2646970667358221220a17d22bd056e9c4d76cbb1f0edc6dfb7b0e68fd39677922926bce6741392492164736f6c634300081c00336fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f80c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3ae94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0742024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a" | packages/core/src/abis/Registry.json:1941 |
REPUTATION_SYSTEM_ADDRESS
const REPUTATION_SYSTEM_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:52
ReputationSystemABI
const ReputationSystemABI: any;Defined in: packages/core/src/abis/index.ts:59
ReputationSystemArtifact
const ReputationSystemArtifact: object = ReputationSystemABIData;Defined in: packages/core/src/abis/index.ts:78
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/ReputationSystem.json:2 |
bytecode | string | "0x60a0604052346102ba57604051601f611e1038819003918201601f19168301916001600160401b03831184841017610293578084926020946040528339810103126102ba57516001600160a01b038116908190036102ba5733156102a7575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360809081526040519081016001600160401b0381118282101761029357604052600a81526020810160018152604082019060648252604051926040840184811060018060401b03821117610293576040526007845266111959985d5b1d60ca1b60208501526060810184905251600355516004555160055580516001600160401b03811161029357600654600181811c91168015610289575b602082101461027557601f8111610212575b50602091601f82116001146101b2579181925f926101a7575b50508160011b915f199060031b1c1916176006555b604051611b5190816102bf82396080518181816108db01528181610bb30152818161131d015261138c0152f35b015190505f80610165565b601f1982169260065f52805f20915f5b8581106101fa575083600195106101e2575b505050811b0160065561017a565b01515f1960f88460031b161c191690555f80806101d4565b919260206001819286850151815501940192016101c2565b60065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f601f830160051c8101916020841061026b575b601f0160051c01905b818110610260575061014c565b5f8155600101610253565b909150819061024a565b634e487b7160e01b5f52602260045260245ffd5b90607f169061013a565b634e487b7160e01b5f52604160045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b1461137a57508063097f6b7c1461124d5780632f4468811461110957806330cd71a8146110485780633425bfae14610ff85780634a2357b914610f8e57806354fd4d5014610f3c5780636df80b4e14610b68578063715018a614610b2457806374f9924414610a975780638da5cb5b14610a705780638dbda2eb14610a385780639172ff45146107d65780639c4b343614610698578063a00e8f8114610636578063a981c9f5146105df578063bcd3697c146104ef578063ce26b0e01461043a578063cf1c545614610401578063f2fde38b1461038e578063fb42a9bf1461033b578063fc193b49146102f75763ff61c64e1461011b575f80fd5b346102f457610129366113e7565b509091809160018060a01b03168082526002602052604082206040518082602082945493848152019086526020862092865b8181106102db5750506101709250038261148d565b8051156102cd57818352600160205261018c604084209161175e565b51835260205261019e6040832061177f565b9260208451940151915b8352600760205260408320549283156102bd575b600b546001600160a01b039096169590805b8281106101f35750505060809450604051938452602084015260408301526060820152f35b6024602061020083611705565b90546040516370a0823160e01b8152600481018d90529384929091839160031b1c6001600160a01b03165afa839181610286575b50610243575b506001016101ce565b61024e575b5f61023a565b9261027e60019161025e86611705565b848060a01b0391549060031b1c16845260096020526040842054906117df565b939050610248565b9091506020813d82116102b5575b816102a16020938361148d565b810103126102b15751905f610234565b5f80fd5b3d9150610294565b670de0b6b3a764000093506101bc565b5060035492600454916101a8565b845483526001948501948694506020909301920161015b565b80fd5b50346102f45760203660031901126102f45760043590600b548210156102f457602061032283611705565b905460405160039290921b1c6001600160a01b03168152f35b50346102f45760403660031901126102f45760406103576113bb565b916103606113d1565b9260018060a01b031681526008602052209060018060a01b03165f52602052602060405f2054604051908152f35b50346102f45760203660031901126102f4576103a86113bb565b6103b0611a95565b6001600160a01b031680156103ed5781546001600160a01b03198116821783556001600160a01b03165f516020611afc5f395f51905f528380a380f35b631e4fbdf760e01b82526004829052602482fd5b50346102f45760203660031901126102f4576020906040906001600160a01b036104296113bb565b168152600983522054604051908152f35b50346102f45760203660031901126102f4576001600160a01b0361045c6113bb565b168152600260205260408120604051908160208254918281520190819285526020852090855b8181106104d9575050508261049891038361148d565b604051928392602084019060208552518091526040840192915b8181106104c0575050500390f35b82518452859450602093840193909201916001016104b2565b8254845260209093019260019283019201610482565b50346102f457806003193601126102f4576003546004549160055460405191806006549061051c82611607565b80865291600181169081156105b85750600114610557575b505090610547836105539493038361148d565b604051948594856116df565b0390f35b600681527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f94939250905b80821061059c575091925090820160200161054783610534565b9192936001816020925483858901015201910190939291610582565b60ff191660208088019190915292151560051b860190920192506105479150849050610534565b50346102f45760403660031901126102f4576105f96113bb565b6001600160a01b03168152600260205260408120805460243592908310156102f45760206106278484611731565b90549060031b1c604051908152f35b50346102f45760403660031901126102f4576040906001600160a01b0361065b6113bb565b1681526001602052818120602435825260205220805461055360018301549261068b60036002830154920161163f565b90604051948594856116df565b50346102f4576106a7366113e7565b5060018060a01b0316918281526002602052604081209260405191826020865491828152019582526020822090825b8181106107c0575050506106f0836107b39596038461148d565b604094855192610700878561148d565b60018452601f198701926107178460208701611a79565b856107218661175e565b5261072b8561175e565b50875195610739898861148d565b6001875261074a8560208901611a79565b519050610756816114b0565b906107638951928361148d565b808252610772601f19916114b0565b013660208301376107828661175e565b5261078c8561175e565b5086519261079a888561148d565b600184523660208501376107ad8361175e565b526117ec565b8151908082526020820152f35b82548852602090970196600192830192016106d6565b50346102b15760c03660031901126102b1576107f06113bb565b6024356001600160401b0381116102b15761080f9036906004016114c7565b6044356001600160401b0381116102b15761082e903690600401611535565b6064356001600160401b0381116102b15761084d903690600401611535565b60a435906001600160401b0382116102b157610870610879923690600401611445565b939094866117ec565b9160409182519161088a848461148d565b600183526020830191601f19850191823685376108a68561175e565b6001600160a01b03909816978890528551936108c2878661148d565b600185526020850193368537876108d88661175e565b527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031694853b156102b15795939291908751968795631b02e44f60e01b875260a48701905f600489015260a060248901525180915260c4870192905f5b818110610a165750505060209060031987840301604488015251918281520193905f5b8181106109fd575050506020845f969484829589956084356064860152600319858503016084860152818452858401378181018401859052601f01601f1916010301925af180156109f3576109cb575b505f516020611adc5f395f51905f529160209151908152a280f35b6020919450916109e95f5f516020611adc5f395f51905f529461148d565b5f949150916109b0565b82513d5f823e3d90fd5b8251865288965060209586019590920191600101610960565b82516001600160a01b031685528a98506020948501949092019160010161093d565b346102b15760203660031901126102b1576001600160a01b03610a596113bb565b165f526007602052602060405f2054604051908152f35b346102b1575f3660031901126102b1575f546040516001600160a01b039091168152602090f35b346102b15760803660031901126102b157610ab06113bb565b6024356001600160401b0381116102b157610acf9036906004016114c7565b906044356001600160401b0381116102b157610aef903690600401611535565b60643591906001600160401b0383116102b157602093610b16610b1c943690600401611535565b926117ec565b604051908152f35b346102b1575f3660031901126102b157610b3c611a95565b5f80546001600160a01b0319811682556001600160a01b03165f516020611afc5f395f51905f528280a3005b346102b15760a03660031901126102b1576004356024356044356084356001600160401b0381116102b157610ba1903690600401611445565b604051635168010760e11b81529091907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa8015610efe575f90610f09575b60209150604460405180948193632474521560e21b835260048301523360248301525afa908115610efe575f91610ecf575b508015610ebc575b15610e8657335f52600160205260405f20855f5260205260405f20541580610e7d575b610e3b575b604051610c6081611472565b8481526020810184815260643560408301908152906001600160401b038511610e275760405194610c9b601f8201601f19166020018761148d565b80865236818601116102b1576020815f92600397838a01378701015260608301948552335f52600160205260405f20885f5260205260405f209251835551600183015551600282015501905180519060018060401b038211610e27578190610d038454611607565b601f8111610dd7575b50602090601f8311600114610d74575f92610d69575b50508160011b915f199060031b1c19161790555b60405191825260208201527f868a11f79934bfa7243fd979d39bf00f37050e24b3ffc20a11f12a8b7e48d99560403392a3005b015190508680610d22565b5f8581528281209350601f198516905b818110610dbf5750908460019594939210610da7575b505050811b019055610d36565b01515f1960f88460031b161c19169055868080610d9a565b92936020600181928786015181550195019301610d84565b909150835f5260205f20601f840160051c81019160208510610e1d575b90601f859493920160051c01905b818110610e0f5750610d0c565b5f8155849350600101610e02565b9091508190610df4565b634e487b7160e01b5f52604160045260245ffd5b335f52600260205260405f208054600160401b811015610e2757610e6491600182018155611731565b81549060031b9087821b915f19901b1916179055610c54565b50831515610c4f565b60405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606490fd5b505f546001600160a01b03163314610c2c565b610ef1915060203d602011610ef7575b610ee9818361148d565b810190611746565b86610c24565b503d610edf565b6040513d5f823e3d90fd5b506020813d602011610f34575b81610f236020938361148d565b810103126102b15760209051610bf2565b3d9150610f16565b346102b1575f3660031901126102b157610553604051610f5d60408261148d565b601081526f2932b83aba30ba34b7b716981719971960811b6020820152604051918291602083526020830190611421565b346102b15760403660031901126102b157610fa76113bb565b7f21281390931aaf470d02c340b1ca10fabd02c8d7cdd1efcdbb3dc3fe5a0d0749602060243592610fd6611a95565b6001600160a01b03165f818152600783526040908190208590555193845292a2005b346102b15760403660031901126102b1576110116113bb565b6110196113d1565b6001600160a01b039182165f908152600a60209081526040808320949093168252928352819020549051908152f35b346102b15760403660031901126102b1576110616113bb565b6024359061106d611a95565b6001600160a01b03165f81815260096020526040902054909190156110b4575b60205f516020611abc5f395f51905f5291835f52600982528060405f2055604051908152a2005b600b54600160401b811015610e27575f516020611abc5f395f51905f52916110e482600160209401600b55611705565b81546001600160a01b0360039290921b91821b19169086901b179055915061108d9050565b346102b15760203660031901126102b1576111226113bb565b6040516370a0823160e01b81523360048201526020816024816001600160a01b0386165afa5f9181611219575b5061118e5760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21031b7b63632b1ba34b7b760711b6044820152606490fd5b156111e057335f52600a60205260405f2060018060a01b0382165f5260205260405f2054156111b957005b335f908152600a602090815260408083206001600160a01b03909416835292905220429055005b60405162461bcd60e51b8152602060048201526011602482015270111bd95cc81b9bdd081a1bdb1908139195607a1b6044820152606490fd5b9091506020813d602011611245575b816112356020938361148d565b810103126102b15751908361114f565b3d9150611228565b346102b15761125b366113e7565b9160018060a01b035f541633148015611301575b156112cd576001600160a01b039081165f8181526008602090815260408083209590941680835294815290839020859055915193845291927f6c1649831c4a2bebf79dfe8a2623ce1f5c65c9ab62903600dc011ee60a11c4089190a3005b60405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606490fd5b50604051635f9464c560e11b81523360048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610efe575f9161135b575b5061126f565b611374915060203d602011610ef757610ee9818361148d565b84611355565b346102b1575f3660031901126102b1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b600435906001600160a01b03821682036102b157565b602435906001600160a01b03821682036102b157565b60609060031901126102b1576004356001600160a01b03811681036102b157906024356001600160a01b03811681036102b1579060443590565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156102b1578235916001600160401b0383116102b157602083818601950101116102b157565b608081019081106001600160401b03821117610e2757604052565b601f909101601f19168101906001600160401b03821190821017610e2757604052565b6001600160401b038111610e275760051b60200190565b9080601f830112156102b1578135906114df826114b0565b926114ed604051948561148d565b82845260208085019360051b8201019182116102b157602001915b8183106115155750505090565b82356001600160a01b03811681036102b157815260209283019201611508565b9080601f830112156102b15781359061154d826114b0565b9261155b604051948561148d565b82845260208085019360051b820101908282116102b15760208101935b82851061158757505050505090565b84356001600160401b0381116102b157820184603f820112156102b1576020810135906115b3826114b0565b916115c1604051938461148d565b8083526020808085019260051b84010101918783116102b157604001905b8282106115f757505050815260209485019401611578565b81358152602091820191016115df565b90600182811c92168015611635575b602083101461162157565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611616565b9060405191825f82549261165284611607565b80845293600181169081156116bd5750600114611679575b506116779250038361148d565b565b90505f9291925260205f20905f915b8183106116a1575050906020611677928201015f61166a565b6020919350806001915483858901015201910190918492611688565b90506020925061167794915060ff191682840152151560051b8201015f61166a565b909260809261170295948352602083015260408201528160608201520190611421565b90565b600b5481101561171d57600b5f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b805482101561171d575f5260205f2001905f90565b908160209103126102b1575180151581036102b15790565b80511561171d5760200190565b805182101561171d5760209160051b010190565b9060405161178c81611472565b60606117b3600383958054855260018101546020860152600281015460408601520161163f565b910152565b818102929181159184041417156117cb57565b634e487b7160e01b5f52601160045260245ffd5b919082018092116117cb57565b93919290935f935f915b8651831015611966576001600160a01b03611811848961176b565b5116965f91825b611822868661176b565b5151841015611917576118af6001916118458661183f8a8a61176b565b5161176b565b518c5f528360205260405f20905f526020528561186460405f2061177f565b8a8a8251158061190f575b6118bf575b6118a99361183f611888926118949461176b565b516020830151906117b8565b9060408101518083116118b7575b50516117df565b906117df565b930192611818565b91505f6118a2565b505050506118a9896118946118888961183f8d6040516118de81611472565b6003548152600454602082015260055460408201526118fd600661163f565b60608201529594509250509350611874565b50831561186f565b6001935061194c670de0b6b3a764000091611953949b9a93979a9996995f52600760205260405f205490811561195e576117b8565b04906117df565b9501919390936117f6565b8391506117b8565b939495505050505f90600b54915b82811061198057505050565b61198981611705565b90546001600160a01b038481165f818152600a6020908152604080832060039790971b9590951c90931680825294909252919020548015159081611a61575b506119d8575b5050600101611974565b604051906370a0823160e01b82526004820152602081602481855afa5f9181611a2e575b50156119ce57611a0d575b806119ce565b60019195611a27915f52600960205260405f2054906117df565b9490611a07565b9091506020813d8211611a59575b81611a496020938361148d565b810103126102b15751905f6119fc565b3d9150611a3c565b905062093a8081018091116117cb574210155f6119c8565b5f5b828110611a8757505050565b606082820152602001611a7b565b5f546001600160a01b03163303611aa857565b63118cdaa760e01b5f523360045260245ffdfecde4878b12c6b6c93c3eb3433ffbfdb24eb29698d8ac6ac98caf5db49d823457db8ed69eccdb6ff5105e3934ba9b515bb1b9d366e3a0c25a5f852ee20b6783e28be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a264697066735822122060089b58bfa930766963cea3bdd8c52ce8caf63016ff1a032076fe2eebdb853964736f6c634300081c0033" | packages/core/src/abis/ReputationSystem.json:698 |
ROLE_ANODE
const ROLE_ANODE: Hash;Defined in: packages/core/src/roles.ts:93
ANODE Role (Anonymous Node)
Remarks
- Description: Anonymous infrastructure node operator
- Permission: Infrastructure operator
- Requirement: minStake: 20 GT, entryBurn: 2 GT (line 95)
- Exit Fee: 10% (1000 basis points), min 1 GT
- Lock Duration: 30 days
- Source: Registry.sol line 37: ROLE_ANODE = keccak256("ANODE")
ROLE_COMMUNITY
const ROLE_COMMUNITY: Hash;Defined in: packages/core/src/roles.ts:31
Community Role
Remarks
- Description: Community administrator, can issue xPNTs, configure SBT rules
- Permission: Community-level governance
- Requirement: minStake: 30 GT, entryBurn: 3 GT (line 99)
- Exit Fee: 5% (500 basis points), min 1 GT
- Lock Duration: 30 days
- Source: Registry.sol line 32: ROLE_COMMUNITY = keccak256("COMMUNITY")
ROLE_DVT
const ROLE_DVT: Hash;Defined in: packages/core/src/roles.ts:81
DVT Role (Distributed Validator Technology)
Remarks
- Description: DVT node operator for consensus validation
- Permission: Infrastructure operator
- Requirement: minStake: 30 GT, entryBurn: 3 GT (line 94)
- Exit Fee: 10% (1000 basis points), min 1 GT
- Lock Duration: 30 days
- Source: Registry.sol line 36: ROLE_DVT = keccak256("DVT")
ROLE_ENDUSER
const ROLE_ENDUSER: Hash;Defined in: packages/core/src/roles.ts:44
End User Role
Remarks
- Description: Community member, can participate and use gasless transactions
- Permission: Basic user level
- Requirement: minStake: 0.3 GT, entryBurn: 0.05 GT (line 100)
- Additional Requirement: Must hold MySBT from community
- Exit Fee: 10% (1000 basis points), min 0.05 GT
- Lock Duration: 7 days
- Source: Registry.sol line 33: ROLE_ENDUSER = keccak256("ENDUSER")
ROLE_KMS
const ROLE_KMS: Hash;Defined in: packages/core/src/roles.ts:105
KMS Role (Key Management Service)
Remarks
- Description: KMS operator for secure key storage and management
- Permission: Infrastructure operator (highest stake)
- Requirement: minStake: 100 GT, entryBurn: 10 GT (line 98)
- Exit Fee: 10% (1000 basis points), min 5 GT
- Lock Duration: 30 days
- Source: Registry.sol line 38: ROLE_KMS = keccak256("KMS")
ROLE_NAMES
const ROLE_NAMES: Record<string, string>;Defined in: packages/core/src/roles.ts:138
ROLE_PAYMASTER_AOA
const ROLE_PAYMASTER_AOA: Hash;Defined in: packages/core/src/roles.ts:56
Paymaster AOA Role (Account Ownership Authentication)
Remarks
- Description: Basic Paymaster node operator with account-based auth
- Permission: Infrastructure operator
- Requirement: minStake: 30 GT, entryBurn: 3 GT (line 92)
- Exit Fee: 10% (1000 basis points), min 1 GT
- Lock Duration: 30 days
- Source: Registry.sol line 34: ROLE_PAYMASTER_AOA = keccak256("PAYMASTER_AOA")
ROLE_PAYMASTER_SUPER
const ROLE_PAYMASTER_SUPER: Hash;Defined in: packages/core/src/roles.ts:69
Paymaster Super Role
Remarks
- Description: Advanced Paymaster operator, can use SuperPaymaster with aPNTs collateral
- Permission: Infrastructure operator (higher tier)
- Requirement: minStake: 50 GT, entryBurn: 5 GT (line 93)
- Additional Requirement: aPNTs collateral in SuperPaymaster contract
- Exit Fee: 10% (1000 basis points), min 2 GT
- Lock Duration: 30 days
- Source: Registry.sol line 35: ROLE_PAYMASTER_SUPER = keccak256("PAYMASTER_SUPER")
ROLE_PERMISSION_LEVELS
const ROLE_PERMISSION_LEVELS: Record<string, RolePermissionLevel>;Defined in: packages/core/src/roles.ts:167
SBT_ADDRESS
const SBT_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:51
SEPOLIA_CONTRACTS
const SEPOLIA_CONTRACTS: object;Defined in: packages/core/src/contracts.ts:38
Sepolia Testnet Contracts
Type Declaration
| Name | Type | Default value | Description | Defined in |
|---|---|---|---|---|
communities | object | - | - | packages/core/src/contracts.ts:77 |
communities.aastar | object | - | AAStar Community - Test community for development (registered: 2025-11-01) | packages/core/src/contracts.ts:79 |
communities.aastar.ensName | "aastar.eth" | 'aastar.eth' | - | packages/core/src/contracts.ts:82 |
communities.aastar.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.apnts | - | packages/core/src/contracts.ts:81 |
communities.aastar.name | "AAStar" | 'AAStar' | - | packages/core/src/contracts.ts:83 |
communities.aastar.owner | "0x411BD567E46C0781248dbB6a9211891C032885e5" | COMMUNITY_OWNERS.aastarOwner | - | packages/core/src/contracts.ts:80 |
communities.aastar.stake | "50" | '50' | - | packages/core/src/contracts.ts:84 |
communities.breadCommunity | object | - | BreadCommunity - Test community for development (registered: 2025-11-03) | packages/core/src/contracts.ts:88 |
communities.breadCommunity.ensName | "bread.eth" | 'bread.eth' | - | packages/core/src/contracts.ts:91 |
communities.breadCommunity.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.bpnts | - | packages/core/src/contracts.ts:90 |
communities.breadCommunity.name | "BreadCommunity" | 'BreadCommunity' | - | packages/core/src/contracts.ts:92 |
communities.breadCommunity.owner | "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA" | COMMUNITY_OWNERS.breadCommunityOwner | - | packages/core/src/contracts.ts:89 |
communities.breadCommunity.stake | "50" | '50' | - | packages/core/src/contracts.ts:93 |
core | object | CORE_ADDRESSES | - | packages/core/src/contracts.ts:42 |
core.aPNTs | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:35 |
core.dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:39 |
core.entryPoint | `0x${string}` | ENTRY_POINT_ADDRESS | - | packages/core/src/contract-addresses.ts:40 |
core.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:31 |
core.gTokenStaking | `0x${string}` | GTOKEN_STAKING_ADDRESS | - | packages/core/src/contract-addresses.ts:32 |
core.mySBT | `0x${string}` | SBT_ADDRESS | - | packages/core/src/contract-addresses.ts:36 |
core.paymasterFactory | `0x${string}` | PAYMASTER_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:34 |
core.paymasterV4 | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:38 |
core.registry | `0x${string}` | REGISTRY_ADDRESS | - | packages/core/src/contract-addresses.ts:30 |
core.reputationSystem | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:42 |
core.superPaymaster | `0x${string}` | SUPER_PAYMASTER_ADDRESS | - | packages/core/src/contract-addresses.ts:33 |
core.xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:41 |
monitoring | object | MONITORING_ADDRESSES | - | packages/core/src/contracts.ts:67 |
monitoring.blsAggregator | `0x${string}` | BLS_AGGREGATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:87 |
monitoring.dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:86 |
official | object | OFFICIAL_ADDRESSES | - | packages/core/src/contracts.ts:72 |
official.entryPoint | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:94 |
paymaster | object | PAYMASTER_ADDRESSES | - | packages/core/src/contracts.ts:62 |
paymaster.paymasterV4_1 | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:78 |
paymaster.paymasterV4_1iImplementation | `0x${string}` | PAYMASTER_V4_IMPL_ADDRESS | - | packages/core/src/contract-addresses.ts:79 |
testAccounts | object | TEST_ACCOUNT_ADDRESSES | - | packages/core/src/contracts.ts:57 |
testAccounts.simpleAccountFactory | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:71 |
testTokens | object | TEST_TOKEN_ADDRESSES | - | packages/core/src/contracts.ts:52 |
testTokens.apnts | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:60 |
testTokens.bpnts | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:62 |
testTokens.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:61 |
testTokens.mockUSDT | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:59 |
testTokens.pimToken | `0x${string}` | TOKEN_ADDRESSES.pimToken | - | packages/core/src/contract-addresses.ts:63 |
tokens | object | TOKEN_ADDRESSES | - | packages/core/src/contracts.ts:47 |
tokens.aPNTs | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:50 |
tokens.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:51 |
tokens.pimToken | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:52 |
tokens.xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:49 |
SERVICE_FEE_RATE
const SERVICE_FEE_RATE: 200 = 200;Defined in: packages/core/src/constants.ts:77
Service fee rate in basis points (200 = 2%)
SimpleAccountABI
const SimpleAccountABI: any;Defined in: packages/core/src/abis/index.ts:54
SimpleAccountArtifact
const SimpleAccountArtifact: object = SimpleAccountABIData;Defined in: packages/core/src/abis/index.ts:73
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs?: undefined; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: ( | { components: object[]; internalType: string; name: string; type: string; } | { components?: undefined; internalType: string; name: string; type: string; })[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/SimpleAccount.json:2 |
bytecode | string | "0x60c03461014757601f61124838819003918201601f19168301916001600160401b0383118484101761014b5780849260209460405283398101031261014757516001600160a01b0381168103610147573060805260a0525f5160206112285f395f51905f525460ff8160401c16610138576002600160401b03196001600160401b038216016100e2575b6040516110c8908161016082396080518181816105ca015261066e015260a05181818161016e01528181610298015281816103a9015281816105140152818161084e015281816108df01528181610a750152610dd00152f35b6001600160401b0319166001600160401b039081175f5160206112285f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f610089565b63f92ee8a960e01b5f5260045ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c90816301ffc9a714610b7757508063150b7a0214610b2157806319822f7c14610a3f57806334fcd5be146109525780634a58db19146108d15780634d44560d1461081c5780634f1ef2861461061e57806352d1902d146105b75780638da5cb5b14610590578063ad3cb1cc14610543578063b0d691fe146104fe578063b61d27f614610483578063bc197c81146103ea578063c399ec881461037c578063c4d66de8146101f3578063d087d2881461013a5763f23a6e610361000f57346101375760a0366003190112610137576100f8610be2565b50610101610bf8565b506084356001600160401b03811161013557610121903690600401610c0e565b505060405163f23a6e6160e01b8152602090f35b505b80fd5b5034610137578060031936011261013757604051631aab3f0d60e11b815230600482015260248101829052906020826044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156101e757906101b0575b602090604051908152f35b506020813d6020116101df575b816101ca60209383610c6b565b810103126101db57602090516101a5565b5f80fd5b3d91506101bd565b604051903d90823e3d90fd5b50346101375760203660031901126101375761020d610be2565b5f5160206110735f395f51905f5254604081901c60ff161591906001600160401b03811680159081610374575b600114908161036a575b159081610361575b50610352576001600160401b031981166001175f5160206110735f395f51905f52558261032a575b5082546001600160a01b0319166001600160a01b03918216908117845560405192917f0000000000000000000000000000000000000000000000000000000000000000167f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de8580a36102e4575080f35b5f5160206110735f395f51905f52805460ff60401b19169055600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a180f35b6001600160481b0319166001600160401b01175f5160206110735f395f51905f52555f610274565b63f92ee8a960e01b8452600484fd5b9050155f61024c565b303b159150610244565b84915061023a565b50346101375780600319360112610137576040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156101e757906101b057602090604051908152f35b50346101375760a036600319011261013757610404610be2565b5061040d610bf8565b506044356001600160401b0381116101355761042d903690600401610c3b565b50506064356001600160401b0381116101355761044e903690600401610c3b565b50506084356001600160401b0381116101355761046f903690600401610c0e565b505060405163bc197c8160e01b8152602090f35b5034610137576060366003190112610137578061049e610be2565b6044356001600160401b0381116104fa5782916104c26104d5923690600401610c0e565b92906104cc610dcd565b5a933691610cbd565b916020835193019160243591f1156104ea5780f35b6104f2610e5e565b602081519101fd5b5050fd5b50346101375780600319360112610137576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346101375780600319360112610137575061058c604051610566604082610c6b565b60058152640352e302e360dc1b6020820152604051918291602083526020830190610cf3565b0390f35b5034610137578060031936011261013757546040516001600160a01b039091168152602090f35b50346101375780600319360112610137577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300361060f5760206040515f5160206110535f395f51905f528152f35b63703e46dd60e11b8152600490fd5b50604036600319011261013757610633610be2565b906024356001600160401b038111610135573660238201121561013557610664903690602481600401359101610cbd565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163081149081156107fa575b506107eb576106a6610e78565b6040516352d1902d60e01b8152926001600160a01b0381169190602085600481865afa809585966107b3575b506106eb57634c9c8ce360e01b84526004839052602484fd5b9091845f5160206110535f395f51905f5281036107a15750813b1561078f575f5160206110535f395f51905f5280546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28151839015610775578083602061077195519101845af461076b610d9e565b91610ff4565b5080f35b505050346107805780f35b63b398979f60e01b8152600490fd5b634c9c8ce360e01b8452600452602483fd5b632a87526960e21b8552600452602484fd5b9095506020813d6020116107e3575b816107cf60209383610c6b565b810103126107df5751945f6106d2565b8480fd5b3d91506107c2565b63703e46dd60e11b8252600482fd5b5f5160206110535f395f51905f52546001600160a01b0316141590505f610699565b503461013757604036600319011261013757806004356001600160a01b038116908190036108ce5761084c610e78565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b156104fa57829160448392604051948593849263040b850f60e31b8452600484015260243560248401525af180156108c3576108b25750f35b816108bc91610c6b565b6101375780f35b6040513d84823e3d90fd5b50fd5b505f3660031901126101db577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b156101db575f6024916040519283809263b760faf960e01b825230600483015234905af180156109475761093b575080f35b61001a91505f90610c6b565b6040513d5f823e3d90fd5b346101db5760203660031901126101db576004356001600160401b0381116101db57610982903690600401610c3b565b61098a610dcd565b36829003605e19015f5b8281101561001a578060051b840135828112156101db5784018035906001600160a01b03821682036101db575f91816109df6109d4604086950183610d17565b91905a923691610cbd565b926020808551950193013591f1156109f957600101610994565b60018303610a09576104f2610e5e565b610a11610e5e565b90610a3b604051928392635a15467560e01b84526004840152604060248401526044830190610cf3565b0390fd5b346101db5760603660031901126101db576004356001600160401b0381116101db5761012060031982360301126101db576044357f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610add57610ab560209260243590600401610d49565b9080610ac5575b50604051908152f35b5f80808093335af150610ad6610d9e565b5082610abc565b60405162461bcd60e51b815260206004820152601c60248201527b1858d8dbdd5b9d0e881b9bdd08199c9bdb48115b9d1c9e541bda5b9d60221b6044820152606490fd5b346101db5760803660031901126101db57610b3a610be2565b50610b43610bf8565b506064356001600160401b0381116101db57610b63903690600401610c0e565b5050604051630a85bd0160e11b8152602090f35b346101db5760203660031901126101db576004359063ffffffff60e01b82168092036101db57602091630a85bd0160e11b8114908115610bd1575b8115610bc0575b5015158152f35b6301ffc9a760e01b14905083610bb9565b630271189760e51b81149150610bb2565b600435906001600160a01b03821682036101db57565b602435906001600160a01b03821682036101db57565b9181601f840112156101db578235916001600160401b0383116101db57602083818601950101116101db57565b9181601f840112156101db578235916001600160401b0383116101db576020808501948460051b0101116101db57565b601f909101601f19168101906001600160401b03821190821017610c8e57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b038111610c8e57601f01601f191660200190565b929192610cc982610ca2565b91610cd76040519384610c6b565b8294818452818301116101db578281602093845f960137010152565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b903590601e19813603018212156101db57018035906001600160401b0382116101db576020019181360383136101db57565b5f546001600160a01b031691610d8791610d7e9190610d7890610d7190610100810190610d17565b3691610cbd565b90610ece565b90929192610f08565b6001600160a01b031603610d99575f90565b600190565b3d15610dc8573d90610daf82610ca2565b91610dbd6040519384610c6b565b82523d5f602084013e565b606090565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316148015610e4b575b15610e0757565b606460405162461bcd60e51b815260206004820152602060248201527f6163636f756e743a206e6f74204f776e6572206f7220456e747279506f696e746044820152fd5b505f546001600160a01b03163314610e00565b3d604051906020818301016040528082525f602083013e90565b5f546001600160a01b031633148015610ec5575b15610e9357565b60405162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b6044820152606490fd5b50303314610e8c565b8151919060418303610efe57610ef79250602082015190606060408401519301515f1a90610f7c565b9192909190565b50505f9160029190565b6004811015610f685780610f1a575050565b60018103610f315763f645eedf60e01b5f5260045ffd5b60028103610f4c575063fce698f760e01b5f5260045260245ffd5b600314610f565750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038411610fe9579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15610947575f516001600160a01b03811615610fdf57905f905f90565b505f906001905f90565b5050505f9160039190565b90611018575080511561100957602081519101fd5b63d6bda27560e01b5f5260045ffd5b81511580611049575b611029575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b1561102156fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a2646970667358221220d9a29786d139e14269bcc42e20659877c1577656f618eb8cb39b8e8da290cbeb64736f6c634300081c0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00" | packages/core/src/abis/SimpleAccount.json:559 |
SimpleAccountFactoryABI
const SimpleAccountFactoryABI: any;Defined in: packages/core/src/abis/index.ts:55
SimpleAccountFactoryArtifact
const SimpleAccountFactoryArtifact: object = SimpleAccountFactoryABIData;Defined in: packages/core/src/abis/index.ts:74
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/SimpleAccountFactory.json:2 |
bytecode | string | "0x60c0806040523461010c576020816119f4803803809161001f8285610137565b83398101031261010c57516001600160a01b0381169081900361010c57604051611200808201906001600160401b038211838310176101235760209183916107f483398481520301905ff08015610118576080526040516213997160e71b815290602090829060049082905afa908115610118575f916100d2575b5060a052604051610699908161015b823960805181818160a50152818161024d0152610337015260a05181818160e601526101b00152f35b90506020813d602011610110575b816100ed60209383610137565b8101031261010c57516001600160a01b038116810361010c575f61009a565b5f80fd5b3d91506100e0565b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176101235760405256fe6080806040526004361015610012575f80fd5b5f3560e01c90816309ccb880146100d45750806311464fbe146100905780635fbfb9cf1461007757638cb84e1814610048575f80fd5b3461007357602061006161005b36610115565b906102c5565b6040516001600160a01b039091168152f35b5f80fd5b3461007357602061006161008a36610115565b906101ae565b34610073575f366003190112610073576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610073575f366003190112610073577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6040906003190112610073576004356001600160a01b0381168103610073579060243590565b601f909101601f19168101906001600160401b0382119082101761015e57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160a01b0390911681526040602080830182905283519183018290526060938291018484015e5f828201840152601f01601f1916010190565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316338190036102ab57506101eb82826102c5565b803b61029c575060405163189acdbd60e31b60208201526001600160a01b03909116602480830191909152815261022360448261013b565b6040519061029d808301916001600160401b0383118484101761015e57839261027b926103c785397f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690610172565b03905ff58015610291576001600160a01b031690565b6040513d5f823e3d90fd5b6001600160a01b031692915050565b630e26c07b60e21b5f52336004523060245260445260645ffd5b604051600b929161039c61029d6102df602082018561013b565b80845260208401906103c7823960405163189acdbd60e31b60208201526001600160a01b03909316602480850191909152835261031d60448461013b565b60206040519361036b8561035d8482019360018060a01b037f00000000000000000000000000000000000000000000000000000000000000001685610172565b03601f19810187528661013b565b60405194859383850197518091895e840190838201905f8252519283915e01015f815203601f19810183528261013b565b5190209060405191604083015260208201523081520160ff8153605590206001600160a01b03169056fe608060405261029d8038038061001481610168565b92833981016040828203126101645781516001600160a01b03811692909190838303610164576020810151906001600160401b03821161016457019281601f8501121561016457835161006e610069826101a1565b610168565b9481865260208601936020838301011161016457815f926020809301865e86010152823b15610152577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a282511561013a575f8091610122945190845af43d15610132573d91610113610069846101a1565b9283523d5f602085013e6101bc565b505b6040516082908161021b8239f35b6060916101bc565b50505034156101245763b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f5260045260245ffd5b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761018d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161018d57601f01601f191660200190565b906101e057508051156101d157602081519101fd5b63d6bda27560e01b5f5260045ffd5b81511580610211575b6101f1575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b156101e956fe60806040527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545f9081906001600160a01b0316368280378136915af43d5f803e156048573d5ff35b3d5ffdfea264697066735822122012a1491e71259db18aaa42117085ea7f9bf01dcf0f64e16f786fce9f190d5a5364736f6c634300081c0033a26469706673582212208984f0af41a178f19c37c70d6b39327df8ba90ae619d8d2add627131a3e4c0a964736f6c634300081c003360c03461014757601f61120038819003918201601f19168301916001600160401b0383118484101761014b5780849260209460405283398101031261014757516001600160a01b0381168103610147573060805260a0525f5160206111e05f395f51905f525460ff8160401c16610138576002600160401b03196001600160401b038216016100e2575b604051611080908161016082396080518181816105ca015261066e015260a05181818161016e01528181610298015281816103a9015281816105140152818161084e015281816108df01528181610a750152610da80152f35b6001600160401b0319166001600160401b039081175f5160206111e05f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f610089565b63f92ee8a960e01b5f5260045ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c90816301ffc9a714610b5057508063150b7a0214610afa57806319822f7c14610a3f57806334fcd5be146109525780634a58db19146108d15780634d44560d1461081c5780634f1ef2861461061e57806352d1902d146105b75780638da5cb5b14610590578063ad3cb1cc14610543578063b0d691fe146104fe578063b61d27f614610483578063bc197c81146103ea578063c399ec881461037c578063c4d66de8146101f3578063d087d2881461013a5763f23a6e610361000f57346101375760a0366003190112610137576100f8610bbb565b50610101610bd1565b506084356001600160401b03811161013557610121903690600401610be7565b505060405163f23a6e6160e01b8152602090f35b505b80fd5b5034610137578060031936011261013757604051631aab3f0d60e11b815230600482015260248101829052906020826044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156101e757906101b0575b602090604051908152f35b506020813d6020116101df575b816101ca60209383610c44565b810103126101db57602090516101a5565b5f80fd5b3d91506101bd565b604051903d90823e3d90fd5b50346101375760203660031901126101375761020d610bbb565b5f51602061102b5f395f51905f5254604081901c60ff161591906001600160401b03811680159081610374575b600114908161036a575b159081610361575b50610352576001600160401b031981166001175f51602061102b5f395f51905f52558261032a575b5082546001600160a01b0319166001600160a01b03918216908117845560405192917f0000000000000000000000000000000000000000000000000000000000000000167f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de8580a36102e4575080f35b5f51602061102b5f395f51905f52805460ff60401b19169055600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a180f35b6001600160481b0319166001600160401b01175f51602061102b5f395f51905f52555f610274565b63f92ee8a960e01b8452600484fd5b9050155f61024c565b303b159150610244565b84915061023a565b50346101375780600319360112610137576040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156101e757906101b057602090604051908152f35b50346101375760a036600319011261013757610404610bbb565b5061040d610bd1565b506044356001600160401b0381116101355761042d903690600401610c14565b50506064356001600160401b0381116101355761044e903690600401610c14565b50506084356001600160401b0381116101355761046f903690600401610be7565b505060405163bc197c8160e01b8152602090f35b5034610137576060366003190112610137578061049e610bbb565b6044356001600160401b0381116104fa5782916104c26104d5923690600401610be7565b92906104cc610da6565b5a933691610c96565b916020835193019160243591f1156104ea5780f35b6104f2610e2c565b602081519101fd5b5050fd5b50346101375780600319360112610137576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346101375780600319360112610137575061058c604051610566604082610c44565b60058152640352e302e360dc1b6020820152604051918291602083526020830190610ccc565b0390f35b5034610137578060031936011261013757546040516001600160a01b039091168152602090f35b50346101375780600319360112610137577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300361060f5760206040515f51602061100b5f395f51905f528152f35b63703e46dd60e11b8152600490fd5b50604036600319011261013757610633610bbb565b906024356001600160401b038111610135573660238201121561013557610664903690602481600401359101610c96565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163081149081156107fa575b506107eb576106a6610e46565b6040516352d1902d60e01b8152926001600160a01b0381169190602085600481865afa809585966107b3575b506106eb57634c9c8ce360e01b84526004839052602484fd5b9091845f51602061100b5f395f51905f5281036107a15750813b1561078f575f51602061100b5f395f51905f5280546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28151839015610775578083602061077195519101845af461076b610d77565b91610fac565b5080f35b505050346107805780f35b63b398979f60e01b8152600490fd5b634c9c8ce360e01b8452600452602483fd5b632a87526960e21b8552600452602484fd5b9095506020813d6020116107e3575b816107cf60209383610c44565b810103126107df5751945f6106d2565b8480fd5b3d91506107c2565b63703e46dd60e11b8252600482fd5b5f51602061100b5f395f51905f52546001600160a01b0316141590505f610699565b503461013757604036600319011261013757806004356001600160a01b038116908190036108ce5761084c610e46565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b156104fa57829160448392604051948593849263040b850f60e31b8452600484015260243560248401525af180156108c3576108b25750f35b816108bc91610c44565b6101375780f35b6040513d84823e3d90fd5b50fd5b505f3660031901126101db577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b156101db575f6024916040519283809263b760faf960e01b825230600483015234905af180156109475761093b575080f35b61001a91505f90610c44565b6040513d5f823e3d90fd5b346101db5760203660031901126101db576004356001600160401b0381116101db57610982903690600401610c14565b61098a610da6565b36829003605e19015f5b8281101561001a578060051b840135828112156101db5784018035906001600160a01b03821682036101db575f91816109df6109d4604086950183610cf0565b91905a923691610c96565b926020808551950193013591f1156109f957600101610994565b60018303610a09576104f2610e2c565b610a11610e2c565b90610a3b604051928392635a15467560e01b84526004840152604060248401526044830190610ccc565b0390fd5b346101db5760603660031901126101db576004356001600160401b0381116101db5761012060031982360301126101db576044357f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633819003610ae05750610ab860209260243590600401610d22565b9080610ac8575b50604051908152f35b5f80808093335af150610ad9610d77565b5082610abf565b63fe34a6d360e01b5f52336004523060245260445260645ffd5b346101db5760803660031901126101db57610b13610bbb565b50610b1c610bd1565b506064356001600160401b0381116101db57610b3c903690600401610be7565b5050604051630a85bd0160e11b8152602090f35b346101db5760203660031901126101db576004359063ffffffff60e01b82168092036101db57602091630a85bd0160e11b8114908115610baa575b8115610b99575b5015158152f35b6301ffc9a760e01b14905083610b92565b630271189760e51b81149150610b8b565b600435906001600160a01b03821682036101db57565b602435906001600160a01b03821682036101db57565b9181601f840112156101db578235916001600160401b0383116101db57602083818601950101116101db57565b9181601f840112156101db578235916001600160401b0383116101db576020808501948460051b0101116101db57565b601f909101601f19168101906001600160401b03821190821017610c6757604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b038111610c6757601f01601f191660200190565b929192610ca282610c7b565b91610cb06040519384610c44565b8294818452818301116101db578281602093845f960137010152565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b903590601e19813603018212156101db57018035906001600160401b0382116101db576020019181360383136101db57565b5f546001600160a01b031691610d6091610d579190610d5190610d4a90610100810190610cf0565b3691610c96565b90610e86565b90929192610ec0565b6001600160a01b031603610d72575f90565b600190565b3d15610da1573d90610d8882610c7b565b91610d966040519384610c44565b82523d5f602084013e565b606090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163381148015610e19575b5f546001600160a01b03169015610def575050565b60849250604051916362018a3160e01b835233600484015230602484015260448301526064820152fd5b505f546001600160a01b03163314610dda565b3d604051906020818301016040528082525f602083013e90565b5f546001600160a01b03163381148015610e7d575b15610e635750565b631979c09b60e31b5f52336004523060245260445260645ffd5b50303314610e5b565b8151919060418303610eb657610eaf9250602082015190606060408401519301515f1a90610f34565b9192909190565b50505f9160029190565b6004811015610f205780610ed2575050565b60018103610ee95763f645eedf60e01b5f5260045ffd5b60028103610f04575063fce698f760e01b5f5260045260245ffd5b600314610f0e5750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038411610fa1579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15610947575f516001600160a01b03811615610f9757905f905f90565b505f906001905f90565b5050505f9160039190565b90610fd05750805115610fc157602081519101fd5b63d6bda27560e01b5f5260045ffd5b81511580611001575b610fe1575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15610fd956fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a2646970667358221220adff2add99b76d5f757f500ba65c3cb99470f825f9d0d9cf78aa834bf649aa5864736f6c634300081c0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00" | packages/core/src/abis/SimpleAccountFactory.json:110 |
SUPER_PAYMASTER_ADDRESS
const SUPER_PAYMASTER_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:53
SuperPaymasterABI
const SuperPaymasterABI: any;Defined in: packages/core/src/abis/index.ts:49
SuperPaymasterArtifact
const SuperPaymasterArtifact: object = SuperPaymasterABIData;Defined in: packages/core/src/abis/index.ts:68
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: ( | { components: object[]; internalType: string; name: string; type: string; } | { components?: undefined; internalType: string; name: string; type: string; })[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/SuperPaymaster.json:2 |
bytecode | string | "0x60e03461027a57601f61430838819003918201601f19168301916001600160401b0383118484101761027e5780849260e09460405283398101031261027a5780516001600160a01b038116919082810361027a5761005f60208301610292565b60408301519091906001600160a01b038116810361027a5761008360608501610292565b9061009060808601610292565b9260c061009f60a08801610292565b960151966001600160a01b038616908115610267575f80546001600160a01b031981168417825560405193916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a31561023057506080526001805566470de4df8200006009556103e8600d5560a052600280546001600160a01b0319166001600160a01b0392831617905590811660c05282161561022957505b600480546001600160a01b0319166001600160a01b03929092169190911790558015610220575b60115560405161406190816102a78239608051818181610a2301528181610aca01528181610b7001528181610fcf0152818161127401528181611aa301528181612144015281816124b10152612c18015260a0518181816102f80152818161073a0152818161106c0152818161137f01528181611625015281816117c401528181611f090152818161222201526129ba015260c05181818161122f01528181611c1801528181612a8701526138cc0152f35b50610e1061016e565b9050610147565b62461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908115b9d1c9e541bda5b9d60721b6044820152606490fd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820361027a5756fe60806040526004361015610011575f80fd5b5f5f3560e01c80630396cb6014612bf0578063058ae10f146129e957806306433b1b146129a4578063079d2d42146125ee57806313e7c9d814612521578063205c28781461248c5780632e1a7d4d146123945780632f4f21e2146121ed57806332726684146121cd57806339788cd9146121ac57806352b7512c14612104578063539f51db146120e757806354fd4d501461208f57806358a2570a1461204a578063594a6f231461202c5780635f4cd4fe14611eac57806360f28de614611e9057806361ad446e14611e7257806361d027b314611e495780636640431f14611de257806366c3687514611da9578063673a7e2814611bf85780636d8a4aff14611bcf578063715018a614611b8857806374f053c414611b5f578063787dce3d14611aff5780637af3816c14611ae15780637c627b2114611a5b578063847807f21461178e57806388a7ca5c146115bc5780638da5cb5b146115955780638e580213146114f257806396daa322146114d4578063a134d63a146113d2578063a3970ae61461136d578063a4b5328f146112a3578063b0d691fe1461125e578063b0f0abe914611219578063b6b55f2514611040578063b8ca3b8314611023578063bb9fe6bf14610fb3578063bc95910114610f48578063bd11187014610f2a578063bfa5a1eb14610cd5578063c06f58e814610cac578063c1d9cb0814610bdc578063c23a5cea14610b4b578063c399ec8814610a9d578063d0e30db014610a0c578063d20727d714610997578063ddc380d81461097a578063e1a452181461095d578063e8ade1a9146108d4578063eafe74b5146106e8578063ec2123f11461067c578063ede3150214610660578063f0f4426014610609578063f2fde38b14610596578063f5c91a08146104e8578063f60fdcb3146104a5578063f7e8cb0d146104665763fc347007146102c4575f80fd5b346104635760203660031901126104635760043565ffffffffffff811690818103610461576040516310fdfea760e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa90811561045657859161041e575b5060209061035d926040518080958194632474521560e21b835233906004840161309b565b03915afa9081156104135784916103e4575b50156103d6573383526005602052600160408420019081549065ffffffffffff60c01b9060c01b169065ffffffffffff60c01b19161790556040519081527f4419a541734858dec04cd4ea31aff7b399a0b82dc61f30cc777c1907dc8102ed60203392a280f35b6282b42960e81b8352600483fd5b610406915060203d60201161040c575b6103fe8183612dfc565b810190613083565b5f61036f565b503d6103f4565b6040513d86823e3d90fd5b90506020813d60201161044e575b8161043960209383612dfc565b8101031261044a575161035d610338565b5f80fd5b3d915061042c565b6040513d87823e3d90fd5b825b80fd5b50346104635760203660031901126104635760209060ff906040906001600160a01b03610491612cb9565b168152600784522054166040519015158152f35b50346104635780600319360112610463576080600a5460ff600b54600c5490604051938452602084015260018060501b038116604084015260501c166060820152f35b503461046357604036600319011261046357610502612cb9565b6024359061050e613c50565b63ffffffff821161055a5760205f516020613f6c5f395f51905f529160018060a01b0316928385526005825261055063ffffffff821660016040882001613a89565b604051908152a280f35b60405162461bcd60e51b815260206004820152601460248201527329b1b7b9329032bc31b2b2b239903ab4b73a199960611b6044820152606490fd5b5034610463576020366003190112610463576105b0612cb9565b6105b8613c50565b6001600160a01b031680156105f55781546001600160a01b03198116821783556001600160a01b03165f516020613fec5f395f51905f528380a380f35b631e4fbdf760e01b82526004829052602482fd5b503461046357602036600319011261046357610623612cb9565b61062b613c50565b6001600160a01b0316801561065157600480546001600160a01b03191691909117905580f35b63e6c4247b60e01b8252600482fd5b5034610463578060031936011261046357602060405160348152f35b503461046357602036600319011261046357600435610699613c50565b80156106d95760407ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d291600954908060095582519182526020820152a180f35b63c52a9bd360e01b8252600482fd5b503461046357604036600319011261046357610702612cb9565b9061070b612ccf565b604051632c333e2560e01b81526001600160a01b039384166004820181905293909190602090839060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa9182156108605783926108a0575b50604051634d3c739760e11b815260048101949094526001600160a01b0316602084602481845afa93841561086057839461086b575b5092602060049460405195868092633ba0b9a960e01b82525afa93841561086057839461082c575b50670de0b6b3a7640000810290808204670de0b6b3a76400001490151715610818576020936107f69161318f565b9081811115610811576108099250612f53565b604051908152f35b5050610809565b634e487b7160e01b83526011600452602483fd5b9093506020813d602011610858575b8161084860209383612dfc565b8101031261044a5751925f6107c8565b3d915061083b565b6040513d85823e3d90fd5b93506020843d602011610898575b8161088660209383612dfc565b8101031261044a5792519260206107a0565b3d9150610879565b9091506020813d6020116108cc575b816108bc60209383612dfc565b8101031261044a5751905f61076a565b3d91506108af565b5034610463576108e336612f24565b906108ec613c50565b6001600160a01b0316808352600560205260408320805460ff60e81b19169215801560e81b60ff60e81b1693909317905590610936575f516020613f8c5f395f51905f528280a280f35b7fae02c1bd695006b6d891af37fdeefea45a10ebcc17071e3471787db4f17728858280a280f35b503461046357806003193601126104635760206040516127108152f35b503461046357806003193601126104635760206040516103e88152f35b5034610463576020366003190112610463576109b1612cb9565b6109b9613c50565b6001600160a01b0316801561065157600280546001600160a01b0319811683179091556001600160a01b03167f75f4cc3f3f70100dc11e396f47f8af2dec5cf7ec94e06062222be779cf2f3dec8380a380f35b508060031936011261046357610a20613c50565b807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15610a9a57816024916040519283809263b760faf960e01b825230600483015234905af18015610a8f57610a7e5750f35b81610a8891612dfc565b6104635780f35b6040513d84823e3d90fd5b50fd5b50346104635780600319360112610463576040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610b3f5790610b0c575b602090604051908152f35b506020813d602011610b37575b81610b2660209383612dfc565b8101031261044a5760209051610b01565b3d9150610b19565b604051903d90823e3d90fd5b50346104635760203660031901126104635780610b66612cb9565b610b6e613c50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b15610bd85760405163611d2e7560e11b81526001600160a01b0390911660048201529082908290602490829084905af18015610a8f57610a7e5750f35b5050fd5b503461046357602036600319011261046357610bf6612cb9565b816080604051610c0581612de1565b828152826020820152826040820152606080820152015260018060a01b03168082526008602052604082205415610c9d5780825260086020526040822090825260086020526040822054915f198301928311610c8957610c85610c71610c6b8585612d4d565b50613a3a565b604051918291602083526020830190612edd565b0390f35b634e487b7160e01b81526011600452602490fd5b63e0a1dc3160e01b8252600482fd5b5034610463578060031936011261046357600e546040516001600160a01b039091168152602090f35b50346104635760803660031901126104635780610cf0612cb9565b6024356003811015610bd85760443591606435906001600160401b038211610f2657610e075f516020613fac5f395f51905f5260405f516020613f6c5f395f51905f5296602096610d4a63ffffffff973690600401612c8c565b959096610d55613c50565b6001600160a01b0316808c5260058a52848c20909b90978c979082610d7986612ebf565b85610eb25750610dee9087600a945b60018d019c8d8f8890825460a01c16115f14610ea3578f90610db9610dbf928a1663ffffffff835460a01c16613aac565b90613a89565b89610e29575b508b815260088f522092885194610ddb86612de1565b428652888f870152898601523691613034565b6060830152610dfc84612ebf565b836080830152613ac6565b8251918252610e1581612ebf565b87820152a25460a01c16604051908152a280f35b80546001600160801b03168a8110610e7f575080546001600160801b0390610e56908c831690831661306a565b82546001600160801b0319169116179055601054610e75908a906130cd565b6010555b5f610dc5565b81546001600160801b031916909155601054610e9b91906130cd565b601055610e79565b8f60a01b198154169055610dbf565b610ebb86612ebf565b60018603610ed15750610dee9087601494610d88565b92610edb86612ebf565b60028614610eef575b9087610dee92610d88565b8a5460ff60e81b1916600160e81b178b5560329350610dee919088908b5f516020613f8c5f395f51905f528280a291925050610ee4565b8480fd5b50346104635780600319360112610463576020601154604051908152f35b503461046357602036600319011261046357610f62612cb9565b610f6a613c50565b600e80546001600160a01b039283166001600160a01b0319821681179092559091167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b5034610463578060031936011261046357610fcc613c50565b807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15610a9a5781809160046040518094819363bb9fe6bf60e01b83525af18015610a8f57610a7e5750f35b503461046357806003193601126104635760206040516107d08152f35b50346104635760203660031901126104635760043561105d613c76565b6040516310fdfea760e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa9081156104135784916111e5575b506020906110d1926040518080958194632474521560e21b835233906004840161309b565b03915afa9081156108605783916111c6575b50156111b857600254611104908290309033906001600160a01b0316613cd0565b6001600160801b03811161117a5733825260056020526040822080546001600160801b0390611138908483169083166130b4565b82546001600160801b0319169116179055600f546111579082906130cd565b600f556040519081525f516020613fcc5f395f51905f5260203392a26001805580f35b60405162461bcd60e51b8152602060048201526016602482015275082dadeeadce840caf0c6cacac8e640ead2dce86264760531b6044820152606490fd5b6282b42960e81b8252600482fd5b6111df915060203d60201161040c576103fe8183612dfc565b5f6110e3565b90506020813d602011611211575b8161120060209383612dfc565b8101031261044a57516110d16110ac565b3d91506111f3565b50346104635780600319360112610463576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346104635780600319360112610463576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610463576040366003190112610463576112bd612cb9565b6024356112c8613c50565b6112d0613c76565b6001600160a01b03821691821561135e5760105480831161134f57916113418160209361131e827ff7595c4fd7fa675e456dd9520ac8266c06d237d52900fc573bccc85b7c177c9e97612f53565b60105561132d82600f54612f53565b600f556002546001600160a01b0316613c96565b604051908152a26001805580f35b63b4aa806360e01b8552600485fd5b63e6c4247b60e01b8452600484fd5b50346104635761137c36612f24565b907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036103d65760018060a01b031682526007602052604082209060ff80198354169115151617905580f35b5034610463576020366003190112610463576001600160a01b036113f4612cb9565b16815260086020526040812080546001600160401b0381116114c0576040519061142460208260051b0183612dfc565b80825260208201809385526020852085915b8383106114a257868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061147357505050500390f35b919360019193955060206114928192603f198a82030186528851612edd565b9601920192018594939192611464565b600560206001926114b285613a3a565b815201920192019190611436565b634e487b7160e01b83526041600452602483fd5b50346104635780600319360112610463576020600d54604051908152f35b50346104635760403660031901126104635761150c612cb9565b6001600160a01b0316815260086020526040812080546024359190821015610461576115389250612d4d565b50805460018201549161158260028201549160ff600461155a60038401612e1f565b920154169260405195869586526020860152604085015260a0606085015260a0840190612cf9565b9061158c81612ebf565b60808301520390f35b5034610463578060031936011261046357546040516001600160a01b039091168152602090f35b5034610463576080366003190112610463576115d6612cb9565b506115df612ccf565b604435906064356001600160401b03811161178a57611602903690600401612c8c565b50506002546001600160a01b031633036103d6576040516310fdfea760e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082600481845afa80156104565783928691611752575b509160209161168a93604051809581948293632474521560e21b84526004840161309b565b03915afa908115610413578491611733575b50156103d6576001600160801b03821161117a576001600160a01b0316808352600560209081526040909320805491935f516020613fcc5f395f51905f529390929091906001600160801b03906116f8908285169083166130b4565b82546001600160801b0319169116179055600f546117179082906130cd565b600f55604051908152a2604051632229f29760e21b8152602090f35b61174c915060203d60201161040c576103fe8183612dfc565b5f61169c565b9250506020823d602011611782575b8161176e60209383612dfc565b8101031261044a5790518291906020611665565b3d9150611761565b8380fd5b5034610463576060366003190112610463576117a8612cb9565b6117b0612ccf565b6040516310fdfea760e01b815260443591907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa9081156119f0578691611a28575b5060206118279160405180938192632474521560e21b835233906004840161309b565b0381855afa9081156119f0578691611a09575b50156119fb57604051635168010760e11b8152602081600481855afa9081156119f05786916119bc575b50602090611889926040518080958194632474521560e21b835233906004840161309b565b03915afa90811561045657859161199d575b501561198f576001600160a01b03831615801561197e575b8015611976575b6119675733808552600560205260408086206001810180546001600160a01b03199081166001600160a01b03898116919091179092556002830180549091169186169190911790558054600160801b600160e81b031916608086901b600160801b600160e01b031617600160e01b1790555190937fff8a1775e676e9fe3cc41088a092f762a9c36c13098d2a9c6a02d1814e0ecbd793919283926119619290919084613a18565b0390a280f35b63c52a9bd360e01b8452600484fd5b5081156118ba565b506001600160a01b038116156118b3565b6282b42960e81b8452600484fd5b6119b6915060203d60201161040c576103fe8183612dfc565b5f61189b565b90506020813d6020116119e8575b816119d760209383612dfc565b8101031261044a5751611889611864565b3d91506119ca565b6040513d88823e3d90fd5b6282b42960e81b8552600485fd5b611a22915060203d60201161040c576103fe8183612dfc565b5f61183a565b90506020813d602011611a53575b81611a4360209383612dfc565b8101031261044a57516020611804565b3d9150611a36565b5034610463576080366003190112610463576004356003811015611add57602435906001600160401b03821161046157611a9c611ada923690600401612c8c565b90611ad1337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146130da565b604435926135d1565b80f35b5080fd5b50346104635780600319360112610463576020601054604051908152f35b503461046357602036600319011261046357600435611b1c613c50565b6107d081116106d95760407fb404cac19fb1cbeff98d325795b08886e3cd8fe8cb1a2f193aac66f13fb239c391600d549080600d5582519182526020820152a180f35b50346104635780600319360112610463576002546040516001600160a01b039091168152602090f35b5034610463578060031936011261046357611ba1613c50565b80546001600160a01b03198116825581906001600160a01b03165f516020613fec5f395f51905f528280a380f35b50346104635780600319360112610463576003546040516001600160a01b039091168152602090f35b5034610463578060031936011261046357604051633fabe5a360e21b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169060a081600481855afa9183908385938695611d6e575b50611c6b5763b41b6cb160e01b8552600485fd5b6402540be40083128015611d5f575b611d5057611c8a60115442612f53565b8410611d50579060206004926040519384809263313ce56760e01b82525afa918215610456578592611d1f575b5060405190611cc582612db2565b83825284602083015260018060501b031690816040820152606060ff841691015282600a5583600b55600c549160ff60501b9060501b169160018060581b0319161717600c555f516020613f4c5f395f51905f528380a380f35b611d4291925060203d602011611d49575b611d3a8183612dfc565b81019061359d565b905f611cb7565b503d611d30565b63b41b6cb160e01b8552600485fd5b506509184e72a0008313611c7a565b9193509350611d95915060a03d60a011611da2575b611d8d8183612dfc565b810190612f88565b509491939190505f611c57565b503d611d83565b5034610463576020366003190112610463576020906040906001600160a01b03611dd1612cb9565b168152600883522054604051908152f35b5034610463576040366003190112610463576040611dfe612cb9565b91611e07612ccf565b9260018060a01b031681526006602052209060018060a01b03165f526020526040805f205460ff82519165ffffffffffff8116835260301c1615156020820152f35b50346104635780600319360112610463576004546040516001600160a01b039091168152602090f35b50346104635780600319360112610463576020600f54604051908152f35b5034610463578060031936011261046357602060405160488152f35b503461046357606036600319011261046357611ec6612cb9565b6024356001600160401b03811161046157611ee5903690600401612d1d565b906044356001600160401b038111610f2657611f05903690600401612d1d565b90927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361201e5781810361200f5791936001600160a01b031691855b818110611f57578680f35b80611f6d611f686001938689613580565b613590565b858952600660205260408920611f8c611f8784878c613580565b613136565b848060a01b03165f5260205260405f209081549060ff60301b90151560301b169060ff60301b1916179055611fc5611f8782858a613580565b857f272958aacfbf07577da4ede62cc7d612dfb0881c6489c961988ef59378d7709f6020611ff7611f68868a8d613580565b936040519415158552868060a01b031693a301611f4c565b63c52a9bd360e01b8652600486fd5b6282b42960e81b8652600486fd5b50346104635780600319360112610463576020600954604051908152f35b503461046357602036600319011261046357612064612cb9565b61206c613c50565b600380546001600160a01b0319166001600160a01b039290921691909117905580f35b503461046357806003193601126104635750610c856040516120b2604082612dfc565b601481527329bab832b92830bcb6b0b9ba32b916999719171960611b6020820152604051918291602083526020830190612cf9565b5034610463578060031936011261046357602060405161012c8152f35b503461046357606036600319011261046357600435906001600160401b038211610463576101206003198336030112610463576121a261218a83612172337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146130da565b61217a613c76565b6044359060243590600401613199565b60018055604051928392604084526040840190612cf9565b9060208301520390f35b503461046357806003193601126104635760206040516509184e72a0008152f35b503461046357806003193601126104635760206040516402540be4008152f35b503461046357604036600319011261046357612207612cb9565b60243590612213613c76565b6040516310fdfea760e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082600481845afa8015610456578392869161235c575b509160209161228793604051809581948293632474521560e21b84526004840161309b565b03915afa90811561041357849161233d575b50156103d6576002546122ba908390309033906001600160a01b0316613cd0565b6001600160801b03821161117a576001600160a01b03168083526005602090815260408420805492935f516020613fcc5f395f51905f52939091906001600160801b039061230d908285169083166130b4565b82546001600160801b0319169116179055600f5461232c9082906130cd565b600f55604051908152a26001805580f35b612356915060203d60201161040c576103fe8183612dfc565b5f612299565b9250506020823d60201161238c575b8161237860209383612dfc565b8101031261044a5790518291906020612262565b3d915061236b565b5034610463576020366003190112610463576004356123b1613c76565b338252600560205260408220546001600160801b031681116124615733825260056020526040822080546001600160801b03906123f39084831690831661306a565b82546001600160801b0319169116179055600f54612412908290612f53565b600f5560025461242e90829033906001600160a01b0316613c96565b6040519081527f4eea589c35918e3c4d8e0371a062a1d544e41d78fb522381678923b9cd6e6dfa60203392a26001805580f35b3382526005602052604082205463cf47918160e01b83526001600160801b0316600452602452604490fd5b503461046357604036600319011261046357806124a7612cb9565b6124af613c50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b15610bd85760405163040b850f60e31b81526001600160a01b03909116600482015260248035908201529082908290604490829084905af18015610a8f57610a7e5750f35b503461046357602036600319011261046357610140906040906001600160a01b0361254a612cb9565b16815260056020522080549060018101549060018060a01b0360028201541665ffffffffffff600460038401549301549360ff6040519660018060801b038116885260018060601b038160801c166020890152818160e01c161515604089015260e81c161515606087015260018060a01b038116608087015263ffffffff8160a01c1660a087015260c01c1660c085015260e0840152610100830152610120820152f35b503461046357606036600319011261046357612608612cb9565b6024356003811015610461576044356001600160401b03811161178a57612633903690600401612c8c565b600e549193916001600160a01b031633036119fb578461265284612ebf565b6001841490811561296c57506001600160a01b038316865260056020526040862054600a6001600160801b039182160416905b612690368488613034565b60208151910120936040936126ce8551986126ab878b612dfc565b600d8a5260208a01926c088aca8408498a640a6d8c2e6d609b1b84523691613034565b508789859360018060a01b0316998a958683526005602052888320906126f38c612ebf565b8b61294c575060ff600a5b16946127098c612ebf565b60028c14612936575b60ff825460e81c1661291f575b600182018663ffffffff825460a01c16115f1461290c5780610db98863ffffffff61274e945460a01c16613aac565b886127f3575b5050509560809795936127be86945f516020613fac5f395f51905f5294848b819a5f51602061400c5f395f51905f529f9d526008602052209085519261279984612de1565b4284528560208501528684015260608301526127b48b612ebf565b8a8c830152613ac6565b81519081526127cc88612ebf565b876020820152a28151936127df81612ebf565b84526020840152820152426060820152a280f35b919650915060018060801b0382541690610bb88202828104610bb814831517156128f857945f516020613fac5f395f51905f52948a8f8f98965f51602061400c5f395f51905f529f9d9b9660809f9d9b968c612710869b048091116128a7575b50508f6127be979850600180612876921b03916080600180911b038a169061306a565b168f600180911b0319825416179055612891866010546130cd565b60105595505094509496989a8296989a50612754565b6127be98506128ef9192965060206010919a87519485915180918484015e81016f2028436170706564206174203330252960801b838201520301600f19810184520182612dfc565b9387965f612853565b634e487b7160e01b8e52601160045260248efd5b805463ffffffff60a01b1916905561274e565b875f516020613f8c5f395f51905f528580a261271f565b815460ff60e81b1916600160e81b178255612712565b6129558c612ebf565b156129635760ff60146126fe565b60ff60326126fe565b9061297685612ebf565b60028503612685576001600160a01b0384168752600560205260408720546001600160801b03169150612685565b50346104635780600319360112610463576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610463576060366003190112610463576024356004356044356001600160401b03811161178a57612a20903690600401612c8c565b600e546001600160a01b031691503382141580612bdc575b6119fb57600b54841115611d5057611c1f194201428111612bc8578410611d5057612bc1575b506402540be40081128015612bb2575b612b6457604051633fabe5a360e21b815260a0816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa8085928692612b89575b50612b1a575b505060086060604051612ad381612db2565b83815260208101859052604081018690520152600a819055600b829055600c80546001600160581b031916600160531b1790555f516020613f4c5f395f51905f528380a380f35b612b27611c209142612f53565b10612b33575b80612ac1565b60149080831315612b735780612b54612b4f612b599386612fbd565b612fd5565b612feb565b13612b64575f612b2d565b63b41b6cb160e01b8352600483fd5b80612b54612b4f85612b8494612fbd565b612b59565b909250612ba5915060a03d60a011611da257611d8d8183612dfc565b509392505091905f612abb565b506509184e72a0008113612a6e565b1515612a5e565b634e487b7160e01b86526011600452602486fd5b5084546001600160a01b0316331415612a38565b50602036600319011261044a5760043563ffffffff811680910361044a57612c16613c50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b1561044a575f90602460405180948193621cb65b60e51b8352600483015234905af18015612c8157612c73575080f35b612c7f91505f90612dfc565b005b6040513d5f823e3d90fd5b9181601f8401121561044a578235916001600160401b03831161044a576020838186019501011161044a57565b600435906001600160a01b038216820361044a57565b602435906001600160a01b038216820361044a57565b35906001600160a01b038216820361044a57565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f8401121561044a578235916001600160401b03831161044a576020808501948460051b01011161044a57565b8054821015612d66575f52600560205f20910201905f90565b634e487b7160e01b5f52603260045260245ffd5b90600182811c92168015612da8575b6020831014612d9457565b634e487b7160e01b5f52602260045260245ffd5b91607f1691612d89565b608081019081106001600160401b03821117612dcd57604052565b634e487b7160e01b5f52604160045260245ffd5b60a081019081106001600160401b03821117612dcd57604052565b601f909101601f19168101906001600160401b03821190821017612dcd57604052565b9060405191825f825492612e3284612d7a565b8084529360018116908115612e9d5750600114612e59575b50612e5792500383612dfc565b565b90505f9291925260205f20905f915b818310612e81575050906020612e57928201015f612e4a565b6020919350806001915483858901015201910190918492612e68565b905060209250612e5794915060ff191682840152151560051b8201015f612e4a565b60031115612ec957565b634e487b7160e01b5f52602160045260245ffd5b90815181526020820151602082015260408201516040820152608080612f12606085015160a0606086015260a0850190612cf9565b93015191612f1f83612ebf565b015290565b604090600319011261044a576004356001600160a01b038116810361044a5790602435801515810361044a5790565b91908203918211612f6057565b634e487b7160e01b5f52601160045260245ffd5b51906001600160501b038216820361044a57565b908160a091031261044a57612f9c81612f74565b91602082015191604081015191612fba608060608401519301612f74565b90565b81810392915f138015828513169184121617612f6057565b90606482029180830560641490151715612f6057565b811561300557600160ff1b81145f19831416612f60570590565b634e487b7160e01b5f52601260045260245ffd5b6001600160401b038111612dcd57601f01601f191660200190565b92919261304082613019565b9161304e6040519384612dfc565b82948184528183011161044a578281602093845f960137010152565b6001600160801b039182169082160391908211612f6057565b9081602091031261044a5751801515810361044a5790565b9081526001600160a01b03909116602082015260400190565b6001600160801b039182169082160191908211612f6057565b91908201809211612f6057565b156130e157565b60405162461bcd60e51b815260206004820152602760248201527f426173655061796d61737465723a2063616c6c6572206973206e6f7420456e746044820152661c9e541bda5b9d60ca1b6064820152608490fd5b356001600160a01b038116810361044a5790565b903590601e198136030182121561044a57018035906001600160401b03821161044a5760200191813603831361044a57565b81810292918115918404141715612f6057565b8115613005570490565b9092916131a582613cf8565b6001600160a01b03165f8181526005602052604081208054919692939160e081901c60ff16156135185760e81c60ff1661356b576001600160a01b036131ea86613136565b165f52600760205260ff60405f2054161561356b57835f52600660205260405f2061321486613136565b6001600160a01b03165f908152602091909152604090819020815192918301906001600160401b03821184831017612dcd5760ff916040525465ffffffffffff8116845260301c16151580602084015261351857600181019165ffffffffffff835460c01c1690816134af575b50505f199260e087016068613296828a61314a565b90501015613489575b50815493608085901c6001600160601b031611613447576040516060916132c582612db2565b600a54808352600b546020840152600c546001600160501b038116604085015260501c60ff16939092018390528a82131561347a57906133049161317c565b90604d811161343357906133216133279260095490600a0a61317c565b90613daf565b600d5490816127100191826127101161346657612af801809211613433579061334f91613d2f565b926001600160801b0316838110613447576001600160801b0390613376908583169061306a565b82546001600160801b03191691161781556003810180546133989085906130cd565b90556133a6836010546130cd565b6010556004810180545f198114613433576001019055546133f590670de0b6b3a7640000906133e19060801c6001600160601b03168561317c565b92546001600160a01b031696920491613136565b90604051956020870152604086015260018060a01b03166060850152608084015260a083015260c082015260c0815261342f60e082612dfc565b9190565b634e487b7160e01b8a52601160045260248afd5b50505050505050906040519061345e602083612dfc565b815290600190565b634e487b7160e01b8b52601160045260248bfd5b63b41b6cb160e01b8b5260048bfd5b9093506134989198508661314a565b60689891981161044a5760485f980135925f61329f565b5165ffffffffffff16801515919082613560575b82613537575b505061351857845f52600660205260405f206134e487613136565b6001600160a01b03165f90815260209190915260408120805465ffffffffffff19164265ffffffffffff1617905580613281565b505050505050905060405161352e602082612dfc565b5f815290600190565b01905065ffffffffffff8111612f605765ffffffffffff1665ffffffffffff4216105f806134c9565b4281141592506134c3565b5050505050905060405161352e602082612dfc565b9190811015612d665760051b0190565b35801515810361044a5790565b9081602091031261044a575160ff8116810361044a5790565b6001600160a01b039091168152602081019190915260400190565b929160025f946135e081612ebf565b14613a12578015613a12578160c0918101031261044a5761360081612ce5565b9261360d60408301612ce5565b9061361f60a060608501359401612ce5565b600b546001600160a01b03938416969184169593909116925f916136439042612f53565b6011541061399a575b829083926138bd575b83821315613878575b8382131561386957906136709161317c565b90604d8111610818579061332161368d9260095490600a0a61317c565b600d546127100190816127101161081857612710916136ab9161317c565b0492808410156137e557836136bf91612f53565b6001600160801b0381116137d7575b61371d906010548082116137cf575b5085835260056020526040832080546001600160801b0390613704908483169083166130b4565b82546001600160801b0319169116179055601054612f53565b60105583815260056020526040812054670de0b6b3a76400009061374d9060801c6001600160601b03168561317c565b0491803b15611add5781604051809263fa74542d60e01b8252818381613777898d600484016135b6565b03925af18015610a8f576137ba575b50507fcde7e91a718e2439d8ff2a679ad52713e82a37b72622fb530c8c41039fdd5bf09160409182519182526020820152a3565b6137c5828092612dfc565b6104635780613786565b90505f6136dd565b506001600160801b036136ce565b93815260056020526040812054909493919250670de0b6b3a7640000916138189160801c6001600160601b03169061317c565b0491813b1561178a57918391613845938360405180968195829463fa74542d60e01b8452600484016135b6565b03925af18015610a8f57613857575050565b613862828092612dfc565b6104635750565b63b41b6cb160e01b8452600484fd5b915050606060405161388981612db2565b600a54808252600b546020830152600c546001600160501b038116604084015260501c60ff1692909101829052909161365e565b604051633fabe5a360e21b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169060a081600481855afa869181613974575b50613913575b5050613655565b8581131561390c5760405163313ce56760e01b81529294509250602090829060049082905afa908115610413579060ff918591613955575b5016915f8061390c565b61396e915060203d602011611d4957611d3a8183612dfc565b5f61394b565b61398e91925060a03d60a011611da257611d8d8183612dfc565b5050509050905f613906565b90303b1561044a57604051630ce74fc560e31b81525f8160048183305af190816139fd575b506139f757506001907f190405c3325ce607eef93c6240d9728b865e09aa174052e80e380f33d165c4f46020604051428152a161364c565b9061364c565b613a0a9194505f90612dfc565b5f925f6139bf565b50505050565b6001600160a01b03918216815291166020820152604081019190915260600190565b90604051613a4781612de1565b608060ff60048395805485526001810154602086015260028101546040860152613a7360038201612e1f565b606086015201541691613a8583612ebf565b0152565b805463ffffffff60a01b191660a09290921b63ffffffff60a01b16919091179055565b9063ffffffff8091169116039063ffffffff8211612f6057565b8054600160401b811015612dcd57613ae391600182018155612d4d565b613c3d578151815560208201516001820155604082015160028201556060820151805160038301916001600160401b038211612dcd57613b238354612d7a565b601f8111613bf8575b50602090601f8311600114613b8f57918060049492608096945f92613b84575b50508160011b915f199060031b1c19161790555b01910151613b6d81612ebf565b613b7681612ebf565b60ff80198354169116179055565b015190505f80613b4c565b90601f19831691845f52815f20925f5b818110613be05750926001928592608098966004989610613bc8575b505050811b019055613b60565b01515f1960f88460031b161c191690555f8080613bbb565b92936020600181928786015181550195019301613b9f565b835f5260205f20601f840160051c81019160208510613c33575b601f0160051c01905b818110613c285750613b2c565b5f8155600101613c1b565b9091508190613c12565b634e487b7160e01b5f525f60045260245ffd5b5f546001600160a01b03163303613c6357565b63118cdaa760e01b5f523360045260245ffd5b600260015414613c87576002600155565b633ee5aeb560e01b5f5260045ffd5b613ccb612e579392613cbd60405194859263a9059cbb60e01b6020850152602484016135b6565b03601f198101845283612dfc565b613e5a565b90613ccb90613cbd612e57956040519586936323b872dd60e01b602086015260248501613a18565b60e081016048613d08828461314a565b905010613d2957613d189161314a565b60481161044a576034013560601c90565b50505f90565b9190915f838202915f1985820991838084109303928084039314613da257826127101115613d9357507fbc01a36e2eb1c432ca57a786c226809d495182a9930be0ded288ce703afb7e919394612710910990828211900360fc1b910360041c170290565b63227bc15360e01b8152600490fd5b5050506127109192500490565b90670de0b6b3a76400008202905f19670de0b6b3a7640000840992828085109403938085039414613e4e5783821115613e3f57670de0b6b3a7640000829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b63227bc15360e01b5f5260045ffd5b5090612fba925061318f565b5f80613ea29260018060a01b03169360208151910182865af13d15613ee5573d90613e8482613019565b91613e926040519384612dfc565b82523d5f602084013e5b83613eed565b8051908115159182613eca575b5050613eb85750565b635274afe760e01b5f5260045260245ffd5b613edd9250602080918301019101613083565b155f80613eaf565b606090613e9c565b90613f115750805115613f0257805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580613f42575b613f22575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15613f1a56fedb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bdfc577563f1b9a0461e24abef1e1fcc0d33d3d881f20b5df6dda59de4aae2c821c5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271daa7503227727e36abb7f0ecf24f626347ccc20233c48c554d49d7d2077a1a304006653c045d0a3144153a51ac6909baae43b8d5b67184cb74e988b72858727fe48be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a49f25e6b37dc7492af788d36761dc1b25f8fb6dcc448fb5637dc828725f0d88a26469706673582212201084ed7bfaee9d920045a6bd45667f8b452bf76b5d19070152a6e2e8127a80f164736f6c634300081c0033" | packages/core/src/abis/SuperPaymaster.json:1780 |
TEST_ACCOUNT_ADDRESSES
const TEST_ACCOUNT_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:69
Test Account Addresses (For Development & Testing)
Type Declaration
| Name | Type | Defined in |
|---|---|---|
simpleAccountFactory | `0x${string}` | packages/core/src/contract-addresses.ts:71 |
TEST_ACCOUNT_POOL_SIZE
const TEST_ACCOUNT_POOL_SIZE: 20 = 20;Defined in: packages/core/src/constants.ts:102
Size of test account pool
TEST_COMMUNITIES
const TEST_COMMUNITIES: object;Defined in: packages/core/src/contract-addresses.ts:108
Test Community Addresses (Registered in Registry v2.2.0 on 2025-11-08)
Type Declaration
| Name | Type | Defined in |
|---|---|---|
aastar | `0x${string}` | packages/core/src/contract-addresses.ts:109 |
bread | `0x${string}` | packages/core/src/contract-addresses.ts:110 |
mycelium | `0x${string}` | packages/core/src/contract-addresses.ts:111 |
TEST_TOKEN_ADDRESSES
const TEST_TOKEN_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:58
Test Token Addresses (For Development & Testing)
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
apnts | `0x${string}` | APNTS_ADDRESS | packages/core/src/contract-addresses.ts:60 |
bpnts | `0x${string}` | GTOKEN_ADDRESS | packages/core/src/contract-addresses.ts:62 |
gToken | `0x${string}` | GTOKEN_ADDRESS | packages/core/src/contract-addresses.ts:61 |
mockUSDT | `0x${string}` | - | packages/core/src/contract-addresses.ts:59 |
pimToken | `0x${string}` | TOKEN_ADDRESSES.pimToken | packages/core/src/contract-addresses.ts:63 |
TOKEN_ADDRESSES
const TOKEN_ADDRESSES: object;Defined in: packages/core/src/contract-addresses.ts:48
Token System Addresses
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
aPNTs | `0x${string}` | APNTS_ADDRESS | packages/core/src/contract-addresses.ts:50 |
gToken | `0x${string}` | GTOKEN_ADDRESS | packages/core/src/contract-addresses.ts:51 |
pimToken | `0x${string}` | - | packages/core/src/contract-addresses.ts:52 |
xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | packages/core/src/contract-addresses.ts:49 |
XPNTS_FACTORY_ADDRESS
const XPNTS_FACTORY_ADDRESS: `0x${string}`;Defined in: packages/core/src/constants.ts:56
xPNTsFactoryABI
const xPNTsFactoryABI: any;Defined in: packages/core/src/abis/index.ts:57
xPNTsFactoryArtifact
const xPNTsFactoryArtifact: object = xPNTsFactoryABIData;Defined in: packages/core/src/abis/index.ts:76
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/xPNTsFactory.json:2 |
bytecode | string | "0x60a0346101c057601f613e9a38819003918201601f19168301916001600160401b038311848410176101c45780849260409485528339810103126101c057610052602061004b836101d8565b92016101d8565b9033156101ad575f8054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a01b0383161561019a57671bc16d674ec800009260249260018060a01b031660018060a01b0319600154161760015560805266470de4df820000600655634465466960e01b81526005600482015220556714d1120d7b16000060266040516547616d696e6760d01b8152600560068201522055670de0b6b3a764000060266040516514dbd8da585b60d21b81526005600682015220556710a741a46278000060236040516244414f60e81b815260056003820152205567120a871cc002000060236040516213919560ea1b8152600560038201522055604051613cad90816101ed82396080518181816106780152610ed30152f35b634726455360e11b5f525f60045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101c05756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b14610ec15750806308c2ddcd14610e815780630ff6541414610e645780632598c32a14610dcb5780632a5c792a14610d20578063358064a814610cb457806335fa61fa14610c5a578063382c803614610b9457806354fd4d5014610b3c578063594a6f2314610b1f57806359734e1a14610b1f5780635ae48ba414610af7578063715018a614610ab35780637ade132c14610a365780638da5cb5b14610a0f5780638dbb03b1146109ec578063954ebd3b146105905780639bb0f5991461054d578063a137891e1461052a578063a550975814610430578063ab7984491461020b578063ae9a6d6f14610393578063b2bcfd3414610367578063b8d7b66914610326578063be382cdb14610261578063df9a70ea1461020b578063ec81aadb146101c75763f2fde38b14610152575f80fd5b346101c45760203660031901126101c45761016b610f02565b6101736110e6565b6001600160a01b031680156101b05781546001600160a01b03198116821783556001600160a01b03165f516020613c585f395f51905f528380a380f35b631e4fbdf760e01b82526004829052602482fd5b80fd5b50346101c45760203660031901126101c457600435906004548210156101c45760206101f283610fcf565b905460405160039290921b1c6001600160a01b03168152f35b50346101c45760203660031901126101c457600435906001600160401b0382116101c457602080806102403660048701610f56565b604051928184925191829101835e8101600581520301902054604051908152f35b50346101c45760203660031901126101c45761027b610f02565b6001600160a01b0381168252600360205260408083209051919290916102a081610f18565b6102d18354808352600185015490816020850152606060036002880154976040870198895201549401938452610ffb565b92601e840292848404601e148515171561031257506102f160a095611022565b90519151926040519485526020850152604084015260608301526080820152f35b634e487b7160e01b81526011600452602490fd5b50346101c45760203660031901126101c4576020906001600160a01b0361034b610f02565b16815260028252604060018060a01b0391205416604051908152f35b50346101c45760203660031901126101c457602061038b610386610f02565b611022565b604051908152f35b50346101c45760203660031901126101c45760406080916103b2610f02565b81606084516103c081610f18565b8281528260208201528286820152015260018060a01b031681526003602052206040516103ec81610f18565b815491828252600181015460208301908152606060036002840154936040860194855201549301928352604051938452516020840152516040830152516060820152f35b50346101c45760403660031901126101c4576004356001600160401b03811161052657610461903690600401610f56565b6024359061046d6110e6565b81151580610514575b156104da5760207f4bea76f3309d60543efdcea3904bba05cd2c7a2e58668e7de988d525fd6a3f969160405190848151928481818501958087835e8101600581520301902055604051918291518091835e810186815203902092604051908152a280f35b60405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21036bab63a34b83634b2b960711b6044820152606490fd5b50678ac7230489e80000821115610476565b5080fd5b50346101c457806003193601126101c45760206040516714d1120d7b1600008152f35b50346101c45760203660031901126101c4576020906001600160a01b03610572610f02565b16815260028252604060018060a01b03912054161515604051908152f35b50346109465760c0366003190112610946576004356001600160401b038111610946576105c1903690600401610f56565b906024356001600160401b038111610946576105e1903690600401610f56565b916044356001600160401b03811161094657610601903690600401610f56565b916064356001600160401b03811161094657610621903690600401610f56565b60a4356001600160a01b038116949085900361094657604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201523360248201526020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561093b575f916109b1575b501561097157335f908152600260205260409020546001600160a01b031661095e5760405191612b4b91828401916001600160401b0383118584101761094a5761073461074292869561110d873960c0855261072061071260c087018b610fab565b86810360208801528c610fab565b903360408701528582036060870152610fab565b908382036080850152610fab565b9060a060843591015203905ff0801561093b576001546001600160a01b0391821694911680610890575b5080610839575b5033815260026020526040812080546001600160a01b0319168417905560045490600160401b8210156108255750927fabfc2cb9c596be68324e2badae1694b9003727b1c82695e6c2cfa7ad8a58759261080c84936107da87600160209901600455610fcf565b81546001600160a01b0360039290921b91821b19169087901b1790556040805181815292839261081a92840190610fab565b828103898401523395610fab565b0390a3604051908152f35b634e487b7160e01b81526041600452602490fd5b833b15610526576040519063557326d160e11b82526004820152818160248183885af1801561088557908291610870575b50610773565b8161087a91610f33565b6101c457805f61086a565b6040513d84823e3d90fd5b843b156109465760405190631eb784cb60e21b825260048201525f8160248183895af1801561093b57610926575b506001546001600160a01b0316843b15610922576040519063557326d160e11b82526004820152828160248183895af1801561091757908391610902575b5061076c565b8161090c91610f33565b61052657815f6108fc565b6040513d85823e3d90fd5b8280fd5b6109339192505f90610f33565b5f905f6108be565b6040513d5f823e3d90fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6329ab51bf60e01b5f523360045260245ffd5b60405162461bcd60e51b815260206004820152601860248201527743616c6c6572206d75737420626520436f6d6d756e69747960401b6044820152606490fd5b90506020813d6020116109e4575b816109cc60209383610f33565b8101031261094657518015158103610946575f6106b0565b3d91506109bf565b34610946575f36600319011261094657602060405168056bc75e2d631000008152f35b34610946575f366003190112610946575f546040516001600160a01b039091168152602090f35b3461094657602036600319011261094657610a4f610f02565b610a576110e6565b6001600160a01b03168015610a7c57600180546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606490fd5b34610946575f36600319011261094657610acb6110e6565b5f80546001600160a01b0319811682556001600160a01b03165f516020613c585f395f51905f528280a3005b34610946575f366003190112610946576001546040516001600160a01b039091168152602090f35b34610946575f366003190112610946576020600654604051908152f35b34610946575f36600319011261094657610b90604051610b5d604082610f33565b60128152713c28272a39a330b1ba37b93c96991718171960711b6020820152604051918291602083526020830190610fab565b0390f35b34610946576080366003190112610946576044356064358115610c4a575b8015610c3b575b60039060405192610bc984610f18565b60043584526020840160243581526040850191825260608501928352335f528360205260405f209451855551600185015551600284015551910155610c0d33611022565b6040519081527f2b4eaa806f1ef4367c0f395b151c87df87dcd9a99bdfa956df2e02a9a24d805e60203392a2005b506714d1120d7b160000610bb9565b670de0b6b3a76400009150610bb2565b34610946576020366003190112610946576001600160a01b03610c7b610f02565b165f526003602052608060405f208054906001810154906003600282015491015491604051938452602084015260408301526060820152f35b34610946576080366003190112610946576044356001600160401b03811161094657610ce4903690600401610f56565b604051815160643592602091839181908401835e8101600581520301902054908115610c4a578015610c3b5760039060405192610bc984610f18565b34610946575f366003190112610946576040518060206004549283815201809260045f5260205f20905f5b818110610dac5750505081610d61910382610f33565b604051918291602083019060208452518091526040830191905f5b818110610d8a575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610d7c565b82546001600160a01b0316845260209093019260019283019201610d4b565b3461094657602036600319011261094657600435610de76110e6565b8015610e265760407ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d291600654908060065582519182526020820152a1005b60405162461bcd60e51b81526020600482015260166024820152755072696365206d75737420626520706f73697469766560501b6044820152606490fd5b34610946575f366003190112610946576020600454604051908152f35b34610946576020366003190112610946576001600160a01b03610ea2610f02565b165f526002602052602060018060a01b0360405f205416604051908152f35b34610946575f366003190112610946577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b600435906001600160a01b038216820361094657565b608081019081106001600160401b0382111761094a57604052565b601f909101601f19168101906001600160401b0382119082101761094a57604052565b81601f82011215610946578035906001600160401b03821161094a5760405192610f8a601f8401601f191660200185610f33565b8284526020838301011161094657815f926020809301838601378301015290565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600454811015610fe75760045f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b8181029291811591840414171561100e57565b634e487b7160e01b5f52601160045260245ffd5b60018060a01b03165f52600360205260405f206040519061104282610f18565b8054808352600182015480602085015260606003600285015494604087019586520154940193845281156110d55761107991610ffb565b90601e820291808304601e149015171561100e576110b39161109c915190610ffb565b91516a0c097ce7bc90715b34b9f160241b92610ffb565b049068056bc75e2d6310000082106110c757565b68056bc75e2d631000009150565b5050505068056bc75e2d6310000090565b5f546001600160a01b031633036110f957565b63118cdaa760e01b5f523360045260245ffdfe610180806040523461075557612b4b803803809161001d8285610759565b833981019060c0818303126107555780516001600160401b038111610755578261004891830161077c565b60208201516001600160401b038111610755578361006791840161077c565b60408301519091906001600160a01b038116908190036107555760608401516001600160401b03811161075557856100a091860161077c565b60808501519095906001600160401b0381116107555760a0916100c491870161077c565b940151916040938451916100d88684610759565b60018352603160f81b6020840190815281519092906001600160401b03811161048f57600354600181811c9116801561074b575b602082101461047157601f81116106e8575b50806020601f8211600114610684575f91610679575b508160011b915f199060031b1c1916176003555b8051906001600160401b03821161048f5760045490600182811c9216801561066f575b60208310146104715781601f849311610601575b50602090601f831160011461059b575f92610590575b50508160011b915f199060031b1c1916176004555b6101b3816107d1565b610120526101c083610958565b6101405260208151910120918260e05251902080610100524660a05284519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f84528683015260608201524660808201523060a082015260a0815261022b60c082610759565b5190206080523060c052801561057e573361016052600880546001600160a01b03191691909117905583516001600160401b03811161048f57600c54600181811c91168015610574575b602082101461047157601f8111610511575b50602094601f82116001146104ae579481929394955f926104a3575b50508160011b915f199060031b1c191617600c555b82516001600160401b03811161048f57600d54600181811c91168015610485575b602082101461047157601f811161040e575b506020601f82116001146103ab57819293945f926103a0575b50508160011b915f199060031b1c191617600d555b8015610391575b600e55516120ba9081610a9182396080518161196b015260a05181611a28015260c05181611935015260e051816119ba015261010051816119e001526101205181610a3001526101405181610a590152610160518181816107ad01528181610b9301528181610ebd01526111200152f35b50670de0b6b3a7640000610320565b015190505f80610304565b601f19821690600d5f52805f20915f5b8181106103f6575095836001959697106103de575b505050811b01600d55610319565b01515f1960f88460031b161c191690555f80806103d0565b9192602060018192868b0151815501940192016103bb565b600d5f527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5601f830160051c81019160208410610467575b601f0160051c01905b81811061045c57506102eb565b5f815560010161044f565b9091508190610446565b634e487b7160e01b5f52602260045260245ffd5b90607f16906102d9565b634e487b7160e01b5f52604160045260245ffd5b015190505f806102a3565b601f19821695600c5f52805f20915f5b8881106104f9575083600195969798106104e1575b505050811b01600c556102b8565b01515f1960f88460031b161c191690555f80806104d3565b919260206001819286850151815501940192016104be565b600c5f527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7601f830160051c8101916020841061056a575b601f0160051c01905b81811061055f5750610287565b5f8155600101610552565b9091508190610549565b90607f1690610275565b634726455360e11b5f5260045260245ffd5b015190505f80610195565b60045f9081528281209350601f198516905b8181106105e957509084600195949392106105d1575b505050811b016004556101aa565b01515f1960f88460031b161c191690555f80806105c3565b929360206001819287860151815501950193016105ad565b60045f529091507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f840160051c81019160208510610665575b90601f859493920160051c01905b818110610657575061017f565b5f815584935060010161064a565b909150819061063c565b91607f169161016b565b90508301515f610134565b60035f9081528181209250601f198416905b8181106106d0575090836001949392106106b8575b5050811b01600355610148565b8501515f1960f88460031b161c191690555f806106ab565b9192602060018192868a015181550194019201610696565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c81019160208410610741575b601f0160051c01905b818110610736575061011e565b5f8155600101610729565b9091508190610720565b90607f169061010c565b5f80fd5b601f909101601f19168101906001600160401b0382119082101761048f57604052565b81601f82011215610755578051906001600160401b03821161048f57604051926107b0601f8401601f191660200185610759565b8284526020838301011161075557815f9260208093018386015e8301015290565b908151602081105f1461084b575090601f81511161080b5760208151910151602082106107fc571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b03811161048f57600554600181811c9116801561094e575b602082101461047157601f811161091b575b50602092601f82116001146108ba57928192935f926108af575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610896565b601f1982169360055f52805f20915f5b86811061090357508360019596106108eb575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806108dd565b919260206001819286850151815501940192016108ca565b60055f52601f60205f20910160051c810190601f830160051c015b818110610943575061087c565b5f8155600101610936565b90607f169061086a565b908151602081105f14610983575090601f81511161080b5760208151910151602082106107fc571790565b6001600160401b03811161048f57600654600181811c91168015610a86575b602082101461047157601f8111610a53575b50602092601f82116001146109f257928192935f926109e7575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806109ce565b601f1982169360065f52805f20915f5b868110610a3b5750836001959610610a23575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f8080610a15565b91926020600181928685015181550194019201610a02565b60065f52601f60205f20910160051c810190601f830160051c015b818110610a7b57506109b4565b5f8155600101610a6e565b90607f16906109a256fe60806040526004361015610011575f80fd5b5f3560e01c806306fdde031461137f578063095ea7b3146113595780631296ee621461131b578063169329ad1461130157806318160ddd146112e457806323b872dd1461119f5780632ace86771461114f5780632dd310001461110b5780632ecd4e7d146109a2578063313ce567146110f05780633644e515146110d657806338518bfe146110ae57806339df23731461108a5780633ba0b9a91461106d5780634000aea014610fb757806340c10f1914610ea157806340cc860b14610e5157806342966c6814610e345780635054dbd014610e0c57806354fd4d5014610dad578063623330ae14610d2457806366b48f9114610d095780636b09de4514610ced57806370a0823114610cb65780637a5b4f5914610c235780637ade132c14610b775780637ecebe0014610b3f5780637fd6327a14610b1057806384b0196e14610a185780638d074547146109f557806395d89b41146109da5780639a78e72e146109a25780639dc29fac1461086a578063a54c44551461080d578063a9059cbb146107dc578063aae64da214610719578063b83aa2de1461062d578063b9e205ae1461058a578063c504e2091461051b578063c6d572ae146104e8578063d505accf146103a3578063dd62ed3e1461036f578063f1d85d55146103325763fa74542d146101fd575f80fd5b3461032e57604036600319011261032e576102166113be565b60095460243591906001600160a01b0316330361031b576001600160a01b03165f818152601060209081526040808320338085529083528184205485855260118452828520918552925290912054919291610272908390611886565b9081116102dc577f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f591602091845f526011835260405f2060018060a01b0333165f52835260405f2055835f52600f825260405f206102d1828254611886565b9055604051908152a2005b60405162461bcd60e51b815260206004820152601760248201527614dc195b991a5b99c81b1a5b5a5d08195e18d959591959604a1b6044820152606490fd5b63472511eb60e11b5f523360045260245ffd5b5f80fd5b3461032e57602036600319011261032e576001600160a01b036103536113be565b165f52600a602052602060ff60405f2054166040519015158152f35b3461032e57604036600319011261032e57602061039b61038d6113be565b6103956113d4565b90611893565b604051908152f35b3461032e5760e036600319011261032e576103bc6113be565b6103c46113d4565b604435906064359260843560ff8116810361032e578442116104d5576104986104a19160018060a01b03841696875f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528a604084015260018060a01b038916606084015289608084015260a083015260c082015260c0815261046660e08261146f565b519020610471611932565b906040519161190160f01b83526002830152602282015260c43591604260a4359220611e75565b90929192611ef8565b6001600160a01b03168481036104be57506104bc9350611b89565b005b84906325c0072360e11b5f5260045260245260445ffd5b8463313c898160e11b5f5260045260245ffd5b3461032e575f36600319011261032e576105176105036116ab565b60405191829160208352602083019061139a565b0390f35b3461032e57602036600319011261032e576105346113be565b6008546001600160a01b0316330361031b576001600160a01b03165f818152600a60205260408120805460ff191690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d89080a2005b3461032e57602036600319011261032e57600854600435906001600160a01b0316330361031b5780156105f05760407fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde91600e549080600e5582519182526020820152a1005b60405162461bcd60e51b815260206004820152601560248201527452617465206d75737420626520706f73697469766560581b6044820152606490fd5b3461032e57606036600319011261032e576106466113be565b60095460243590604435906001600160a01b0316330361070457805f52600b60205260ff60405f2054166106f2575f52600b60205260405f20600160ff1982541617905561069382611424565b335f9081526020919091526040902054916106ad8161143d565b60018060a01b0333165f526020526106c98260405f2054611886565b9283116102dc576104bc926106dd8261143d565b335f9081526020919091526040902055611b20565b63070c5a0360e51b5f5260045260245ffd5b63472511eb60e11b5f90815233600452602490fd5b3461032e57602036600319011261032e576107326113be565b6008546001600160a01b0316331415806107a9575b61031b576001600160a01b0316801561079757805f52600a60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b634726455360e11b5f5260045260245ffd5b50337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161415610747565b3461032e57604036600319011261032e576108026107f86113be565b6024359033611b4d565b602060405160018152f35b3461032e57604036600319011261032e576108266113be565b335f8181526010602090815260408083206001600160a01b03909516808452948252918290206024359081905591519182525f5160206120255f395f51905f5291a3005b3461032e57604036600319011261032e576108836113be565b600954602435906001600160a01b03163314610948576001600160a01b03821633036108b3575b6104bc91611b20565b6108bd3383611893565b918183106108f757816104bc935f1981036108dc575b505091506108aa565b6108f0916108e9916117f0565b3383611b89565b81846108d3565b60405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602c60248201527f53757065725061796d6173746572206d75737420757365206275726e46726f6d60448201526b576974684f7048617368282960a01b6064820152608490fd5b3461032e57602036600319011261032e576001600160a01b036109c36113be565b165f52600f602052602060405f2054604051908152f35b3461032e575f36600319011261032e57610517610503611616565b3461032e576020610a0f610a08366113ea565b9291611893565b10604051908152f35b3461032e575f36600319011261032e57610ab4610a547f0000000000000000000000000000000000000000000000000000000000000000611cc3565b610a7d7f0000000000000000000000000000000000000000000000000000000000000000611dbd565b6020610ac260405192610a90838561146f565b5f84525f368137604051958695600f60f81b875260e08588015260e087019061139a565b90858203604087015261139a565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b828110610af957505050500390f35b835185528695509381019392810192600101610aea565b3461032e57602036600319011261032e576004355f52600b602052602060ff60405f2054166040519015158152f35b3461032e57602036600319011261032e576001600160a01b03610b606113be565b165f526007602052602060405f2054604051908152f35b3461032e57602036600319011261032e57610b906113be565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141580610c0e575b61031b576001600160a01b0316801561079757600980546001600160a01b031916821790557f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b506008546001600160a01b0316331415610bc3565b3461032e575f36600319011261032e57610c82610c3e6114ca565b610c46611616565b6008546001600160a01b031690610cac90610c9e610c626116ab565b610c90610c6d611581565b9360405198899860a08a5260a08a019061139a565b9088820360208a015261139a565b90868203604088015261139a565b90848203606086015261139a565b9060808301520390f35b3461032e57602036600319011261032e576001600160a01b03610cd76113be565b165f525f602052602060405f2054604051908152f35b3461032e57602036600319011261032e576104bc6004356117fd565b3461032e575f36600319011261032e57610517610503611581565b3461032e57602036600319011261032e57610d3d6113be565b600854906001600160a01b038216903382900361031b576001600160a01b03169182908115610d9a576001600160a01b031916176008557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b50634726455360e11b5f5260045260245ffd5b3461032e575f36600319011261032e57610517604051610dce60408261146f565b601f81527f58504e54732d322e332e322d64656661756c742d6c696d69742d61706e747300602082015260405191829160208352602083019061139a565b3461032e575f36600319011261032e576009546040516001600160a01b039091168152602090f35b3461032e57602036600319011261032e576104bc60043533611b20565b3461032e57604036600319011261032e57610e6a6113be565b610e726113d4565b6001600160a01b039182165f908152601060209081526040808320949093168252928352819020549051908152f35b3461032e57604036600319011261032e57610eba6113be565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141580610fa2575b610704576001600160a01b038116908115610d9a576009546104bc926001600160a01b039091169081151580610f7f575b610f2f575b5050602435905f611bec565b610f37611740565b91610f4184611424565b9060018060a01b03165f526020528160405f20555f5160206120255f395f51905f52602060095460018060a01b031693604051908152a38280610f23565b50610f8983611424565b60018060a01b0383165f5260205260405f205415610f1e565b506008546001600160a01b0316331415610eed565b3461032e57606036600319011261032e57610fd06113be565b60243590604435906001600160401b03821161032e573660238301121561032e576004820135926001600160401b038411611059576040519161101d601f8601601f19166020018461146f565b848352366024868601011161032e575f6020866108029760246110549801838801378501015261104d8282611876565b5033611a4e565b61179a565b634e487b7160e01b5f52604160045260245ffd5b3461032e575f36600319011261032e576020600e54604051908152f35b3461032e575f36600319011261032e57602060405169010f0cf064dd592000008152f35b3461032e575f36600319011261032e576008546040516001600160a01b039091168152602090f35b3461032e575f36600319011261032e57602061039b611932565b3461032e575f36600319011261032e57602060405160128152f35b3461032e575f36600319011261032e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461032e57604036600319011261032e576111686113be565b6111706113d4565b6001600160a01b039182165f908152601160209081526040808320949093168252928352819020549051908152f35b3461032e576111ad366113ea565b6009549091906001600160a01b031633811461126d575b506111cf3384611893565b92600184016111e3575b6108029350611b4d565b828410611252576001600160a01b03811693841561123f57331561122c57610802945f52600160205260405f2060018060a01b0333165f526020528360405f20910390556111d9565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b8284637dc7a0d960e11b5f523360045260245260445260645ffd5b6001600160a01b0382160361128257836111c4565b60405162461bcd60e51b815260206004820152603460248201527f53757065725061796d61737465722053656375726974793a2043616e206f6e6c6044820152733c90383ab63610333ab73239903a379039b2b63360611b6064820152608490fd5b3461032e575f36600319011261032e576020600254604051908152f35b3461032e575f36600319011261032e57602061039b611740565b3461032e57604036600319011261032e5761080261105461133a6113be565b6024356040519161134c60208461146f565b5f835261104d8282611876565b3461032e57604036600319011261032e576108026113756113be565b6024359033611b89565b3461032e575f36600319011261032e576105176105036114ca565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361032e57565b602435906001600160a01b038216820361032e57565b606090600319011261032e576004356001600160a01b038116810361032e57906024356001600160a01b038116810361032e579060443590565b6001600160a01b03165f90815260106020526040902090565b6001600160a01b03165f90815260116020526040902090565b6001600160a01b03165f908152600f6020526040902090565b601f909101601f19168101906001600160401b0382119082101761105957604052565b90600182811c921680156114c0575b60208310146114ac57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916114a1565b604051905f82600354916114dd83611492565b80835292600181169081156115625750600114611503575b6115019250038361146f565b565b5060035f90815290917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b818310611546575050906020611501928201016114f5565b602091935080600191548385890101520191019091849261152e565b6020925061150194915060ff191682840152151560051b8201016114f5565b604051905f82600d549161159483611492565b808352926001811690811561156257506001146115b7576115019250038361146f565b50600d5f90815290917fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b8183106115fa575050906020611501928201016114f5565b60209193508060019154838589010152019101909184926115e2565b604051905f826004549161162983611492565b8083529260018116908115611562575060011461164c576115019250038361146f565b5060045f90815290917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b81831061168f575050906020611501928201016114f5565b6020919350806001915483858901015201910190918492611677565b604051905f82600c54916116be83611492565b808352926001811690811561156257506001146116e1576115019250038361146f565b50600c5f90815290917fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b818310611724575050906020611501928201016114f5565b602091935080600191548385890101520191019091849261170c565b600e54806117955750670de0b6b3a76400005b8069010f0cf064dd59200000029069010f0cf064dd5920000082040361178157670de0b6b3a7640000900490565b634e487b7160e01b5f52601160045260245ffd5b611753565b156117a157565b60405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d726563656976656044820152603960f91b6064820152608490fd5b9190820391821161178157565b335f52600f60205260405f2054908115611872578181111561186b57505b6118258133611b20565b335f52600f60205260405f2061183c8282546117f0565b9055335f52600f60205260405f205460405191825260208201525f5160206120455f395f51905f5260403392a2565b905061181b565b5050565b906118819133611b4d565b600190565b9190820180921161178157565b6001600160a01b0382165f908152600a602052604090205460ff166118db5760018060a01b03165f52600160205260405f209060018060a01b03165f5260205260405f205490565b6001600160a01b039081165f818152601060209081526040808320959094168083529481528382205492825260118152838220948252939093529120548082111561192c57611929916117f0565b90565b50505f90565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480611a25575b1561198d577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a08152611a1f60c08261146f565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614611964565b919290803b15611b1757611a9d935f60209460405196879586948593632229f29760e21b855233600486015260018060a01b03166024850152604484015260806064840152608483019061139a565b03926001600160a01b03165af15f9181611ad2575b50611abc57505f90565b6001600160e01b031916632229f29760e21b1490565b9091506020813d602011611b0f575b81611aee6020938361146f565b8101031261032e57516001600160e01b03198116810361032e57905f611ab2565b3d9150611ae1565b50505050600190565b906001600160a01b03821615611b3a575f61150192611bec565b634b637e8f60e11b5f525f60045260245ffd5b91906001600160a01b03831615611b3a576001600160a01b03811615611b765761150192611bec565b63ec442f0560e01b5f525f60045260245ffd5b6001600160a01b031690811561123f576001600160a01b031691821561122c5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b91906001600160a01b0383161580611cb1575b80611ca8575b611c13575b61150192611f6c565b611c1c81611456565b5480611c285750611c0a565b9181611c5592938083115f14611ca057945b611c4382611456565b611c4e8782546117f0565b9055611f6c565b81611c5e575050565b611c688282611b20565b80611c805f5160206120455f395f51905f5292611456565b546040805194855260208501919091526001600160a01b039190911692a2565b508194611c3a565b50811515611c05565b506001600160a01b0381161515611bff565b60ff8114611d095760ff811690601f8211611cfa5760405191611ce760408461146f565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b50604051600554815f611d1b83611492565b8083529260018116908115611d9e5750600114611d3f575b6119299250038261146f565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b818310611d8257505090602061192992820101611d33565b6020919350806001915483858801015201910190918392611d6a565b6020925061192994915060ff191682840152151560051b820101611d33565b60ff8114611de15760ff811690601f8211611cfa5760405191611ce760408461146f565b50604051600654815f611df383611492565b8083529260018116908115611d9e5750600114611e16576119299250038261146f565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310611e5957505090602061192992820101611d33565b6020919350806001915483858801015201910190918392611e41565b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038411611eed579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15611ee2575f516001600160a01b03811615611ed857905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b6004811015611f585780611f0a575050565b60018103611f215763f645eedf60e01b5f5260045ffd5b60028103611f3c575063fce698f760e01b5f5260045260245ffd5b600314611f465750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b03169081611fd25760205f5160206120655f395f51905f5291611f9885600254611886565b6002555b6001600160a01b03169384611fbd5780600254036002555b604051908152a3565b845f525f825260405f20818154019055611fb4565b815f525f60205260405f2054838110612009575f5160206120655f395f51905f529184602092855f525f84520360405f2055611f9c565b91905063391434e360e21b5f5260045260245260445260645ffdfebae546dee4cdda3373cbd29134aea6bc8f5a16e508791a2e0d2a3848d3016ee6798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886dddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212206e8daee4ff966728e6d54d786e40fd37647919849b6526b5601c4412cd9c7d4d64736f6c634300081c00338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a264697066735822122019545cd2c304323df87b723644c5b101300eb2cfa093443cc1b71a466319f75f64736f6c634300081c0033" | packages/core/src/abis/xPNTsFactory.json:717 |
xPNTsTokenABI
const xPNTsTokenABI: any;Defined in: packages/core/src/abis/index.ts:56
xPNTsTokenArtifact
const xPNTsTokenArtifact: object = xPNTsTokenABIData;Defined in: packages/core/src/abis/index.ts:75
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
abi | ( | { anonymous?: undefined; inputs: object[]; name?: undefined; outputs?: undefined; stateMutability: string; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs: object[]; stateMutability: string; type: string; } | { anonymous: boolean; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; } | { anonymous?: undefined; inputs: object[]; name: string; outputs?: undefined; stateMutability?: undefined; type: string; })[] | - | packages/core/src/abis/xPNTsToken.json:2 |
bytecode | string | "0x610180806040523461075557612b4b803803809161001d8285610759565b833981019060c0818303126107555780516001600160401b038111610755578261004891830161077c565b60208201516001600160401b038111610755578361006791840161077c565b60408301519091906001600160a01b038116908190036107555760608401516001600160401b03811161075557856100a091860161077c565b60808501519095906001600160401b0381116107555760a0916100c491870161077c565b940151916040938451916100d88684610759565b60018352603160f81b6020840190815281519092906001600160401b03811161048f57600354600181811c9116801561074b575b602082101461047157601f81116106e8575b50806020601f8211600114610684575f91610679575b508160011b915f199060031b1c1916176003555b8051906001600160401b03821161048f5760045490600182811c9216801561066f575b60208310146104715781601f849311610601575b50602090601f831160011461059b575f92610590575b50508160011b915f199060031b1c1916176004555b6101b3816107d1565b610120526101c083610958565b6101405260208151910120918260e05251902080610100524660a05284519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f84528683015260608201524660808201523060a082015260a0815261022b60c082610759565b5190206080523060c052801561057e573361016052600880546001600160a01b03191691909117905583516001600160401b03811161048f57600c54600181811c91168015610574575b602082101461047157601f8111610511575b50602094601f82116001146104ae579481929394955f926104a3575b50508160011b915f199060031b1c191617600c555b82516001600160401b03811161048f57600d54600181811c91168015610485575b602082101461047157601f811161040e575b506020601f82116001146103ab57819293945f926103a0575b50508160011b915f199060031b1c191617600d555b8015610391575b600e55516120ba9081610a9182396080518161196b015260a05181611a28015260c05181611935015260e051816119ba015261010051816119e001526101205181610a3001526101405181610a590152610160518181816107ad01528181610b9301528181610ebd01526111200152f35b50670de0b6b3a7640000610320565b015190505f80610304565b601f19821690600d5f52805f20915f5b8181106103f6575095836001959697106103de575b505050811b01600d55610319565b01515f1960f88460031b161c191690555f80806103d0565b9192602060018192868b0151815501940192016103bb565b600d5f527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5601f830160051c81019160208410610467575b601f0160051c01905b81811061045c57506102eb565b5f815560010161044f565b9091508190610446565b634e487b7160e01b5f52602260045260245ffd5b90607f16906102d9565b634e487b7160e01b5f52604160045260245ffd5b015190505f806102a3565b601f19821695600c5f52805f20915f5b8881106104f9575083600195969798106104e1575b505050811b01600c556102b8565b01515f1960f88460031b161c191690555f80806104d3565b919260206001819286850151815501940192016104be565b600c5f527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7601f830160051c8101916020841061056a575b601f0160051c01905b81811061055f5750610287565b5f8155600101610552565b9091508190610549565b90607f1690610275565b634726455360e11b5f5260045260245ffd5b015190505f80610195565b60045f9081528281209350601f198516905b8181106105e957509084600195949392106105d1575b505050811b016004556101aa565b01515f1960f88460031b161c191690555f80806105c3565b929360206001819287860151815501950193016105ad565b60045f529091507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f840160051c81019160208510610665575b90601f859493920160051c01905b818110610657575061017f565b5f815584935060010161064a565b909150819061063c565b91607f169161016b565b90508301515f610134565b60035f9081528181209250601f198416905b8181106106d0575090836001949392106106b8575b5050811b01600355610148565b8501515f1960f88460031b161c191690555f806106ab565b9192602060018192868a015181550194019201610696565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c81019160208410610741575b601f0160051c01905b818110610736575061011e565b5f8155600101610729565b9091508190610720565b90607f169061010c565b5f80fd5b601f909101601f19168101906001600160401b0382119082101761048f57604052565b81601f82011215610755578051906001600160401b03821161048f57604051926107b0601f8401601f191660200185610759565b8284526020838301011161075557815f9260208093018386015e8301015290565b908151602081105f1461084b575090601f81511161080b5760208151910151602082106107fc571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b03811161048f57600554600181811c9116801561094e575b602082101461047157601f811161091b575b50602092601f82116001146108ba57928192935f926108af575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610896565b601f1982169360055f52805f20915f5b86811061090357508360019596106108eb575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806108dd565b919260206001819286850151815501940192016108ca565b60055f52601f60205f20910160051c810190601f830160051c015b818110610943575061087c565b5f8155600101610936565b90607f169061086a565b908151602081105f14610983575090601f81511161080b5760208151910151602082106107fc571790565b6001600160401b03811161048f57600654600181811c91168015610a86575b602082101461047157601f8111610a53575b50602092601f82116001146109f257928192935f926109e7575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806109ce565b601f1982169360065f52805f20915f5b868110610a3b5750836001959610610a23575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f8080610a15565b91926020600181928685015181550194019201610a02565b60065f52601f60205f20910160051c810190601f830160051c015b818110610a7b57506109b4565b5f8155600101610a6e565b90607f16906109a256fe60806040526004361015610011575f80fd5b5f3560e01c806306fdde031461137f578063095ea7b3146113595780631296ee621461131b578063169329ad1461130157806318160ddd146112e457806323b872dd1461119f5780632ace86771461114f5780632dd310001461110b5780632ecd4e7d146109a2578063313ce567146110f05780633644e515146110d657806338518bfe146110ae57806339df23731461108a5780633ba0b9a91461106d5780634000aea014610fb757806340c10f1914610ea157806340cc860b14610e5157806342966c6814610e345780635054dbd014610e0c57806354fd4d5014610dad578063623330ae14610d2457806366b48f9114610d095780636b09de4514610ced57806370a0823114610cb65780637a5b4f5914610c235780637ade132c14610b775780637ecebe0014610b3f5780637fd6327a14610b1057806384b0196e14610a185780638d074547146109f557806395d89b41146109da5780639a78e72e146109a25780639dc29fac1461086a578063a54c44551461080d578063a9059cbb146107dc578063aae64da214610719578063b83aa2de1461062d578063b9e205ae1461058a578063c504e2091461051b578063c6d572ae146104e8578063d505accf146103a3578063dd62ed3e1461036f578063f1d85d55146103325763fa74542d146101fd575f80fd5b3461032e57604036600319011261032e576102166113be565b60095460243591906001600160a01b0316330361031b576001600160a01b03165f818152601060209081526040808320338085529083528184205485855260118452828520918552925290912054919291610272908390611886565b9081116102dc577f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f591602091845f526011835260405f2060018060a01b0333165f52835260405f2055835f52600f825260405f206102d1828254611886565b9055604051908152a2005b60405162461bcd60e51b815260206004820152601760248201527614dc195b991a5b99c81b1a5b5a5d08195e18d959591959604a1b6044820152606490fd5b63472511eb60e11b5f523360045260245ffd5b5f80fd5b3461032e57602036600319011261032e576001600160a01b036103536113be565b165f52600a602052602060ff60405f2054166040519015158152f35b3461032e57604036600319011261032e57602061039b61038d6113be565b6103956113d4565b90611893565b604051908152f35b3461032e5760e036600319011261032e576103bc6113be565b6103c46113d4565b604435906064359260843560ff8116810361032e578442116104d5576104986104a19160018060a01b03841696875f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528a604084015260018060a01b038916606084015289608084015260a083015260c082015260c0815261046660e08261146f565b519020610471611932565b906040519161190160f01b83526002830152602282015260c43591604260a4359220611e75565b90929192611ef8565b6001600160a01b03168481036104be57506104bc9350611b89565b005b84906325c0072360e11b5f5260045260245260445ffd5b8463313c898160e11b5f5260045260245ffd5b3461032e575f36600319011261032e576105176105036116ab565b60405191829160208352602083019061139a565b0390f35b3461032e57602036600319011261032e576105346113be565b6008546001600160a01b0316330361031b576001600160a01b03165f818152600a60205260408120805460ff191690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d89080a2005b3461032e57602036600319011261032e57600854600435906001600160a01b0316330361031b5780156105f05760407fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde91600e549080600e5582519182526020820152a1005b60405162461bcd60e51b815260206004820152601560248201527452617465206d75737420626520706f73697469766560581b6044820152606490fd5b3461032e57606036600319011261032e576106466113be565b60095460243590604435906001600160a01b0316330361070457805f52600b60205260ff60405f2054166106f2575f52600b60205260405f20600160ff1982541617905561069382611424565b335f9081526020919091526040902054916106ad8161143d565b60018060a01b0333165f526020526106c98260405f2054611886565b9283116102dc576104bc926106dd8261143d565b335f9081526020919091526040902055611b20565b63070c5a0360e51b5f5260045260245ffd5b63472511eb60e11b5f90815233600452602490fd5b3461032e57602036600319011261032e576107326113be565b6008546001600160a01b0316331415806107a9575b61031b576001600160a01b0316801561079757805f52600a60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b634726455360e11b5f5260045260245ffd5b50337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161415610747565b3461032e57604036600319011261032e576108026107f86113be565b6024359033611b4d565b602060405160018152f35b3461032e57604036600319011261032e576108266113be565b335f8181526010602090815260408083206001600160a01b03909516808452948252918290206024359081905591519182525f5160206120255f395f51905f5291a3005b3461032e57604036600319011261032e576108836113be565b600954602435906001600160a01b03163314610948576001600160a01b03821633036108b3575b6104bc91611b20565b6108bd3383611893565b918183106108f757816104bc935f1981036108dc575b505091506108aa565b6108f0916108e9916117f0565b3383611b89565b81846108d3565b60405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602c60248201527f53757065725061796d6173746572206d75737420757365206275726e46726f6d60448201526b576974684f7048617368282960a01b6064820152608490fd5b3461032e57602036600319011261032e576001600160a01b036109c36113be565b165f52600f602052602060405f2054604051908152f35b3461032e575f36600319011261032e57610517610503611616565b3461032e576020610a0f610a08366113ea565b9291611893565b10604051908152f35b3461032e575f36600319011261032e57610ab4610a547f0000000000000000000000000000000000000000000000000000000000000000611cc3565b610a7d7f0000000000000000000000000000000000000000000000000000000000000000611dbd565b6020610ac260405192610a90838561146f565b5f84525f368137604051958695600f60f81b875260e08588015260e087019061139a565b90858203604087015261139a565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b828110610af957505050500390f35b835185528695509381019392810192600101610aea565b3461032e57602036600319011261032e576004355f52600b602052602060ff60405f2054166040519015158152f35b3461032e57602036600319011261032e576001600160a01b03610b606113be565b165f526007602052602060405f2054604051908152f35b3461032e57602036600319011261032e57610b906113be565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141580610c0e575b61031b576001600160a01b0316801561079757600980546001600160a01b031916821790557f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b506008546001600160a01b0316331415610bc3565b3461032e575f36600319011261032e57610c82610c3e6114ca565b610c46611616565b6008546001600160a01b031690610cac90610c9e610c626116ab565b610c90610c6d611581565b9360405198899860a08a5260a08a019061139a565b9088820360208a015261139a565b90868203604088015261139a565b90848203606086015261139a565b9060808301520390f35b3461032e57602036600319011261032e576001600160a01b03610cd76113be565b165f525f602052602060405f2054604051908152f35b3461032e57602036600319011261032e576104bc6004356117fd565b3461032e575f36600319011261032e57610517610503611581565b3461032e57602036600319011261032e57610d3d6113be565b600854906001600160a01b038216903382900361031b576001600160a01b03169182908115610d9a576001600160a01b031916176008557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b50634726455360e11b5f5260045260245ffd5b3461032e575f36600319011261032e57610517604051610dce60408261146f565b601f81527f58504e54732d322e332e322d64656661756c742d6c696d69742d61706e747300602082015260405191829160208352602083019061139a565b3461032e575f36600319011261032e576009546040516001600160a01b039091168152602090f35b3461032e57602036600319011261032e576104bc60043533611b20565b3461032e57604036600319011261032e57610e6a6113be565b610e726113d4565b6001600160a01b039182165f908152601060209081526040808320949093168252928352819020549051908152f35b3461032e57604036600319011261032e57610eba6113be565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141580610fa2575b610704576001600160a01b038116908115610d9a576009546104bc926001600160a01b039091169081151580610f7f575b610f2f575b5050602435905f611bec565b610f37611740565b91610f4184611424565b9060018060a01b03165f526020528160405f20555f5160206120255f395f51905f52602060095460018060a01b031693604051908152a38280610f23565b50610f8983611424565b60018060a01b0383165f5260205260405f205415610f1e565b506008546001600160a01b0316331415610eed565b3461032e57606036600319011261032e57610fd06113be565b60243590604435906001600160401b03821161032e573660238301121561032e576004820135926001600160401b038411611059576040519161101d601f8601601f19166020018461146f565b848352366024868601011161032e575f6020866108029760246110549801838801378501015261104d8282611876565b5033611a4e565b61179a565b634e487b7160e01b5f52604160045260245ffd5b3461032e575f36600319011261032e576020600e54604051908152f35b3461032e575f36600319011261032e57602060405169010f0cf064dd592000008152f35b3461032e575f36600319011261032e576008546040516001600160a01b039091168152602090f35b3461032e575f36600319011261032e57602061039b611932565b3461032e575f36600319011261032e57602060405160128152f35b3461032e575f36600319011261032e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461032e57604036600319011261032e576111686113be565b6111706113d4565b6001600160a01b039182165f908152601160209081526040808320949093168252928352819020549051908152f35b3461032e576111ad366113ea565b6009549091906001600160a01b031633811461126d575b506111cf3384611893565b92600184016111e3575b6108029350611b4d565b828410611252576001600160a01b03811693841561123f57331561122c57610802945f52600160205260405f2060018060a01b0333165f526020528360405f20910390556111d9565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b8284637dc7a0d960e11b5f523360045260245260445260645ffd5b6001600160a01b0382160361128257836111c4565b60405162461bcd60e51b815260206004820152603460248201527f53757065725061796d61737465722053656375726974793a2043616e206f6e6c6044820152733c90383ab63610333ab73239903a379039b2b63360611b6064820152608490fd5b3461032e575f36600319011261032e576020600254604051908152f35b3461032e575f36600319011261032e57602061039b611740565b3461032e57604036600319011261032e5761080261105461133a6113be565b6024356040519161134c60208461146f565b5f835261104d8282611876565b3461032e57604036600319011261032e576108026113756113be565b6024359033611b89565b3461032e575f36600319011261032e576105176105036114ca565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361032e57565b602435906001600160a01b038216820361032e57565b606090600319011261032e576004356001600160a01b038116810361032e57906024356001600160a01b038116810361032e579060443590565b6001600160a01b03165f90815260106020526040902090565b6001600160a01b03165f90815260116020526040902090565b6001600160a01b03165f908152600f6020526040902090565b601f909101601f19168101906001600160401b0382119082101761105957604052565b90600182811c921680156114c0575b60208310146114ac57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916114a1565b604051905f82600354916114dd83611492565b80835292600181169081156115625750600114611503575b6115019250038361146f565b565b5060035f90815290917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b818310611546575050906020611501928201016114f5565b602091935080600191548385890101520191019091849261152e565b6020925061150194915060ff191682840152151560051b8201016114f5565b604051905f82600d549161159483611492565b808352926001811690811561156257506001146115b7576115019250038361146f565b50600d5f90815290917fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b8183106115fa575050906020611501928201016114f5565b60209193508060019154838589010152019101909184926115e2565b604051905f826004549161162983611492565b8083529260018116908115611562575060011461164c576115019250038361146f565b5060045f90815290917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b81831061168f575050906020611501928201016114f5565b6020919350806001915483858901015201910190918492611677565b604051905f82600c54916116be83611492565b808352926001811690811561156257506001146116e1576115019250038361146f565b50600c5f90815290917fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b818310611724575050906020611501928201016114f5565b602091935080600191548385890101520191019091849261170c565b600e54806117955750670de0b6b3a76400005b8069010f0cf064dd59200000029069010f0cf064dd5920000082040361178157670de0b6b3a7640000900490565b634e487b7160e01b5f52601160045260245ffd5b611753565b156117a157565b60405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d726563656976656044820152603960f91b6064820152608490fd5b9190820391821161178157565b335f52600f60205260405f2054908115611872578181111561186b57505b6118258133611b20565b335f52600f60205260405f2061183c8282546117f0565b9055335f52600f60205260405f205460405191825260208201525f5160206120455f395f51905f5260403392a2565b905061181b565b5050565b906118819133611b4d565b600190565b9190820180921161178157565b6001600160a01b0382165f908152600a602052604090205460ff166118db5760018060a01b03165f52600160205260405f209060018060a01b03165f5260205260405f205490565b6001600160a01b039081165f818152601060209081526040808320959094168083529481528382205492825260118152838220948252939093529120548082111561192c57611929916117f0565b90565b50505f90565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480611a25575b1561198d577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a08152611a1f60c08261146f565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614611964565b919290803b15611b1757611a9d935f60209460405196879586948593632229f29760e21b855233600486015260018060a01b03166024850152604484015260806064840152608483019061139a565b03926001600160a01b03165af15f9181611ad2575b50611abc57505f90565b6001600160e01b031916632229f29760e21b1490565b9091506020813d602011611b0f575b81611aee6020938361146f565b8101031261032e57516001600160e01b03198116810361032e57905f611ab2565b3d9150611ae1565b50505050600190565b906001600160a01b03821615611b3a575f61150192611bec565b634b637e8f60e11b5f525f60045260245ffd5b91906001600160a01b03831615611b3a576001600160a01b03811615611b765761150192611bec565b63ec442f0560e01b5f525f60045260245ffd5b6001600160a01b031690811561123f576001600160a01b031691821561122c5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b91906001600160a01b0383161580611cb1575b80611ca8575b611c13575b61150192611f6c565b611c1c81611456565b5480611c285750611c0a565b9181611c5592938083115f14611ca057945b611c4382611456565b611c4e8782546117f0565b9055611f6c565b81611c5e575050565b611c688282611b20565b80611c805f5160206120455f395f51905f5292611456565b546040805194855260208501919091526001600160a01b039190911692a2565b508194611c3a565b50811515611c05565b506001600160a01b0381161515611bff565b60ff8114611d095760ff811690601f8211611cfa5760405191611ce760408461146f565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b50604051600554815f611d1b83611492565b8083529260018116908115611d9e5750600114611d3f575b6119299250038261146f565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b818310611d8257505090602061192992820101611d33565b6020919350806001915483858801015201910190918392611d6a565b6020925061192994915060ff191682840152151560051b820101611d33565b60ff8114611de15760ff811690601f8211611cfa5760405191611ce760408461146f565b50604051600654815f611df383611492565b8083529260018116908115611d9e5750600114611e16576119299250038261146f565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310611e5957505090602061192992820101611d33565b6020919350806001915483858801015201910190918392611e41565b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038411611eed579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15611ee2575f516001600160a01b03811615611ed857905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b6004811015611f585780611f0a575050565b60018103611f215763f645eedf60e01b5f5260045ffd5b60028103611f3c575063fce698f760e01b5f5260045260245ffd5b600314611f465750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b03169081611fd25760205f5160206120655f395f51905f5291611f9885600254611886565b6002555b6001600160a01b03169384611fbd5780600254036002555b604051908152a3565b845f525f825260405f20818154019055611fb4565b815f525f60205260405f2054838110612009575f5160206120655f395f51905f529184602092855f525f84520360405f2055611f9c565b91905063391434e360e21b5f5260045260245260445260645ffdfebae546dee4cdda3373cbd29134aea6bc8f5a16e508791a2e0d2a3848d3016ee6798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886dddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212206e8daee4ff966728e6d54d786e40fd37647919849b6526b5601c4412cd9c7d4d64736f6c634300081c0033" | packages/core/src/abis/xPNTsToken.json:1279 |
Functions
accountActions()
function accountActions(address): (client) => AccountActions;Defined in: packages/core/src/actions/account.ts:32
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): AccountActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
accountFactoryActions()
function accountFactoryActions(address): (client) => AccountFactoryActions;Defined in: packages/core/src/actions/account.ts:155
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): AccountFactoryActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
aggregatorActions()
function aggregatorActions(): (client) => AggregatorActions;Defined in: packages/core/src/actions/aggregator.ts:10
Returns
(client): AggregatorActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
createAAStarPublicClient()
function createAAStarPublicClient(rpcUrl, chain): object;Defined in: packages/core/src/clients.ts:8
Creates a standard AAStar public client for any given chain.
Parameters
| Parameter | Type | Default value |
|---|---|---|
rpcUrl | string | undefined |
chain | Chain | sepolia |
Returns
| Name | Type | Description | Defined in |
|---|---|---|---|
account | undefined | The Account of the Client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:73 |
batch? | object | Flags for batch settings. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:75 |
batch.multicall? | | boolean | { batchSize?: number; deployless?: boolean; wait?: number; } | Toggle to enable eth_call multicall aggregation. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:20 |
cacheTime | number | Time (in ms) that cached data will remain in memory. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:77 |
call() | (parameters) => Promise<CallReturnType> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: eth_call Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:89 |
ccipRead? | | false | { request?: (parameters) => Promise<`0x${string}`>; } | CCIP Read configuration. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:79 |
chain | Chain | undefined | Chain for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:81 |
createAccessList() | (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: eth_createAccessList Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:113 |
createBlockFilter() | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "block"; }> | Creates a Filter to listen for new block hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: eth_newBlockFilter Example import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:133 |
createContractEventFilter() | <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> | Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs. - Docs: https://viem.sh/docs/contract/createContractEventFilter Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:154 |
createEventFilter() | <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> | Creates a Filter to listen for new events that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: eth_newFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:176 |
createPendingTransactionFilter() | () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${string}`]; ReturnType: `0x${string}`[] | RpcLog[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${string}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${string}`]; ReturnType: boolean; }]>; type: "transaction"; }> | Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges. - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: eth_newPendingTransactionFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:196 |
estimateContractGas() | <chain, abi, functionName, args>(args) => Promise<bigint> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas Remarks Internally, uses a Public Client to call the estimateGas action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:223 |
estimateFeesPerGas() | <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:685 |
estimateGas() | (args) => Promise<bigint> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: eth_estimateGas Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:247 |
estimateMaxPriorityFeePerGas() | <chainOverride>(args?) => Promise<bigint> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:877 |
experimental_blockTag? | BlockTag | Default block tag to use for RPC requests. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:83 |
extend() | <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>> | - | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:69 |
fillTransaction() | <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:271 |
getBalance() | (args) => Promise<bigint> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: eth_getBalance Remarks You can convert the balance to ether units with formatEther. const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:306 |
getBlobBaseFee() | () => Promise<bigint> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: eth_blobBaseFee Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:327 |
getBlock() | <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls eth_getBlockByNumber for blockNumber & blockTag. - Calls eth_getBlockByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:350 |
getBlockNumber() | (args?) => Promise<bigint> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: eth_blockNumber Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:372 |
getBlockTransactionCount() | (args?) => Promise<number> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls eth_getBlockTransactionCountByNumber for blockNumber & blockTag. - Calls eth_getBlockTransactionCountByHash for blockHash. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:394 |
getBytecode() | (args) => Promise<GetCodeReturnType> | Deprecated Use getCode instead. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:396 |
getChainId() | () => Promise<number> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: eth_chainId Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:416 |
getCode() | (args) => Promise<GetCodeReturnType> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: eth_getCode Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:438 |
getContractEvents() | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:464 |
getEip712Domain() | (args) => Promise<GetEip712DomainReturnType> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // } | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:497 |
getEnsAddress() | (args) => Promise<GetEnsAddressReturnType> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:526 |
getEnsAvatar() | (args) => Promise<GetEnsAvatarReturnType> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls getEnsText with key set to 'avatar'. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:555 |
getEnsName() | (args) => Promise<GetEnsNameReturnType> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls reverse(bytes) on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:581 |
getEnsResolver() | (args) => Promise<`0x${string}`> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:610 |
getEnsText() | (args) => Promise<GetEnsTextReturnType> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens Remarks Calls resolve(bytes, bytes) on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev' | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:640 |
getFeeHistory() | (args) => Promise<GetFeeHistoryReturnType> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: eth_feeHistory Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:663 |
getFilterChanges() | <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> | Returns a list of logs or hashes based on a Filter since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: eth_getFilterChanges Remarks A Filter can be created from the following actions: - createBlockFilter - createContractEventFilter - createEventFilter - createPendingTransactionFilter Depending on the type of filter, the return value will be different: - If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs. - If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes. - If the filter was created with createBlockFilter, it returns a list of block hashes. Examples // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:764 |
getFilterLogs() | <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: eth_getFilterLogs Remarks getFilterLogs is only compatible with event filters. Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:791 |
getGasPrice() | () => Promise<bigint> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: eth_gasPrice Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:810 |
getLogs() | <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: eth_getLogs Example import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:831 |
getProof() | (args) => Promise<GetProofReturnType> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls eth_getProof Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:856 |
getStorageAt() | (args) => Promise<GetStorageAtReturnType> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: eth_getStorageAt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:901 |
getTransaction() | <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }> | Returns information about a Transaction given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionByHash Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:924 |
getTransactionConfirmations() | (args) => Promise<bigint> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionConfirmations Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:947 |
getTransactionCount() | (args) => Promise<number> | Returns the number of Transactions an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: eth_getTransactionCount Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:969 |
getTransactionReceipt() | (args) => Promise<TransactionReceipt> | Returns the Transaction Receipt given a Transaction hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: eth_getTransactionReceipt Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:992 |
key | string | A key for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:85 |
multicall() | <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>> | Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract. - Docs: https://viem.sh/docs/contract/multicall Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1030 |
name | string | A name for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:87 |
pollingInterval | number | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:89 |
prepareTransactionRequest() | <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(...), (...)> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever<(...)> extends true ? unknown : ExactPartial<(...)>> & { chainId?: number }, ParameterTypeToParameters<request["parameters"] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : "type" | "chainId" | "gas" | "nonce" | "fees" | "blobVersionedHashes">> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest Examples import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1069 |
readContract() | <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts Remarks A "read-only" function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1101 |
request | EIP1193RequestFn<PublicRpcSchema> | Request function wrapped with friendly error handling | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:91 |
sendRawTransaction() | (args) => Promise<`0x${string}`> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: eth_sendRawTransaction Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1126 |
sendRawTransactionSync() | (args) => Promise<TransactionReceipt> | Sends a signed transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: eth_sendRawTransactionSync Example import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1151 |
simulate() | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Deprecated Use simulateBlocks instead. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1155 |
simulateBlocks() | <calls>(args) => Promise<SimulateBlocksReturnType<calls>> | Simulates a set of calls on block(s) with optional block and state overrides. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1198 |
simulateCalls() | <calls>(args) => Promise<SimulateCallsReturnType<calls>> | Simulates a set of calls. Example import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1231 |
simulateContract() | <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>> | Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts Remarks This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions. Internally, uses a Public Client to call the call action with ABI-encoded data. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1262 |
transport | TransportConfig<string, EIP1193RequestFn> & Record<string, any> | The RPC transport | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:93 |
type | string | The type of client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:95 |
uid | string | A unique ID for the client. | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/createClient.d.ts:97 |
uninstallFilter() | (args) => Promise<boolean> | Destroys a Filter that was created from one of the following Actions: - createBlockFilter - createEventFilter - createPendingTransactionFilter - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: eth_uninstallFilter Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1325 |
verifyHash() | (args) => Promise<boolean> | Verify that a hash was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyHash | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1271 |
verifyMessage() | (args) => Promise<boolean> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/actions/public/verifyMessage | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1282 |
verifySiweMessage() | (args) => Promise<boolean> | Verifies EIP-4361 formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via ERC-6492. - Docs https://viem.sh/docs/siwe/actions/verifySiweMessage | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1293 |
verifyTypedData() | (args) => Promise<boolean> | Verify that typed data was signed by the provided address. - Docs https://viem.sh/docs/actions/public/verifyTypedData | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1302 |
waitForTransactionReceipt() | (args) => Promise<TransactionReceipt> | Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls eth_getTransactionReceipt on each block until it has been processed. - If a Transaction has been replaced: - Calls eth_getBlockByNumber and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls eth_getTransactionReceipt. Remarks The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - repriced: The gas price has been modified (e.g. different maxFeePerGas) - cancelled: The Transaction has been cancelled (e.g. value === 0n) - replaced: The Transaction has been replaced (e.g. different value or data) Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1364 |
watchBlockNumber() | (args) => WatchBlockNumberReturnType | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_blockNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1389 |
watchBlocks() | <includeTransactions, blockTag>(args) => WatchBlocksReturnType | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When poll: true, calls eth_getBlockByNumber on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newHeads" event. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1414 |
watchContractEvent() | <abi, eventName, strict>(args) => WatchContractEventReturnType | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent Remarks This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs. watchContractEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchContractEvent will fall back to using getLogs instead. Example import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1444 |
watchEvent() | <abiEvent, abiEvents, strict>(args) => WatchEventReturnType | Watches and returns emitted Event Logs. - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - RPC Provider supports eth_newFilter: - Calls eth_newFilter to create a filter (called on initialize). - On a polling interval, it will call eth_getFilterChanges. - RPC Provider does not support eth_newFilter: - Calls eth_getLogs for each block between the polling interval. Remarks This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs. watchEvent will attempt to create an Event Filter and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. eth_newFilter), then watchEvent will fall back to using getLogs instead. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1476 |
watchPendingTransactions() | (args) => WatchPendingTransactionsReturnType | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When poll: true - Calls eth_newPendingTransactionFilter to initialize the filter. - Calls eth_getFilterChanges on a polling interval. - When poll: false & WebSocket Transport, uses a WebSocket subscription via eth_subscribe and the "newPendingTransactions" event. Remarks This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions. Example import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) | node_modules/.pnpm/viem@2.43.3_typescript@5.7.2/node_modules/viem/_types/clients/decorators/public.d.ts:1505 |
dvtActions()
function dvtActions(): (client) => DVTActions;Defined in: packages/core/src/actions/dvt.ts:11
Returns
(client): DVTActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
entryPointActions()
function entryPointActions(address, version): (client) => EntryPointActions;Defined in: packages/core/src/actions/entryPoint.ts:42
Parameters
| Parameter | Type | Default value |
|---|---|---|
address | `0x${string}` | undefined |
version | EntryPointVersion | EntryPointVersion.V07 |
Returns
(client): EntryPointActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
getAddressUrl()
function getAddressUrl(network, address): string;Defined in: packages/core/src/networks.ts:109
Get address URL on block explorer
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "anvil" | "sepolia" | Network name |
address | string | Contract or wallet address |
Returns
string
Full address URL
Example
const url = getAddressUrl('sepolia', '0xabc...');
// 'https://sepolia.etherscan.io/address/0xabc...'getAllCommunityConfigs()
function getAllCommunityConfigs(): CommunityConfig[];Defined in: packages/core/src/communities.ts:84
Get all community configurations
Returns
getBlockExplorer()
function getBlockExplorer(network): "" | "https://sepolia.etherscan.io";Defined in: packages/core/src/networks.ts:75
Get block explorer URL
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "anvil" | "sepolia" | Network name |
Returns
"" | "https://sepolia.etherscan.io"
Block explorer base URL
Example
const explorer = getBlockExplorer('sepolia');
// 'https://sepolia.etherscan.io'getChainId()
function getChainId(network): number;Defined in: packages/core/src/networks.ts:125
Get chain ID for a network
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "anvil" | "sepolia" | Network name |
Returns
number
Chain ID number
Example
const chainId = getChainId('sepolia');
// 11155111getCommunities()
function getCommunities(network): object;Defined in: packages/core/src/contracts.ts:395
Get registered communities
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
Communities object
| Name | Type | Default value | Description | Defined in |
|---|---|---|---|---|
aastar | object | - | AAStar Community - Test community for development (registered: 2025-11-01) | packages/core/src/contracts.ts:79 |
aastar.ensName | "aastar.eth" | 'aastar.eth' | - | packages/core/src/contracts.ts:82 |
aastar.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.apnts | - | packages/core/src/contracts.ts:81 |
aastar.name | "AAStar" | 'AAStar' | - | packages/core/src/contracts.ts:83 |
aastar.owner | "0x411BD567E46C0781248dbB6a9211891C032885e5" | COMMUNITY_OWNERS.aastarOwner | - | packages/core/src/contracts.ts:80 |
aastar.stake | "50" | '50' | - | packages/core/src/contracts.ts:84 |
breadCommunity | object | - | BreadCommunity - Test community for development (registered: 2025-11-03) | packages/core/src/contracts.ts:88 |
breadCommunity.ensName | "bread.eth" | 'bread.eth' | - | packages/core/src/contracts.ts:91 |
breadCommunity.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.bpnts | - | packages/core/src/contracts.ts:90 |
breadCommunity.name | "BreadCommunity" | 'BreadCommunity' | - | packages/core/src/contracts.ts:92 |
breadCommunity.owner | "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA" | COMMUNITY_OWNERS.breadCommunityOwner | - | packages/core/src/contracts.ts:89 |
breadCommunity.stake | "50" | '50' | - | packages/core/src/contracts.ts:93 |
Example
const communities = getCommunities('sepolia');
console.log(communities.aastar.owner);getCommunity()
function getCommunity(network, communityName):
| {
ensName: "aastar.eth";
gasToken: `0x${string}`;
name: "AAStar";
owner: "0x411BD567E46C0781248dbB6a9211891C032885e5";
stake: "50";
}
| {
ensName: "bread.eth";
gasToken: `0x${string}`;
name: "BreadCommunity";
owner: "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA";
stake: "50";
};Defined in: packages/core/src/contracts.ts:412
Get a specific community
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
communityName | "aastar" | "breadCommunity" | Community name (aastar, builderDao) |
Returns
| { ensName: "aastar.eth"; gasToken: `0x${string}`; name: "AAStar"; owner: "0x411BD567E46C0781248dbB6a9211891C032885e5"; stake: "50"; } | { ensName: "bread.eth"; gasToken: `0x${string}`; name: "BreadCommunity"; owner: "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"; stake: "50"; }
Community information
Example
const aastar = getCommunity('sepolia', 'aastar');
console.log(aastar.gasToken); // aPNTs addressgetCommunityConfig()
function getCommunityConfig(address): CommunityConfig | undefined;Defined in: packages/core/src/communities.ts:77
Get community configuration by address
Parameters
| Parameter | Type |
|---|---|
address | string |
Returns
CommunityConfig | undefined
getContract()
function getContract(
network,
category,
name): string;Defined in: packages/core/src/contracts.ts:151
Get a specific contract address
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
category | ContractCategory | Contract category |
name | string | Contract name |
Returns
string
Contract address
Example
const address = getContract('sepolia', 'core', 'superPaymaster');getContractNetworks()
function getContractNetworks(): "sepolia"[];Defined in: packages/core/src/contracts.ts:325
Get all supported contract network names
Returns
"sepolia"[]
Array of supported network names
Example
const networks = getContractNetworks();
// ['sepolia']getContracts()
function getContracts(network): object;Defined in: packages/core/src/contracts.ts:130
Get all contracts for a specific network
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name (e.g., 'sepolia') |
Returns
object
All contract addresses for the network
| Name | Type | Default value | Description | Defined in |
|---|---|---|---|---|
communities | object | - | - | packages/core/src/contracts.ts:77 |
communities.aastar | object | - | AAStar Community - Test community for development (registered: 2025-11-01) | packages/core/src/contracts.ts:79 |
communities.aastar.ensName | "aastar.eth" | 'aastar.eth' | - | packages/core/src/contracts.ts:82 |
communities.aastar.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.apnts | - | packages/core/src/contracts.ts:81 |
communities.aastar.name | "AAStar" | 'AAStar' | - | packages/core/src/contracts.ts:83 |
communities.aastar.owner | "0x411BD567E46C0781248dbB6a9211891C032885e5" | COMMUNITY_OWNERS.aastarOwner | - | packages/core/src/contracts.ts:80 |
communities.aastar.stake | "50" | '50' | - | packages/core/src/contracts.ts:84 |
communities.breadCommunity | object | - | BreadCommunity - Test community for development (registered: 2025-11-03) | packages/core/src/contracts.ts:88 |
communities.breadCommunity.ensName | "bread.eth" | 'bread.eth' | - | packages/core/src/contracts.ts:91 |
communities.breadCommunity.gasToken | `0x${string}` | TEST_TOKEN_ADDRESSES.bpnts | - | packages/core/src/contracts.ts:90 |
communities.breadCommunity.name | "BreadCommunity" | 'BreadCommunity' | - | packages/core/src/contracts.ts:92 |
communities.breadCommunity.owner | "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA" | COMMUNITY_OWNERS.breadCommunityOwner | - | packages/core/src/contracts.ts:89 |
communities.breadCommunity.stake | "50" | '50' | - | packages/core/src/contracts.ts:93 |
core | object | CORE_ADDRESSES | - | packages/core/src/contracts.ts:42 |
core.aPNTs | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:35 |
core.dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:39 |
core.entryPoint | `0x${string}` | ENTRY_POINT_ADDRESS | - | packages/core/src/contract-addresses.ts:40 |
core.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:31 |
core.gTokenStaking | `0x${string}` | GTOKEN_STAKING_ADDRESS | - | packages/core/src/contract-addresses.ts:32 |
core.mySBT | `0x${string}` | SBT_ADDRESS | - | packages/core/src/contract-addresses.ts:36 |
core.paymasterFactory | `0x${string}` | PAYMASTER_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:34 |
core.paymasterV4 | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:38 |
core.registry | `0x${string}` | REGISTRY_ADDRESS | - | packages/core/src/contract-addresses.ts:30 |
core.reputationSystem | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:42 |
core.superPaymaster | `0x${string}` | SUPER_PAYMASTER_ADDRESS | - | packages/core/src/contract-addresses.ts:33 |
core.xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:41 |
monitoring | object | MONITORING_ADDRESSES | - | packages/core/src/contracts.ts:67 |
monitoring.blsAggregator | `0x${string}` | BLS_AGGREGATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:87 |
monitoring.dvtValidator | `0x${string}` | DVT_VALIDATOR_ADDRESS | - | packages/core/src/contract-addresses.ts:86 |
official | object | OFFICIAL_ADDRESSES | - | packages/core/src/contracts.ts:72 |
official.entryPoint | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:94 |
paymaster | object | PAYMASTER_ADDRESSES | - | packages/core/src/contracts.ts:62 |
paymaster.paymasterV4_1 | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:78 |
paymaster.paymasterV4_1iImplementation | `0x${string}` | PAYMASTER_V4_IMPL_ADDRESS | - | packages/core/src/contract-addresses.ts:79 |
testAccounts | object | TEST_ACCOUNT_ADDRESSES | - | packages/core/src/contracts.ts:57 |
testAccounts.simpleAccountFactory | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:71 |
testTokens | object | TEST_TOKEN_ADDRESSES | - | packages/core/src/contracts.ts:52 |
testTokens.apnts | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:60 |
testTokens.bpnts | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:62 |
testTokens.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:61 |
testTokens.mockUSDT | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:59 |
testTokens.pimToken | `0x${string}` | TOKEN_ADDRESSES.pimToken | - | packages/core/src/contract-addresses.ts:63 |
tokens | object | TOKEN_ADDRESSES | - | packages/core/src/contracts.ts:47 |
tokens.aPNTs | `0x${string}` | APNTS_ADDRESS | - | packages/core/src/contract-addresses.ts:50 |
tokens.gToken | `0x${string}` | GTOKEN_ADDRESS | - | packages/core/src/contract-addresses.ts:51 |
tokens.pimToken | `0x${string}` | - | - | packages/core/src/contract-addresses.ts:52 |
tokens.xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | - | packages/core/src/contract-addresses.ts:49 |
Example
const contracts = getContracts('sepolia');
console.log(contracts.core.superPaymaster);getCoreContracts()
function getCoreContracts(network): object;Defined in: packages/core/src/contracts.ts:184
Get core system contracts
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
object
Core contract addresses
Example
const core = getCoreContracts('sepolia');
console.log(core.superPaymaster);
console.log(core.registry);getDeploymentDate()
function getDeploymentDate(network, contractName): string | undefined;Defined in: packages/core/src/contracts.ts:376
Get contract deployment date
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
contractName | string | Contract name |
Returns
string | undefined
Deployment date string (YYYY-MM-DD)
Example
const date = getDeploymentDate('sepolia', 'superPaymaster');
// '2025-10-25'getEntryPoint()
function getEntryPoint(network): string;Defined in: packages/core/src/contracts.ts:293
Get EntryPoint v0.7 address
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
string
EntryPoint address
Example
const entryPoint = getEntryPoint('sepolia');getNetwork()
function getNetwork(network):
| {
blockExplorer: "https://sepolia.etherscan.io";
chainId: 11155111;
name: "Sepolia";
nativeCurrency: {
decimals: 18;
name: "Sepolia ETH";
symbol: "ETH";
};
rpcUrl: "https://rpc.sepolia.org";
}
| {
blockExplorer: "";
chainId: 31337;
name: "Anvil";
nativeCurrency: {
decimals: 18;
name: "ETH";
symbol: "ETH";
};
rpcUrl: "http://127.0.0.1:8545";
};Defined in: packages/core/src/networks.ts:44
Get network configuration
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "anvil" | "sepolia" | Network name |
Returns
| { blockExplorer: "https://sepolia.etherscan.io"; chainId: 11155111; name: "Sepolia"; nativeCurrency: { decimals: 18; name: "Sepolia ETH"; symbol: "ETH"; }; rpcUrl: "https://rpc.sepolia.org"; } | { blockExplorer: ""; chainId: 31337; name: "Anvil"; nativeCurrency: { decimals: 18; name: "ETH"; symbol: "ETH"; }; rpcUrl: "http://127.0.0.1:8545"; }
Network configuration
Example
const network = getNetwork('sepolia');
console.log(network.chainId); // 11155111getPaymasterV4_1()
function getPaymasterV4_1(network): string;Defined in: packages/core/src/contracts.ts:232
Get PaymasterV4_1 address (AOA mode)
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
string
PaymasterV4_1 address
Example
const paymaster = getPaymasterV4_1('sepolia');getRoleName()
function getRoleName(roleHash): string;Defined in: packages/core/src/roles.ts:152
Get human-readable role name
Parameters
| Parameter | Type |
|---|---|
roleHash | `0x${string}` |
Returns
string
getRpcUrl()
function getRpcUrl(network): "https://rpc.sepolia.org" | "http://127.0.0.1:8545";Defined in: packages/core/src/networks.ts:59
Get RPC URL for a network
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "anvil" | "sepolia" | Network name |
Returns
"https://rpc.sepolia.org" | "http://127.0.0.1:8545"
Public RPC URL
Example
const rpcUrl = getRpcUrl('sepolia');getSimpleAccountFactory()
function getSimpleAccountFactory(network): string;Defined in: packages/core/src/contracts.ts:263
Get SimpleAccountFactory address
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
string
SimpleAccountFactory address
Example
const factory = getSimpleAccountFactory('sepolia');getSuperPaymasterV2()
function getSuperPaymasterV2(network): string;Defined in: packages/core/src/contracts.ts:278
Get SuperPaymaster V2 address (AOA+ mode)
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
string
SuperPaymaster V2 address
Example
const superPaymaster = getSuperPaymasterV2('sepolia');getTestAccounts()
function getTestAccounts(network): object;Defined in: packages/core/src/contracts.ts:248
Get test account contracts (SimpleAccountFactory, etc.)
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
object
Test account contract addresses
| Name | Type | Defined in |
|---|---|---|
simpleAccountFactory | `0x${string}` | packages/core/src/contract-addresses.ts:71 |
Example
const testAccounts = getTestAccounts('sepolia');
console.log(testAccounts.simpleAccountFactory);getTestTokenContracts()
function getTestTokenContracts(network): object;Defined in: packages/core/src/contracts.ts:217
Get test token contracts (for development & testing)
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
object
Test token contract addresses
| Name | Type | Default value | Defined in |
|---|---|---|---|
apnts | `0x${string}` | APNTS_ADDRESS | packages/core/src/contract-addresses.ts:60 |
bpnts | `0x${string}` | GTOKEN_ADDRESS | packages/core/src/contract-addresses.ts:62 |
gToken | `0x${string}` | GTOKEN_ADDRESS | packages/core/src/contract-addresses.ts:61 |
mockUSDT | `0x${string}` | - | packages/core/src/contract-addresses.ts:59 |
pimToken | `0x${string}` | TOKEN_ADDRESSES.pimToken | packages/core/src/contract-addresses.ts:63 |
Example
const testTokens = getTestTokenContracts('sepolia');
console.log(testTokens.mockUSDT);getTokenContracts()
function getTokenContracts(network): object;Defined in: packages/core/src/contracts.ts:201
Get token system contracts
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "sepolia" | Network name |
Returns
object
Token contract addresses
| Name | Type | Default value | Defined in |
|---|---|---|---|
aPNTs | `0x${string}` | APNTS_ADDRESS | packages/core/src/contract-addresses.ts:50 |
gToken | `0x${string}` | GTOKEN_ADDRESS | packages/core/src/contract-addresses.ts:51 |
pimToken | `0x${string}` | - | packages/core/src/contract-addresses.ts:52 |
xPNTsFactory | `0x${string}` | XPNTS_FACTORY_ADDRESS | packages/core/src/contract-addresses.ts:49 |
Example
const tokens = getTokenContracts('sepolia');
console.log(tokens.xPNTsFactory);
console.log(tokens.mySBT);getTxUrl()
function getTxUrl(network, txHash): string;Defined in: packages/core/src/networks.ts:92
Get transaction URL on block explorer
Parameters
| Parameter | Type | Description |
|---|---|---|
network | "anvil" | "sepolia" | Network name |
txHash | string | Transaction hash |
Returns
string
Full transaction URL
Example
const url = getTxUrl('sepolia', '0x123...');
// 'https://sepolia.etherscan.io/tx/0x123...'gTokenActions()
function gTokenActions(): (client) => TokenActions;Defined in: packages/core/src/actions/tokens.ts:87
Returns
(client): TokenActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
gTokenExtendedActions()
function gTokenExtendedActions(address): (client) => GTokenExtendedActions;Defined in: packages/core/src/actions/gtokenExtended.ts:29
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): GTokenExtendedActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
isContractNetworkSupported()
function isContractNetworkSupported(network): network is "sepolia";Defined in: packages/core/src/contracts.ts:310
Check if a network is supported for contracts
Parameters
| Parameter | Type | Description |
|---|---|---|
network | string | Network name to check |
Returns
network is "sepolia"
True if network is supported
Example
if (isContractNetworkSupported('sepolia')) {
const contracts = getContracts('sepolia');
}isRegisteredCommunity()
function isRegisteredCommunity(address): boolean;Defined in: packages/core/src/communities.ts:91
Check if address is a registered community
Parameters
| Parameter | Type |
|---|---|
address | string |
Returns
boolean
paymasterFactoryActions()
function paymasterFactoryActions(address): (client) => PaymasterFactoryActions;Defined in: packages/core/src/actions/factory.ts:400
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): PaymasterFactoryActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
paymasterV4Actions()
function paymasterV4Actions(address): (client) => PaymasterV4Actions;Defined in: packages/core/src/actions/paymasterV4.ts:94
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): PaymasterV4Actions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
registryActions()
function registryActions(address): (client) => RegistryActions;Defined in: packages/core/src/actions/registry.ts:117
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): RegistryActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
reputationActions()
function reputationActions(address): (client) => ReputationActions;Defined in: packages/core/src/actions/reputation.ts:69
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): ReputationActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
sbtActions()
function sbtActions(address): (client) => SBTActions;Defined in: packages/core/src/actions/sbt.ts:92
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): SBTActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
stakingActions()
function stakingActions(address): (client) => StakingActions;Defined in: packages/core/src/actions/staking.ts:58
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): StakingActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
superPaymasterActions()
function superPaymasterActions(address): (client) => SuperPaymasterActions;Defined in: packages/core/src/actions/superPaymaster.ts:115
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): SuperPaymasterActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
tokenActions()
function tokenActions(): (client) => TokenActions;Defined in: packages/core/src/actions/tokens.ts:143
Returns
(client): TokenActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
Returns
validateAddress()
function validateAddress(address, fieldName): `0x${string}`;Defined in: packages/core/src/utils/validation.ts:14
Validates an Ethereum address. Throws AAStarValidationError if invalid.
Parameters
| Parameter | Type | Default value |
|---|---|---|
address | string | undefined |
fieldName | string | 'Address' |
Returns
`0x${string}`
validateAmount()
function validateAmount(
amount,
fieldName,
min,
max?): bigint;Defined in: packages/core/src/utils/validation.ts:31
Validates a BigInt amount.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
amount | bigint | undefined | The value to check |
fieldName | string | 'Amount' | Name for error messages |
min | bigint | 0n | Minimum value (default 0n) |
max? | bigint | undefined | Maximum value (optional) |
Returns
bigint
validateHex()
function validateHex(value, fieldName): `0x${string}`;Defined in: packages/core/src/utils/validation.ts:57
Validates a Hex string.
Parameters
| Parameter | Type | Default value |
|---|---|---|
value | string | undefined |
fieldName | string | 'Hex' |
Returns
`0x${string}`
validateUint128()
function validateUint128(value, fieldName): bigint;Defined in: packages/core/src/utils/validation.ts:49
Validates a UINT128 value (Common in Paymaster Data).
Parameters
| Parameter | Type | Default value |
|---|---|---|
value | bigint | undefined |
fieldName | string | 'Value' |
Returns
bigint
xPNTsFactoryActions()
function xPNTsFactoryActions(address): (client) => XPNTsFactoryActions;Defined in: packages/core/src/actions/factory.ts:121
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
Returns
(client): XPNTsFactoryActions;Parameters
| Parameter | Type |
|---|---|
client | | { account: undefined; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; call: (parameters) => Promise<CallReturnType>; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; createAccessList: (parameters) => Promise<{ accessList: AccessList; gasUsed: bigint; }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "block"; }>; createContractEventFilter: <abi, eventName, args, strict, fromBlock, toBlock>(args) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>>; createEventFilter: <abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?) => Promise<{ [K in string | number | symbol]: Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges"; Parameters: [`0x${(...)}`]; ReturnType: ...[] | ...[]; }, { Method: "eth_getFilterLogs"; Parameters: [`0x${(...)}`]; ReturnType: RpcLog[]; }, { Method: "eth_uninstallFilter"; Parameters: [`0x${(...)}`]; ReturnType: boolean; }]>; type: "transaction"; }>; estimateContractGas: <chain, abi, functionName, args>(args) => Promise<bigint>; estimateFeesPerGas: <chainOverride, type>(args?) => Promise<EstimateFeesPerGasReturnType<type>>; estimateGas: (args) => Promise<bigint>; estimateMaxPriorityFeePerGas: <chainOverride>(args?) => Promise<bigint>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, undefined, PublicRpcSchema, { [K in string | number | symbol]: client[K] } & PublicActions<Transport, Chain | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getBalance: (args) => Promise<bigint>; getBlobBaseFee: () => Promise<bigint>; getBlock: <includeTransactions, blockTag>(args?) => Promise<{ baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: `0x${string}`; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: `0x${string}`[]; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: bigint | null; transactions: includeTransactions extends true ? ( | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId?: ... | ...; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "legacy"; typeHex: ... | ...; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice: bigint; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip2930"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip1559"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly ...[]; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip4844"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: ... extends ... ? ... : ...; blockNumber: ... extends ... ? ... : ...; chainId: number; from: `0x${(...)}`; gas: bigint; gasPrice?: undefined; hash: `0x${(...)}`; input: `0x${(...)}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${(...)}`; s: `0x${(...)}`; to: ... | ...; transactionIndex: ... extends ... ? ... : ...; type: "eip7702"; typeHex: ... | ...; v: bigint; value: bigint; yParity: number; })[] : `0x${string}`[]; transactionsRoot: `0x${string}`; uncles: `0x${string}`[]; withdrawals?: Withdrawal[]; withdrawalsRoot?: `0x${string}`; }>; getBlockNumber: (args?) => Promise<bigint>; getBlockTransactionCount: (args?) => Promise<number>; getBytecode: (args) => Promise<GetCodeReturnType>; getChainId: () => Promise<number>; getCode: (args) => Promise<GetCodeReturnType>; getContractEvents: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getEip712Domain: (args) => Promise<GetEip712DomainReturnType>; getEnsAddress: (args) => Promise<GetEnsAddressReturnType>; getEnsAvatar: (args) => Promise<GetEnsAvatarReturnType>; getEnsName: (args) => Promise<GetEnsNameReturnType>; getEnsResolver: (args) => Promise<`0x${string}`>; getEnsText: (args) => Promise<GetEnsTextReturnType>; getFeeHistory: (args) => Promise<GetFeeHistoryReturnType>; getFilterChanges: <filterType, abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>>; getFilterLogs: <abi, eventName, strict, fromBlock, toBlock>(args) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>>; getGasPrice: () => Promise<bigint>; getLogs: <abiEvent, abiEvents, strict, fromBlock, toBlock>(args?) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>>; getProof: (args) => Promise<GetProofReturnType>; getStorageAt: (args) => Promise<GetStorageAtReturnType>; getTransaction: <blockTag>(args) => Promise< | { accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity?: undefined; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly `0x${string}`[]; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; } | { accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: `0x${string}`; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: `0x${string}` | null; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: `0x${string}` | null; v: bigint; value: bigint; yParity: number; }>; getTransactionConfirmations: (args) => Promise<bigint>; getTransactionCount: (args) => Promise<number>; getTransactionReceipt: (args) => Promise<TransactionReceipt>; key: string; multicall: <contracts, allowFailure>(args) => Promise<MulticallReturnType<contracts, allowFailure>>; name: string; pollingInterval: number; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; readContract: <abi, functionName, args>(args) => Promise<ReadContractReturnType<abi, functionName, args>>; request: EIP1193RequestFn<PublicRpcSchema>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; simulate: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateBlocks: <calls>(args) => Promise<SimulateBlocksReturnType<calls>>; simulateCalls: <calls>(args) => Promise<SimulateCallsReturnType<calls>>; simulateContract: <abi, functionName, args, chainOverride, accountOverride>(args) => Promise<SimulateContractReturnType<abi, functionName, args, Chain | undefined, Account | undefined, chainOverride, accountOverride>>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; uninstallFilter: (args) => Promise<boolean>; verifyHash: (args) => Promise<boolean>; verifyMessage: (args) => Promise<boolean>; verifySiweMessage: (args) => Promise<boolean>; verifyTypedData: (args) => Promise<boolean>; waitForTransactionReceipt: (args) => Promise<TransactionReceipt>; watchBlockNumber: (args) => WatchBlockNumberReturnType; watchBlocks: <includeTransactions, blockTag>(args) => WatchBlocksReturnType; watchContractEvent: <abi, eventName, strict>(args) => WatchContractEventReturnType; watchEvent: <abiEvent, abiEvents, strict>(args) => WatchEventReturnType; watchPendingTransactions: (args) => WatchPendingTransactionsReturnType; } | { account: Account | undefined; addChain: (args) => Promise<void>; batch?: { multicall?: | boolean | { batchSize?: number; deployless?: boolean; wait?: number; }; }; cacheTime: number; ccipRead?: | false | { request?: (parameters) => Promise<`0x${string}`>; }; chain: Chain | undefined; deployContract: <abi, chainOverride>(args) => Promise<`0x${string}`>; experimental_blockTag?: BlockTag; extend: <client>(fn) => Client<Transport, Chain | undefined, Account | undefined, WalletRpcSchema, { [K in string | number | symbol]: client[K] } & WalletActions<Chain | undefined, Account | undefined>>; fillTransaction: <chainOverride, accountOverride>(args) => Promise<FillTransactionReturnType<Chain | undefined, chainOverride>>; getAddresses: () => Promise<GetAddressesReturnType>; getCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; getCapabilities: <chainId>(parameters?) => Promise<{ [K in string | number | symbol]: (chainId extends number ? { atomic?: { status: ... }; paymasterService?: { supported: ... }; unstable_addSubAccount?: { keyTypes: ...; supported: ... }; [key: string]: any } : ChainIdToCapabilities<Capabilities<{ atomic?: ...; paymasterService?: ...; unstable_addSubAccount?: ...; [key: ...]: ... }>, number>)[K] }>; getChainId: () => Promise<number>; getPermissions: () => Promise<GetPermissionsReturnType>; key: string; name: string; pollingInterval: number; prepareAuthorization: (parameters) => Promise<PrepareAuthorizationReturnType>; prepareTransactionRequest: <request, chainOverride, accountOverride>(args) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<(...), (...)> & { chainId?: ... }, ParameterTypeToParameters<(...) extends (...) ? (...) : (...)>> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K] }>; request: EIP1193RequestFn<WalletRpcSchema>; requestAddresses: () => Promise<RequestAddressesReturnType>; requestPermissions: (args) => Promise<RequestPermissionsReturnType>; sendCalls: <calls, chainOverride>(parameters) => Promise<{ capabilities?: { [key: string]: any; }; id: string; }>; sendCallsSync: <calls, chainOverride>(parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; sendRawTransaction: (args) => Promise<`0x${string}`>; sendRawTransactionSync: (args) => Promise<TransactionReceipt>; sendTransaction: <request, chainOverride>(args) => Promise<`0x${string}`>; sendTransactionSync: <request, chainOverride>(args) => Promise<TransactionReceipt>; showCallsStatus: (parameters) => Promise<void>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (args) => Promise<`0x${string}`>; signTransaction: <chainOverride, request>(args) => Promise<TransactionSerialized<GetTransactionType<request, | request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends string | undefined ? Extract<any[any], string> : never>, | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ... | ... extends ... ? ... : ...> extends "legacy" ? TransactionSerializedLegacy : never>>; signTypedData: <typedData, primaryType>(args) => Promise<`0x${string}`>; switchChain: (args) => Promise<void>; transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>; type: string; uid: string; waitForCallsStatus: (parameters) => Promise<{ atomic: boolean; capabilities?: | { [key: string]: any; } | { [key: string]: any; }; chainId: number; id: string; receipts?: WalletCallReceipt<bigint, "success" | "reverted">[]; status: "pending" | "success" | "failure" | undefined; statusCode: number; version: string; }>; watchAsset: (args) => Promise<boolean>; writeContract: <abi, functionName, args, chainOverride>(args) => Promise<`0x${string}`>; writeContractSync: <abi, functionName, args, chainOverride>(args) => Promise<TransactionReceipt>; } |
