Skip to main content
The SDK handles the account deployments for you. When transacting on a new chain for the first time, the account will be deployed as part of the intent. The Orchestrator automatically detects if the account needs to be deployed, then passes the init data to the relayer market as part of the intent, which is then executed by a relayer.

How deployment works

Deployment is per-chain. When you call sendTransaction targeting a chain where the account is not deployed yet, the Orchestrator bundles the deployment into the intent automatically. The account is only deployed on that specific chain, not on all supported chains at once. Receiving tokens at the counterfactual address does not trigger deployment. Only an outbound transaction submitted through the SDK does.

Who pays for deployment?

ScenarioWho paysSource
Sponsorship enabled (sponsored: true)You (the developer)Your USDC sponsorship deposit on Base
No sponsorshipThe userTokens in the user’s account on the target chain, or on another chain where they are already deployed
Developer sponsorship and the user’s account balance are separate. Sponsorship is a developer-funded deposit that subsidises fees on behalf of users. The user’s account balance is whatever tokens the user holds. See Gas and fee sponsorship for setup details.
You can make deployment completely gasless for the user with sponsorships.
Otherwise, the user needs to have some tokens on either the chain you’re deploying to, or any other supported chain (provided the account is already deployed there).

Check Status

You can check if the account is deployed on a specific chain:
await rhinestoneAccount.isDeployed(chain)

Manual Deployments

You can manually trigger an account deployment on any chain:
await rhinestoneAccount.deploy(chain)
You can also sponsor the gas:
await rhinestoneAccount.deploy(
  chain,
  {
    sponsored: true
  }
)

Deploy from Another Account

You can deploy an account from another smart account using the deploy action. This can be useful when you want to pay for a deployment with another account:
import { deploy } from '@rhinestone/sdk/actions'

const newAccount = await rhinestone.createAccount({
  owners: { type: 'ecdsa', accounts: [newOwner] },
})

await sponsorAccount.sendTransaction({
  chain,
  calls: [deploy(newAccount)],
})