tornado-relayer/abis/mining.abi.json

1086 lines
24 KiB
JSON
Raw Normal View History

2020-09-28 04:28:34 +02:00
[
{
"inputs": [
{
"internalType": "contract IRewardSwap",
"name": "_rewardSwap",
"type": "address"
},
{
"internalType": "address",
"name": "_governance",
"type": "address"
},
{
"internalType": "contract IVerifier[]",
"name": "verifiers",
"type": "address[]"
},
{
"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"
}
],
"internalType": "struct Farm.Rate[]",
"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": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "accountNullifiers",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "accountRoots",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currentAccountIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currentAccountRootIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"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"
},
{
"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"
}
],
"internalType": "struct Farm.RewardExtData",
"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"
}
],
"internalType": "struct Farm.AccountUpdate",
"name": "account",
"type": "tuple"
}
],
"internalType": "struct Farm.RewardArgs",
"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"
}
],
"internalType": "struct Farm.TreeUpdateArgs",
"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"
}
],
"internalType": "struct Farm.RewardExtData",
"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"
}
],
"internalType": "struct Farm.AccountUpdate",
"name": "account",
"type": "tuple"
}
],
"internalType": "struct Farm.RewardArgs",
"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": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "extDataHash",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "bytes",
"name": "encryptedAccount",
"type": "bytes"
}
],
"internalType": "struct Farm.WithdrawExtData",
"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"
}
],
"internalType": "struct Farm.AccountUpdate",
"name": "account",
"type": "tuple"
}
],
"internalType": "struct Farm.WithdrawArgs",
"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": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "extDataHash",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "bytes",
"name": "encryptedAccount",
"type": "bytes"
}
],
"internalType": "struct Farm.WithdrawExtData",
"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"
}
],
"internalType": "struct Farm.AccountUpdate",
"name": "account",
"type": "tuple"
}
],
"internalType": "struct Farm.WithdrawArgs",
"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"
}
],
"internalType": "struct Farm.TreeUpdateArgs",
"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"
}
],
"internalType": "struct Farm.TreeLeaf[]",
"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"
}
],
"internalType": "struct Farm.TreeLeaf[]",
"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"
}
],
"internalType": "struct Farm.Rate[]",
"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": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "keccak252",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_root",
"type": "bytes32"
}
],
"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"
}
]