UNPKG

@etherisc/registry-contracts

Version:

Etherisc's smart contracts for the registry.

1,432 lines (1,431 loc) 370 kB
{ "abi": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "EIP712_DOMAIN_NAME", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "EIP712_DOMAIN_VERSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "EIP712_RESTAKE_TYPE", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "EIP712_STAKE_TYPE", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "stakeId", "type": "uint96" }, { "internalType": "NftId", "name": "newTarget", "type": "uint96" }, { "internalType": "bytes32", "name": "signatureId", "type": "bytes32" } ], "name": "getRestakeDigest", "outputs": [ { "internalType": "bytes32", "name": "digest", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "digest", "type": "bytes32" }, { "internalType": "bytes", "name": "signature", "type": "bytes" } ], "name": "getSigner", "outputs": [ { "internalType": "address", "name": "signer", "type": "address" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "target", "type": "uint96" }, { "internalType": "uint256", "name": "dipAmount", "type": "uint256" }, { "internalType": "bytes32", "name": "signatureId", "type": "bytes32" } ], "name": "getStakeDigest", "outputs": [ { "internalType": "bytes32", "name": "digest", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "NftId", "name": "stakeId", "type": "uint96" }, { "internalType": "NftId", "name": "newTarget", "type": "uint96" }, { "internalType": "bytes32", "name": "signatureId", "type": "bytes32" }, { "internalType": "bytes", "name": "signature", "type": "bytes" } ], "name": "processRestakeSignature", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "NftId", "name": "target", "type": "uint96" }, { "internalType": "uint256", "name": "dipAmount", "type": "uint256" }, { "internalType": "bytes32", "name": "signatureId", "type": "bytes32" }, { "internalType": "bytes", "name": "signature", "type": "bytes" } ], "name": "processStakeSignature", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Strings.sol", "26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/ECDSA.sol", "27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/EIP712.sol", "30": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/math/Math.sol", "34": "contracts/registry/IChainNft.sol", "53": "contracts/staking/StakingMessageHelper.sol" }, "ast": { "absolutePath": "contracts/staking/StakingMessageHelper.sol", "exportedSymbols": { "ECDSA": [ 14129 ], "EIP712": [ 14283 ], "NftId": [ 3353 ], "StakingMessageHelper": [ 7109 ] }, "id": 7110, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 6868, "literals": [ "solidity", "^", "0.8", ".19" ], "nodeType": "PragmaDirective", "src": "39:24:53" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/ECDSA.sol", "file": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", "id": 6870, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 7110, "sourceUnit": 14130, "src": "65:75:53", "symbolAliases": [ { "foreign": { "id": 6869, "name": "ECDSA", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14129, "src": "73:5:53", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/EIP712.sol", "file": "@openzeppelin/contracts/utils/cryptography/EIP712.sol", "id": 6872, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 7110, "sourceUnit": 14284, "src": "141:77:53", "symbolAliases": [ { "foreign": { "id": 6871, "name": "EIP712", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14283, "src": "149:6:53", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/registry/IChainNft.sol", "file": "../registry/IChainNft.sol", "id": 6874, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 7110, "sourceUnit": 3495, "src": "220:48:53", "symbolAliases": [ { "foreign": { "id": 6873, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "228:5:53", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 6875, "name": "EIP712", "nameLocations": [ "309:6:53" ], "nodeType": "IdentifierPath", "referencedDeclaration": 14283, "src": "309:6:53" }, "id": 6876, "nodeType": "InheritanceSpecifier", "src": "309:6:53" } ], "canonicalName": "StakingMessageHelper", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 7109, "linearizedBaseContracts": [ 7109, 14283 ], "name": "StakingMessageHelper", "nameLocation": "280:20:53", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "functionSelector": "fd070296", "id": 6879, "mutability": "constant", "name": "EIP712_DOMAIN_NAME", "nameLocation": "345:18:53", "nodeType": "VariableDeclaration", "scope": 7109, "src": "322:61:53", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6877, "name": "string", "nodeType": "ElementaryTypeName", "src": "322:6:53", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "45746865726973635374616b696e67", "id": 6878, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "366:17:53", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b5f2cb8c56dc414bc883b324f248ce0279cad8eb447e9db356d950578504be3e", "typeString": "literal_string \"EtheriscStaking\"" }, "value": "EtheriscStaking" }, "visibility": "public" }, { "constant": true, "functionSelector": "5cc33321", "id": 6882, "mutability": "constant", "name": "EIP712_DOMAIN_VERSION", "nameLocation": "412:21:53", "nodeType": "VariableDeclaration", "scope": 7109, "src": "389:50:53", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6880, "name": "string", "nodeType": "ElementaryTypeName", "src": "389:6:53", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "31", "id": 6881, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "436:3:53", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", "typeString": "literal_string \"1\"" }, "value": "1" }, "visibility": "public" }, { "constant": true, "functionSelector": "9f696374", "id": 6885, "mutability": "constant", "name": "EIP712_STAKE_TYPE", "nameLocation": "538:17:53", "nodeType": "VariableDeclaration", "scope": 7109, "src": "515:103:53", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6883, "name": "string", "nodeType": "ElementaryTypeName", "src": "515:6:53", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "5374616b652875696e743936207461726765742c75696e7432353620646970416d6f756e742c62797465733332207369676e6174757265496429", "id": 6884, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "558:60:53", "typeDescriptions": { "typeIdentifier": "t_stringliteral_d54f5fdefb1e2f45575e9386c8d77953264cad7b9468994032cff3c5e586a4b9", "typeString": "literal_string \"Stake(uint96 target,uint256 dipAmount,bytes32 signatureId)\"" }, "value": "Stake(uint96 target,uint256 dipAmount,bytes32 signatureId)" }, "visibility": "public" }, { "constant": true, "id": 6893, "mutability": "constant", "name": "EIP712_STAKE_TYPE_HASH", "nameLocation": "649:22:53", "nodeType": "VariableDeclaration", "scope": 7109, "src": "624:96:53", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6886, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "624:7:53", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "arguments": [ { "arguments": [ { "id": 6890, "name": "EIP712_STAKE_TYPE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6885, "src": "701:17:53", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "id": 6888, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "684:3:53", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 6889, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "688:12:53", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "684:16:53", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, "id": 6891, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "684:35:53", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "id": 6887, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -8, "src": "674:9:53", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, "id": 6892, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "674:46:53", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "private" }, { "constant": true, "functionSelector": "8452a196", "id": 6896, "mutability": "constant", "name": "EIP712_RESTAKE_TYPE", "nameLocation": "750:19:53", "nodeType": "VariableDeclaration", "scope": 7109, "src": "727:107:53", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6894, "name": "string", "nodeType": "ElementaryTypeName", "src": "727:6:53", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "52657374616b652875696e743936207374616b6549642c75696e743936206e65775461726765742c62797465733332207369676e6174757265496429", "id": 6895, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "772:62:53", "typeDescriptions": { "typeIdentifier": "t_stringliteral_bb9b64599fa76f4728043c93b078fcb8c0c29091e825002a4b379689ddd8c67c", "typeString": "literal_string \"Restake(uint96 stakeId,uint96 newTarget,bytes32 signatureId)\"" }, "value": "Restake(uint96 stakeId,uint96 newTarget,bytes32 signatureId)" }, "visibility": "public" }, { "constant": true, "id": 6904, "mutability": "constant", "name": "EIP712_RESTAKE_TYPE_HASH", "nameLocation": "865:24:53", "nodeType": "VariableDeclaration", "scope": 7109, "src": "840:100:53", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6897, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "840:7:53", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "arguments": [ { "arguments": [ { "id": 6901, "name": "EIP712_RESTAKE_TYPE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6896, "src": "919:19:53", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "id": 6899, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "902:3:53", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, "id": 6900, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "906:12:53", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "902:16:53", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, "id": 6902, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "902:37:53", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "id": 6898, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -8, "src": "892:9:53", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, "id": 6903, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "892:48:53", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "private" }, { "constant": false, "id": 6908, "mutability": "mutable", "name": "_signatureIsUsed", "nameLocation": "1002:16:53", "nodeType": "VariableDeclaration", "scope": 7109, "src": "948:70:53", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "typeName": { "id": 6907, "keyName": "signatureHash", "keyNameLocation": "964:13:53", "keyType": { "id": 6905, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "956:7:53", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "948:45:53", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueName": "isUsed", "valueNameLocation": "986:6:53", "valueType": { "id": 6906, "name": "bool", "nodeType": "ElementaryTypeName", "src": "981:4:53", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } }, "visibility": "private" }, { "body": { "id": 6915, "nodeType": "Block", "src": "1151:3:53", "statements": [] }, "id": 6916, "implemented": true, "kind": "constructor", "modifiers": [ { "arguments": [ { "id": 6911, "name": "EIP712_DOMAIN_NAME", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6879, "src": "1055:18:53", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, { "id": 6912, "name": "EIP712_DOMAIN_VERSION", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6882, "src": "1075:21:53", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "id": 6913, "kind": "baseConstructorSpecifier", "modifierName": { "id": 6910, "name": "EIP712", "nameLocations": [ "1048:6:53" ], "nodeType": "IdentifierPath", "referencedDeclaration": 14283, "src": "1048:6:53" }, "nodeType": "ModifierInvocation", "src": "1048:49:53" } ], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 6909, "nodeType": "ParameterList", "parameters": [], "src": "1037:2:53" }, "returnParameters": { "id": 6914, "nodeType": "ParameterList", "parameters": [], "src": "1151:0:53" }, "scope": 7109, "src": "1026:128:53", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 6951, "nodeType": "Block", "src": "1425:189:53", "statements": [ { "assignments": [ 6931 ], "declarations": [ { "constant": false, "id": 6931, "mutability": "mutable", "name": "digest", "nameLocation": "1443:6:53", "nodeType": "VariableDeclaration", "scope": 6951, "src": "1435:14:53", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6930, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1435:7:53", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "id": 6937, "initialValue": { "arguments": [ { "id": 6933, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6921, "src": "1467:6:53", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, { "id": 6934, "name": "dipAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6923, "src": "1475:9:53", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 6935, "name": "signatureId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6925, "src": "1486:11:53", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 6932, "name": "getStakeDigest", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7020, "src": "1452:14:53", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_userDefinedValueType$_NftId_$3353_$_t_uint256_$_t_bytes32_$returns$_t_bytes32_$", "typeString": "function (NftId,uint256,bytes32) view returns (bytes32)" } }, "id": 6936, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1452:46:53", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", "src": "1435:63:53" }, { "assignments": [ 6939 ], "declarations": [ { "constant": false, "id": 6939, "mutability": "mutable", "name": "signer", "nameLocation": "1516:6:53", "nodeType": "VariableDeclaration", "scope": 6951, "src": "1508:14:53", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6938, "name": "address", "nodeType": "ElementaryTypeName", "src": "1508:7:53", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 6944, "initialValue": { "arguments": [ { "id": 6941, "name": "digest", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6931, "src": "1535:6:53", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 6942, "name": "signature", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6927, "src": "1543:9:53", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } ], "id": 6940, "name": "getSigner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7068, "src": "1525:9:53", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_calldata_ptr_$returns$_t_address_$", "typeString": "function (bytes32,bytes calldata) pure returns (address)" } }, "id": 6943, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1525:28:53", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "1508:45:53" }, { "expression": { "arguments": [ { "id": 6946, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6918, "src": "1582:5:53", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 6947, "name": "signer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6939, "src": "1589:6:53", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 6948, "name": "signature", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6927, "src": "1597:9:53", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata" } ], "id": 6945, "name": "_processSignature", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7108, "src": "1564:17:53", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_bytes_calldata_ptr_$returns$__$", "typeString": "function (address,address,bytes calldata)" } }, "id": 6949, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1564:43:53", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6950, "nodeType": "ExpressionStatement", "src": "1564:43:53" } ] }, "functionSelector": "e94a62ea", "id": 6952, "implemented": true, "kind": "function", "modifiers": [], "name": "processStakeSignature", "nameLocation": "1170:21:53", "nodeType": "FunctionDefinition", "parameters": { "id": 6928, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6918, "mutability": "mutable", "name": "owner", "nameLocation": "1209:5:53", "nodeType": "VariableDeclaration", "scope": 6952, "src": "1201:13:53", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6917, "name": "address", "nodeType": "ElementaryTypeName", "src": "1201:7:53", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 6921, "mutability": "mutable", "name": "target", "nameLocation": "1230:6:53", "nodeType": "VariableDeclaration", "scope": 6952, "src": "1224:12:53", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, "typeName": { "id": 6920, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 6919, "name": "NftId", "nameLocations": [ "1224:5:53" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "1224:5:53" }, "referencedDeclaration": 3353, "src": "1224:5:53", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "visibility": "internal" }, { "constant": false, "id": 6923, "mutability": "mutable", "name": "dipAmount", "nameLocation": "1254:9:53", "nodeType": "VariableDeclaration", "scope": 6952, "src": "1246:17:53", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6922, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1246:7:53", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 6925, "mutability": "mutable", "name": "signatureId", "nameLocation": "1281:11:53", "nodeType": "VariableDeclaration", "scope": 6952, "src": "1273:19:53", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6924, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1273:7:53", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 6927, "mutability": "mutable", "name": "signature", "nameLocation": "1387:9:53", "nodeType": "VariableDeclaration", "scope": 6952, "src": "1372:24:53", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 6926, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1372:5:53", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "1191:211:53" }, "returnParameters": { "id": 6929, "nodeType": "ParameterList", "parameters": [], "src": "1425:0:53" }, "scope": 7109, "src": "1161:453:53", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { "id": 6988, "nodeType": "Block", "src": "1886:192:53", "statements": [ { "assignments": [ 6968 ], "declarations": [ { "constant": false, "id": 6968, "mutability": "mutable", "name": "digest", "nameLocation": "1904:6:53", "nodeType": "VariableDeclaration", "scope": 6988, "src": "1896:14:53", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6967, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1896:7:53", "typeDescriptions": {