Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SwiftDest

Git Source

Inherits: ReentrancyGuard

State Variables

wormhole

IWormhole public wormhole

guardian

address public guardian

orders

mapping(bytes32 => Order) public orders

pendingAmounts

mapping(bytes32 => uint256) public pendingAmounts

Functions

constructor

constructor(address _wormhole) ;

setWormhole

function setWormhole(address _wormhole) external;

fulfillOrder

function fulfillOrder(
    uint256 fulfillAmount,
    bytes memory encodedVm,
    OrderParams memory params,
    ExtraParams memory extraParams,
    UnlockParams calldata unlockParams,
    PermitParams calldata permit
) public payable nonReentrant returns (bytes memory);

fulfillSimple

function fulfillSimple(
    uint256 fulfillAmount,
    bytes32 orderHash,
    OrderParams memory params,
    ExtraParams memory extraParams,
    UnlockParams memory unlockParams,
    PermitParams calldata permit
) public payable nonReentrant;

cancelOrder

function cancelOrder(bytes32 orderHash, OrderParams memory params, ExtraParams memory extraParams, bytes32 canceler)
    public
    payable
    nonReentrant
    returns (uint64 sequence);

postBatch

function postBatch(bytes32[] memory orderHashes) public payable returns (uint64 sequence);

rescue

function rescue(bytes memory encodedVm) public;

setPause

function setPause(bool _pause) public;

setAuctionConfig

function setAuctionConfig(address _auctionVerifier, uint16 _auctionChainId, bytes32 _auctionAddr) public;

setConsistencyLevel

function setConsistencyLevel(uint8 _consistencyLevel) public;

setEmitters

function setEmitters(uint16[] memory chainIds, bytes32[] memory addresses) public;

changeGuardian

function changeGuardian(address newGuardian) public;

claimGuardian

function claimGuardian() public;

getOrders

function getOrders(bytes32[] memory orderHashes) public view returns (Order[] memory);

settleWithPayload

function settleWithPayload(OrderParams memory params, ExtraParams memory extraParams)
    public
    nonReentrant
    returns (uint256 netAmount);

buildKey

function buildKey(OrderParams memory params, ExtraParams memory extraParams)
    internal
    pure
    returns (Key memory key);

encodeKey

function encodeKey(Key memory key) internal pure returns (bytes memory encoded);

truncateAddress

function truncateAddress(bytes32 b) internal pure returns (address);

payEth

function payEth(address to, uint256 amount, bool revertOnFailure) internal;

receive

receive() external payable;

Events

OrderSettled

event OrderSettled(bytes32 key, uint256 netAmount);