Factory Blueprint Deployment
Contracts Deployment
Deploy Token or Connector contracts on all desired chains (ensure there is an existing UTS Router on these chains).
If our blueprint Token or Connector satisfies your requirements, you can deploy token with our Factory.
Single chain deploy through UTS Factory
If you want to deploy UTS Token using our blueprint, you can call the function below on UTS Factory contract:
Use DeployTokenData
:
Address encoded here will be setted as the owner of the token
The name of new token
The symbol of new token
The decimals of new token
Token initial supply, that will be minted
Token supply, that will be minted to owner (must be less than or equal initialSupply)
True/false flag is token should be without any extensions (non-mintable, non-burnable, without fee, working by lock/unlock scheme). If true, other flags should be false
True/false flag is token mintable by owner (owner can mint arbitrary token amount)
True/false flag is token burnable (everyone can burn his tokens)
True/false flag is token burnable by BURNER_ROLE role only
True/false flag is token will supports fee extracting for bridging(currently unsupported, should be false by default)
UTSRouter address on the deployment chain
Array of initial destination chain IDs that token binded to
Array of ChainConfig structs, initial settings
Salt to deploy new token to specified address, you can specify it, if you want specific address
If PureToken
is set to true
, then initialSupply
should be equal or more than mintedAmountToOwner
.
If PureToken
is set to false
, then initialSupply
should be equal to mintedAmountToOwner
If you want to deploy UTS Connector, you should use function below:
Using struct DeployConnectorData
owner
UTSConnector owner's address, encoded in bytes
underlyingToken
Address of the ERC20 token on top of which is UTSConnector built
feeModule
True/false flag is connector will supports fee extracting for bridging(currently unsupported, should be false by default)
router
UTSRouter address
allowedChainIds
Array of initial destination chain IDs that connector binded to
chainConfigs
Array of ChainConfig structs, initial settings
salt
Provided salt to deploy new connector to specified address
Chain Config struct should be built using struct below:
Ensure the chain configurations are properly set up to allow all your smart contracts to communicate with each other.
peerAddress
Destination peer address, that can bridge or receive tokens to/from source chain. Normally it should be address of token/connector on destination chain
minGasLimit
Minimal gas amount that can be provided as function's input and will be used at redeem function
decimals
Destination peer token decimals
paused
True/false flag is destination peer paused
owner
, router
,chainConfigs.peerAddress
and underlyingToken
are addresses, but since UTS is omnichain, we designed our protocol to be ready for non evm blockchains like Solana, Ton and others. So, to pass address like data use abi.encodePacked(address)
, on evm chains
You may configure minGasLimit
parameter to take more gas for transfer execution on destination chain if you need so. Please do your own calculations.
You can set this minGasLimit
as 0, so, minGasLimit will be set from UTSRouter. You can find more information in Estimations
Cross-chain deploy using UTS Deployment Router
You can use our Deployment Router to do a cross-chain deploy, this means that with calling only one function you can deploy and set up the whole cluster.
To do it, you need to call a function below on UTSDeploymentRouter
To do this you need to provide deployMetadata:
dstChainId
Destination chain Id (or current)
isConnector
True/false flag is specified params for deploy UTSConnector
params
encoded deployData (encoded DeployTokenData
struct or encoded DeployConnectorData
struct)
If you want to pay in ERC-20 token you can do it with PAYMENT_TOKEN
in UTSDeploymentRouter.
You also have a possibility to pay in native. Currently it is NGL
If you want to estimate deployment fee we have functions for that reason on UTSDeploymentRouter. You can find this information in Estimations section
That's it, now you are ready to make your first cross-chain token transfer!
Last updated