This guide explains how to use theDocumentation Index
Fetch the complete documentation index at: https://fireblocks-43c4b3ee-chore-add-cli.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
/v1/tokenization/tokens endpoint through the SDK to issue a new ERC20F token. This will allow you to deploy and link the token to an asset, enabling easy management of issuance, minting, and burning operations.
What is ERC20F?
ERC20F is a fungible token reference implementation developed by Fireblocks. It builds upon the widely used ERC-20 token standard, with added functionality for upgradability and enhanced control over token operations. This implementation is designed to be flexible, allowing for token minting, burning, and secure integration within Fireblocks’ ecosystem. It is optimized for compliance, making it ideal for organizations requiring scalable and customizable token management solutions. It’s important to note that the ERC20F token uses a proxy pattern, which decouples the state (in the proxy) from the smart contract logic (referred to asimplementation in this guide) to support upgradability. Read more about the upgradability features of this contract here.
We built a contract template for ERC20F tokens that you can use to issue new tokens. To find more information about Templates, refer to the Contract Template guide.
Prerequisites
Before issuing a new ERC20F token using the Fireblocks SDK, ensure you know the following:- Asset ID: The
assetIdof the blockchain where the token will be deployed (e.g. ETH_TEST5 for Sepolia). This is the Fireblocks ID of the gas token of the blockchain where the token will be deployed. (To get the asset ID, refer to this assetId list) - Vault Account: The
vaultAccountIdthat will deploy the token. Ensure the vault has sufficient native gas for transaction fees. You can retrieve the vaultAccountId from the Fireblocks console by checking the URL of the selected vault, e.g.,https://console.fireblocks.io/v2/accounts/vault/<vaultAccountId>. For more details about Vault Accounts, refer to the Create Vault Account guide. - Contract Template: Ensure the contract template is uploaded, and you have the
templateIdfrom the template. for details. (ForERC20F, the contract template ID is41c76f08-3144-4641-96c9-260c8fe846a7forProd USworkspaces). - Ensure you have access to the
Fireblocks Smart Contracts package, which includes the reference protocol contracts.
Example: Issuing a New ERC20F Token
Here’s an example of how to issue a new ERC20F token using the Fireblocks SDK:1. Initialize the Fireblocks SDK
First, the Fireblocks SDK and initialize the SDK with your Fireblocks API key and private key:2. Retrieve ERC20F Contract Template
We need to retrieve the ERC20F contract template using thegetContractTemplate method:
For more information, refer to the Get Contract Template API reference page.
implementationContractId which is required for the next steps.
3. Retrieve Implementation Contract Address
To get the address of the implementation contract, you need to call thegetDeployedContracts method:
This extra step is required only for templates of contracts that follow the proxy pattern (such as ERC20F).
contractAddress which is required for the next step.
4. Issue New Token
To proceed with deploying the new token, you need to define the following deployment variables:name: The token name (e.g., “MyToken”).symbol: The token symbol (e.g., “MTK”).defaultAdminAddress: The address that will receive the DEFAULT_ADMIN_ROLE.minterAddress: The address that will receive the MINTER_ROLE.pauserAddress: The address that will receive the PAUSER_ROLE.
constructorParams field. The proxy will reference the implementation contract and use the initialize method to set up the token parameters.
Now let’s issue the new token:
Highlights:
-
Ensure that
contractIdpassed in thecreateParamscorresponds to the template ID of the contract you want to deploy. In this case, it is the ERC20F contract template ID. -
Replace the example addresses with your own values for
defaultAdminAddress,minterAddress, andpauserAddress. - Ensure that the vault account has sufficient native gas for transaction fees.
-
If you need to obtain the ABI for the
initializefunction of the proxy used in step 4, you can find it in the contract template: