ONFT721Core

Git Source

Inherits: NonblockingLzApp, ERC165, IONFT721Core

State Variables

FUNCTION_TYPE_SEND

uint16 public constant FUNCTION_TYPE_SEND = 1;

minGasToTransferAndStore

uint256 public minGasToTransferAndStore;

dstChainIdToBatchLimit

mapping(uint16 => uint256) public dstChainIdToBatchLimit;

dstChainIdToTransferGas

mapping(uint16 => uint256) public dstChainIdToTransferGas;

storedCredits

mapping(bytes32 => StoredCredit) public storedCredits;

Functions

constructor

constructor(uint256 _minGasToTransferAndStore, address _lzEndpoint) NonblockingLzApp(_lzEndpoint);

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool);

estimateSendFee

function estimateSendFee(
    uint16 _dstChainId,
    bytes memory _toAddress,
    uint256 _tokenId,
    bool _useZro,
    bytes memory _adapterParams,
    bytes memory _data
) public view virtual override returns (uint256 nativeFee, uint256 zroFee);

estimateSendBatchFee

function estimateSendBatchFee(
    uint16 _dstChainId,
    bytes memory _toAddress,
    uint256[] memory _tokenIds,
    bool _useZro,
    bytes memory _adapterParams,
    bytes[] memory _data
) public view virtual override returns (uint256 nativeFee, uint256 zroFee);

_send

function _send(
    address _from,
    uint16 _dstChainId,
    bytes memory _toAddress,
    uint256[] memory _tokenIds,
    address payable _refundAddress,
    address _zroPaymentAddress,
    bytes memory _adapterParams,
    bytes[] memory _data
) internal virtual;

_nonblockingLzReceive

function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64, bytes memory _payload)
    internal
    virtual
    override;

clearCredits

function clearCredits(bytes memory _payload) external;

_creditTill

function _creditTill(
    uint16 _srcChainId,
    address _toAddress,
    uint256 _startIndex,
    uint256[] memory _tokenIds,
    bytes[] memory _data
) internal returns (uint256);

setMinGasToTransferAndStore

function setMinGasToTransferAndStore(uint256 _minGasToTransferAndStore) external onlyOwner;

setDstChainIdToTransferGas

function setDstChainIdToTransferGas(uint16 _dstChainId, uint256 _dstChainIdToTransferGas) external onlyOwner;

setDstChainIdToBatchLimit

function setDstChainIdToBatchLimit(uint16 _dstChainId, uint256 _dstChainIdToBatchLimit) external onlyOwner;

_creditTo

function _creditTo(uint16 _srcChainId, address _toAddress, uint256 _tokenId, bytes memory _data) internal virtual;

_toSingletonArray

function _toSingletonArray(uint256 element) internal pure returns (uint256[] memory);

_toSingletonArray

function _toSingletonArray(bytes memory data) internal pure returns (bytes[] memory);

Structs

StoredCredit

struct StoredCredit {
    uint16 srcChainId;
    address toAddress;
    uint256 index;
    bool creditsRemain;
}