Module HoprChannels

Source
Expand description

Generated by the following Solidity interface…

library HoprCrypto {
    struct CompactSignature {
        bytes32 r;
        bytes32 vs;
    }
    struct VRFParameters {
        uint256 vx;
        uint256 vy;
        uint256 s;
        uint256 h;
        uint256 sBx;
        uint256 sBy;
        uint256 hVx;
        uint256 hVy;
    }
}

interface HoprChannels {
    type ChannelStatus is uint8;
    type Balance is uint96;
    type ChannelEpoch is uint24;
    type TicketIndex is uint48;
    type TicketIndexOffset is uint32;
    type Timestamp is uint32;
    type WinProb is uint56;
    struct RedeemableTicket {
        TicketData data;
        HoprCrypto.CompactSignature signature;
        uint256 porSecret;
    }
    struct TicketData {
        bytes32 channelId;
        Balance amount;
        TicketIndex ticketIndex;
        TicketIndexOffset indexOffset;
        ChannelEpoch epoch;
        WinProb winProb;
    }

    error AlreadyInitialized();
    error BalanceExceedsGlobalPerChannelAllowance();
    error ContractNotResponsible();
    error InsufficientChannelBalance();
    error InvalidAggregatedTicketInterval();
    error InvalidBalance();
    error InvalidCurvePoint();
    error InvalidFieldElement();
    error InvalidNoticePeriod();
    error InvalidPointWitness();
    error InvalidSafeAddress();
    error InvalidTicketSignature();
    error InvalidTokenRecipient();
    error InvalidTokensReceivedUsage();
    error InvalidVRFProof();
    error MultiSigUninitialized();
    error NoticePeriodNotDue();
    error SourceEqualsDestination();
    error TicketIsNotAWin();
    error TokenTransferFailed();
    error WrongChannelState(string reason);
    error WrongToken();
    error ZeroAddress(string reason);

    event ChannelBalanceDecreased(bytes32 indexed channelId, Balance newBalance);
    event ChannelBalanceIncreased(bytes32 indexed channelId, Balance newBalance);
    event ChannelClosed(bytes32 indexed channelId);
    event ChannelOpened(address indexed source, address indexed destination);
    event DomainSeparatorUpdated(bytes32 indexed domainSeparator);
    event LedgerDomainSeparatorUpdated(bytes32 indexed ledgerDomainSeparator);
    event OutgoingChannelClosureInitiated(bytes32 indexed channelId, Timestamp closureTime);
    event TicketRedeemed(bytes32 indexed channelId, TicketIndex newTicketIndex);

    constructor(address _token, Timestamp _noticePeriodChannelClosure, address _safeRegistry);

    function ERC777_HOOK_FUND_CHANNEL_MULTI_SIZE() external view returns (uint256);
    function ERC777_HOOK_FUND_CHANNEL_SIZE() external view returns (uint256);
    function LEDGER_VERSION() external view returns (string memory);
    function MAX_USED_BALANCE() external view returns (Balance);
    function MIN_USED_BALANCE() external view returns (Balance);
    function TOKENS_RECIPIENT_INTERFACE_HASH() external view returns (bytes32);
    function VERSION() external view returns (string memory);
    function _currentBlockTimestamp() external view returns (Timestamp);
    function _getChannelId(address source, address destination) external pure returns (bytes32);
    function _getTicketHash(RedeemableTicket memory redeemable) external view returns (bytes32);
    function _isWinningTicket(bytes32 ticketHash, RedeemableTicket memory redeemable, HoprCrypto.VRFParameters memory params) external pure returns (bool);
    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32);
    function channels(bytes32) external view returns (Balance balance, TicketIndex ticketIndex, Timestamp closureTime, ChannelEpoch epoch, ChannelStatus status);
    function closeIncomingChannel(address source) external;
    function closeIncomingChannelSafe(address selfAddress, address source) external;
    function domainSeparator() external view returns (bytes32);
    function finalizeOutgoingChannelClosure(address destination) external;
    function finalizeOutgoingChannelClosureSafe(address selfAddress, address destination) external;
    function fundChannel(address account, Balance amount) external;
    function fundChannelSafe(address selfAddress, address account, Balance amount) external;
    function initiateOutgoingChannelClosure(address destination) external;
    function initiateOutgoingChannelClosureSafe(address selfAddress, address destination) external;
    function ledgerDomainSeparator() external view returns (bytes32);
    function multicall(bytes[] memory data) external returns (bytes[] memory results);
    function noticePeriodChannelClosure() external view returns (Timestamp);
    function redeemTicket(RedeemableTicket memory redeemable, HoprCrypto.VRFParameters memory params) external;
    function redeemTicketSafe(address selfAddress, RedeemableTicket memory redeemable, HoprCrypto.VRFParameters memory params) external;
    function token() external view returns (address);
    function tokensReceived(address, address from, address to, uint256 amount, bytes memory userData, bytes memory) external;
    function updateDomainSeparator() external;
    function updateLedgerDomainSeparator() external;
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_token",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_noticePeriodChannelClosure",
        "type": "uint32",
        "internalType": "HoprChannels.Timestamp"
      },
      {
        "name": "_safeRegistry",
        "type": "address",
        "internalType": "contract HoprNodeSafeRegistry"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ERC777_HOOK_FUND_CHANNEL_MULTI_SIZE",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ERC777_HOOK_FUND_CHANNEL_SIZE",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "LEDGER_VERSION",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "MAX_USED_BALANCE",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint96",
        "internalType": "HoprChannels.Balance"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "MIN_USED_BALANCE",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint96",
        "internalType": "HoprChannels.Balance"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "TOKENS_RECIPIENT_INTERFACE_HASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "VERSION",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "_currentBlockTimestamp",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint32",
        "internalType": "HoprChannels.Timestamp"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "_getChannelId",
    "inputs": [
      {
        "name": "source",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "destination",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "_getTicketHash",
    "inputs": [
      {
        "name": "redeemable",
        "type": "tuple",
        "internalType": "struct HoprChannels.RedeemableTicket",
        "components": [
          {
            "name": "data",
            "type": "tuple",
            "internalType": "struct HoprChannels.TicketData",
            "components": [
              {
                "name": "channelId",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "amount",
                "type": "uint96",
                "internalType": "HoprChannels.Balance"
              },
              {
                "name": "ticketIndex",
                "type": "uint48",
                "internalType": "HoprChannels.TicketIndex"
              },
              {
                "name": "indexOffset",
                "type": "uint32",
                "internalType": "HoprChannels.TicketIndexOffset"
              },
              {
                "name": "epoch",
                "type": "uint24",
                "internalType": "HoprChannels.ChannelEpoch"
              },
              {
                "name": "winProb",
                "type": "uint56",
                "internalType": "HoprChannels.WinProb"
              }
            ]
          },
          {
            "name": "signature",
            "type": "tuple",
            "internalType": "struct HoprCrypto.CompactSignature",
            "components": [
              {
                "name": "r",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "vs",
                "type": "bytes32",
                "internalType": "bytes32"
              }
            ]
          },
          {
            "name": "porSecret",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "_isWinningTicket",
    "inputs": [
      {
        "name": "ticketHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "redeemable",
        "type": "tuple",
        "internalType": "struct HoprChannels.RedeemableTicket",
        "components": [
          {
            "name": "data",
            "type": "tuple",
            "internalType": "struct HoprChannels.TicketData",
            "components": [
              {
                "name": "channelId",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "amount",
                "type": "uint96",
                "internalType": "HoprChannels.Balance"
              },
              {
                "name": "ticketIndex",
                "type": "uint48",
                "internalType": "HoprChannels.TicketIndex"
              },
              {
                "name": "indexOffset",
                "type": "uint32",
                "internalType": "HoprChannels.TicketIndexOffset"
              },
              {
                "name": "epoch",
                "type": "uint24",
                "internalType": "HoprChannels.ChannelEpoch"
              },
              {
                "name": "winProb",
                "type": "uint56",
                "internalType": "HoprChannels.WinProb"
              }
            ]
          },
          {
            "name": "signature",
            "type": "tuple",
            "internalType": "struct HoprCrypto.CompactSignature",
            "components": [
              {
                "name": "r",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "vs",
                "type": "bytes32",
                "internalType": "bytes32"
              }
            ]
          },
          {
            "name": "porSecret",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      },
      {
        "name": "params",
        "type": "tuple",
        "internalType": "struct HoprCrypto.VRFParameters",
        "components": [
          {
            "name": "vx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "vy",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "s",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "h",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "sBx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "sBy",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hVx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hVy",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "canImplementInterfaceForAddress",
    "inputs": [
      {
        "name": "interfaceHash",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "channels",
    "inputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "balance",
        "type": "uint96",
        "internalType": "HoprChannels.Balance"
      },
      {
        "name": "ticketIndex",
        "type": "uint48",
        "internalType": "HoprChannels.TicketIndex"
      },
      {
        "name": "closureTime",
        "type": "uint32",
        "internalType": "HoprChannels.Timestamp"
      },
      {
        "name": "epoch",
        "type": "uint24",
        "internalType": "HoprChannels.ChannelEpoch"
      },
      {
        "name": "status",
        "type": "uint8",
        "internalType": "enum HoprChannels.ChannelStatus"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "closeIncomingChannel",
    "inputs": [
      {
        "name": "source",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "closeIncomingChannelSafe",
    "inputs": [
      {
        "name": "selfAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "source",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "domainSeparator",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "finalizeOutgoingChannelClosure",
    "inputs": [
      {
        "name": "destination",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "finalizeOutgoingChannelClosureSafe",
    "inputs": [
      {
        "name": "selfAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "destination",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "fundChannel",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint96",
        "internalType": "HoprChannels.Balance"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "fundChannelSafe",
    "inputs": [
      {
        "name": "selfAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint96",
        "internalType": "HoprChannels.Balance"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "initiateOutgoingChannelClosure",
    "inputs": [
      {
        "name": "destination",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "initiateOutgoingChannelClosureSafe",
    "inputs": [
      {
        "name": "selfAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "destination",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ledgerDomainSeparator",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "multicall",
    "inputs": [
      {
        "name": "data",
        "type": "bytes[]",
        "internalType": "bytes[]"
      }
    ],
    "outputs": [
      {
        "name": "results",
        "type": "bytes[]",
        "internalType": "bytes[]"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "noticePeriodChannelClosure",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint32",
        "internalType": "HoprChannels.Timestamp"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "redeemTicket",
    "inputs": [
      {
        "name": "redeemable",
        "type": "tuple",
        "internalType": "struct HoprChannels.RedeemableTicket",
        "components": [
          {
            "name": "data",
            "type": "tuple",
            "internalType": "struct HoprChannels.TicketData",
            "components": [
              {
                "name": "channelId",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "amount",
                "type": "uint96",
                "internalType": "HoprChannels.Balance"
              },
              {
                "name": "ticketIndex",
                "type": "uint48",
                "internalType": "HoprChannels.TicketIndex"
              },
              {
                "name": "indexOffset",
                "type": "uint32",
                "internalType": "HoprChannels.TicketIndexOffset"
              },
              {
                "name": "epoch",
                "type": "uint24",
                "internalType": "HoprChannels.ChannelEpoch"
              },
              {
                "name": "winProb",
                "type": "uint56",
                "internalType": "HoprChannels.WinProb"
              }
            ]
          },
          {
            "name": "signature",
            "type": "tuple",
            "internalType": "struct HoprCrypto.CompactSignature",
            "components": [
              {
                "name": "r",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "vs",
                "type": "bytes32",
                "internalType": "bytes32"
              }
            ]
          },
          {
            "name": "porSecret",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      },
      {
        "name": "params",
        "type": "tuple",
        "internalType": "struct HoprCrypto.VRFParameters",
        "components": [
          {
            "name": "vx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "vy",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "s",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "h",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "sBx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "sBy",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hVx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hVy",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "redeemTicketSafe",
    "inputs": [
      {
        "name": "selfAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "redeemable",
        "type": "tuple",
        "internalType": "struct HoprChannels.RedeemableTicket",
        "components": [
          {
            "name": "data",
            "type": "tuple",
            "internalType": "struct HoprChannels.TicketData",
            "components": [
              {
                "name": "channelId",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "amount",
                "type": "uint96",
                "internalType": "HoprChannels.Balance"
              },
              {
                "name": "ticketIndex",
                "type": "uint48",
                "internalType": "HoprChannels.TicketIndex"
              },
              {
                "name": "indexOffset",
                "type": "uint32",
                "internalType": "HoprChannels.TicketIndexOffset"
              },
              {
                "name": "epoch",
                "type": "uint24",
                "internalType": "HoprChannels.ChannelEpoch"
              },
              {
                "name": "winProb",
                "type": "uint56",
                "internalType": "HoprChannels.WinProb"
              }
            ]
          },
          {
            "name": "signature",
            "type": "tuple",
            "internalType": "struct HoprCrypto.CompactSignature",
            "components": [
              {
                "name": "r",
                "type": "bytes32",
                "internalType": "bytes32"
              },
              {
                "name": "vs",
                "type": "bytes32",
                "internalType": "bytes32"
              }
            ]
          },
          {
            "name": "porSecret",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      },
      {
        "name": "params",
        "type": "tuple",
        "internalType": "struct HoprCrypto.VRFParameters",
        "components": [
          {
            "name": "vx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "vy",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "s",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "h",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "sBx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "sBy",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hVx",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hVy",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "token",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IERC20"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "tokensReceived",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "from",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "userData",
        "type": "bytes",
        "internalType": "bytes"
      },
      {
        "name": "",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateDomainSeparator",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateLedgerDomainSeparator",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "ChannelBalanceDecreased",
    "inputs": [
      {
        "name": "channelId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "newBalance",
        "type": "uint96",
        "indexed": false,
        "internalType": "HoprChannels.Balance"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ChannelBalanceIncreased",
    "inputs": [
      {
        "name": "channelId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "newBalance",
        "type": "uint96",
        "indexed": false,
        "internalType": "HoprChannels.Balance"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ChannelClosed",
    "inputs": [
      {
        "name": "channelId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ChannelOpened",
    "inputs": [
      {
        "name": "source",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "destination",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "DomainSeparatorUpdated",
    "inputs": [
      {
        "name": "domainSeparator",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "LedgerDomainSeparatorUpdated",
    "inputs": [
      {
        "name": "ledgerDomainSeparator",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OutgoingChannelClosureInitiated",
    "inputs": [
      {
        "name": "channelId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "closureTime",
        "type": "uint32",
        "indexed": false,
        "internalType": "HoprChannels.Timestamp"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "TicketRedeemed",
    "inputs": [
      {
        "name": "channelId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "newTicketIndex",
        "type": "uint48",
        "indexed": false,
        "internalType": "HoprChannels.TicketIndex"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "AlreadyInitialized",
    "inputs": []
  },
  {
    "type": "error",
    "name": "BalanceExceedsGlobalPerChannelAllowance",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ContractNotResponsible",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InsufficientChannelBalance",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidAggregatedTicketInterval",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidBalance",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidCurvePoint",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidFieldElement",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidNoticePeriod",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidPointWitness",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidSafeAddress",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidTicketSignature",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidTokenRecipient",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidTokensReceivedUsage",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidVRFProof",
    "inputs": []
  },
  {
    "type": "error",
    "name": "MultiSigUninitialized",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NoticePeriodNotDue",
    "inputs": []
  },
  {
    "type": "error",
    "name": "SourceEqualsDestination",
    "inputs": []
  },
  {
    "type": "error",
    "name": "TicketIsNotAWin",
    "inputs": []
  },
  {
    "type": "error",
    "name": "TokenTransferFailed",
    "inputs": []
  },
  {
    "type": "error",
    "name": "WrongChannelState",
    "inputs": [
      {
        "name": "reason",
        "type": "string",
        "internalType": "string"
      }
    ]
  },
  {
    "type": "error",
    "name": "WrongToken",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ZeroAddress",
    "inputs": [
      {
        "name": "reason",
        "type": "string",
        "internalType": "string"
      }
    ]
  }
]

Structs§

AlreadyInitialized
Custom error with signature AlreadyInitialized() and selector 0x0dc149f0.
Balance
BalanceExceedsGlobalPerChannelAllowance
Custom error with signature BalanceExceedsGlobalPerChannelAllowance() and selector 0xa4f3bbe4.
ChannelBalanceDecreased
Event with signature ChannelBalanceDecreased(bytes32,uint96) and selector 0x22e2a422a8860656a3a33cfa1daf771e76798ce5649747957235025de12e0b24.
ChannelBalanceIncreased
Event with signature ChannelBalanceIncreased(bytes32,uint96) and selector 0x5fa17246d3a5d68d42baa94cde33042180b783a399c02bf63ac2076e0f708738.
ChannelClosed
Event with signature ChannelClosed(bytes32) and selector 0xceeab2eef998c17fe96f30f83fbf3c55fc5047f6e40c55a0cf72d236e9d2ba72.
ChannelEpoch
ChannelOpened
Event with signature ChannelOpened(address,address) and selector 0xdd90f938230335e59dc925c57ecb0e27a28c2d87356e31f00cd5554abd6c1b2d.
ChannelStatus
ContractNotResponsible
Custom error with signature ContractNotResponsible() and selector 0xacd5a823.
DomainSeparatorUpdated
Event with signature DomainSeparatorUpdated(bytes32) and selector 0x771f5240ae5fd8a7640d3fb82fa70aab2fb1dbf35f2ef464f8509946717664c5.
ERC777_HOOK_FUND_CHANNEL_MULTI_SIZECall
Function with signature ERC777_HOOK_FUND_CHANNEL_MULTI_SIZE() and selector 0x78d8016d.
ERC777_HOOK_FUND_CHANNEL_MULTI_SIZEReturn
Container type for the return parameters of the ERC777_HOOK_FUND_CHANNEL_MULTI_SIZE() function.
ERC777_HOOK_FUND_CHANNEL_SIZECall
Function with signature ERC777_HOOK_FUND_CHANNEL_SIZE() and selector 0x44dae6f8.
ERC777_HOOK_FUND_CHANNEL_SIZEReturn
Container type for the return parameters of the ERC777_HOOK_FUND_CHANNEL_SIZE() function.
HoprChannelsInstance
A HoprChannels instance.
InsufficientChannelBalance
Custom error with signature InsufficientChannelBalance() and selector 0xb147636c.
InvalidAggregatedTicketInterval
Custom error with signature InvalidAggregatedTicketInterval() and selector 0xd0dc3c1e.
InvalidBalance
Custom error with signature InvalidBalance() and selector 0xc52e3eff.
InvalidCurvePoint
Custom error with signature InvalidCurvePoint() and selector 0x72454a82.
InvalidFieldElement
Custom error with signature InvalidFieldElement() and selector 0x3ae4ed6b.
InvalidNoticePeriod
Custom error with signature InvalidNoticePeriod() and selector 0xf9ee9107.
InvalidPointWitness
Custom error with signature InvalidPointWitness() and selector 0xedfdcd98.
InvalidSafeAddress
Custom error with signature InvalidSafeAddress() and selector 0x8e9d7c5e.
InvalidTicketSignature
Custom error with signature InvalidTicketSignature() and selector 0xcddd5356.
InvalidTokenRecipient
Custom error with signature InvalidTokenRecipient() and selector 0xb9c49108.
InvalidTokensReceivedUsage
Custom error with signature InvalidTokensReceivedUsage() and selector 0x69ee6f28.
InvalidVRFProof
Custom error with signature InvalidVRFProof() and selector 0x95fdbdb8.
LEDGER_VERSIONCall
Function with signature LEDGER_VERSION() and selector 0xddad1902.
LEDGER_VERSIONReturn
Container type for the return parameters of the LEDGER_VERSION() function.
LedgerDomainSeparatorUpdated
Event with signature LedgerDomainSeparatorUpdated(bytes32) and selector 0xa43fad83920fd09445855e854e73c9c532e17402c9ceb09993a2392843a5bdb9.
MAX_USED_BALANCECall
Function with signature MAX_USED_BALANCE() and selector 0x5d2f07c5.
MAX_USED_BALANCEReturn
Container type for the return parameters of the MAX_USED_BALANCE() function.
MIN_USED_BALANCECall
Function with signature MIN_USED_BALANCE() and selector 0x29392e32.
MIN_USED_BALANCEReturn
Container type for the return parameters of the MIN_USED_BALANCE() function.
MultiSigUninitialized
Custom error with signature MultiSigUninitialized() and selector 0x454a20c8.
NoticePeriodNotDue
Custom error with signature NoticePeriodNotDue() and selector 0x7164032a.
OutgoingChannelClosureInitiated
Event with signature OutgoingChannelClosureInitiated(bytes32,uint32) and selector 0x07b5c950597fc3bed92e2ad37fa84f701655acb372982e486f5fad3607f04a5c.
RedeemableTicket
SourceEqualsDestination
Custom error with signature SourceEqualsDestination() and selector 0x97a3aed2.
TOKENS_RECIPIENT_INTERFACE_HASHCall
Function with signature TOKENS_RECIPIENT_INTERFACE_HASH() and selector 0x72581cc0.
TOKENS_RECIPIENT_INTERFACE_HASHReturn
Container type for the return parameters of the TOKENS_RECIPIENT_INTERFACE_HASH() function.
TicketData
TicketIndex
TicketIndexOffset
TicketIsNotAWin
Custom error with signature TicketIsNotAWin() and selector 0xee835c89.
TicketRedeemed
Event with signature TicketRedeemed(bytes32,uint48) and selector 0x7165e2ebc7ce35cc98cb7666f9945b3617f3f36326b76d18937ba5fecf18739a.
Timestamp
TokenTransferFailed
Custom error with signature TokenTransferFailed() and selector 0x045c4b02.
VERSIONCall
Function with signature VERSION() and selector 0xffa1ad74.
VERSIONReturn
Container type for the return parameters of the VERSION() function.
WinProb
WrongChannelState
Custom error with signature WrongChannelState(string) and selector 0x499463c1.
WrongToken
Custom error with signature WrongToken() and selector 0xa0f3feea.
ZeroAddress
Custom error with signature ZeroAddress(string) and selector 0xeac0d389.
_currentBlockTimestampCall
Function with signature _currentBlockTimestamp() and selector 0xb920deed.
_currentBlockTimestampReturn
Container type for the return parameters of the _currentBlockTimestamp() function.
_getChannelIdCall
Function with signature _getChannelId(address,address) and selector 0xbe9babdc.
_getChannelIdReturn
Container type for the return parameters of the _getChannelId(address,address) function.
_getTicketHashCall
Function with signature _getTicketHash(((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256)) and selector 0x24086cc2.
_getTicketHashReturn
Container type for the return parameters of the _getTicketHash(((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256)) function.
_isWinningTicketCall
Function with signature _isWinningTicket(bytes32,((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256),(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) and selector 0x8c3710c9.
_isWinningTicketReturn
Container type for the return parameters of the _isWinningTicket(bytes32,((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256),(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) function.
canImplementInterfaceForAddressCall
Function with signature canImplementInterfaceForAddress(bytes32,address) and selector 0x249cb3fa.
canImplementInterfaceForAddressReturn
Container type for the return parameters of the canImplementInterfaceForAddress(bytes32,address) function.
channelsCall
Function with signature channels(bytes32) and selector 0x7a7ebd7b.
channelsReturn
Container type for the return parameters of the channels(bytes32) function.
closeIncomingChannelCall
Function with signature closeIncomingChannel(address) and selector 0x1a7ffe7a.
closeIncomingChannelReturn
Container type for the return parameters of the closeIncomingChannel(address) function.
closeIncomingChannelSafeCall
Function with signature closeIncomingChannelSafe(address,address) and selector 0x54a2edf5.
closeIncomingChannelSafeReturn
Container type for the return parameters of the closeIncomingChannelSafe(address,address) function.
constructorCall
Constructor`.
domainSeparatorCall
Function with signature domainSeparator() and selector 0xf698da25.
domainSeparatorReturn
Container type for the return parameters of the domainSeparator() function.
finalizeOutgoingChannelClosureCall
Function with signature finalizeOutgoingChannelClosure(address) and selector 0x23cb3ac0.
finalizeOutgoingChannelClosureReturn
Container type for the return parameters of the finalizeOutgoingChannelClosure(address) function.
finalizeOutgoingChannelClosureSafeCall
Function with signature finalizeOutgoingChannelClosureSafe(address,address) and selector 0x651514bf.
finalizeOutgoingChannelClosureSafeReturn
Container type for the return parameters of the finalizeOutgoingChannelClosureSafe(address,address) function.
fundChannelCall
Function with signature fundChannel(address,uint96) and selector 0xfc55309a.
fundChannelReturn
Container type for the return parameters of the fundChannel(address,uint96) function.
fundChannelSafeCall
Function with signature fundChannelSafe(address,address,uint96) and selector 0x0abec58f.
fundChannelSafeReturn
Container type for the return parameters of the fundChannelSafe(address,address,uint96) function.
initiateOutgoingChannelClosureCall
Function with signature initiateOutgoingChannelClosure(address) and selector 0x7c8e28da.
initiateOutgoingChannelClosureReturn
Container type for the return parameters of the initiateOutgoingChannelClosure(address) function.
initiateOutgoingChannelClosureSafeCall
Function with signature initiateOutgoingChannelClosureSafe(address,address) and selector 0xbda65f45.
initiateOutgoingChannelClosureSafeReturn
Container type for the return parameters of the initiateOutgoingChannelClosureSafe(address,address) function.
ledgerDomainSeparatorCall
Function with signature ledgerDomainSeparator() and selector 0xc966c4fe.
ledgerDomainSeparatorReturn
Container type for the return parameters of the ledgerDomainSeparator() function.
multicallCall
Function with signature multicall(bytes[]) and selector 0xac9650d8.
multicallReturn
Container type for the return parameters of the multicall(bytes[]) function.
noticePeriodChannelClosureCall
Function with signature noticePeriodChannelClosure() and selector 0x87352d65.
noticePeriodChannelClosureReturn
Container type for the return parameters of the noticePeriodChannelClosure() function.
redeemTicketCall
Function with signature redeemTicket(((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256),(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) and selector 0xfcb7796f.
redeemTicketReturn
Container type for the return parameters of the redeemTicket(((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256),(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) function.
redeemTicketSafeCall
Function with signature redeemTicketSafe(address,((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256),(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) and selector 0x0cd88d72.
redeemTicketSafeReturn
Container type for the return parameters of the redeemTicketSafe(address,((bytes32,uint96,uint48,uint32,uint24,uint56),(bytes32,bytes32),uint256),(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)) function.
tokenCall
Function with signature token() and selector 0xfc0c546a.
tokenReturn
Container type for the return parameters of the token() function.
tokensReceivedCall
Function with signature tokensReceived(address,address,address,uint256,bytes,bytes) and selector 0x0023de29.
tokensReceivedReturn
Container type for the return parameters of the tokensReceived(address,address,address,uint256,bytes,bytes) function.
updateDomainSeparatorCall
Function with signature updateDomainSeparator() and selector 0x89ccfe89.
updateDomainSeparatorReturn
Container type for the return parameters of the updateDomainSeparator() function.
updateLedgerDomainSeparatorCall
Function with signature updateLedgerDomainSeparator() and selector 0xdc96fd50.
updateLedgerDomainSeparatorReturn
Container type for the return parameters of the updateLedgerDomainSeparator() function.

Enums§

HoprChannelsCalls
Container for all the HoprChannels function calls.
HoprChannelsErrors
Container for all the HoprChannels custom errors.
HoprChannelsEvents
Container for all the HoprChannels events.

Statics§

BYTECODE
The creation / init bytecode of the contract.
DEPLOYED_BYTECODE
The runtime bytecode of the contract, as deployed on the network.

Functions§

deploy
Deploys this contract using the given provider and constructor arguments, if any.
deploy_builder
Creates a RawCallBuilder for deploying this contract using the given provider and constructor arguments, if any.
new
Creates a new wrapper around an on-chain HoprChannels contract instance.