tornado-relayer/abis/mining.abi.json

1078 lines
23 KiB
JSON
Raw Normal View History

2020-09-28 04:28:34 +02:00
[
{
"inputs": [
{
2020-10-14 21:36:34 +02:00
"internalType": "bytes32",
2020-09-28 04:28:34 +02:00
"name": "_rewardSwap",
2020-10-14 21:36:34 +02:00
"type": "bytes32"
2020-09-28 04:28:34 +02:00
},
{
2020-10-14 21:36:34 +02:00
"internalType": "bytes32",
2020-09-28 04:28:34 +02:00
"name": "_governance",
2020-10-14 21:36:34 +02:00
"type": "bytes32"
2020-09-28 04:28:34 +02:00
},
{
2020-10-14 21:36:34 +02:00
"internalType": "bytes32[3]",
2020-09-28 04:28:34 +02:00
"name": "verifiers",
2020-10-14 21:36:34 +02:00
"type": "bytes32[3]"
2020-09-28 04:28:34 +02:00
},
{
"internalType": "bytes32",
"name": "_accountRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_depositRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_withdrawalRoot",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.Rate[]",
2020-09-28 04:28:34 +02:00
"name": "_rates",
"type": "tuple[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "hash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "block",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "DepositData",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "commitment",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "nullifier",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes",
"name": "encryptedAccount",
"type": "bytes"
},
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "NewAccount",
"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": false,
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "RateChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "hash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "block",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "WithdrawalData",
"type": "event"
},
{
"inputs": [],
"name": "ACCOUNT_ROOT_HISTORY_SIZE",
"outputs": [
{
2020-10-14 21:36:34 +02:00
"internalType": "uint256",
2020-09-28 04:28:34 +02:00
"name": "",
2020-10-14 21:36:34 +02:00
"type": "uint256"
2020-09-28 04:28:34 +02:00
}
],
"stateMutability": "view",
"type": "function"
},
{
2020-10-14 21:36:34 +02:00
"inputs": [],
"name": "accountCount",
2020-09-28 04:28:34 +02:00
"outputs": [
{
2020-10-14 21:36:34 +02:00
"internalType": "uint256",
2020-09-28 04:28:34 +02:00
"name": "",
2020-10-14 21:36:34 +02:00
"type": "uint256"
2020-09-28 04:28:34 +02:00
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
2020-10-14 21:36:34 +02:00
"internalType": "bytes32",
2020-09-28 04:28:34 +02:00
"name": "",
2020-10-14 21:36:34 +02:00
"type": "bytes32"
2020-09-28 04:28:34 +02:00
}
],
2020-10-14 21:36:34 +02:00
"name": "accountNullifiers",
2020-09-28 04:28:34 +02:00
"outputs": [
{
2020-10-14 21:36:34 +02:00
"internalType": "bool",
2020-09-28 04:28:34 +02:00
"name": "",
2020-10-14 21:36:34 +02:00
"type": "bool"
2020-09-28 04:28:34 +02:00
}
],
"stateMutability": "view",
"type": "function"
},
{
2020-10-14 21:36:34 +02:00
"inputs": [
2020-09-28 04:28:34 +02:00
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
2020-10-14 21:36:34 +02:00
"name": "accountRoots",
2020-09-28 04:28:34 +02:00
"outputs": [
{
2020-10-14 21:36:34 +02:00
"internalType": "bytes32",
2020-09-28 04:28:34 +02:00
"name": "",
2020-10-14 21:36:34 +02:00
"type": "bytes32"
2020-09-28 04:28:34 +02:00
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "depositRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "governance",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "previousDepositRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "previousWithdrawalRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "rates",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
2020-10-14 21:36:34 +02:00
{
"inputs": [
{
"internalType": "bytes32",
"name": "node",
"type": "bytes32"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
2020-09-28 04:28:34 +02:00
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "rewardNullifiers",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rewardSwap",
"outputs": [
{
"internalType": "contract IRewardSwap",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rewardVerifier",
"outputs": [
{
"internalType": "contract IVerifier",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "treeUpdateVerifier",
"outputs": [
{
"internalType": "contract IVerifier",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdrawVerifier",
"outputs": [
{
"internalType": "contract IVerifier",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdrawalRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes[]",
"name": "_rewardArgs",
"type": "bytes[]"
}
],
"name": "batchReward",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "_proof",
"type": "bytes"
},
{
"components": [
{
"internalType": "uint256",
"name": "rate",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"internalType": "bytes32",
"name": "rewardNullifier",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "extDataHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "depositRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "withdrawalRoot",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "bytes",
"name": "encryptedAccount",
"type": "bytes"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.RewardExtData",
2020-09-28 04:28:34 +02:00
"name": "extData",
"type": "tuple"
},
{
"components": [
{
"internalType": "bytes32",
"name": "inputRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "inputNullifierHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "outputRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "outputPathIndices",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "outputCommitment",
"type": "bytes32"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.AccountUpdate",
2020-09-28 04:28:34 +02:00
"name": "account",
"type": "tuple"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.RewardArgs",
2020-09-28 04:28:34 +02:00
"name": "_args",
"type": "tuple"
},
{
"internalType": "bytes",
"name": "_treeUpdateProof",
"type": "bytes"
},
{
"components": [
{
"internalType": "bytes32",
"name": "oldRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "newRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "leaf",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "pathIndices",
"type": "uint256"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.TreeUpdateArgs",
2020-09-28 04:28:34 +02:00
"name": "_treeUpdateArgs",
"type": "tuple"
}
],
"name": "reward",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "_proof",
"type": "bytes"
},
{
"components": [
{
"internalType": "uint256",
"name": "rate",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"internalType": "bytes32",
"name": "rewardNullifier",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "extDataHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "depositRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "withdrawalRoot",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "bytes",
"name": "encryptedAccount",
"type": "bytes"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.RewardExtData",
2020-09-28 04:28:34 +02:00
"name": "extData",
"type": "tuple"
},
{
"components": [
{
"internalType": "bytes32",
"name": "inputRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "inputNullifierHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "outputRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "outputPathIndices",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "outputCommitment",
"type": "bytes32"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.AccountUpdate",
2020-09-28 04:28:34 +02:00
"name": "account",
"type": "tuple"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.RewardArgs",
2020-09-28 04:28:34 +02:00
"name": "_args",
"type": "tuple"
}
],
"name": "reward",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "_proof",
"type": "bytes"
},
{
"components": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "extDataHash",
"type": "bytes32"
},
{
"components": [
2020-10-14 21:36:34 +02:00
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
2020-09-28 04:28:34 +02:00
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "bytes",
"name": "encryptedAccount",
"type": "bytes"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.WithdrawExtData",
2020-09-28 04:28:34 +02:00
"name": "extData",
"type": "tuple"
},
{
"components": [
{
"internalType": "bytes32",
"name": "inputRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "inputNullifierHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "outputRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "outputPathIndices",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "outputCommitment",
"type": "bytes32"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.AccountUpdate",
2020-09-28 04:28:34 +02:00
"name": "account",
"type": "tuple"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.WithdrawArgs",
2020-09-28 04:28:34 +02:00
"name": "_args",
"type": "tuple"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "_proof",
"type": "bytes"
},
{
"components": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "extDataHash",
"type": "bytes32"
},
{
"components": [
2020-10-14 21:36:34 +02:00
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
2020-09-28 04:28:34 +02:00
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "bytes",
"name": "encryptedAccount",
"type": "bytes"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.WithdrawExtData",
2020-09-28 04:28:34 +02:00
"name": "extData",
"type": "tuple"
},
{
"components": [
{
"internalType": "bytes32",
"name": "inputRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "inputNullifierHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "outputRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "outputPathIndices",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "outputCommitment",
"type": "bytes32"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.AccountUpdate",
2020-09-28 04:28:34 +02:00
"name": "account",
"type": "tuple"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.WithdrawArgs",
2020-09-28 04:28:34 +02:00
"name": "_args",
"type": "tuple"
},
{
"internalType": "bytes",
"name": "_treeUpdateProof",
"type": "bytes"
},
{
"components": [
{
"internalType": "bytes32",
"name": "oldRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "newRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "leaf",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "pathIndices",
"type": "uint256"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.TreeUpdateArgs",
2020-09-28 04:28:34 +02:00
"name": "_treeUpdateArgs",
"type": "tuple"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_currentDepositRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_newDepositRoot",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"internalType": "bytes32",
"name": "hash",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "block",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.TreeLeaf[]",
2020-09-28 04:28:34 +02:00
"name": "_deposits",
"type": "tuple[]"
},
{
"internalType": "bytes32",
"name": "_currentWithdrawalRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_newWithdrawalRoot",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"internalType": "bytes32",
"name": "hash",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "block",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.TreeLeaf[]",
2020-09-28 04:28:34 +02:00
"name": "_withdrawals",
"type": "tuple[]"
}
],
"name": "updateRoots",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "instance",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
2020-10-14 21:36:34 +02:00
"internalType": "struct Miner.Rate[]",
2020-09-28 04:28:34 +02:00
"name": "_rates",
"type": "tuple[]"
}
],
"name": "setRates",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newWeight",
"type": "uint256"
}
],
"name": "setPoolWeight",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_root",
"type": "bytes32"
2020-10-14 21:36:34 +02:00
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
2020-09-28 04:28:34 +02:00
}
],
"name": "isKnownAccountRoot",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getLastAccountRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
]