Oracle
Inherits: Verifier
State Variables
PROTOCOL
address public immutable PROTOCOL;
owner
address public owner;
feeOf
mapping(uint256 => uint256) public feeOf;
approvedOf
mapping(address => bool) public approvedOf;
Functions
onlyOwner
modifier onlyOwner();
onlyApproved
modifier onlyApproved();
constructor
constructor(address dao, address ormp);
receive
receive() external payable;
version
function version() public pure returns (string memory);
importMessageHash
Only could be called by owner.
function importMessageHash(uint256 chainId, address channel, uint256 msgIndex, bytes32 msgHash) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
chainId | uint256 | The source chain id. |
channel | address | The message channel. |
msgIndex | uint256 | The source chain message index. |
msgHash | bytes32 | The source chain message hash corresponding to the channel. |
hashOf
function hashOf(uint256 chainId, address channel, uint256 msgIndex) public view override returns (bytes32);
changeOwner
function changeOwner(address newOwner) external onlyOwner;
setApproved
function setApproved(address operator, bool approve) external onlyOwner;
isApproved
function isApproved(address operator) public view returns (bool);
withdraw
function withdraw(address to, uint256 amount) external onlyApproved;
setFee
function setFee(uint256 chainId, uint256 fee_) external onlyApproved;
fee
function fee(uint256 toChainId, address) public view returns (uint256);
Events
SetFee
event SetFee(uint256 indexed chainId, uint256 fee);
SetApproved
event SetApproved(address operator, bool approve);
Withdrawal
event Withdrawal(address indexed to, uint256 amt);
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);