Treasury Accounts
Learn how to use your dev account to transfer accounts.
Using your dev account to manage pre-minted on-chain assets. Ideal for games requiring a fixed set of pre-minted assets.
A Treasury account operates as a standard EOA, authorized via an API key. After integrating your game's pre-minted assets into our contracts, you transfer these assets to the treasury account's address. This setup enables you to redistribute the assets from the Treasury to other accounts within your game.
Requisites#
To escrow assets to your dev account you need to either:
- Support ERC-2771 transactions: The assets you want to escrow need to support ERC-2771 transactions (i.e. meta transactions). You can check the list of supported forwarder contracts.
- Fund dev account: You need to fund your dev account with the native tokens of the network you're interacting with.
Quickstart#
If pre-minted assets get distributed in batches, you might want to create a treasury account per batch - or periodically send assets to the treasury's address - managing these accounts is up to you.
1. Create a dev account#
First, create your dev account in your dashboard or via API.
2. Transferring an asset#
Once you have a dev account, you can transfer assets to it.
To sponsor the transaction, the contract supports ERC-2771 transactions. If not, you need to fund the dev account with the native tokens of the network you're interacting with.
Therefore, we set a policy with a policy rule account_functions
that allows the dev account interactions. Learn how to create a policy sponsor.
You're all set, you can now transfer assets to the player's account.