Build
Architecture
contracts
contracts
evm
ZetaConnector.non-eth.sol
Contract.zetaconnectornoneth

Git Source (opens in a new tab)

Inherits: ZetaConnectorBase

Non ETH implementation of ZetaConnector. This contract manages interactions between TSS and different chains. This version is for every chain but Etherum network because in the other chains we mint and burn and in Etherum we lock and unlock

maxSupply

uint256 public maxSupply = 2 ** 256 - 1;

constructor

constructor(address zetaTokenAddress_, address tssAddress_, address tssAddressUpdater_, address pauserAddress_)
    ZetaConnectorBase(zetaTokenAddress_, tssAddress_, tssAddressUpdater_, pauserAddress_);

getLockedAmount

function getLockedAmount() external view returns (uint256);

setMaxSupply

function setMaxSupply(uint256 maxSupply_) external onlyTssAddress;

send

Entry point to send data to protocol This call burn the token and emit an event with all the data needed by the protocol

function send(ZetaInterfaces.SendInput calldata input) external override whenNotPaused;

onReceive

Handler to receive data from other chain. This method can be called only by TSS. Transfer the Zeta tokens to destination and calls onZetaMessage if it's needed. To perform the transfer mint new tokens, validating first the maxSupply allowed in the current chain.

function onReceive(
    bytes calldata zetaTxSenderAddress,
    uint256 sourceChainId,
    address destinationAddress,
    uint256 zetaValue,
    bytes calldata message,
    bytes32 internalSendHash
) external override onlyTssAddress;

onRevert

Handler to receive errors from other chain. This method can be called only by TSS. Transfer the Zeta tokens to destination and calls onZetaRevert if it's needed. To perform the transfer mint new tokens, validating first the maxSupply allowed in the current chain.

function onRevert(
    address zetaTxSenderAddress,
    uint256 sourceChainId,
    bytes calldata destinationAddress,
    uint256 destinationChainId,
    uint256 remainingZetaValue,
    bytes calldata message,
    bytes32 internalSendHash
) external override whenNotPaused onlyTssAddress;

MaxSupplyUpdated

event MaxSupplyUpdated(address callerAddress, uint256 newMaxSupply);