4. Generating the token contract

Tutorial on how to use Bridge Protocol to configure and deploy a new tokenized asset - Part 4: Generating the token contract

Setting up your token

Once you have chosen your network and connected your address, the next step is now to configure your token by clicking on Tokens > Issue new token.

Fill all the relevant fields according to the instructions below:

Signer address (mandatory): The address that will deploy the token contract and that will be the token proxy administrator. See Bridge token for more information.

Default owner address (mandatory): The address that will be the owner of the token.

Token name (mandatory): The name you want to give your token, for example Mt Pelerin Shares.

Token symbol (mandatory): The symbol (ticker) you want to give your token, for example MPS.

Decimals (mandatory): The number of decimals you want your token to have. For example 0 if you are creating a token representing an asset that is not divisible (e.g. 1 token = 1 company share).

  • Possible range: 0 to 18 decimals.

Previously deployed logic (optional): Choose a logic contract that you have previously deployed to spare the cost of re-deploying an identical one. Leave blank if you have no previously deployed logic. See Bridge token for more information.

Total supply (mandatory for pre-mint): The total amount of tokens that you want to create, for example 10000000.

  • Total supply is not finite, you can increase or decrease the total supply of your token later on.

  • Entering a total supply is optional if you won't pre-mint tokens (see "Pre-mint?" below).

Percentage of shares tokenized (mandatory): This value is informative only, in the case you are issuing tokens representing shares of a company. Leave the default 100 value if it doesn't apply to you.

Reference currency (mandatory): The reference currency that will be used by the rules engine to enforce the compliance limits for a given user across multiple currencies.

KYC providers addresses (optional): Input one or more addresses (separated by a comma) of the entities that will manage the compliance of your token. See Compliance registry for more information. You can add KYC providers later on.

Rules (optional): Choose the rules to define how your token can be transferred or not. See Rules engine for more information.

  • You can add and remove rules to your token at any time

  • You need to add at least one rule before deploying your token

Lots (optional): You can divide your total supply into different lots with different purposes (locked vs. unlocked tokens, private sale tokens, public sale tokens, etc.). You can create lots later on. Please note that if you don't create a first lot now, no tokens will be minted when generating contracts.

  • Percentage: Percentage of the total supply attributed to the lot.

  • Vault: Address where the newly created tokens will be stored.

  • Minter: Address that will issue (mint) the new tokens.

Sales (EVM only): You can schedule one or several automated token sales with these smart contracts. A user sending ETH to a token sale will automatically receive his/her tokens in return. You can create sales later on.

  • Start: the date and time of the opening of the token sale.

  • End: the date and time of the end of the token sale.

  • Price: the price for one token, in the referrence currency chosen above.

  • Lot: the sale will sell tokens from that specific lot only.

  • ETH vault: the address where the ETH proceeds of the sale will be sent.

Pre-mint? (optional): If ticked, the tokens will be minted at the same time as the deployment of the token contract.

Generating the token contracts

Once all the relevant parameters above have been chosen, you can proceed an deploy the token by clicking on the "Generate contracts" button at the bottom of the screen.

Before clicking on the "Generate contracts" button, make sure to first set a proper gas price and gas limit at the bottom left of the screen for EVM networks (> 8 000 000) or the proper fee for Tezos network (> 1 000 000)

Deploying a token can be slow, especially if you don't re-use a previously deployed logic. Please allow up to several dozen minutes.

Previously unfinished deployments

After having clicked on "Generate contracts", if the contract deployment is interrupted for any reason (sudden spike of gas price, for instance) you will be able to resume it later.

In such case, a "Previously unfinished deployements" menu will appear right below "Signer address". You will be able to select the interrupted deployment and resume it.

In this way, you won't lose the gas already spent before the interruption of the deployment.

EVM Token deployment cost

In order to generate the token contracts, you will need to have prepared beforehand enough ETH to pay for the deployment gas costs. Here's how to calculate the amounts you will need for your first token:

Signer address

(10,000,000x)/1,000,000,000=y(10,000,000*x)/1,000,000,000 = y

Default owner address

(800,000x)/1,000,000,000=y(800,000*x)/1,000,000,000 = y

x = Current gas price (see https://etherscan.io/gastracker or https://ethgasstation.info/

y = Amount of ETH to prepare

Ulterior token deployments will consume less gas if you re-use a previously deployed logic.

Congratulations, you have successfully created a new token! The next guide will show you how to interract with it.

Last updated