cic-contracts/TransferAuthorization.sol

32 lines
1.2 KiB
Solidity
Raw Normal View History

2020-12-11 07:48:54 +01:00
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
2020-12-11 10:20:56 +01:00
// File-version: 2
2020-12-11 07:48:54 +01:00
2021-01-13 12:05:36 +01:00
interface TransferAuthorization {
2020-12-11 07:48:54 +01:00
event NewRequest(address indexed _sender, address indexed _recipient, address indexed _token, uint256 _value, uint256 _serial);
event NewExecution(uint256 serial);
event NewRejection(uint256 serial);
2021-01-02 08:49:32 +01:00
event TransferFail(uint256 serial);
2020-12-11 07:48:54 +01:00
2021-01-02 08:49:32 +01:00
struct Transaction {
uint256 serial;
address sender;
address recipient;
address token;
uint256 value;
}
2021-01-02 20:21:59 +01:00
function approvers() external view returns (address[] memory);
2021-01-02 08:49:32 +01:00
function count() external view returns (uint256);
function lastSerial() external view returns (uint256);
function nextSerial() external view returns (uint256);
function getSerialAt(uint256 _idx) external view returns (uint256);
function requests(uint256 _serial) external view returns (Transaction memory);
2021-01-02 08:49:32 +01:00
function createRequest(address _recipient, address _token, uint256 _value) external returns (uint256);
function executeRequest(uint256 _serial) external returns (bool);
function rejectRequest(uint256 _serial) external returns (bool);
2020-12-11 07:48:54 +01:00
}