Factory Blueprint Deployment

If our blueprint Token or Connector meets your requirements, you can deploy the token using our Factory. You may also deploy the Token or Connector contracts on all desired chains (ensure that an existing UTS Router is available on these chains). See below for more information.

Single-Chain Deployment via UTS Factory

UTS Token

If you want to deploy UTS Token using our blueprint, you can call the function below on UTS Factory contract:

/**
 * @notice Deploys a new {UTSToken} using the provided deployment parameters.
 * @param deployData the {DeployTokenData} struct containing deployment parameters.
 * @dev See the {UTSERC20DataTypes.DeployTokenData} for details.
 *
 * @return success call result.
 * @return newToken a newly deployed {UTSToken} contract address.
 */
function deployToken(DeployTokenData calldata deployData)

Use DeployTokenData :

struct DeployTokenData {
    bytes     owner;
    string    name;
    string    symbol;
    uint8     decimals;
    uint256   initialSupply;
    uint256   mintedAmountToOwner;
    bool      pureToken;
    bool      mintable;
    bool      globalBurnable;
    bool      onlyRoleBurnable;
    bool      feeModule;
    bytes     router;
    uint256[] allowedChainIds;
    ChainConfig[] chainConfigs;
    bytes32   salt;
}
Field
Meaning

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

UTS Connector

If you want to deploy UTS Connector, you should use function below:

Using struct DeployConnectorData

Field
Meaning

owner

UTSConnector owner's address, encoded in bytes

underlyingToken

Address of the ERC20 token on top of which is UTSConnector built(you can also use a placeholder address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE, if the desired connector have to interact with network native currency, e.g. Ether)

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.

Name
Meaning

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.peerAddressand 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 Deployment with UTS Deployment Router

You can use our Deployment Router for cross-chain deployment, allowing you to deploy and set up the entire cluster with a single function call. To do this, simply call the function below on the UTSDeploymentRouter.

To do this you need to provide deployMetadata:

Name
Meaning

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

Was this helpful?