Function useSendTransaction
- useSendTransaction<config, context>(parameters?): UseSendTransactionReturnType<config, context>
Type Parameters
- config extends Config = Config
- context = unknown
Parameters
- parameters: {
config?: Config | config;
mutation?: {
gcTime?: number;
meta?: Record<string, unknown>;
networkMode?: NetworkMode;
onError?: ((error: SendTransactionErrorType, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: undefined | context) => unknown);
onMutate?: ((variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}) => undefined | context | Promise<undefined | context>);
onSettled?: ((data: undefined | `0x${string}`, error: null | SendTransactionErrorType, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: undefined | context) => unknown);
onSuccess?: ((data: `0x${string}`, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: context) => unknown);
retry?: RetryValue<SendTransactionErrorType>;
retryDelay?: RetryDelayValue<SendTransactionErrorType>;
scope?: MutationScope;
};
} = {}Optional
config?: Config | config
Optional
mutation?: {
gcTime?: number;
meta?: Record<string, unknown>;
networkMode?: NetworkMode;
onError?: ((error: SendTransactionErrorType, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: undefined | context) => unknown);
onMutate?: ((variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}) => undefined | context | Promise<undefined | context>);
onSettled?: ((data: undefined | `0x${string}`, error: null | SendTransactionErrorType, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: undefined | context) => unknown);
onSuccess?: ((data: `0x${string}`, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: context) => unknown);
retry?: RetryValue<SendTransactionErrorType>;
retryDelay?: RetryDelayValue<SendTransactionErrorType>;
scope?: MutationScope;
}
Optional
gcTime?: number
Optional
meta?: Record<string, unknown>
Optional
networkMode?: NetworkMode
Optional
onError?: ((error: SendTransactionErrorType, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: undefined | context) => unknown)
- (error, variables, context): unknown
Parameters
- error: SendTransactionErrorType
- variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
} - context: undefined | context
Returns unknown
Optional
onMutate?: ((variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}) => undefined | context | Promise<undefined | context>)
- (variables): undefined | context | Promise<undefined | context>
Parameters
- variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}
Returns undefined | context | Promise<undefined | context>
Optional
onSettled?: ((data: undefined | `0x${string}`, error: null | SendTransactionErrorType, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: undefined | context) => unknown)
- (data, error, variables, context): unknown
Parameters
- data: undefined | `0x${string}`
- error: null | SendTransactionErrorType
- variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
} - context: undefined | context
Returns unknown
Optional
onSuccess?: ((data: `0x${string}`, variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
}, context: context) => unknown)
- (data, variables, context): unknown
Parameters
- data: `0x${string}`
- variables: {
[key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
} - context: context
Returns unknown
Optional
retry?: RetryValue<SendTransactionErrorType>
Optional
retryDelay?: RetryDelayValue<SendTransactionErrorType>
Optional
scope?: MutationScope
Returns UseSendTransactionReturnType<config, context>