Function usePrepareErc20TransferFrom
- usePrepareErc20TransferFrom(config?): Pick<QueryObserverResult<PrepareWriteContractResult<readonly [{
inputs: readonly [{
indexed: true;
name: "owner";
type: "address";
}, {
indexed: true;
name: "spender";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Approval";
type: "event";
}, {
inputs: readonly [{
indexed: true;
name: "from";
type: "address";
}, {
indexed: true;
name: "to";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Transfer";
type: "event";
}, {
inputs: readonly [{
name: "owner";
type: "address";
}, {
name: "spender";
type: "address";
}];
name: "allowance";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "spender";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "approve";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "account";
type: "address";
}];
name: "balanceOf";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "decimals";
outputs: readonly [{
name: "";
type: "uint8";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "name";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "symbol";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "totalSupply";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transfer";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "sender";
type: "address";
}, {
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transferFrom";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}], "transferFrom", number>, Error>, "data" | "error" | "isError" | "isLoading" | "isSuccess" | "isFetched" | "isFetchedAfterMount" | "isFetching" | "isRefetching" | "refetch" | "fetchStatus"> & {
internal: Pick<QueryObserverResult<unknown, unknown>, "isLoadingError" | "isRefetchError" | "dataUpdatedAt" | "errorUpdatedAt" | "failureCount" | "isPaused" | "isPlaceholderData" | "isPreviousData" | "isStale" | "remove">;
isIdle: boolean;
status: "error" | "success" | "loading" | "idle";
} & {
config: PrepareWriteContractResult<readonly [{
inputs: readonly [{
indexed: true;
name: "owner";
type: "address";
}, {
indexed: true;
name: "spender";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Approval";
type: "event";
}, {
inputs: readonly [{
indexed: true;
name: "from";
type: "address";
}, {
indexed: true;
name: "to";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Transfer";
type: "event";
}, {
inputs: readonly [{
name: "owner";
type: "address";
}, {
name: "spender";
type: "address";
}];
name: "allowance";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "spender";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "approve";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "account";
type: "address";
}];
name: "balanceOf";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "decimals";
outputs: readonly [{
name: "";
type: "uint8";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "name";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "symbol";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "totalSupply";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transfer";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "sender";
type: "address";
}, {
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transferFrom";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}], "transferFrom", number>;
} Parameters
config: Omit<UsePrepareContractWriteConfig<readonly [{
inputs: readonly [{
indexed: true;
name: "owner";
type: "address";
}, {
indexed: true;
name: "spender";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Approval";
type: "event";
}, {
inputs: readonly [{
indexed: true;
name: "from";
type: "address";
}, {
indexed: true;
name: "to";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Transfer";
type: "event";
}, {
inputs: readonly [{
name: "owner";
type: "address";
}, {
name: "spender";
type: "address";
}];
name: "allowance";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "spender";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "approve";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "account";
type: "address";
}];
name: "balanceOf";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "decimals";
outputs: readonly [{
name: "";
type: "uint8";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "name";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "symbol";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "totalSupply";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transfer";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "sender";
type: "address";
}, {
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transferFrom";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}], "transferFrom">, "abi" | "functionName"> = ...
Returns Pick<QueryObserverResult<PrepareWriteContractResult<readonly [{
inputs: readonly [{
indexed: true;
name: "owner";
type: "address";
}, {
indexed: true;
name: "spender";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Approval";
type: "event";
}, {
inputs: readonly [{
indexed: true;
name: "from";
type: "address";
}, {
indexed: true;
name: "to";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Transfer";
type: "event";
}, {
inputs: readonly [{
name: "owner";
type: "address";
}, {
name: "spender";
type: "address";
}];
name: "allowance";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "spender";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "approve";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "account";
type: "address";
}];
name: "balanceOf";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "decimals";
outputs: readonly [{
name: "";
type: "uint8";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "name";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "symbol";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "totalSupply";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transfer";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "sender";
type: "address";
}, {
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transferFrom";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}], "transferFrom", number>, Error>, "data" | "error" | "isError" | "isLoading" | "isSuccess" | "isFetched" | "isFetchedAfterMount" | "isFetching" | "isRefetching" | "refetch" | "fetchStatus"> & {
internal: Pick<QueryObserverResult<unknown, unknown>, "isLoadingError" | "isRefetchError" | "dataUpdatedAt" | "errorUpdatedAt" | "failureCount" | "isPaused" | "isPlaceholderData" | "isPreviousData" | "isStale" | "remove">;
isIdle: boolean;
status: "error" | "success" | "loading" | "idle";
} & {
config: PrepareWriteContractResult<readonly [{
inputs: readonly [{
indexed: true;
name: "owner";
type: "address";
}, {
indexed: true;
name: "spender";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Approval";
type: "event";
}, {
inputs: readonly [{
indexed: true;
name: "from";
type: "address";
}, {
indexed: true;
name: "to";
type: "address";
}, {
indexed: false;
name: "value";
type: "uint256";
}];
name: "Transfer";
type: "event";
}, {
inputs: readonly [{
name: "owner";
type: "address";
}, {
name: "spender";
type: "address";
}];
name: "allowance";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "spender";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "approve";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "account";
type: "address";
}];
name: "balanceOf";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "decimals";
outputs: readonly [{
name: "";
type: "uint8";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "name";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "symbol";
outputs: readonly [{
name: "";
type: "string";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [];
name: "totalSupply";
outputs: readonly [{
name: "";
type: "uint256";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transfer";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
name: "sender";
type: "address";
}, {
name: "recipient";
type: "address";
}, {
name: "amount";
type: "uint256";
}];
name: "transferFrom";
outputs: readonly [{
name: "";
type: "bool";
}];
stateMutability: "nonpayable";
type: "function";
}], "transferFrom", number>;
}
Wraps usePrepareContractWrite with
abi
set to erc20ABI andfunctionName
set to"transferFrom"
.