@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,425 lines (1,424 loc) • 299 kB
JSON
{
"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_POLICY_TYPE",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EIP712_TYPE_HASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "policyHolder",
"type": "address"
},
{
"internalType": "address",
"name": "protectedWallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "protectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}
],
"name": "applyForPolicy",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "protectedWallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "protectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getDigest",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"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": "address",
"name": "protectedWallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "protectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}
],
"name": "getSignerFromDigestAndSignature",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "protectedWallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "protectedBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getStructHash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "structHash",
"type": "bytes32"
}
],
"name": "getTypedDataV4Hash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"12": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/cryptography/ECDSA.sol",
"54": "contracts/EIP712.sol",
"64": "contracts/test/Gasless.sol"
},
"ast": {
"absolutePath": "contracts/test/Gasless.sol",
"exportedSymbols": {
"EIP712": [
4683
],
"Gasless": [
7855
]
},
"id": 7856,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 7700,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:64"
},
{
"absolutePath": "contracts/EIP712.sol",
"file": "../EIP712.sol",
"id": 7702,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 7856,
"sourceUnit": 4684,
"src": "63:37:64",
"symbolAliases": [
{
"foreign": {
"id": 7701,
"name": "EIP712",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"src": "71:6:64",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 7703,
"name": "EIP712",
"nodeType": "IdentifierPath",
"referencedDeclaration": 4683,
"src": "126:6:64"
},
"id": 7704,
"nodeType": "InheritanceSpecifier",
"src": "126:6:64"
}
],
"contractDependencies": [
4683
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 7855,
"linearizedBaseContracts": [
7855,
4683
],
"name": "Gasless",
"nameLocation": "111:7:64",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "fd070296",
"id": 7707,
"mutability": "constant",
"name": "EIP712_DOMAIN_NAME",
"nameLocation": "194:18:64",
"nodeType": "VariableDeclaration",
"scope": 7855,
"src": "171:59:64",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 7705,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "171:6:64",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"hexValue": "45746865726973634465706567",
"id": 7706,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "215:15:64",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_55d9572bc870968148d64559e3f054afe52848f22a50302a667bf2b58a0c131b",
"typeString": "literal_string \"EtheriscDepeg\""
},
"value": "EtheriscDepeg"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "5cc33321",
"id": 7710,
"mutability": "constant",
"name": "EIP712_DOMAIN_VERSION",
"nameLocation": "259:21:64",
"nodeType": "VariableDeclaration",
"scope": 7855,
"src": "236:50:64",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 7708,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "236:6:64",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"hexValue": "31",
"id": 7709,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "283:3:64",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6",
"typeString": "literal_string \"1\""
},
"value": "1"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "3e52fa7d",
"id": 7713,
"mutability": "constant",
"name": "EIP712_POLICY_TYPE",
"nameLocation": "316:18:64",
"nodeType": "VariableDeclaration",
"scope": 7855,
"src": "293:127:64",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 7711,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "293:6:64",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"hexValue": "506f6c69637928616464726573732077616c6c65742c75696e743235362070726f74656374656442616c616e63652c75696e74323536206475726174696f6e2c75696e743235362062756e646c65496429",
"id": 7712,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "337:83:64",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_757ca318949ab7e01114bb72954b37d8770a86308802c8b66863e21c582a9b25",
"typeString": "literal_string \"Policy(address wallet,uint256 protectedBalance,uint256 duration,uint256 bundleId)\""
},
"value": "Policy(address wallet,uint256 protectedBalance,uint256 duration,uint256 bundleId)"
},
"visibility": "public"
},
{
"constant": true,
"id": 7721,
"mutability": "constant",
"name": "EIP712_POLICY_TYPE_HASH",
"nameLocation": "451:23:64",
"nodeType": "VariableDeclaration",
"scope": 7855,
"src": "426:98:64",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 7714,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "426:7:64",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"id": 7718,
"name": "EIP712_POLICY_TYPE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7713,
"src": "504:18:64",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
],
"expression": {
"id": 7716,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "487:3:64",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 7717,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodePacked",
"nodeType": "MemberAccess",
"src": "487:16:64",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
"typeString": "function () pure returns (bytes memory)"
}
},
"id": 7719,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "487:36:64",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 7715,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "477:9:64",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 7720,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "477:47:64",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "private"
},
{
"body": {
"id": 7728,
"nodeType": "Block",
"src": "608:3:64",
"statements": []
},
"id": 7729,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"id": 7724,
"name": "EIP712_DOMAIN_NAME",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7707,
"src": "561:18:64",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
{
"id": 7725,
"name": "EIP712_DOMAIN_VERSION",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7710,
"src": "581:21:64",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
}
],
"id": 7726,
"modifierName": {
"id": 7723,
"name": "EIP712",
"nodeType": "IdentifierPath",
"referencedDeclaration": 4683,
"src": "554:6:64"
},
"nodeType": "ModifierInvocation",
"src": "554:49:64"
}
],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 7722,
"nodeType": "ParameterList",
"parameters": [],
"src": "542:2:64"
},
"returnParameters": {
"id": 7727,
"nodeType": "ParameterList",
"parameters": [],
"src": "608:0:64"
},
"scope": 7855,
"src": "531:80:64",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 7771,
"nodeType": "Block",
"src": "883:312:64",
"statements": [
{
"expression": {
"id": 7748,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 7746,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7744,
"src": "893:7:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "66616c7365",
"id": 7747,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "903:5:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "893:15:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 7749,
"nodeType": "ExpressionStatement",
"src": "893:15:64"
},
{
"assignments": [
7751
],
"declarations": [
{
"constant": false,
"id": 7751,
"mutability": "mutable",
"name": "signer",
"nameLocation": "927:6:64",
"nodeType": "VariableDeclaration",
"scope": 7771,
"src": "919:14:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 7750,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "919:7:64",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 7759,
"initialValue": {
"arguments": [
{
"id": 7753,
"name": "protectedWallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7733,
"src": "981:15:64",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 7754,
"name": "protectedBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7735,
"src": "1010:16:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 7755,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7737,
"src": "1040:8:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 7756,
"name": "bundleId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7739,
"src": "1062:8:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 7757,
"name": "signature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7741,
"src": "1084:9:64",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"id": 7752,
"name": "getSignerFromDigestAndSignature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7802,
"src": "936:31:64",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_calldata_ptr_$returns$_t_address_$",
"typeString": "function (address,uint256,uint256,uint256,bytes calldata) view returns (address)"
}
},
"id": 7758,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "936:158:64",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "919:175:64"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 7763,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 7761,
"name": "policyHolder",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7731,
"src": "1113:12:64",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 7762,
"name": "signer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7751,
"src": "1129:6:64",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1113:22:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a205369676e617475726520696e76616c6964",
"id": 7764,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1137:26:64",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_04ff938f5531d5405f0b9bf7471623a1b59bca890d502f9a11ef66354d8c66c8",
"typeString": "literal_string \"ERROR: Signature invalid\""
},
"value": "ERROR: Signature invalid"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_04ff938f5531d5405f0b9bf7471623a1b59bca890d502f9a11ef66354d8c66c8",
"typeString": "literal_string \"ERROR: Signature invalid\""
}
],
"id": 7760,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1105:7:64",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 7765,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1105:59:64",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 7766,
"nodeType": "ExpressionStatement",
"src": "1105:59:64"
},
{
"expression": {
"id": 7769,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 7767,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7744,
"src": "1174:7:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "74727565",
"id": 7768,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1184:4:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1174:14:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 7770,
"nodeType": "ExpressionStatement",
"src": "1174:14:64"
}
]
},
"functionSelector": "04faaf9b",
"id": 7772,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "applyForPolicy",
"nameLocation": "627:14:64",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 7742,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 7731,
"mutability": "mutable",
"name": "policyHolder",
"nameLocation": "659:12:64",
"nodeType": "VariableDeclaration",
"scope": 7772,
"src": "651:20:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 7730,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "651:7:64",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7733,
"mutability": "mutable",
"name": "protectedWallet",
"nameLocation": "689:15:64",
"nodeType": "VariableDeclaration",
"scope": 7772,
"src": "681:23:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 7732,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "681:7:64",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7735,
"mutability": "mutable",
"name": "protectedBalance",
"nameLocation": "722:16:64",
"nodeType": "VariableDeclaration",
"scope": 7772,
"src": "714:24:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 7734,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "714:7:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7737,
"mutability": "mutable",
"name": "duration",
"nameLocation": "756:8:64",
"nodeType": "VariableDeclaration",
"scope": 7772,
"src": "748:16:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 7736,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "748:7:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7739,
"mutability": "mutable",
"name": "bundleId",
"nameLocation": "782:8:64",
"nodeType": "VariableDeclaration",
"scope": 7772,
"src": "774:16:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 7738,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "774:7:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7741,
"mutability": "mutable",
"name": "signature",
"nameLocation": "816:9:64",
"nodeType": "VariableDeclaration",
"scope": 7772,
"src": "801:24:64",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 7740,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "801:5:64",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "641:190:64"
},
"returnParameters": {
"id": 7745,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 7744,
"mutability": "mutable",
"name": "success",
"nameLocation": "870:7:64",
"nodeType": "VariableDeclaration",
"scope": 7772,
"src": "865:12:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 7743,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "865:4:64",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "864:14:64"
},
"scope": 7855,
"src": "618:577:64",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": {
"id": 7801,
"nodeType": "Block",
"src": "1459:222:64",
"statements": [
{
"assignments": [
7788
],
"declarations": [
{
"constant": false,
"id": 7788,
"mutability": "mutable",
"name": "digest",
"nameLocation": "1477:6:64",
"nodeType": "VariableDeclaration",
"scope": 7801,
"src": "1469:14:64",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 7787,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1469:7:64",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 7795,
"initialValue": {
"arguments": [
{
"id": 7790,
"name": "protectedWallet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7774,
"src": "1513:15:64",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 7791,
"name": "protectedBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7776,
"src": "1546:16:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 7792,
"name": "duration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7778,
"src": "1580:8:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"id": 7793,
"name": "bundleId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7780,
"src": "1606:8:64",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 7789,
"name": "getDigest",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7829,
"src": "1486:9:64",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
"typeString": "function (address,uint256,uint256,uint256) view returns (bytes32)"
}
},
"id": 7794,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1486:142:64",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1469:159:64"
},
{
"expression": {
"arguments": [
{
"id": 7797,
"name": "digest",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7788,
"src": "1656:6:64",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 7798,
"name": "signature",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7782,
"src": "1664:9:64",
"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": 7796,
"name": "getSigner",
"nodeType": "Identifier",