TokenConnectorLogic
Inherits: IBridgeConnector
State Variables
bridge
BridgeBase public bridge;
token
address public token;
otherNetworkAddress
address public otherNetworkAddress;
state
TokenState public state;
finalizedState
bytes public finalizedState;
Functions
onlySettled
modifier onlySettled();
onlyBridge
modifier onlyBridge();
estimateSettlementFee
function estimateSettlementFee(address locker) public view returns (uint256);
epoch
function epoch() public view returns (uint256);
decodeTransfers
function decodeTransfers(bytes memory data) internal pure returns (Transfer[] memory);
isStateEmpty
function isStateEmpty() external view override returns (bool);
getStateLength
function getStateLength() external view returns (uint256);
finalize
function finalize(uint256 epoch_to_finalize) public virtual override onlyBridge returns (bytes32);
getFinalizedState
Retrieves the finalized state of the bridgeable contract.
function getFinalizedState() public view override returns (bytes memory);
Returns
Name | Type | Description |
---|---|---|
<none> | bytes | A bytes serialized finalized state |
getSourceContract
Returns the address of the underlying contract in this network
function getSourceContract() external view returns (address);
getDestinationContract
Returns the address of the bridged contract on the other network
function getDestinationContract() external view returns (address);
applyState
function applyState(bytes calldata) external virtual;
Events
Finalized
Events
event Finalized(uint256 indexed epoch);
AssetBridged
event AssetBridged(address indexed connector, address indexed account, uint256 value);