@arbitrum/nitro-contracts
Version:
Layer 2 precompiles and rollup for Arbitrum Nitro
249 lines (248 loc) • 19.7 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "EdgeStakingPool",
"sourceName": "src/assertionStakingPool/EdgeStakingPool.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_challengeManager",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_edgeId",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
}
],
"name": "AmountExceedsBalance",
"type": "error"
},
{
"inputs": [],
"name": "EmptyEdgeId",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "actual",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "expected",
"type": "bytes32"
}
],
"name": "IncorrectEdgeId",
"type": "error"
},
{
"inputs": [],
"name": "ZeroAmount",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "StakeDeposited",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "StakeWithdrawn",
"type": "event"
},
{
"inputs": [],
"name": "challengeManager",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint8",
"name": "level",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "endHistoryRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "endHeight",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "claimId",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "prefixProof",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "proof",
"type": "bytes"
}
],
"internalType": "struct CreateEdgeArgs",
"name": "args",
"type": "tuple"
}
],
"name": "createEdge",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "depositBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "depositIntoPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "edgeId",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "stakeToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdrawFromPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "withdrawFromPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60e060405234801561001057600080fd5b50604051610eea380380610eea83398101604081905261002f916100e8565b816001600160a01b03166351ed6a306040518163ffffffff1660e01b8152600401602060405180830381865afa15801561006d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100919190610116565b6001600160a01b0316608052806100ba57604051620d29f560e71b815260040160405180910390fd5b6001600160a01b0390911660a05260c05261013a565b6001600160a01b03811681146100e557600080fd5b50565b600080604083850312156100fb57600080fd5b8251610106816100d0565b6020939093015192949293505050565b60006020828403121561012857600080fd5b8151610133816100d0565b9392505050565b60805160a05160c051610d4b61019f6000396000818161015b0152818161055801526105ac0152600081816092015281816103a70152818161048401526104dc01526000818160f3015281816102670152818161033b01526104620152610d4b6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80637476083b1161005b5780637476083b14610115578063956501bb146101285780639cfa2a2a14610156578063bd3eec7d1461017d57600080fd5b8063023a96fe1461008d57806326c0e5c5146100d157806330fc43ed146100db57806351ed6a30146100ee575b600080fd5b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d9610190565b005b6100d96100e9366004610a40565b6101ab565b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6100d9610123366004610a40565b6102cf565b610148610136366004610a59565b60006020819052908152604090205481565b6040519081526020016100c8565b6101487f000000000000000000000000000000000000000000000000000000000000000081565b6100d961018b366004610a82565b61039b565b336000908152602081905260409020546101a9906101ab565b565b806000036101e5576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526020819052604090205480821115610244576040517fa47b7c6500000000000000000000000000000000000000000000000000000000815233600482015260248101839052604481018290526064015b60405180910390fd5b61024e8282610aec565b33600081815260208190526040902091909155610296907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690846105dd565b60405182815233907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9060200160405180910390a25050565b80600003610309576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526020819052604081208054839290610328908490610b05565b9091555061036390506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084610686565b60405181815233907f0a7bb2e28cc4698aac06db79cf9163bfcc20719286cf59fa7d492ceda1b8edc29060200160405180910390a250565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016631c1b4f3a6103d96020850185610b2e565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260ff9091166004820152602401602060405180830381865afa15801561042f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104539190610b49565b90506104a96001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836106dd565b6040517f05fae1410000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906305fae14190610511908690600401610bf8565b6020604051808303816000875af1158015610530573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105549190610b49565b90507f000000000000000000000000000000000000000000000000000000000000000081146105d8576040517f75c0811b000000000000000000000000000000000000000000000000000000008152600481018290527f0000000000000000000000000000000000000000000000000000000000000000602482015260440161023b565b505050565b6040516001600160a01b0383166024820152604481018290526105d89084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526107c1565b6040516001600160a01b03808516602483015283166044820152606481018290526106d79085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610622565b50505050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b9190610b49565b6107759190610b05565b6040516001600160a01b0385166024820152604481018290529091506106d79085907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610622565b6000610816826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108a69092919063ffffffff16565b8051909150156105d857808060200190518101906108349190610c80565b6105d85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161023b565b60606108b584846000856108bf565b90505b9392505050565b6060824710156109375760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161023b565b6001600160a01b0385163b61098e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161023b565b600080866001600160a01b031685876040516109aa9190610cc6565b60006040518083038185875af1925050503d80600081146109e7576040519150601f19603f3d011682016040523d82523d6000602084013e6109ec565b606091505b50915091506109fc828286610a07565b979650505050505050565b60608315610a165750816108b8565b825115610a265782518084602001fd5b8160405162461bcd60e51b815260040161023b9190610ce2565b600060208284031215610a5257600080fd5b5035919050565b600060208284031215610a6b57600080fd5b81356001600160a01b03811681146108b857600080fd5b600060208284031215610a9457600080fd5b813567ffffffffffffffff811115610aab57600080fd5b820160c081850312156108b857600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610aff57610aff610abd565b92915050565b80820180821115610aff57610aff610abd565b803560ff81168114610b2957600080fd5b919050565b600060208284031215610b4057600080fd5b6108b882610b18565b600060208284031215610b5b57600080fd5b5051919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610b9757600080fd5b830160208101925035905067ffffffffffffffff811115610bb757600080fd5b803603821315610bc657600080fd5b9250929050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6020815260ff610c0783610b18565b1660208201526020820135604082015260408201356060820152606082013560808201526000610c3a6080840184610b62565b60c060a0850152610c4f60e085018284610bcd565b915050610c5f60a0850185610b62565b601f198584030160c0860152610c76838284610bcd565b9695505050505050565b600060208284031215610c9257600080fd5b815180151581146108b857600080fd5b60005b83811015610cbd578181015183820152602001610ca5565b50506000910152565b60008251610cd8818460208701610ca2565b9190910192915050565b6020815260008251806020840152610d01816040850160208701610ca2565b601f01601f1916919091016040019291505056fea2646970667358221220f8ea00786f1a7c6e003bdb2ca790889b97ac2bd75d91451060edd0de09de510b64736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80637476083b1161005b5780637476083b14610115578063956501bb146101285780639cfa2a2a14610156578063bd3eec7d1461017d57600080fd5b8063023a96fe1461008d57806326c0e5c5146100d157806330fc43ed146100db57806351ed6a30146100ee575b600080fd5b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d9610190565b005b6100d96100e9366004610a40565b6101ab565b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6100d9610123366004610a40565b6102cf565b610148610136366004610a59565b60006020819052908152604090205481565b6040519081526020016100c8565b6101487f000000000000000000000000000000000000000000000000000000000000000081565b6100d961018b366004610a82565b61039b565b336000908152602081905260409020546101a9906101ab565b565b806000036101e5576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526020819052604090205480821115610244576040517fa47b7c6500000000000000000000000000000000000000000000000000000000815233600482015260248101839052604481018290526064015b60405180910390fd5b61024e8282610aec565b33600081815260208190526040902091909155610296907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690846105dd565b60405182815233907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9060200160405180910390a25050565b80600003610309576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526020819052604081208054839290610328908490610b05565b9091555061036390506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084610686565b60405181815233907f0a7bb2e28cc4698aac06db79cf9163bfcc20719286cf59fa7d492ceda1b8edc29060200160405180910390a250565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016631c1b4f3a6103d96020850185610b2e565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260ff9091166004820152602401602060405180830381865afa15801561042f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104539190610b49565b90506104a96001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836106dd565b6040517f05fae1410000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906305fae14190610511908690600401610bf8565b6020604051808303816000875af1158015610530573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105549190610b49565b90507f000000000000000000000000000000000000000000000000000000000000000081146105d8576040517f75c0811b000000000000000000000000000000000000000000000000000000008152600481018290527f0000000000000000000000000000000000000000000000000000000000000000602482015260440161023b565b505050565b6040516001600160a01b0383166024820152604481018290526105d89084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526107c1565b6040516001600160a01b03808516602483015283166044820152606481018290526106d79085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610622565b50505050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b9190610b49565b6107759190610b05565b6040516001600160a01b0385166024820152604481018290529091506106d79085907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610622565b6000610816826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108a69092919063ffffffff16565b8051909150156105d857808060200190518101906108349190610c80565b6105d85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161023b565b60606108b584846000856108bf565b90505b9392505050565b6060824710156109375760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161023b565b6001600160a01b0385163b61098e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161023b565b600080866001600160a01b031685876040516109aa9190610cc6565b60006040518083038185875af1925050503d80600081146109e7576040519150601f19603f3d011682016040523d82523d6000602084013e6109ec565b606091505b50915091506109fc828286610a07565b979650505050505050565b60608315610a165750816108b8565b825115610a265782518084602001fd5b8160405162461bcd60e51b815260040161023b9190610ce2565b600060208284031215610a5257600080fd5b5035919050565b600060208284031215610a6b57600080fd5b81356001600160a01b03811681146108b857600080fd5b600060208284031215610a9457600080fd5b813567ffffffffffffffff811115610aab57600080fd5b820160c081850312156108b857600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610aff57610aff610abd565b92915050565b80820180821115610aff57610aff610abd565b803560ff81168114610b2957600080fd5b919050565b600060208284031215610b4057600080fd5b6108b882610b18565b600060208284031215610b5b57600080fd5b5051919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610b9757600080fd5b830160208101925035905067ffffffffffffffff811115610bb757600080fd5b803603821315610bc657600080fd5b9250929050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6020815260ff610c0783610b18565b1660208201526020820135604082015260408201356060820152606082013560808201526000610c3a6080840184610b62565b60c060a0850152610c4f60e085018284610bcd565b915050610c5f60a0850185610b62565b601f198584030160c0860152610c76838284610bcd565b9695505050505050565b600060208284031215610c9257600080fd5b815180151581146108b857600080fd5b60005b83811015610cbd578181015183820152602001610ca5565b50506000910152565b60008251610cd8818460208701610ca2565b9190910192915050565b6020815260008251806020840152610d01816040850160208701610ca2565b601f01601f1916919091016040019291505056fea2646970667358221220f8ea00786f1a7c6e003bdb2ca790889b97ac2bd75d91451060edd0de09de510b64736f6c63430008110033",
"linkReferences": {},
"deployedLinkReferences": {}
}