ForeignGatewayOnGnosis
Inherits: IForeignGateway
State Variables
MIN_JURORS
uint256 public constant MIN_JURORS = 3;
weth
IERC20 public immutable weth;
localDisputeID
uint256 internal localDisputeID = 1;
feeForJuror
mapping(uint96 => uint256) public feeForJuror;
governor
address public governor;
fastBridgeReceiver
IFastBridgeReceiver public fastBridgeReceiver;
senderChainID
uint256 public immutable override senderChainID;
senderGateway
address public override senderGateway;
depreciatedFastbridge
IFastBridgeReceiver public depreciatedFastbridge;
depreciatedFastBridgeExpiration
uint256 public depreciatedFastBridgeExpiration;
disputeHashtoDisputeData
mapping(bytes32 => DisputeData) public disputeHashtoDisputeData;
Functions
onlyFromFastBridge
modifier onlyFromFastBridge();
onlyByGovernor
modifier onlyByGovernor();
constructor
constructor(
address _governor,
IFastBridgeReceiver _fastBridgeReceiver,
address _senderGateway,
uint256 _senderChainID,
IERC20 _weth
);
changeGovernor
Changes the governor.
function changeGovernor(address _governor) external;
Parameters
Name | Type | Description |
---|---|---|
_governor | address | The address of the new governor. |
changeFastbridge
Changes the fastBridge, useful to increase the claim deposit.
function changeFastbridge(IFastBridgeReceiver _fastBridgeReceiver, uint256 _gracePeriod) external onlyByGovernor;
Parameters
Name | Type | Description |
---|---|---|
_fastBridgeReceiver | IFastBridgeReceiver | The address of the new fastBridge. |
_gracePeriod | uint256 | The duration to accept messages from the deprecated bridge (if at all). |
changeReceiverGateway
Changes the sender gateway.
function changeReceiverGateway(address _senderGateway) external;
Parameters
Name | Type | Description |
---|---|---|
_senderGateway | address | The address of the new sender gateway. |
changeCourtJurorFee
Changes the feeForJuror
property value of a specified court.
function changeCourtJurorFee(uint96 _courtID, uint256 _feeForJuror) external onlyByGovernor;
Parameters
Name | Type | Description |
---|---|---|
_courtID | uint96 | The ID of the court. |
_feeForJuror | uint256 | The new value for the feeForJuror property value. |
createDispute
function createDispute(uint256, bytes calldata) external payable override returns (uint256 disputeID);
createDisputeERC20
function createDisputeERC20(uint256 _choices, bytes calldata _extraData, uint256 _amount)
external
override
returns (uint256 disputeID);
arbitrationCost
function arbitrationCost(bytes calldata _extraData) public view override returns (uint256 cost);
relayRule
Relay the rule call from the home gateway to the arbitrable.
function relayRule(address _messageSender, bytes32 _disputeHash, uint256 _ruling, address _relayer)
external
override
onlyFromFastBridge;
withdrawFees
function withdrawFees(bytes32 _disputeHash) external override;
disputeHashToForeignID
function disputeHashToForeignID(bytes32 _disputeHash) external view override returns (uint256);
extraDataToCourtIDMinJurors
function extraDataToCourtIDMinJurors(bytes memory _extraData)
internal
view
returns (uint96 courtID, uint256 minJurors);
Events
OutgoingDispute
event OutgoingDispute(
bytes32 disputeHash,
bytes32 blockhash,
uint256 localDisputeID,
uint256 _choices,
bytes _extraData,
address arbitrable
);
ArbitrationCostModified
event ArbitrationCostModified(uint96 indexed _courtID, uint256 _feeForJuror);
Structs
DisputeData
struct DisputeData {
uint248 id;
bool ruled;
address arbitrable;
uint256 paid;
address relayer;
}