Skip to main content
Version: SDK V2

Create

The create method on the BiconomySmartAccountV2 class takes a configuration object when creating a new smart account. See chart and example code below for implementation details.

BiconomySmartAccountV2Config

ParameterDescriptionRequired
chainIdChain Id of preferred networkYes
paymasterInstance of Paymaster ClassNo
bundlerInstance of Bundler ClassNo
entryPointAddressEntry point address to be usedYes
defaultValidationModuleDefault validation module instanceYes
activeValidationModuleActive validation module instanceNo
rpcUrlOptionally provide your own rpc urlNo
indexIndex numberNo

const smartAccount = await BiconomySmartAccountV2.create({
chainId: ChainId.POLYGON_MUMBAI, //or any chain of your choice
bundler: bundler, // instance of bundler
paymaster: paymaster, // instance of paymaster
entryPointAddress: DEFAULT_ENTRYPOINT_ADDRESS, //entry point address for chain
defaultValidationModule: ownerShipModule, // either ECDSA or Multi chain to start
activeValidationModule: ownerShipModule // either ECDSA or Multi chain to start
})

info

Building on Chiliz Mainnet or the Spicy Testnet? Note that the entry point address on this is different as it was deployed by us on the Biconomy team. The address of the entry point is : 0x00000061FEfce24A79343c27127435286BB7A4E1

In the coming sections we will refer to all methods by using smartAcount.method