编译器
0.8.20+commit.a1b79de6
文件 1 的 9:AbstractDAO.sol
pragma solidity =0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
abstract contract AbstractDAO is Ownable {
address public _operator;
uint256 public _threshold;
uint256 public _queueOrder;
uint256 public _votingInProgress;
uint256 public _votesSent;
uint256 public _requiredVoteThreshold;
uint256 public _authorizedAddressesCount;
uint256 internal _bps;
mapping(uint256 => address) public _authorizedAddresses;
mapping(address => address) internal _submittedVotesTable;
mapping(address => uint256) internal _revokeVotesTable;
mapping(address => uint256) internal _addVotesCountTable;
mapping(uint256 => uint256) internal _revokeVotesCountTable;
address[] internal _addVotingProposals;
uint256[] internal _revokeVotingProposals;
mapping(uint256 => bool) internal _nonces;
uint256 internal _burnNonce;
uint256 internal _thresholdLevel;
function initAuthorizedAddresses(address authorized1, address authorized2, address operator)
external
onlyOwner
{
require(
_authorizedAddresses[1] == address(0) &&
_authorizedAddresses[2] == address(0),
"Authorized addresses already set"
);
_authorizedAddresses[1] = authorized1;
_authorizedAddresses[2] = authorized2;
_submittedVotesTable[authorized1] = authorized1;
_submittedVotesTable[authorized2] = authorized2;
_operator = operator;
}
function voteAdd(uint256 authorizedIndex, address votingAddress) external {
address winningAddress = address(0);
require(
msg.sender == _authorizedAddresses[authorizedIndex],
"Must be sent from authorized sender"
);
require(
_votingInProgress == 0 || _votingInProgress == 1,
"Another voting is ongoing"
);
require(
_submittedVotesTable[msg.sender] == msg.sender,
"One vote per authorized address only"
);
for (uint256 i = 0; i < _authorizedAddressesCount; i++) {
require(_authorizedAddresses[i] != votingAddress, 'voting address already authorized');
}
if (_votingInProgress == 0) {
_votingInProgress = 1;
}
_submittedVotesTable[msg.sender] = votingAddress;
_votesSent += 1;
winningAddress = _addVotingProcess();
if (msg.sender == winningAddress) {
_addVotingCleanup();
return;
}
if (_operator == winningAddress) {
_addVotingCleanup();
return;
}
if (address(0) != winningAddress) {
_addAuthorized(winningAddress);
_addVotingCleanup();
return;
}
if (address(0) == winningAddress && _votesSent == _authorizedAddressesCount) {
_addVotingCleanup();
return;
}
}
function setOperator(uint256 authorizedIndex, address newOperator) external {
require(
msg.sender == _authorizedAddresses[authorizedIndex],
"Must be sent from authorized sender"
);
require(_operator != newOperator, "operator already set");
_operator = newOperator;
}
function voteRevoke(uint256 authorizedIndex, uint256 revokeAddressIndex)
external
{
uint256 winningAddressIndex = 0;
require(
msg.sender == _authorizedAddresses[authorizedIndex],
"Must be sent from authorized sender"
);
require(
_votingInProgress == 0 || _votingInProgress == 2,
"Another voting is ongoing"
);
require(
_submittedVotesTable[msg.sender] == msg.sender,
"One vote per authorized address only"
);
require(
_authorizedAddressesCount > 2,
"you mad?"
);
for (uint256 i = 0; i < _authorizedAddressesCount; i++) {
require(_authorizedAddresses[revokeAddressIndex] != address(0), 'invalid revoke index');
}
if (_votingInProgress == 0) {
_votingInProgress = 2;
}
_revokeVotesTable[msg.sender] = revokeAddressIndex;
_submittedVotesTable[msg.sender] = address(0);
_votesSent += 1;
winningAddressIndex = _revokeVotingProcess();
if (winningAddressIndex > 0) {
_revokeAuthorized(winningAddressIndex);
_revokeVotingCleanup();
}
}
function isNonceRealised(uint256 _nonce) external view returns (bool) {
return _nonces[_nonce];
}
function getThreshold() public view returns (uint256) {
return _threshold;
}
function approveThreshold() external {
require(
msg.sender == _authorizedAddresses[_queueOrder],
"Must be sent from authorized sender in the correct order"
);
_threshold += _thresholdLevel;
_queueOrder += 1;
if (_authorizedAddressesCount < _queueOrder) {
_queueOrder = 1;
}
}
function _addAuthorized(address _toAdd) internal {
_authorizedAddresses[_authorizedAddressesCount + 1] = _toAdd;
_authorizedAddressesCount += 1;
_requiredVoteThreshold = _authorizedAddressesCount * _bps;
}
function _revokeAuthorized(uint256 _toRemove) internal {
delete _authorizedAddresses[_toRemove];
for (uint256 i = _toRemove; i <= _authorizedAddressesCount; i++) {
_authorizedAddresses[i] = _authorizedAddresses[i + 1];
}
_authorizedAddressesCount -= 1;
_requiredVoteThreshold = _authorizedAddressesCount * _bps;
_queueOrder = 1;
}
function _addVotingCleanup() internal {
for (uint256 i = 0; i < _addVotingProposals.length; i++) {
delete _addVotesCountTable[_addVotingProposals[i]];
}
for (uint256 i = 1; i <= _authorizedAddressesCount; i++) {
_submittedVotesTable[_authorizedAddresses[i]] = _authorizedAddresses[i];
}
delete _addVotingProposals;
_votesSent = 0;
_votingInProgress = 0;
}
function _revokeVotingCleanup() internal {
for (uint256 i = 0; i <= _authorizedAddressesCount; i++) {
delete _revokeVotesCountTable[i];
}
for (uint256 i = 1; i <= _authorizedAddressesCount; i++) {
delete _revokeVotesTable[_authorizedAddresses[i]];
_submittedVotesTable[_authorizedAddresses[i]] = _authorizedAddresses[i];
}
delete _revokeVotingProposals;
_votesSent = 0;
_votingInProgress = 0;
}
function _addVotingProcess() internal returns (address) {
address votedAddress = address(0);
address winningAddress = address(0);
uint256 highestScore = 0;
for (uint256 i = 1; i <= _authorizedAddressesCount; i++) {
votedAddress = _submittedVotesTable[_authorizedAddresses[i]];
if (votedAddress == _authorizedAddresses[i] || address(0) == votedAddress) {
continue;
}
_addVotesCountTable[votedAddress] += 1;
_addVotingProposals.push(votedAddress);
delete _submittedVotesTable[_authorizedAddresses[i]];
}
for (uint256 j = 0; j < _addVotingProposals.length; j++) {
if (highestScore < _addVotesCountTable[_addVotingProposals[j]]) {
highestScore = _addVotesCountTable[_addVotingProposals[j]];
winningAddress = _addVotingProposals[j];
}
}
if (highestScore * 10_000 >= _requiredVoteThreshold) {
return winningAddress;
}
uint256 finalityCheck = (((_authorizedAddressesCount - _votesSent) * 10_000) + (highestScore * 10_000));
if (finalityCheck < _requiredVoteThreshold) {
return msg.sender;
}
return address(0);
}
function _revokeVotingProcess() internal returns (uint256) {
uint256 highestScore = 0;
uint256 votedAddressIndex = 0;
uint256 winningAddressIndex = 0;
for (uint256 i = 1; i <= _authorizedAddressesCount; i++) {
votedAddressIndex = _revokeVotesTable[_authorizedAddresses[i]];
if (_authorizedAddresses[votedAddressIndex] == address(0)) {
continue;
}
_revokeVotesCountTable[votedAddressIndex] += 1;
_revokeVotingProposals.push(votedAddressIndex);
delete _revokeVotesTable[_authorizedAddresses[i]];
}
for (uint256 j = 0; j < _revokeVotingProposals.length; j++) {
if (highestScore < _revokeVotesCountTable[_revokeVotingProposals[j]]) {
highestScore = _revokeVotesCountTable[_revokeVotingProposals[j]];
winningAddressIndex = _revokeVotingProposals[j];
}
}
if (highestScore * 10_000 >= _requiredVoteThreshold) {
return winningAddressIndex;
}
uint256 finalityCheck = (((_authorizedAddressesCount - _votesSent) * 10_000) + (highestScore * 10_000));
if (finalityCheck <= _requiredVoteThreshold || _votesSent == _authorizedAddressesCount) {
_revokeVotingCleanup();
}
return 0;
}
}
文件 2 的 9:Context.sol
pragma solidity ^0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
文件 3 的 9:ECDSA.sol
pragma solidity ^0.8.20;
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
error ECDSAInvalidSignature();
error ECDSAInvalidSignatureLength(uint256 length);
error ECDSAInvalidSignatureS(bytes32 s);
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError, bytes32) {
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return;
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}
文件 4 的 9:ERC20.sol
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual returns (string memory) {
return _name;
}
function symbol() public view virtual returns (string memory) {
return _symbol;
}
function decimals() public view virtual returns (uint8) {
return 18;
}
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
_totalSupply -= value;
}
} else {
unchecked {
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
文件 5 的 9:IERC20.sol
pragma solidity ^0.8.20;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
文件 6 的 9:IERC20Metadata.sol
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
文件 7 的 9:Ownable.sol
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
error OwnableUnauthorizedAccount(address account);
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 8 的 9:draft-IERC6093.sol
pragma solidity ^0.8.20;
interface IERC20Errors {
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
error ERC20InvalidSender(address sender);
error ERC20InvalidReceiver(address receiver);
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
error ERC20InvalidApprover(address approver);
error ERC20InvalidSpender(address spender);
}
interface IERC721Errors {
error ERC721InvalidOwner(address owner);
error ERC721NonexistentToken(uint256 tokenId);
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
error ERC721InvalidSender(address sender);
error ERC721InvalidReceiver(address receiver);
error ERC721InsufficientApproval(address operator, uint256 tokenId);
error ERC721InvalidApprover(address approver);
error ERC721InvalidOperator(address operator);
}
interface IERC1155Errors {
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
error ERC1155InvalidSender(address sender);
error ERC1155InvalidReceiver(address receiver);
error ERC1155MissingApprovalForAll(address operator, address owner);
error ERC1155InvalidApprover(address approver);
error ERC1155InvalidOperator(address operator);
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
文件 9 的 9:wLYX.sol
pragma solidity =0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { AbstractDAO } from "./AbstractDAO.sol";
contract WrappedLYX is ERC20, AbstractDAO {
event Unwrapped(
address indexed recipient,
uint256 indexed amount,
uint256 indexed nonce
);
uint256 public _chainID;
address internal _contractAddress;
constructor(uint256 thresholdLevel) ERC20("Wrapped LYX", "wLYX") Ownable(msg.sender) {
_thresholdLevel = thresholdLevel;
_threshold = thresholdLevel;
_operator = owner();
_queueOrder = 1;
_votesSent = 0;
_votingInProgress = 0;
_bps = 6666;
_requiredVoteThreshold = 2 * _bps;
_authorizedAddressesCount = 2;
uint256 id;
assembly {
id := chainid()
}
_chainID = id;
_contractAddress = address(this);
}
function mint(
uint256 value,
uint256 bridgeNonce,
address recipient,
uint8 v,
bytes32 r,
bytes32 s
) external {
require(_nonces[bridgeNonce] == false, "Nonce already used");
require(
ECDSA.recover(
keccak256(abi.encodePacked(value, recipient, bridgeNonce, _chainID, _contractAddress)),
v,
r,
s
) == _operator,
"Signature verification failure"
);
require(_threshold >= value, "Value exceeds current threshold");
_nonces[bridgeNonce] = true;
_mint(recipient, value);
_threshold -= value;
}
function burn(uint256 value) external {
burnFor(msg.sender, value);
}
function burnFor(address recipient, uint256 value) public {
_burn(msg.sender, value);
emit Unwrapped(recipient, value, _burnNonce++);
}
}
{
"compilationTarget": {
"contracts/wLYX.sol": "WrappedLYX"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"uint256","name":"thresholdLevel","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"Unwrapped","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_authorizedAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_authorizedAddressesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_chainID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_queueOrder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_requiredVoteThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_threshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_votesSent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_votingInProgress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approveThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"authorized1","type":"address"},{"internalType":"address","name":"authorized2","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"initAuthorizedAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"isNonceRealised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"bridgeNonce","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"authorizedIndex","type":"uint256"},{"internalType":"address","name":"newOperator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"authorizedIndex","type":"uint256"},{"internalType":"address","name":"votingAddress","type":"address"}],"name":"voteAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"authorizedIndex","type":"uint256"},{"internalType":"uint256","name":"revokeAddressIndex","type":"uint256"}],"name":"voteRevoke","outputs":[],"stateMutability":"nonpayable","type":"function"}]