Skip to content
On this page

Overview of Everscale to EVM Transfer Mechanics

  1. Locking or Burning the Target Tokens Based on Their Type:

    • If the target token is a Native token, it will be locked on Everscale.
    • If it is an Alien token, it will be burned.
  2. Event Contract Deployment and Confirmation:

    • The event contract is deployed on Everscale through a previous transaction.
    • After a few seconds, relayers confirm the event contract by voting on it.
  3. Releasing or Minting Tokens on the EVM Network:

    3.1 Paying Gas Fees for an EVM Network with EVER:

    In this case, the process of token release or minting on the EVM network is automated.

    • The Credit Modules will call the relevant function on the MultiVault contract. After that the MultiVault contract handles the minting or releasing the token based on its type.

    3.2 Paying Gas Fees for an EVM Network with an EVM Gas Token:

    In this case, the process of token release or minting on the EVM network is done manually.

    • For Native tokens, call the saveWithdrawNative function to mint tokens.
    • For Alien tokens, call the saveWithdrawAlien function to release tokens. “Locking or Burning Target Tokens Based on Their Type:

    TIP

    Note that these functions must be called on the MultiVault contract.

  4. At this point, the desired amount of target tokens must be deposited to the recipient EVM address.

Step-by-Step Guide: Everscale to EVM Transfer

Native Coin transfer

EverEVMNativeCoin

  • 1 - Call the wrap function on the WEVERVault contract and mint WEVER tokens :

Function

solidity
function wrap(
        uint128 tokens,
        address owner_address,
        address gas_back_address,
        TvmCell payload
    ) external;
Details

Parameters

ParamDescription
tokensAmount of the token
owner_addressCompounder address
gas_back_addressAddress to send the change back
payloadOperational payload, see wrap payload.

NOTE : gas_back_address will be the user's address if the EVM network fees are paid with its gas token and will be EventCloser if it is paid with EVER.

Example Transactions


WARNING

The next step is only necessary if EVM network fees are paid with its gas token.


  • 2 - Mint WEVER tokens in the EVM network by calling the saveWithdrawNative function on the MultiVault contract :

Function

solidity
function saveWithdrawNative(
        bytes memory payload,
        bytes[] memory signatures
    ) external;
Details

Parameters

ParamDescription
payloadOperational payload, see payload.
signaturesRelayers signatures see signatures.

Example Transactions


Native Token Transfer

EverEVMNativeToken

1 - Transfer the tokens to the ProxyMultiVaultNativeV-4's TokenWallet contract by calling the transfer function on your TokenWallet contract :

Function

solidity
function transfer(
        uint128 amount,
        address recipient,
        uint128 deployWalletValue,
        address remainingGasTo,
        bool notify,
        TvmCell payload
    ) external;
Details

Parameters

ParamDescription
amountAmount of the token
recipientRecipient address which is proxyMultivaultNativeV_4 address
deployWalletValueToken Wallet deploy value if not deployed before
remainingGasToAddress to send the change back
notifyNotify receiver on incoming transfer
payloadOperational payload, see transfer payload.

NOTE : remainingGasTo will be the user's address if the EVM network fees are paid with its gas token and will be EventCloser if it is paid with EVER.

Example Transactions


WARNING

The next step is only necessary if EVM network fees are paid with its gas token.


  • 2 - Mint the tokens in the EVM network by calling the saveWithdrawNative function on the MultiVault contract:

Function

solidity
function saveWithdrawNative(
        bytes memory payload,
        bytes[] memory signatures
    ) external;
Details

Parameters

ParamDescription
payloadOperational payload, see payload.
signaturesRelayers signatures see signatures.

Example Transactions


Alien Token Transfer

EverEVMAlienToken

1 - Burn the tokens on Everscale network by calling the `burn` function on your `tokenWallet` contract :

Function

solidity
function burn(
        uint128 amount,
        address remainingGasTo,
        address callbackTo,
        TvmCell payload
    ) external;
Details

Parameters

ParamDescription
amountAmount of the target token token
callBackToCallback Receiver contract which is MergePoolV_4 in this case
remainingGasToAddress to send the change back
payloadOperational payload, see burn payload.

NOTE : remainingGasTo will be the user's address if the EVM network fees are paid with its gas token and will be EventCloser if it is paid with EVER.

Example Transactions


WARNING

The next step is only necessary if EVM network fees are paid with its gas token.


  • 2 - Release the tokens in the EVM network by calling the saveWithdrawAlien function on the MultiVault contract:

Function

solidity
function saveWithdrawAlien(
        bytes memory payload,
        bytes[] memory signatures
    ) external;
Details

Parameters

ParamDescription
payloadOperational payload, see payload.
signaturesRelayers signatures see signatures.

Example Transactions


EVM Gas Token Transfer

EverEVMGasToken

1 - Burn the tokens on Everscale network by calling the burn function on your tokenWallet contract :

Function

solidity
function burn(
        uint128 amount,
        address remainingGasTo,
        address callbackTo,
        TvmCell payload
    ) external;
Details

Parameters

ParamDescription
amountAmount of the token
callBackToCallback Receiver contract.ProxyMultiVaultAlienV_7 in this case
remainingGasToAddress to send the change back
payloadOperational payload, see burn payload.

NOTE : remainingGasTo will be the user's address if the EVM network fees are paid with its gas token and will be EventCloser if it is paid with EVER.

Example Transactions


WARNING

The next step is only necessary if EVM network fees are paid with its gas token.


  • 2 - Release the tokens in EVM network by calling the saveWithdrawAlien function on the MultiVault contract:

Function

solidity
function saveWithdrawAlien(
        bytes memory payload,
        bytes[] memory signatures
    ) external;
Details

Parameters

ParamDescription
payloadOperational payload, see payload.
signaturesRelayers signatures see signatures.

Example Transactions


Interactive code samples related to examples above can be found here

The addresses of all the referenced contracts and tokens can be found at Links.