diff --git a/child/.eslintrc.js b/child/.eslintrc.js index 2fd9e26..42104d6 100644 --- a/child/.eslintrc.js +++ b/child/.eslintrc.js @@ -3,6 +3,7 @@ module.exports = { plugins: [ '@typescript-eslint', 'unicorn', + 'json', ], extends: 'eslint:recommended', parserOptions: { @@ -21,6 +22,7 @@ module.exports = { u8: true, }, rules: { + 'indent': ['error', 2], 'space-before-function-paren': ['error', 'never'], semi: ['error', 'never'], 'no-underscore-dangle': 0, @@ -37,7 +39,13 @@ module.exports = { files: ['*.ts', '*.tsx'], rules: { '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], - } - } - ] + }, + }, + { + files: ['*.json'], + rules: { + 'unicorn/filename-case': ['error', { 'case': 'pascalCase' }], + }, + }, + ], } diff --git a/child/abis/ChildERC20.json b/child/abis/ChildERC20.json deleted file mode 100644 index 57cab34..0000000 --- a/child/abis/ChildERC20.json +++ /dev/null @@ -1,917 +0,0 @@ -[ - { - "inputs":[ - { - "internalType":"address", - "name":"_owner", - "type":"address" - }, - { - "internalType":"address", - "name":"_token", - "type":"address" - }, - { - "internalType":"string", - "name":"_name", - "type":"string" - }, - { - "internalType":"string", - "name":"_symbol", - "type":"string" - }, - { - "internalType":"uint8", - "name":"_decimals", - "type":"uint8" - } - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"constructor" - }, - { - "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":"token", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"from", - "type":"address" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"amount", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"input1", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"output1", - "type":"uint256" - } - ], - "name":"Deposit", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"address", - "name":"token", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"from", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"to", - "type":"address" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"amount", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"input1", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"input2", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"output1", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"output2", - "type":"uint256" - } - ], - "name":"LogFeeTransfer", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"address", - "name":"token", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"from", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"to", - "type":"address" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"amount", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"input1", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"input2", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"output1", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"output2", - "type":"uint256" - } - ], - "name":"LogTransfer", - "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":"token", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"from", - "type":"address" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"amount", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"input1", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"output1", - "type":"uint256" - } - ], - "name":"Withdraw", - "type":"event" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"CHAINID", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"EIP712_DOMAIN_HASH", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"EIP712_DOMAIN_SCHEMA_HASH", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"EIP712_TOKEN_TRANSFER_ORDER_SCHEMA_HASH", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - { - "internalType":"address", - "name":"owner", - "type":"address" - } - ], - "name":"balanceOf", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"decimals", - "outputs":[ - { - "internalType":"uint8", - "name":"", - "type":"uint8" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"spender", - "type":"address" - }, - { - "internalType":"uint256", - "name":"subtractedValue", - "type":"uint256" - } - ], - "name":"decreaseAllowance", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":true, - "inputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "name":"disabledHashes", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - { - "internalType":"bytes32", - "name":"hash", - "type":"bytes32" - }, - { - "internalType":"bytes", - "name":"sig", - "type":"bytes" - } - ], - "name":"ecrecovery", - "outputs":[ - { - "internalType":"address", - "name":"result", - "type":"address" - } - ], - "payable":false, - "stateMutability":"pure", - "type":"function" - }, - { - "constant":true, - "inputs":[ - { - "internalType":"address", - "name":"spender", - "type":"address" - }, - { - "internalType":"uint256", - "name":"tokenIdOrAmount", - "type":"uint256" - }, - { - "internalType":"bytes32", - "name":"data", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"expiration", - "type":"uint256" - } - ], - "name":"getTokenTransferOrderHash", - "outputs":[ - { - "internalType":"bytes32", - "name":"orderHash", - "type":"bytes32" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"spender", - "type":"address" - }, - { - "internalType":"uint256", - "name":"addedValue", - "type":"uint256" - } - ], - "name":"increaseAllowance", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"isOwner", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"name", - "outputs":[ - { - "internalType":"string", - "name":"", - "type":"string" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"networkId", - "outputs":[ - { - "internalType":"bytes", - "name":"", - "type":"bytes" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"owner", - "outputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"parent", - "outputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"parentOwner", - "outputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":false, - "inputs":[ - - ], - "name":"renounceOwnership", - "outputs":[ - - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"symbol", - "outputs":[ - { - "internalType":"string", - "name":"", - "type":"string" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"token", - "outputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":true, - "inputs":[ - - ], - "name":"totalSupply", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"newOwner", - "type":"address" - } - ], - "name":"transferOwnership", - "outputs":[ - - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"bytes", - "name":"sig", - "type":"bytes" - }, - { - "internalType":"uint256", - "name":"amount", - "type":"uint256" - }, - { - "internalType":"bytes32", - "name":"data", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"expiration", - "type":"uint256" - }, - { - "internalType":"address", - "name":"to", - "type":"address" - } - ], - "name":"transferWithSig", - "outputs":[ - { - "internalType":"address", - "name":"from", - "type":"address" - } - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"_parent", - "type":"address" - } - ], - "name":"setParent", - "outputs":[ - - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"user", - "type":"address" - }, - { - "internalType":"uint256", - "name":"amount", - "type":"uint256" - } - ], - "name":"deposit", - "outputs":[ - - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"uint256", - "name":"amount", - "type":"uint256" - } - ], - "name":"withdraw", - "outputs":[ - - ], - "payable":true, - "stateMutability":"payable", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"to", - "type":"address" - }, - { - "internalType":"uint256", - "name":"value", - "type":"uint256" - } - ], - "name":"transfer", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":true, - "inputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - }, - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "name":"allowance", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "payable":false, - "stateMutability":"view", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - }, - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "name":"approve", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - }, - { - "constant":false, - "inputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - }, - { - "internalType":"address", - "name":"", - "type":"address" - }, - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "name":"transferFrom", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "payable":false, - "stateMutability":"nonpayable", - "type":"function" - } -] \ No newline at end of file diff --git a/child/abis/ChildErc20.json b/child/abis/ChildErc20.json new file mode 100644 index 0000000..af53070 --- /dev/null +++ b/child/abis/ChildErc20.json @@ -0,0 +1,877 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "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": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "input1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "output1", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "input1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "input2", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "output1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "output2", + "type": "uint256" + } + ], + "name": "LogFeeTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "input1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "input2", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "output1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "output2", + "type": "uint256" + } + ], + "name": "LogTransfer", + "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": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "input1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "output1", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "CHAINID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EIP712_DOMAIN_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EIP712_DOMAIN_SCHEMA_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EIP712_TOKEN_TRANSFER_ORDER_SCHEMA_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "disabledHashes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "ecrecovery", + "outputs": [ + { + "internalType": "address", + "name": "result", + "type": "address" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenIdOrAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "data", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "expiration", + "type": "uint256" + } + ], + "name": "getTokenTransferOrderHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "networkId", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "parent", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "parentOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "data", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "expiration", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "transferWithSig", + "outputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_parent", + "type": "address" + } + ], + "name": "setParent", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/child/package-lock.json b/child/package-lock.json index adc1863..1fc736f 100644 --- a/child/package-lock.json +++ b/child/package-lock.json @@ -1524,6 +1524,16 @@ "lodash.zip": "^4.2.0" } }, + "eslint-plugin-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-json/-/eslint-plugin-json-2.1.2.tgz", + "integrity": "sha512-isM/fsUxS4wN1+nLsWoV5T4gLgBQnsql3nMTr8u+cEls1bL8rRQO5CP5GtxJxaOfbcKqnz401styw+H/P+e78Q==", + "dev": true, + "requires": { + "lodash": "^4.17.19", + "vscode-json-languageservice": "^3.7.0" + } + }, "eslint-plugin-unicorn": { "version": "24.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-24.0.0.tgz", @@ -3053,6 +3063,12 @@ "delimit-stream": "0.1.0" } }, + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -5141,6 +5157,43 @@ "extsprintf": "^1.2.0" } }, + "vscode-json-languageservice": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-3.11.0.tgz", + "integrity": "sha512-QxI+qV97uD7HHOCjh3MrM1TfbdwmTXrMckri5Tus1/FQiG3baDZb2C9Y0y8QThs7PwHYBIQXcAc59ZveCRZKPA==", + "dev": true, + "requires": { + "jsonc-parser": "^3.0.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-languageserver-types": "3.16.0-next.2", + "vscode-nls": "^5.0.0", + "vscode-uri": "^2.1.2" + } + }, + "vscode-languageserver-textdocument": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz", + "integrity": "sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA==", + "dev": true + }, + "vscode-languageserver-types": { + "version": "3.16.0-next.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.2.tgz", + "integrity": "sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==", + "dev": true + }, + "vscode-nls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.0.tgz", + "integrity": "sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==", + "dev": true + }, + "vscode-uri": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", + "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", + "dev": true + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/child/package.json b/child/package.json index 62aff92..d59ebcb 100644 --- a/child/package.json +++ b/child/package.json @@ -3,8 +3,8 @@ "version": "1.0.0", "description": "Subgraphs mapping for Graph-node protocol - Matic Network", "scripts": { - "lint": "eslint --ext .ts src", - "lint:fix": "eslint --ext .ts src --fix", + "lint": "eslint --ext .ts --ext .js --ext .json .eslintrc.js src abis", + "lint:fix": "eslint --ext .ts --ext .js --ext .json .eslintrc.js src abis --fix", "graph": "graph", "codegen": "graph codegen", "build": "graph build", @@ -39,6 +39,7 @@ "@typescript-eslint/eslint-plugin": "^4.10.0", "@typescript-eslint/parser": "^4.10.0", "eslint": "^7.16.0", + "eslint-plugin-json": "^2.1.2", "eslint-plugin-unicorn": "^24.0.0", "mustache": "4.0.1", "typescript": "^4.1.3" diff --git a/child/subgraph.template.yaml b/child/subgraph.template.yaml index 37dd8f3..a1ad60f 100644 --- a/child/subgraph.template.yaml +++ b/child/subgraph.template.yaml @@ -16,7 +16,7 @@ dataSources: - TransactionEntity abis: - name: ChildERC20 - file: ./abis/ChildERC20.json + file: ./abis/ChildErc20.json eventHandlers: - event: LogTransfer(indexed address,indexed address,indexed address,uint256,uint256,uint256,uint256,uint256) handler: handleLogTransfer diff --git a/child/tslint.json b/child/tslint.json deleted file mode 100644 index aaee435..0000000 --- a/child/tslint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": ["tslint:recommended"], - "jsRules": {}, - "rules": { - "semicolon": [true, "never"] - }, - "rulesDirectory": [] -} diff --git a/root/.eslintrc.js b/root/.eslintrc.js index 2fd9e26..42104d6 100644 --- a/root/.eslintrc.js +++ b/root/.eslintrc.js @@ -3,6 +3,7 @@ module.exports = { plugins: [ '@typescript-eslint', 'unicorn', + 'json', ], extends: 'eslint:recommended', parserOptions: { @@ -21,6 +22,7 @@ module.exports = { u8: true, }, rules: { + 'indent': ['error', 2], 'space-before-function-paren': ['error', 'never'], semi: ['error', 'never'], 'no-underscore-dangle': 0, @@ -37,7 +39,13 @@ module.exports = { files: ['*.ts', '*.tsx'], rules: { '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], - } - } - ] + }, + }, + { + files: ['*.json'], + rules: { + 'unicorn/filename-case': ['error', { 'case': 'pascalCase' }], + }, + }, + ], } diff --git a/root/abis/RootChainManager.json b/root/abis/RootChainManager.json index 3a8af09..243fa23 100644 --- a/root/abis/RootChainManager.json +++ b/root/abis/RootChainManager.json @@ -1,765 +1,765 @@ [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address payable", - "name": "relayerAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "functionSignature", - "type": "bytes" - } - ], - "name": "MetaTransactionExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "tokenType", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "predicateAddress", - "type": "address" - } - ], - "name": "PredicateRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rootToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "childToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "tokenType", - "type": "bytes32" - } - ], - "name": "TokenMapped", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEPOSIT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ERC712_VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETHER_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAPPER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAP_TOKEN", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "childChainManagerAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "childToRootToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "functionSignature", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "sigR", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "sigS", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "sigV", - "type": "uint8" - } - ], - "name": "executeMetaTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getDomainSeperator", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "processedExits", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rootToChildToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenToType", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "typeToPredicate", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "setupContractId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initializeEIP712", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newStateSender", - "type": "address" - } - ], - "name": "setStateSender", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stateSenderAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newCheckpointManager", - "type": "address" - } - ], - "name": "setCheckpointManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "checkpointManagerAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newChildChainManager", - "type": "address" - } - ], - "name": "setChildChainManagerAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "tokenType", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "predicateAddress", - "type": "address" - } - ], - "name": "registerPredicate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "rootToken", - "type": "address" - }, - { - "internalType": "address", - "name": "childToken", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "tokenType", - "type": "bytes32" - } - ], - "name": "mapToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "rootToken", - "type": "address" - }, - { - "internalType": "address", - "name": "childToken", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "tokenType", - "type": "bytes32" - } - ], - "name": "remapToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "depositEtherFor", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "address", - "name": "rootToken", - "type": "address" - }, - { - "internalType": "bytes", - "name": "depositData", - "type": "bytes" - } - ], - "name": "depositFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "inputData", - "type": "bytes" - } - ], - "name": "exit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address payable", + "name": "relayerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + } + ], + "name": "MetaTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "tokenType", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "predicateAddress", + "type": "address" + } + ], + "name": "PredicateRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rootToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "childToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "tokenType", + "type": "bytes32" + } + ], + "name": "TokenMapped", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEPOSIT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC712_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ETHER_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAPPER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAP_TOKEN", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "childChainManagerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "childToRootToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "sigR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "sigS", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "sigV", + "type": "uint8" + } + ], + "name": "executeMetaTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getDomainSeperator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "processedExits", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rootToChildToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenToType", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "typeToPredicate", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setupContractId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeEIP712", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newStateSender", + "type": "address" + } + ], + "name": "setStateSender", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stateSenderAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCheckpointManager", + "type": "address" + } + ], + "name": "setCheckpointManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "checkpointManagerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newChildChainManager", + "type": "address" + } + ], + "name": "setChildChainManagerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "tokenType", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "predicateAddress", + "type": "address" + } + ], + "name": "registerPredicate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "rootToken", + "type": "address" + }, + { + "internalType": "address", + "name": "childToken", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "tokenType", + "type": "bytes32" + } + ], + "name": "mapToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "rootToken", + "type": "address" + }, + { + "internalType": "address", + "name": "childToken", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "tokenType", + "type": "bytes32" + } + ], + "name": "remapToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "depositEtherFor", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "rootToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "depositData", + "type": "bytes" + } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "inputData", + "type": "bytes" + } + ], + "name": "exit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ] diff --git a/root/abis/StakingInfo.json b/root/abis/StakingInfo.json index 45b3638..c732d8a 100644 --- a/root/abis/StakingInfo.json +++ b/root/abis/StakingInfo.json @@ -1,1454 +1,1454 @@ [ - { - "inputs": [ - { - "internalType": "address", - "name": "_registry", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "ClaimFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "totalAmount", - "type": "uint256" - } - ], - "name": "ClaimRewards", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "newValidatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "oldValidatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ConfirmAuction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "rewards", - "type": "uint256" - } - ], - "name": "DelegatorClaimedRewards", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - } - ], - "name": "DelegatorRestaked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "DelegatorUnstaked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newDynasty", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldDynasty", - "type": "uint256" - } - ], - "name": "DynastyValueChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "exitEpoch", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "signer", - "type": "address" - } - ], - "name": "Jailed", - "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": "uint256", - "name": "newProposerBonus", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldProposerBonus", - "type": "uint256" - } - ], - "name": "ProposerBonusChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "total", - "type": "uint256" - } - ], - "name": "Restaked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newReward", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldReward", - "type": "uint256" - } - ], - "name": "RewardUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ShareBurned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ShareMinted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldSigner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newSigner", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "signerPubkey", - "type": "bytes" - } - ], - "name": "SignerChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Slashed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newAmount", - "type": "uint256" - } - ], - "name": "StakeUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "activationEpoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "total", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "signerPubkey", - "type": "bytes" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "auctionAmount", - "type": "uint256" - } - ], - "name": "StartAuction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newThreshold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldThreshold", - "type": "uint256" - } - ], - "name": "ThresholdChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "TopUpFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "signer", - "type": "address" - } - ], - "name": "UnJailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deactivationEpoch", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "UnstakeInit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "total", - "type": "uint256" - } - ], - "name": "Unstaked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCommissionRate", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "oldCommissionRate", - "type": "uint256" - } - ], - "name": "UpdateCommissionRate", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "registry", - "outputs": [ - { - "internalType": "contract Registry", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "validatorNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256[]", - "name": "validatorIds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "nonces", - "type": "uint256[]" - } - ], - "name": "updateNonce", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "signerPubkey", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "activationEpoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "total", - "type": "uint256" - } - ], - "name": "logStaked", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "total", - "type": "uint256" - } - ], - "name": "logUnstaked", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deactivationEpoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "logUnstakeInit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "oldSigner", - "type": "address" - }, - { - "internalType": "address", - "name": "newSigner", - "type": "address" - }, - { - "internalType": "bytes", - "name": "signerPubkey", - "type": "bytes" - } - ], - "name": "logSignerChange", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "total", - "type": "uint256" - } - ], - "name": "logRestaked", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "exitEpoch", - "type": "uint256" - }, - { - "internalType": "address", - "name": "signer", - "type": "address" - } - ], - "name": "logJailed", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "signer", - "type": "address" - } - ], - "name": "logUnjailed", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "logSlashed", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "oldThreshold", - "type": "uint256" - } - ], - "name": "logThresholdChange", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newDynasty", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "oldDynasty", - "type": "uint256" - } - ], - "name": "logDynastyValueChange", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newProposerBonus", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "oldProposerBonus", - "type": "uint256" - } - ], - "name": "logProposerBonusChange", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReward", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "oldReward", - "type": "uint256" - } - ], - "name": "logRewardUpdate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "logStakeUpdate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalAmount", - "type": "uint256" - } - ], - "name": "logClaimRewards", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "auctionAmount", - "type": "uint256" - } - ], - "name": "logStartAuction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newValidatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "oldValidatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "logConfirmAuction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "logTopUpFee", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "logClaimFee", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "getStakerDetails", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reward", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "activationEpoch", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deactivationEpoch", - "type": "uint256" - }, - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_status", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "totalValidatorStake", - "outputs": [ - { - "internalType": "uint256", - "name": "validatorStake", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getAccountStateRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "accountStateRoot", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "getValidatorContractAddress", - "outputs": [ - { - "internalType": "address", - "name": "ValidatorContract", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "logShareMinted", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "logShareBurned", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rewards", - "type": "uint256" - } - ], - "name": "logDelegatorClaimRewards", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - } - ], - "name": "logDelegatorRestaked", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "logDelegatorUnstaked", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "newCommissionRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "oldCommissionRate", - "type": "uint256" - } - ], - "name": "logUpdateCommissionRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "ClaimFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalAmount", + "type": "uint256" + } + ], + "name": "ClaimRewards", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newValidatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldValidatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ConfirmAuction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "rewards", + "type": "uint256" + } + ], + "name": "DelegatorClaimedRewards", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalStaked", + "type": "uint256" + } + ], + "name": "DelegatorRestaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DelegatorUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newDynasty", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldDynasty", + "type": "uint256" + } + ], + "name": "DynastyValueChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "exitEpoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "Jailed", + "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": "uint256", + "name": "newProposerBonus", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldProposerBonus", + "type": "uint256" + } + ], + "name": "ProposerBonusChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "name": "Restaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newReward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldReward", + "type": "uint256" + } + ], + "name": "RewardUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ShareBurned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ShareMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldSigner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newSigner", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signerPubkey", + "type": "bytes" + } + ], + "name": "SignerChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Slashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newAmount", + "type": "uint256" + } + ], + "name": "StakeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "activationEpoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "total", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signerPubkey", + "type": "bytes" + } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "auctionAmount", + "type": "uint256" + } + ], + "name": "StartAuction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldThreshold", + "type": "uint256" + } + ], + "name": "ThresholdChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "TopUpFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "UnJailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "deactivationEpoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "UnstakeInit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "name": "Unstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCommissionRate", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldCommissionRate", + "type": "uint256" + } + ], + "name": "UpdateCommissionRate", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract Registry", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "validatorNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256[]", + "name": "validatorIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + } + ], + "name": "updateNonce", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signerPubkey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "activationEpoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "name": "logStaked", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "name": "logUnstaked", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deactivationEpoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "logUnstakeInit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "oldSigner", + "type": "address" + }, + { + "internalType": "address", + "name": "newSigner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signerPubkey", + "type": "bytes" + } + ], + "name": "logSignerChange", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "name": "logRestaked", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exitEpoch", + "type": "uint256" + }, + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "logJailed", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "logUnjailed", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "logSlashed", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oldThreshold", + "type": "uint256" + } + ], + "name": "logThresholdChange", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newDynasty", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oldDynasty", + "type": "uint256" + } + ], + "name": "logDynastyValueChange", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newProposerBonus", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oldProposerBonus", + "type": "uint256" + } + ], + "name": "logProposerBonusChange", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReward", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oldReward", + "type": "uint256" + } + ], + "name": "logRewardUpdate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "logStakeUpdate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalAmount", + "type": "uint256" + } + ], + "name": "logClaimRewards", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "auctionAmount", + "type": "uint256" + } + ], + "name": "logStartAuction", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newValidatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oldValidatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "logConfirmAuction", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "logTopUpFee", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "logClaimFee", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "getStakerDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "activationEpoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deactivationEpoch", + "type": "uint256" + }, + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_status", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "totalValidatorStake", + "outputs": [ + { + "internalType": "uint256", + "name": "validatorStake", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getAccountStateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "accountStateRoot", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "getValidatorContractAddress", + "outputs": [ + { + "internalType": "address", + "name": "ValidatorContract", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "logShareMinted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "logShareBurned", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rewards", + "type": "uint256" + } + ], + "name": "logDelegatorClaimRewards", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalStaked", + "type": "uint256" + } + ], + "name": "logDelegatorRestaked", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "logDelegatorUnstaked", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newCommissionRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "oldCommissionRate", + "type": "uint256" + } + ], + "name": "logUpdateCommissionRate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } ] diff --git a/root/abis/WithdrawManager.json b/root/abis/WithdrawManager.json index d9bde26..32802e6 100644 --- a/root/abis/WithdrawManager.json +++ b/root/abis/WithdrawManager.json @@ -1,574 +1,574 @@ [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "exitId", - "type": "uint256" - } - ], - "name": "ExitCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldExitPeriod", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newExitPeriod", - "type": "uint256" - } - ], - "name": "ExitPeriodUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "exitor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "exitId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isRegularExit", - "type": "bool" - } - ], - "name": "ExitStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "exitId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "age", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "signer", - "type": "address" - } - ], - "name": "ExitUpdated", - "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": "uint256", - "name": "exitId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": true, - "inputs": [], - "name": "HALF_EXIT_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "ON_FINALIZE_GAS_LIMIT", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exitNft", - "outputs": [ - { - "internalType": "contract ExitNFT", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exitWindow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "exits", - "outputs": [ - { - "internalType": "uint256", - "name": "receiptAmountOrNFTId", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bool", - "name": "isRegularExit", - "type": "bool" - }, - { - "internalType": "address", - "name": "predicate", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "exitsQueues", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "exitId", + "type": "uint256" + } + ], + "name": "ExitCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldExitPeriod", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newExitPeriod", + "type": "uint256" + } + ], + "name": "ExitPeriodUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "exitor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "exitId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isRegularExit", + "type": "bool" + } + ], + "name": "ExitStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "exitId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "age", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "ExitUpdated", + "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": "uint256", + "name": "exitId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": true, + "inputs": [], + "name": "HALF_EXIT_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ON_FINALIZE_GAS_LIMIT", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "exitNft", + "outputs": [ + { + "internalType": "contract ExitNFT", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "exitWindow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "exits", + "outputs": [ + { + "internalType": "uint256", + "name": "receiptAmountOrNFTId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "internalType": "address", "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "ownerExits", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "createExitQueue", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "offset", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "verifyTxInclusion", - "type": "bool" - } - ], - "name": "verifyInclusion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "depositId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOrToken", - "type": "uint256" - } - ], - "name": "startExitWithDepositedTokens", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "exitor", - "type": "address" - }, - { - "internalType": "address", - "name": "childToken", - "type": "address" - }, - { - "internalType": "address", - "name": "rootToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "exitAmountOrTokenId", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "internalType": "bool", - "name": "isRegularExit", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "priority", - "type": "uint256" - } - ], - "name": "addExitToQueue", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "exitId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "inputId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "challengeData", - "type": "bytes" - }, - { - "internalType": "address", - "name": "adjudicatorPredicate", - "type": "address" - } - ], - "name": "challengeExit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - } - ], - "name": "processExits", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address[]", - "name": "_tokens", - "type": "address[]" - } - ], - "name": "processExitsBatch", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "exitId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "age", - "type": "uint256" - }, - { - "internalType": "address", - "name": "utxoOwner", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "addInput", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "halfExitPeriod", - "type": "uint256" - } - ], - "name": "updateExitPeriod", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bool", + "name": "isRegularExit", + "type": "bool" + }, + { + "internalType": "address", + "name": "predicate", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "exitsQueues", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "ownerExits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "createExitQueue", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "offset", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "verifyTxInclusion", + "type": "bool" + } + ], + "name": "verifyInclusion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "depositId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOrToken", + "type": "uint256" + } + ], + "name": "startExitWithDepositedTokens", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "exitor", + "type": "address" + }, + { + "internalType": "address", + "name": "childToken", + "type": "address" + }, + { + "internalType": "address", + "name": "rootToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exitAmountOrTokenId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "isRegularExit", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "priority", + "type": "uint256" + } + ], + "name": "addExitToQueue", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "exitId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "challengeData", + "type": "bytes" + }, + { + "internalType": "address", + "name": "adjudicatorPredicate", + "type": "address" + } + ], + "name": "challengeExit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "processExits", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "processExitsBatch", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "exitId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "age", + "type": "uint256" + }, + { + "internalType": "address", + "name": "utxoOwner", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "addInput", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "halfExitPeriod", + "type": "uint256" + } + ], + "name": "updateExitPeriod", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } ] diff --git a/root/package-lock.json b/root/package-lock.json index c6e873e..2a442ad 100644 --- a/root/package-lock.json +++ b/root/package-lock.json @@ -1523,6 +1523,16 @@ "lodash.zip": "^4.2.0" } }, + "eslint-plugin-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-json/-/eslint-plugin-json-2.1.2.tgz", + "integrity": "sha512-isM/fsUxS4wN1+nLsWoV5T4gLgBQnsql3nMTr8u+cEls1bL8rRQO5CP5GtxJxaOfbcKqnz401styw+H/P+e78Q==", + "dev": true, + "requires": { + "lodash": "^4.17.19", + "vscode-json-languageservice": "^3.7.0" + } + }, "eslint-plugin-unicorn": { "version": "24.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-24.0.0.tgz", @@ -3052,6 +3062,12 @@ "delimit-stream": "0.1.0" } }, + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -5140,6 +5156,43 @@ "extsprintf": "^1.2.0" } }, + "vscode-json-languageservice": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-3.11.0.tgz", + "integrity": "sha512-QxI+qV97uD7HHOCjh3MrM1TfbdwmTXrMckri5Tus1/FQiG3baDZb2C9Y0y8QThs7PwHYBIQXcAc59ZveCRZKPA==", + "dev": true, + "requires": { + "jsonc-parser": "^3.0.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-languageserver-types": "3.16.0-next.2", + "vscode-nls": "^5.0.0", + "vscode-uri": "^2.1.2" + } + }, + "vscode-languageserver-textdocument": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz", + "integrity": "sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA==", + "dev": true + }, + "vscode-languageserver-types": { + "version": "3.16.0-next.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.2.tgz", + "integrity": "sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==", + "dev": true + }, + "vscode-nls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.0.tgz", + "integrity": "sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==", + "dev": true + }, + "vscode-uri": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", + "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", + "dev": true + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/root/package.json b/root/package.json index 6bd40bf..e0c4a54 100644 --- a/root/package.json +++ b/root/package.json @@ -2,8 +2,8 @@ "name": "matic-root-subgraphs", "license": "MIT", "scripts": { - "lint": "eslint --ext .ts src", - "lint:fix": "eslint --ext .ts src --fix", + "lint": "eslint --ext .ts --ext .js --ext .json .eslintrc.js src abis", + "lint:fix": "eslint --ext .ts --ext .js --ext .json .eslintrc.js src abis --fix", "graph": "graph", "codegen": "graph codegen", "build": "graph build", @@ -22,6 +22,7 @@ "@typescript-eslint/eslint-plugin": "^4.10.0", "@typescript-eslint/parser": "^4.10.0", "eslint": "^7.16.0", + "eslint-plugin-json": "^2.1.2", "eslint-plugin-unicorn": "^24.0.0", "mustache": "4.0.1", "typescript": "^4.1.3"