Target chain smart contracts

  • Deposit Contract: This contract is responsible for taking user deposits on the supported chain and minting the representative token. Depending on the asset deposited the shares are minted and the asset is deployed to respective strategy

    contract DepositL2{
    	mapping(address=>cValue) whitelistedToken;
    	function deposit(address _tokenAddress, address _receiver, uint256 _value, uint256 _depositFee) external payable
    	function transferDepositL1(address _tokenAddress, uint256 _value) external;
    }
  • nETH Contract: This is the native ETH contract present on the supported chains that mints the nETH token

    contract nETH is ERC20{
    	function mintNETH(address _receiver, uint256 _value) external onlyAuthorised; 
    	function burnNETH(address _receiver, uint356 _value) external onlyAuthorised;
    }
  • Messaging L2 Contract: This contract is responsible for sending message from all supported chains to the Ethereum L1. It uses LayerZero and other messaging protocol to do so. The Messaging Contract looks like this:

    contract MessagingApp{
    	address public lzEndpoint;
    	address public Deposit;
    	function sendMessage(bytes memory _data, uint256 _destID) external onlyDeposit
    	function receiveMessage(bytes memory _data) external onlyDeposit
    }

Last updated