To deploy contracts run truffle migrate --network NETWORK_NAME --file <path_to_env_config>
.
To deploy new handlers for tokens and register them on bridge contract provide: --redeploy-token-handlers
flag.
Each domain is defined with:
domainID
: a string representing the domain IDMPCAddress
: a string representing the MPC address. If omitted endKeygen will not be called as part of the migration script.fee
: an object containing a definition of the fee handlers that will be deployed.The current limitation is that only oneBasicFeeHandler
and oneDynamicERC20FeeHandlerEVM
can be deployed using the migration script.basic
: fee handler properties that will be configured after deploymentfee
: a string representing a fee amount
oracle
: fee handler properties that will be configured after deploymentgasUsed
: a string representing a amount of units of gas that should be used for calculating transaction costfeePercentage
: a number representing the percentage of the total deposited amount that will be taken as a fee (this is only applicable if the calculated transaction cost is smaller than the fee calculated as a percentage of the deposited amount)
access
: an object containing access control information used for transferring admin access as the final step of the migration. If omitted, this migration step will be skipped.feeHandlerAdmin
: an address to which admin access for all deployed fee handlers will be renouncedfeeRouterAdmin
: an address to which admin access for deployed fee router will be renouncedaccessControl
: an object representing an access control map (each property defines specific function and address that will be granted access to this function)
erc721
: an array of ERC721 tokens, with the following properties:name
: a string representing the name of the tokensymbol
: a string representing the symbol of the tokenuri
: a string representing the URI of the metadataresourceID
: a string representing Sygma's cross-chain resourceIDfeeType
: a string representing the type of fee handler that should be registered for this token for all destination networks (oracle
orbasic
)
erc20
: an array of ERC20 tokens, with the following properties:name
: a string representing the name of the tokensymbol
: a string representing the symbol of the tokenresourceID
: a string representing Sygma's cross-chain resourceIDfeeType
: a string representing the type of fee handler that should be registered for this token for all destination networks (oracle
orbasic
)strategy
: a string representing the token issuance strategy (mb
for mint/burn orlr
for lock/release)decimals
: a string representing the number of decimals for the token
permissionedGeneric
: an array of permissioned generic resources, with the following properties:resourceID
: a string representing Sygma's cross-chain resourceIDfeeType
: a string representing the type of fee handler that should be registered for this resource for all destination networks (oracle
orbasic
)depositFunctionSig
: a string representing the deposit function signaturedepositorOffset
: a number representing the depositor offsetexecuteFunctionSig
: a string representing the function signature of the function that should be called on execution
permissionlessGeneric
: permissionless generic handler deployment definition:resourceID
: a string representing Sygma's cross-chain resourceIDfeeType
: a string representing the type of fee handler that should be registered for this resource for all destination networks (oracle
orbasic
)