getPaymasterData
Retrieves paymaster-related User Operation properties to be used for sending the User Operation from Pimlico.
Internally uses ERC-7677's pm_getPaymasterData method.
Usage
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})import { } from 'viem'
import { } from 'viem/account-abstraction'
export const = ({
: ('https://public.pimlico.io/v2/11155111/rpc'),
}) Returns
{
paymaster: Address
paymasterData: Hex
paymasterVerificationGasLimit: bigint
paymasterPostOpGasLimit: bigint
}Paymasted-related User Operation properties.
Parameters
callData
- Type:
Hex
The data to pass to the sender during the main execution call.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})callGasLimit (optional)
- Type:
bigint
The amount of gas to allocate the main execution call.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})chainId
- Type:
number
Chain ID to target.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})context (optional)
- Type:
unknown
Paymaster specific fields.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: {
: 'abc123',
},
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})entryPointAddress
- Type:
Address
EntryPoint address to target.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})factory (optional)
- Type:
Address
Account Factory address.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})factoryData (optional)
- Type:
Hex
Call data to execute on the Account Factory to deploy a Smart Account.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})maxFeePerGas (optional)
- Type:
bigint
Maximum fee per gas for User Operation execution.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})maxPriorityFeePerGas (optional)
- Type:
bigint
Maximum priority fee per gas for User Operation execution.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})nonce
- Type:
bigint
Nonce for the User Operation.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})preVerificationGas (optional)
- Type:
bigint
Extra gas to pay the Bunder.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: 69420n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})sender
- Type:
Address
Sender for the User Operation.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: 69420n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
})verificationGasLimit (optional)
- Type:
bigint
The amount of gas to allocate for the verification step.
import { } from './config'
const = await .({
: '0xb61d27f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
: 69420n,
: 11155111,
: '0x0000000071727De22E5E9d8BAf0edAc6f37da032',
: '0xfb6dab6200b8958c2655c3747708f82243d3f32e',
: '0xf14ddffc000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000',
: 14510554812n,
: 2000000000n,
: 0n,
: '0xE911628bF8428C23f179a07b081325cAe376DE1f',
: 69420n,
})