Home

Create a Smart Account

At the core of account abstraction is the smart account -- an account powered by a smart contract. The fact that smart accounts are smart contracts is what allows us to abstract their logic, from authentication to gas payments and more.

Installation#

command-line

_10
npm install @openfort/openfort-node

Send Create Request#

Openfort players are the entity that has smart accounts associated with them. It can have one smart account per chain and will have the same address across all chains.

It's important to note that these accounts are counterfactual (they are not deployed until the first transaction is executed). Nevertheless, this account can already receive tokens and assets to it.

createAccount

FAQs#

When I create an account, is it deployed on-chain?#

No. If your account hasn't been deployed yet, we simply use CREATE2 to compute the address that the account would be deployed to. Your account is deployed automatically with the first UserOp it sends.

In other words, "creating" accounts with the SDK is free -- you can create an infinite number of such account objects without paying any gas. It's only when you send the first UserOp that the account is deployed automatically.

Can I create multiple accounts from the same EOA signer?#

Yes, you can do so by providing an index when you create the account object.