mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-17 05:20:56 +00:00
6436 lines
286 KiB
JSON
6436 lines
286 KiB
JSON
{
|
|
"contractName": "DailyLimitModule",
|
|
"abi": [
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "manager",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"name": "_masterCopy",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "changeMasterCopy",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "NAME",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "dailyLimits",
|
|
"outputs": [
|
|
{
|
|
"name": "dailyLimit",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"name": "spentToday",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"name": "lastDay",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "VERSION",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"name": "tokens",
|
|
"type": "address[]"
|
|
},
|
|
{
|
|
"name": "_dailyLimits",
|
|
"type": "uint256[]"
|
|
}
|
|
],
|
|
"name": "setup",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "dailyLimit",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "changeDailyLimit",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"inputs": [
|
|
{
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "executeDailyLimit",
|
|
"outputs": [],
|
|
"payable": false,
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [],
|
|
"name": "today",
|
|
"outputs": [
|
|
{
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"bytecode": "0x608060405234801561001057600080fd5b50610de9806100206000396000f300608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f031461009e578063481c6a751461014757806363bae7c31461019e5780637de7edef1461020b57806381c5e03b1461024e578063a3f4df7e1461029b578063b74e452b1461032b578063d7bffc9214610356578063ffa1ad74146103bb575b600080fd5b3480156100aa57600080fd5b50610145600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061044b565b005b34801561015357600080fd5b5061015c6104ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101aa57600080fd5b50610209600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610510565b005b34801561021757600080fd5b5061024c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a64565b005b34801561025a57600080fd5b50610299600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b29565b005b3480156102a757600080fd5b506102b0610bd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f05780820151818401526020810190506102d5565b50505050905090810190601f16801561031d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033757600080fd5b50610340610c09565b6040518082815260200191505060405180910390f35b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c21565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103c757600080fd5b506103d0610c4b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104105780820151818401526020810190506103f5565b50505050905090810190601f16801561043d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000610455610c84565b600090505b82518110156104e557818181518110151561047157fe5b9060200190602002015160026000858481518110151561048d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550808060010191505061045a565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156105cf57600080fd5b505af11580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b8101908080519060200190929190505050151561061557600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415151561063b57600080fd5b60008211151561064a57600080fd5b6106548483610d0e565b151561065f57600080fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555060008473ffffffffffffffffffffffffffffffffffffffff16141561080957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7848460006040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018060200183600281111561078757fe5b60ff168152602001828103825260008152602001602001945050505050602060405180830381600087803b1580156107be57600080fd5b505af11580156107d2573d6000803e3d6000fd5b505050506040513d60208110156107e857600080fd5b8101908080519060200190929190505050151561080457600080fd5b610a5e565b8282604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183600281111561098857fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b838110156109c85780820151818401526020810190506109ad565b50505050905090810190601f1680156109f55780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610a1757600080fd5b505af1158015610a2b573d6000803e3d6000fd5b505050506040513d6020811015610a4157600080fd5b81019080805190602001909291905050501515610a5d57600080fd5b5b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ac057600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610ae657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8557600080fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b60006201518042811515610c1957fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6040805190810160405280600581526020017f302e302e3100000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610ccb57600080fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154610d5f610c09565b1115610d8057610d6d610c09565b8160020181905550600081600101819055505b80600001548382600101540111158015610da35750806001015483826001015401115b15610db15760019150610db6565b600091505b50929150505600a165627a7a723058204a6f633058d32a4c7f0a2649d73dd0a0048102b89b6ddd371abdbd004bd34c790029",
|
|
"deployedBytecode": "0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f031461009e578063481c6a751461014757806363bae7c31461019e5780637de7edef1461020b57806381c5e03b1461024e578063a3f4df7e1461029b578063b74e452b1461032b578063d7bffc9214610356578063ffa1ad74146103bb575b600080fd5b3480156100aa57600080fd5b50610145600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061044b565b005b34801561015357600080fd5b5061015c6104ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101aa57600080fd5b50610209600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610510565b005b34801561021757600080fd5b5061024c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a64565b005b34801561025a57600080fd5b50610299600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b29565b005b3480156102a757600080fd5b506102b0610bd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f05780820151818401526020810190506102d5565b50505050905090810190601f16801561031d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033757600080fd5b50610340610c09565b6040518082815260200191505060405180910390f35b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c21565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103c757600080fd5b506103d0610c4b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104105780820151818401526020810190506103f5565b50505050905090810190601f16801561043d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000610455610c84565b600090505b82518110156104e557818181518110151561047157fe5b9060200190602002015160026000858481518110151561048d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550808060010191505061045a565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156105cf57600080fd5b505af11580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b8101908080519060200190929190505050151561061557600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff161415151561063b57600080fd5b60008211151561064a57600080fd5b6106548483610d0e565b151561065f57600080fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555060008473ffffffffffffffffffffffffffffffffffffffff16141561080957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7848460006040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018060200183600281111561078757fe5b60ff168152602001828103825260008152602001602001945050505050602060405180830381600087803b1580156107be57600080fd5b505af11580156107d2573d6000803e3d6000fd5b505050506040513d60208110156107e857600080fd5b8101908080519060200190929190505050151561080457600080fd5b610a5e565b8282604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183600281111561098857fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b838110156109c85780820151818401526020810190506109ad565b50505050905090810190601f1680156109f55780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610a1757600080fd5b505af1158015610a2b573d6000803e3d6000fd5b505050506040513d6020811015610a4157600080fd5b81019080805190602001909291905050501515610a5d57600080fd5b5b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ac057600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610ae657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b8557600080fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b60006201518042811515610c1957fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6040805190810160405280600581526020017f302e302e3100000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610ccb57600080fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154610d5f610c09565b1115610d8057610d6d610c09565b8160020181905550600081600101819055505b80600001548382600101540111158015610da35750806001015483826001015401115b15610db15760019150610db6565b600091505b50929150505600a165627a7a723058204a6f633058d32a4c7f0a2649d73dd0a0048102b89b6ddd371abdbd004bd34c790029",
|
|
"sourceMap": "296:3082:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;296:3082:17;;;;;;;",
|
|
"deployedSourceMap": "296:3082:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;918:222;;8:9:-1;5:2;;;30:1;27;20:12;5:2;918:222:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;262:28:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:28:7;;;;;;;;;;;;;;;;;;;;;;;;;;;1890:784:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1890:784:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;626:208:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;626:208:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1368:158:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1368:158:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;339:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;339:50:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;339:50:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3260:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3260:116:17;;;;;;;;;;;;;;;;;;;;;;;513:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;513:50:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;395:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;395:40:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;395:40:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;918:222;1031:9;1004:12;:10;:12::i;:::-;1043:1;1031:13;;1026:107;1050:6;:13;1046:1;:17;1026:107;;;1118:12;1131:1;1118:15;;;;;;;;;;;;;;;;;;1082:11;:22;1094:6;1101:1;1094:9;;;;;;;;;;;;;;;;;;1082:22;;;;;;;;;;;;;;;:33;;:51;;;;1065:3;;;;;;;1026:107;;;918:222;;;:::o;262:28:7:-;;;;;;;;;;;;;:::o;1890:784:17:-;2480:17;2087:7;;;;;;;;;;;2074:29;;;2104:10;2074:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2074:41:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2074:41:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2074:41:17;;;;;;;;;;;;;;;;2066:50;;;;;;;;2140:1;2134:2;:7;;;;2126:16;;;;;;;;2169:1;2160:6;:10;2152:19;;;;;;;;2253:27;2266:5;2273:6;2253:12;:27::i;:::-;2245:36;;;;;;;;2324:6;2291:11;:18;2303:5;2291:18;;;;;;;;;;;;;;;:29;;;:39;;;;;;;;;;;2353:1;2344:5;:10;;;2340:328;;;2378:7;;;;;;;;;;;:33;;;2412:2;2416:6;2428:19;2378:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2378:70:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2378:70:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2378:70:17;;;;;;;;;;;;;;;;2370:79;;;;;;;;2340:328;;;2553:2;2557:6;2500:64;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2500:64:17;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;2500:64:17;2480:84;;2586:7;;;;;;;;;;;:33;;;2620:5;2627:1;2630:4;2636:19;2586:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2586:70:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2586:70:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2586:70:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2586:70:17;;;;;;;;;;;;;;;;2578:79;;;;;;;;2340:328;1890:784;;;;:::o;626:208:5:-;359:7:7;;;;;;;;;;;337:30;;:10;:30;;;329:39;;;;;;;;791:1:5;776:11;:16;;;;768:25;;;;;;;;816:11;803:10;;:24;;;;;;;;;;;;;;;;;;626:208;:::o;1368:158:17:-;359:7:7;;;;;;;;;;;337:30;;:10;:30;;;329:39;;;;;;;;1509:10:17;1477:11;:18;1489:5;1477:18;;;;;;;;;;;;;;;:29;;:42;;;;1368:158;;:::o;339:50::-;;;;;;;;;;;;;;;;;;;;:::o;3260:116::-;3322:4;3362:6;3356:3;:12;;;;;;;;3349:3;:20;3342:27;;3260:116;:::o;513:50::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;395:40::-;;;;;;;;;;;;;;;;;;;;:::o;392:268:7:-;606:1;594:7;;;;;;;;;;;586:21;;;578:30;;;;;;;;642:10;618:7;;:35;;;;;;;;;;;;;;;;;;392:268::o;2680:488:17:-;2767:4;2787:29;2819:11;:18;2831:5;2819:18;;;;;;;;;;;;;;;2787:50;;2861:10;:18;;;2851:7;:5;:7::i;:::-;:28;2847:126;;;2916:7;:5;:7::i;:::-;2895:10;:18;;:28;;;;2961:1;2937:10;:21;;:25;;;;2847:126;3023:10;:21;;;3013:6;2989:10;:21;;;:30;:55;;:125;;;;;3093:10;:21;;;3084:6;3060:10;:21;;;:30;:54;2989:125;2982:157;;;3135:4;3128:11;;;;2982:157;3156:5;3149:12;;2680:488;;;;;;:::o",
|
|
"source": "pragma solidity 0.4.24;\nimport \"../Module.sol\";\nimport \"../ModuleManager.sol\";\nimport \"../OwnerManager.sol\";\nimport \"../Enum.sol\";\n\n\n/// @title Daily Limit Module - Allows to transfer limited amounts of ERC20 tokens and Ether without confirmations.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract DailyLimitModule is Module {\n\n string public constant NAME = \"Daily Limit Module\";\n string public constant VERSION = \"0.0.1\";\n\n // dailyLimits mapping maps token address to daily limit settings.\n mapping (address => DailyLimit) public dailyLimits;\n\n struct DailyLimit {\n uint256 dailyLimit;\n uint256 spentToday;\n uint256 lastDay;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param tokens List of token addresses. Ether is represented with address 0x0.\n /// @param _dailyLimits List of daily limits in smalles units (e.g. Wei for Ether).\n function setup(address[] tokens, uint256[] _dailyLimits)\n public\n {\n setManager();\n for (uint256 i = 0; i < tokens.length; i++)\n dailyLimits[tokens[i]].dailyLimit = _dailyLimits[i];\n }\n\n /// @dev Allows to update the daily limit for a specified token. This can only be done via a Safe transaction.\n /// @param token Token contract address.\n /// @param dailyLimit Daily limit in smallest token unit.\n function changeDailyLimit(address token, uint256 dailyLimit)\n public\n authorized\n {\n dailyLimits[token].dailyLimit = dailyLimit;\n }\n\n /// @dev Returns if Safe transaction is a valid daily limit transaction.\n /// @param token Address of the token that should be transfered (0 for Ether)\n /// @param to Address to which the tokens should be transfered\n /// @param amount Amount of tokens (or Ether) that should be transfered\n /// @return Returns if transaction can be executed.\n function executeDailyLimit(address token, address to, uint256 amount)\n public\n {\n // Only Safe owners are allowed to execute daily limit transactions.\n require(OwnerManager(manager).isOwner(msg.sender));\n require(to != 0);\n require(amount > 0);\n // Validate that transfer is not exceeding daily limit.\n require(isUnderLimit(token, amount));\n dailyLimits[token].spentToday += amount;\n if (token == 0) {\n require(manager.execTransactionFromModule(to, amount, \"\", Enum.Operation.Call));\n } else {\n bytes memory data = abi.encodeWithSignature(\"transfer(address,uint256)\", to, amount);\n require(manager.execTransactionFromModule(token, 0, data, Enum.Operation.Call));\n }\n }\n\n function isUnderLimit(address token, uint256 amount)\n internal\n returns (bool)\n {\n DailyLimit storage dailyLimit = dailyLimits[token];\n if (today() > dailyLimit.lastDay) {\n dailyLimit.lastDay = today();\n dailyLimit.spentToday = 0;\n }\n if ( dailyLimit.spentToday + amount <= dailyLimit.dailyLimit\n && dailyLimit.spentToday + amount > dailyLimit.spentToday)\n return true;\n return false;\n }\n\n /// @dev Returns last midnight as Unix timestamp.\n /// @return Unix timestamp.\n function today()\n public\n view\n returns (uint)\n {\n return now - (now % 1 days);\n }\n}\n",
|
|
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
|
|
"exportedSymbols": {
|
|
"DailyLimitModule": [
|
|
1973
|
|
]
|
|
},
|
|
"id": 1974,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1742,
|
|
"literals": [
|
|
"solidity",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:17"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
|
|
"file": "../Module.sol",
|
|
"id": 1743,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 751,
|
|
"src": "24:23:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
|
|
"file": "../ModuleManager.sol",
|
|
"id": 1744,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 1101,
|
|
"src": "48:30:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
|
|
"file": "../OwnerManager.sol",
|
|
"id": 1745,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 1473,
|
|
"src": "79:29:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
|
|
"file": "../Enum.sol",
|
|
"id": 1746,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 31,
|
|
"src": "109:21:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 1747,
|
|
"name": "Module",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 750,
|
|
"src": "325:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Module_$750",
|
|
"typeString": "contract Module"
|
|
}
|
|
},
|
|
"id": 1748,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "325:6:17"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
652,
|
|
750,
|
|
1619
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": "@title Daily Limit Module - Allows to transfer limited amounts of ERC20 tokens and Ether without confirmations.\n @author Stefan George - <stefan@gnosis.pm>",
|
|
"fullyImplemented": true,
|
|
"id": 1973,
|
|
"linearizedBaseContracts": [
|
|
1973,
|
|
750,
|
|
652,
|
|
1619
|
|
],
|
|
"name": "DailyLimitModule",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 1751,
|
|
"name": "NAME",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1973,
|
|
"src": "339:50:17",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1749,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "339:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "4461696c79204c696d6974204d6f64756c65",
|
|
"id": 1750,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "369:20:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
|
|
"typeString": "literal_string \"Daily Limit Module\""
|
|
},
|
|
"value": "Daily Limit Module"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 1754,
|
|
"name": "VERSION",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1973,
|
|
"src": "395:40:17",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1752,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "395:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "302e302e31",
|
|
"id": 1753,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "428:7:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
|
|
"typeString": "literal_string \"0.0.1\""
|
|
},
|
|
"value": "0.0.1"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1758,
|
|
"name": "dailyLimits",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1973,
|
|
"src": "513:50:17",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
|
|
},
|
|
"typeName": {
|
|
"id": 1757,
|
|
"keyType": {
|
|
"id": 1755,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "522:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "513:31:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
|
|
},
|
|
"valueType": {
|
|
"contractScope": null,
|
|
"id": 1756,
|
|
"name": "DailyLimit",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1765,
|
|
"src": "533:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"canonicalName": "DailyLimitModule.DailyLimit",
|
|
"id": 1765,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 1760,
|
|
"name": "dailyLimit",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1765,
|
|
"src": "598:18:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1759,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "598:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1762,
|
|
"name": "spentToday",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1765,
|
|
"src": "626:18:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1761,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "626:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1764,
|
|
"name": "lastDay",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1765,
|
|
"src": "654:15:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1763,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "654:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "DailyLimit",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 1973,
|
|
"src": "570:106:17",
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1800,
|
|
"nodeType": "Block",
|
|
"src": "994:146:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 1774,
|
|
"name": "setManager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 749,
|
|
"src": "1004:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
|
|
"typeString": "function ()"
|
|
}
|
|
},
|
|
"id": 1775,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1004:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1776,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1004:12:17"
|
|
},
|
|
{
|
|
"body": {
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1797,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1788,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "1082:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1792,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1789,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1768,
|
|
"src": "1094:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 1791,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1790,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1101:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1094:9:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1082:22:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"id": 1793,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "dailyLimit",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1760,
|
|
"src": "1082:33:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1794,
|
|
"name": "_dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1771,
|
|
"src": "1118:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"id": 1796,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1795,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1131:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1118:15:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1082:51:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1798,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1082:51:17"
|
|
},
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1784,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1781,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1046:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1782,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1768,
|
|
"src": "1050:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 1783,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1050:13:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1046:17:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1799,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
1778
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1778,
|
|
"name": "i",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1801,
|
|
"src": "1031:9:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1777,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1031:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1780,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1779,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1043:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1031:13:17"
|
|
},
|
|
"loopExpression": {
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1786,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "1065:3:17",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1785,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1065:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1787,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1065:3:17"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "1026:107:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Setup function sets initial storage of contract.\n @param tokens List of token addresses. Ether is represented with address 0x0.\n @param _dailyLimits List of daily limits in smalles units (e.g. Wei for Ether).",
|
|
"id": 1801,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "setup",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1772,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1768,
|
|
"name": "tokens",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1801,
|
|
"src": "933:16:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1766,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "933:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1767,
|
|
"length": null,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "933:9:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1771,
|
|
"name": "_dailyLimits",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1801,
|
|
"src": "951:22:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1769,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "951:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1770,
|
|
"length": null,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "951:9:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "932:42:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1773,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "994:0:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "918:222:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1817,
|
|
"nodeType": "Block",
|
|
"src": "1467:59:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1815,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1810,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "1477:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1812,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1811,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1803,
|
|
"src": "1489:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1477:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"id": 1813,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "dailyLimit",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1760,
|
|
"src": "1477:29:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1814,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1805,
|
|
"src": "1509:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1477:42:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1816,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1477:42:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Allows to update the daily limit for a specified token. This can only be done via a Safe transaction.\n @param token Token contract address.\n @param dailyLimit Daily limit in smallest token unit.",
|
|
"id": 1818,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 1808,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 1807,
|
|
"name": "authorized",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 730,
|
|
"src": "1452:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1452:10:17"
|
|
}
|
|
],
|
|
"name": "changeDailyLimit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1806,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1803,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1818,
|
|
"src": "1394:13:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1802,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1394:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1805,
|
|
"name": "dailyLimit",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1818,
|
|
"src": "1409:18:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1804,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1409:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1393:35:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1809,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1467:0:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "1368:158:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1902,
|
|
"nodeType": "Block",
|
|
"src": "1979:695:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1832,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2598,
|
|
"src": "2104:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 1833,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2104:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1829,
|
|
"name": "manager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 717,
|
|
"src": "2087:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
],
|
|
"id": 1828,
|
|
"name": "OwnerManager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1472,
|
|
"src": "2074:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$1472_$",
|
|
"typeString": "type(contract OwnerManager)"
|
|
}
|
|
},
|
|
"id": 1830,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2074:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_OwnerManager_$1472",
|
|
"typeString": "contract OwnerManager"
|
|
}
|
|
},
|
|
"id": 1831,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "isOwner",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1422,
|
|
"src": "2074:29:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view external returns (bool)"
|
|
}
|
|
},
|
|
"id": 1834,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2074:41:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1827,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2066:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1835,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2066:50:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1836,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2066:50:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 1840,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1838,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1822,
|
|
"src": "2134:2:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1839,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2140:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2134:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1837,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2126:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1841,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2126:16:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1842,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2126:16:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1846,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1844,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2160:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1845,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2169:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2160:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1843,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2152:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1847,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2152:19:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1848,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2152:19:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1851,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2266:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1852,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2273:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1850,
|
|
"name": "isUnderLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1959,
|
|
"src": "2253:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) returns (bool)"
|
|
}
|
|
},
|
|
"id": 1853,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2253:27:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1849,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2245:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1854,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2245:36:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1855,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2245:36:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1861,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1856,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "2291:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1858,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1857,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2303:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2291:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"id": 1859,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "2291:29:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1860,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2324:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2291:39:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1862,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2291:39:17"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 1865,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1863,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2344:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1864,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2353:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2344:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1900,
|
|
"nodeType": "Block",
|
|
"src": "2466:202:17",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1880
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1880,
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "2480:17:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1879,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2480:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1887,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "7472616e7366657228616464726573732c75696e7432353629",
|
|
"id": 1883,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2524:27:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
|
|
"typeString": "literal_string \"transfer(address,uint256)\""
|
|
},
|
|
"value": "transfer(address,uint256)"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1884,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1822,
|
|
"src": "2553:2:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1885,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2557:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
|
|
"typeString": "literal_string \"transfer(address,uint256)\""
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1881,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2585,
|
|
"src": "2500:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 1882,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodeWithSignature",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2500:23:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1886,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2500:64:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2480:84:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1891,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2620:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1892,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2627:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1893,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1880,
|
|
"src": "2630:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1894,
|
|
"name": "Enum",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 30,
|
|
"src": "2636:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
|
|
"typeString": "type(contract Enum)"
|
|
}
|
|
},
|
|
"id": 1895,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "Operation",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 29,
|
|
"src": "2636:14:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
|
|
"typeString": "type(enum Enum.Operation)"
|
|
}
|
|
},
|
|
"id": 1896,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "Call",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2636:19:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1889,
|
|
"name": "manager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 717,
|
|
"src": "2586:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
},
|
|
"id": 1890,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "execTransactionFromModule",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 927,
|
|
"src": "2586:33:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$29_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 1897,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2586:70:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1888,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2578:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1898,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2578:79:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1899,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2578:79:17"
|
|
}
|
|
]
|
|
},
|
|
"id": 1901,
|
|
"nodeType": "IfStatement",
|
|
"src": "2340:328:17",
|
|
"trueBody": {
|
|
"id": 1878,
|
|
"nodeType": "Block",
|
|
"src": "2356:104:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1869,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1822,
|
|
"src": "2412:2:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1870,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2416:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "",
|
|
"id": 1871,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2424:2:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
"value": ""
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1872,
|
|
"name": "Enum",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 30,
|
|
"src": "2428:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
|
|
"typeString": "type(contract Enum)"
|
|
}
|
|
},
|
|
"id": 1873,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "Operation",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 29,
|
|
"src": "2428:14:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
|
|
"typeString": "type(enum Enum.Operation)"
|
|
}
|
|
},
|
|
"id": 1874,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "Call",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2428:19:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
{
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1867,
|
|
"name": "manager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 717,
|
|
"src": "2378:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
},
|
|
"id": 1868,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "execTransactionFromModule",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 927,
|
|
"src": "2378:33:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$29_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 1875,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2378:70:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1866,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2370:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1876,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2370:79:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1877,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2370:79:17"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param token Address of the token that should be transfered (0 for Ether)\n @param to Address to which the tokens should be transfered\n @param amount Amount of tokens (or Ether) that should be transfered\n @return Returns if transaction can be executed.",
|
|
"id": 1903,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "executeDailyLimit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1825,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1820,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "1917:13:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1819,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1917:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1822,
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "1932:10:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1821,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1932:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1824,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "1944:14:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1823,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1944:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1916:43:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1826,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1979:0:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "1890:784:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1958,
|
|
"nodeType": "Block",
|
|
"src": "2777:391:17",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1913
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1913,
|
|
"name": "dailyLimit",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2787:29:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1912,
|
|
"name": "DailyLimit",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1765,
|
|
"src": "2787:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1917,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1914,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "2819:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1916,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1915,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1905,
|
|
"src": "2831:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2819:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2787:50:17"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1922,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 1918,
|
|
"name": "today",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1972,
|
|
"src": "2851:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1919,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2851:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1920,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2861:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1921,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "lastDay",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1764,
|
|
"src": "2861:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2851:28:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 1937,
|
|
"nodeType": "IfStatement",
|
|
"src": "2847:126:17",
|
|
"trueBody": {
|
|
"id": 1936,
|
|
"nodeType": "Block",
|
|
"src": "2881:92:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1928,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1923,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2895:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1925,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "lastDay",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1764,
|
|
"src": "2895:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 1926,
|
|
"name": "today",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1972,
|
|
"src": "2916:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1927,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2916:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2895:28:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1929,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2895:28:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1934,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1930,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2937:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1932,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "2937:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1933,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2961:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2937:25:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1935,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2937:25:17"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1952,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1944,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1938,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2989:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1939,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "2989:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1940,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1907,
|
|
"src": "3013:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2989:30:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1942,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "3023:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1943,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "dailyLimit",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1760,
|
|
"src": "3023:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2989:55:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1951,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1948,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1945,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "3060:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1946,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "3060:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1947,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1907,
|
|
"src": "3084:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3060:30:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1949,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "3093:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1950,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "3093:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3060:54:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "2989:125:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 1955,
|
|
"nodeType": "IfStatement",
|
|
"src": "2982:157:17",
|
|
"trueBody": {
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 1953,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3135:4:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 1911,
|
|
"id": 1954,
|
|
"nodeType": "Return",
|
|
"src": "3128:11:17"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "66616c7365",
|
|
"id": 1956,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3156:5:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "false"
|
|
},
|
|
"functionReturnParameters": 1911,
|
|
"id": 1957,
|
|
"nodeType": "Return",
|
|
"src": "3149:12:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1959,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "isUnderLimit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1908,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1905,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2702:13:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1904,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2702:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1907,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2717:14:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1906,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2717:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2701:31:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1911,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1910,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2767:4:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1909,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2767:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2766:6:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "2680:488:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1971,
|
|
"nodeType": "Block",
|
|
"src": "3332:44:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1969,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1964,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2600,
|
|
"src": "3349:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1967,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1965,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2600,
|
|
"src": "3356:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "%",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 1966,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3362:6:17",
|
|
"subdenomination": "days",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_86400_by_1",
|
|
"typeString": "int_const 86400"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "3356:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 1968,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "3355:14:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3349:20:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1963,
|
|
"id": 1970,
|
|
"nodeType": "Return",
|
|
"src": "3342:27:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
|
|
"id": 1972,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "today",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1960,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3274:2:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1963,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1962,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1972,
|
|
"src": "3322:4:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1961,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3322:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3321:6:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "3260:116:17",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1974,
|
|
"src": "296:3082:17"
|
|
}
|
|
],
|
|
"src": "0:3379:17"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
|
|
"exportedSymbols": {
|
|
"DailyLimitModule": [
|
|
1973
|
|
]
|
|
},
|
|
"id": 1974,
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1742,
|
|
"literals": [
|
|
"solidity",
|
|
"0.4",
|
|
".24"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "0:23:17"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
|
|
"file": "../Module.sol",
|
|
"id": 1743,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 751,
|
|
"src": "24:23:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
|
|
"file": "../ModuleManager.sol",
|
|
"id": 1744,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 1101,
|
|
"src": "48:30:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
|
|
"file": "../OwnerManager.sol",
|
|
"id": 1745,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 1473,
|
|
"src": "79:29:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
|
|
"file": "../Enum.sol",
|
|
"id": 1746,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 1974,
|
|
"sourceUnit": 31,
|
|
"src": "109:21:17",
|
|
"symbolAliases": [],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 1747,
|
|
"name": "Module",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 750,
|
|
"src": "325:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Module_$750",
|
|
"typeString": "contract Module"
|
|
}
|
|
},
|
|
"id": 1748,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "325:6:17"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
652,
|
|
750,
|
|
1619
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": "@title Daily Limit Module - Allows to transfer limited amounts of ERC20 tokens and Ether without confirmations.\n @author Stefan George - <stefan@gnosis.pm>",
|
|
"fullyImplemented": true,
|
|
"id": 1973,
|
|
"linearizedBaseContracts": [
|
|
1973,
|
|
750,
|
|
652,
|
|
1619
|
|
],
|
|
"name": "DailyLimitModule",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 1751,
|
|
"name": "NAME",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1973,
|
|
"src": "339:50:17",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1749,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "339:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "4461696c79204c696d6974204d6f64756c65",
|
|
"id": 1750,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "369:20:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
|
|
"typeString": "literal_string \"Daily Limit Module\""
|
|
},
|
|
"value": "Daily Limit Module"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 1754,
|
|
"name": "VERSION",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1973,
|
|
"src": "395:40:17",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 1752,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "395:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"value": {
|
|
"argumentTypes": null,
|
|
"hexValue": "302e302e31",
|
|
"id": 1753,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "428:7:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
|
|
"typeString": "literal_string \"0.0.1\""
|
|
},
|
|
"value": "0.0.1"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1758,
|
|
"name": "dailyLimits",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1973,
|
|
"src": "513:50:17",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
|
|
},
|
|
"typeName": {
|
|
"id": 1757,
|
|
"keyType": {
|
|
"id": 1755,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "522:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Mapping",
|
|
"src": "513:31:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
|
|
},
|
|
"valueType": {
|
|
"contractScope": null,
|
|
"id": 1756,
|
|
"name": "DailyLimit",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1765,
|
|
"src": "533:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit"
|
|
}
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"canonicalName": "DailyLimitModule.DailyLimit",
|
|
"id": 1765,
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 1760,
|
|
"name": "dailyLimit",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1765,
|
|
"src": "598:18:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1759,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "598:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1762,
|
|
"name": "spentToday",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1765,
|
|
"src": "626:18:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1761,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "626:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1764,
|
|
"name": "lastDay",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1765,
|
|
"src": "654:15:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1763,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "654:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "DailyLimit",
|
|
"nodeType": "StructDefinition",
|
|
"scope": 1973,
|
|
"src": "570:106:17",
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1800,
|
|
"nodeType": "Block",
|
|
"src": "994:146:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 1774,
|
|
"name": "setManager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 749,
|
|
"src": "1004:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
|
|
"typeString": "function ()"
|
|
}
|
|
},
|
|
"id": 1775,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1004:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1776,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1004:12:17"
|
|
},
|
|
{
|
|
"body": {
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1797,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1788,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "1082:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1792,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1789,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1768,
|
|
"src": "1094:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 1791,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1790,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1101:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1094:9:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1082:22:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"id": 1793,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "dailyLimit",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1760,
|
|
"src": "1082:33:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1794,
|
|
"name": "_dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1771,
|
|
"src": "1118:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[] memory"
|
|
}
|
|
},
|
|
"id": 1796,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1795,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1131:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1118:15:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1082:51:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1798,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1082:51:17"
|
|
},
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1784,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1781,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1046:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1782,
|
|
"name": "tokens",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1768,
|
|
"src": "1050:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[] memory"
|
|
}
|
|
},
|
|
"id": 1783,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "1050:13:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1046:17:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 1799,
|
|
"initializationExpression": {
|
|
"assignments": [
|
|
1778
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1778,
|
|
"name": "i",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1801,
|
|
"src": "1031:9:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1777,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1031:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1780,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1779,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1043:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1031:13:17"
|
|
},
|
|
"loopExpression": {
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1786,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "UnaryOperation",
|
|
"operator": "++",
|
|
"prefix": false,
|
|
"src": "1065:3:17",
|
|
"subExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1785,
|
|
"name": "i",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1778,
|
|
"src": "1065:1:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1787,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1065:3:17"
|
|
},
|
|
"nodeType": "ForStatement",
|
|
"src": "1026:107:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Setup function sets initial storage of contract.\n @param tokens List of token addresses. Ether is represented with address 0x0.\n @param _dailyLimits List of daily limits in smalles units (e.g. Wei for Ether).",
|
|
"id": 1801,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "setup",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1772,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1768,
|
|
"name": "tokens",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1801,
|
|
"src": "933:16:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
|
"typeString": "address[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1766,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "933:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 1767,
|
|
"length": null,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "933:9:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
|
"typeString": "address[]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1771,
|
|
"name": "_dailyLimits",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1801,
|
|
"src": "951:22:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
|
|
"typeString": "uint256[]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 1769,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "951:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1770,
|
|
"length": null,
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "951:9:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
|
|
"typeString": "uint256[]"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "932:42:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1773,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "994:0:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "918:222:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1817,
|
|
"nodeType": "Block",
|
|
"src": "1467:59:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1815,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1810,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "1477:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1812,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1811,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1803,
|
|
"src": "1489:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "1477:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"id": 1813,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "dailyLimit",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1760,
|
|
"src": "1477:29:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1814,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1805,
|
|
"src": "1509:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1477:42:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1816,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1477:42:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Allows to update the daily limit for a specified token. This can only be done via a Safe transaction.\n @param token Token contract address.\n @param dailyLimit Daily limit in smallest token unit.",
|
|
"id": 1818,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 1808,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 1807,
|
|
"name": "authorized",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 730,
|
|
"src": "1452:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1452:10:17"
|
|
}
|
|
],
|
|
"name": "changeDailyLimit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1806,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1803,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1818,
|
|
"src": "1394:13:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1802,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1394:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1805,
|
|
"name": "dailyLimit",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1818,
|
|
"src": "1409:18:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1804,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1409:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1393:35:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1809,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1467:0:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "1368:158:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1902,
|
|
"nodeType": "Block",
|
|
"src": "1979:695:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1832,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2598,
|
|
"src": "2104:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 1833,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2104:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1829,
|
|
"name": "manager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 717,
|
|
"src": "2087:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
],
|
|
"id": 1828,
|
|
"name": "OwnerManager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1472,
|
|
"src": "2074:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$1472_$",
|
|
"typeString": "type(contract OwnerManager)"
|
|
}
|
|
},
|
|
"id": 1830,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2074:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_OwnerManager_$1472",
|
|
"typeString": "contract OwnerManager"
|
|
}
|
|
},
|
|
"id": 1831,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "isOwner",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1422,
|
|
"src": "2074:29:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view external returns (bool)"
|
|
}
|
|
},
|
|
"id": 1834,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2074:41:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1827,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2066:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1835,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2066:50:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1836,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2066:50:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 1840,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1838,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1822,
|
|
"src": "2134:2:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1839,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2140:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2134:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1837,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2126:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1841,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2126:16:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1842,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2126:16:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1846,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1844,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2160:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1845,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2169:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2160:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1843,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2152:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1847,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2152:19:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1848,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2152:19:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1851,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2266:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1852,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2273:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 1850,
|
|
"name": "isUnderLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1959,
|
|
"src": "2253:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) returns (bool)"
|
|
}
|
|
},
|
|
"id": 1853,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2253:27:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1849,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2245:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1854,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2245:36:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1855,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2245:36:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1861,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1856,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "2291:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1858,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1857,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2303:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2291:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"id": 1859,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "2291:29:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 1860,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2324:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2291:39:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1862,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2291:39:17"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 1865,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1863,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2344:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1864,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2353:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2344:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 1900,
|
|
"nodeType": "Block",
|
|
"src": "2466:202:17",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1880
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1880,
|
|
"name": "data",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "2480:17:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 1879,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2480:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1887,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "7472616e7366657228616464726573732c75696e7432353629",
|
|
"id": 1883,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2524:27:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
|
|
"typeString": "literal_string \"transfer(address,uint256)\""
|
|
},
|
|
"value": "transfer(address,uint256)"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1884,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1822,
|
|
"src": "2553:2:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1885,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2557:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
|
|
"typeString": "literal_string \"transfer(address,uint256)\""
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1881,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2585,
|
|
"src": "2500:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 1882,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "encodeWithSignature",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2500:23:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 1886,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2500:64:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2480:84:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1891,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1820,
|
|
"src": "2620:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1892,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2627:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1893,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1880,
|
|
"src": "2630:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1894,
|
|
"name": "Enum",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 30,
|
|
"src": "2636:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
|
|
"typeString": "type(contract Enum)"
|
|
}
|
|
},
|
|
"id": 1895,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "Operation",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 29,
|
|
"src": "2636:14:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
|
|
"typeString": "type(enum Enum.Operation)"
|
|
}
|
|
},
|
|
"id": 1896,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "Call",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2636:19:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1889,
|
|
"name": "manager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 717,
|
|
"src": "2586:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
},
|
|
"id": 1890,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "execTransactionFromModule",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 927,
|
|
"src": "2586:33:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$29_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 1897,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2586:70:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1888,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2578:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1898,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2578:79:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1899,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2578:79:17"
|
|
}
|
|
]
|
|
},
|
|
"id": 1901,
|
|
"nodeType": "IfStatement",
|
|
"src": "2340:328:17",
|
|
"trueBody": {
|
|
"id": 1878,
|
|
"nodeType": "Block",
|
|
"src": "2356:104:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1869,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1822,
|
|
"src": "2412:2:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 1870,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1824,
|
|
"src": "2416:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"hexValue": "",
|
|
"id": 1871,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2424:2:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
"value": ""
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1872,
|
|
"name": "Enum",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 30,
|
|
"src": "2428:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
|
|
"typeString": "type(contract Enum)"
|
|
}
|
|
},
|
|
"id": 1873,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "Operation",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 29,
|
|
"src": "2428:14:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
|
|
"typeString": "type(enum Enum.Operation)"
|
|
}
|
|
},
|
|
"id": 1874,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberName": "Call",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": null,
|
|
"src": "2428:19:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
{
|
|
"typeIdentifier": "t_enum$_Operation_$29",
|
|
"typeString": "enum Enum.Operation"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1867,
|
|
"name": "manager",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 717,
|
|
"src": "2378:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ModuleManager_$1100",
|
|
"typeString": "contract ModuleManager"
|
|
}
|
|
},
|
|
"id": 1868,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "execTransactionFromModule",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 927,
|
|
"src": "2378:33:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$29_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 1875,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2378:70:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
],
|
|
"id": 1866,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
2601,
|
|
2602
|
|
],
|
|
"referencedDeclaration": 2601,
|
|
"src": "2370:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
|
|
"typeString": "function (bool) pure"
|
|
}
|
|
},
|
|
"id": 1876,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2370:79:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 1877,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2370:79:17"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param token Address of the token that should be transfered (0 for Ether)\n @param to Address to which the tokens should be transfered\n @param amount Amount of tokens (or Ether) that should be transfered\n @return Returns if transaction can be executed.",
|
|
"id": 1903,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "executeDailyLimit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1825,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1820,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "1917:13:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1819,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1917:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1822,
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "1932:10:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1821,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1932:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1824,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1903,
|
|
"src": "1944:14:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1823,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1944:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1916:43:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1826,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1979:0:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "1890:784:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1958,
|
|
"nodeType": "Block",
|
|
"src": "2777:391:17",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1913
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1913,
|
|
"name": "dailyLimit",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2787:29:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit"
|
|
},
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 1912,
|
|
"name": "DailyLimit",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1765,
|
|
"src": "2787:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 1917,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"baseExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1914,
|
|
"name": "dailyLimits",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1758,
|
|
"src": "2819:11:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1765_storage_$",
|
|
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
|
|
}
|
|
},
|
|
"id": 1916,
|
|
"indexExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1915,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1905,
|
|
"src": "2831:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "IndexAccess",
|
|
"src": "2819:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2787:50:17"
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1922,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 1918,
|
|
"name": "today",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1972,
|
|
"src": "2851:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1919,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2851:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1920,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2861:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1921,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "lastDay",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1764,
|
|
"src": "2861:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2851:28:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 1937,
|
|
"nodeType": "IfStatement",
|
|
"src": "2847:126:17",
|
|
"trueBody": {
|
|
"id": 1936,
|
|
"nodeType": "Block",
|
|
"src": "2881:92:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1928,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1923,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2895:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1925,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "lastDay",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1764,
|
|
"src": "2895:18:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 1926,
|
|
"name": "today",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1972,
|
|
"src": "2916:5:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
|
|
"typeString": "function () view returns (uint256)"
|
|
}
|
|
},
|
|
"id": 1927,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2916:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2895:28:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1929,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2895:28:17"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1934,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1930,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2937:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1932,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "2937:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"hexValue": "30",
|
|
"id": 1933,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2961:1:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "2937:25:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 1935,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2937:25:17"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 1952,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1944,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1941,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1938,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "2989:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1939,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "2989:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1940,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1907,
|
|
"src": "3013:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2989:30:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "<=",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1942,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "3023:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1943,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "dailyLimit",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1760,
|
|
"src": "3023:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2989:55:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "&&",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1951,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1948,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1945,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "3060:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1946,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "3060:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1947,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1907,
|
|
"src": "3084:6:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3060:30:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 1949,
|
|
"name": "dailyLimit",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1913,
|
|
"src": "3093:10:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_DailyLimit_$1765_storage_ptr",
|
|
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
|
|
}
|
|
},
|
|
"id": 1950,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "spentToday",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 1762,
|
|
"src": "3093:21:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3060:54:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "2989:125:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": null,
|
|
"id": 1955,
|
|
"nodeType": "IfStatement",
|
|
"src": "2982:157:17",
|
|
"trueBody": {
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "74727565",
|
|
"id": 1953,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3135:4:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "true"
|
|
},
|
|
"functionReturnParameters": 1911,
|
|
"id": 1954,
|
|
"nodeType": "Return",
|
|
"src": "3128:11:17"
|
|
}
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "66616c7365",
|
|
"id": 1956,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "bool",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3156:5:17",
|
|
"subdenomination": null,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"value": "false"
|
|
},
|
|
"functionReturnParameters": 1911,
|
|
"id": 1957,
|
|
"nodeType": "Return",
|
|
"src": "3149:12:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 1959,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": false,
|
|
"modifiers": [],
|
|
"name": "isUnderLimit",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1908,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1905,
|
|
"name": "token",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2702:13:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1904,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2702:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 1907,
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2717:14:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1906,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2717:7:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2701:31:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1911,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1910,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1959,
|
|
"src": "2767:4:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 1909,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2767:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2766:6:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "2680:488:17",
|
|
"stateMutability": "nonpayable",
|
|
"superFunction": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 1971,
|
|
"nodeType": "Block",
|
|
"src": "3332:44:17",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1969,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1964,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2600,
|
|
"src": "3349:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"components": [
|
|
{
|
|
"argumentTypes": null,
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 1967,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"argumentTypes": null,
|
|
"id": 1965,
|
|
"name": "now",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 2600,
|
|
"src": "3356:3:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "%",
|
|
"rightExpression": {
|
|
"argumentTypes": null,
|
|
"hexValue": "31",
|
|
"id": 1966,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3362:6:17",
|
|
"subdenomination": "days",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_86400_by_1",
|
|
"typeString": "int_const 86400"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "3356:12:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"id": 1968,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "3355:14:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "3349:20:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1963,
|
|
"id": 1970,
|
|
"nodeType": "Return",
|
|
"src": "3342:27:17"
|
|
}
|
|
]
|
|
},
|
|
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
|
|
"id": 1972,
|
|
"implemented": true,
|
|
"isConstructor": false,
|
|
"isDeclaredConst": true,
|
|
"modifiers": [],
|
|
"name": "today",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 1960,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3274:2:17"
|
|
},
|
|
"payable": false,
|
|
"returnParameters": {
|
|
"id": 1963,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1962,
|
|
"name": "",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 1972,
|
|
"src": "3322:4:17",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 1961,
|
|
"name": "uint",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3322:4:17",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3321:6:17"
|
|
},
|
|
"scope": 1973,
|
|
"src": "3260:116:17",
|
|
"stateMutability": "view",
|
|
"superFunction": null,
|
|
"visibility": "public"
|
|
}
|
|
],
|
|
"scope": 1974,
|
|
"src": "296:3082:17"
|
|
}
|
|
],
|
|
"src": "0:3379:17"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
|
|
},
|
|
"networks": {
|
|
"4": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0x7fbf23d81d86e6d983bb5526e1456a314057ffb0",
|
|
"transactionHash": "0x6c99547388ac2e4a058dfefd9a50240efb12fa4b21c127c89dcca96ca3e918d1"
|
|
},
|
|
"1527316019334": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xc78d5518d62b7a5bd2659c432996dd55ca07f1eb",
|
|
"transactionHash": "0xa9c94eb8ff4c3c857211c3b03fa7356009f4952d8cc71d3953be16cd0152a022"
|
|
},
|
|
"1527420696956": {
|
|
"events": {},
|
|
"links": {},
|
|
"address": "0xf289e80fb030333c4b18827149f3148c1597e5cd",
|
|
"transactionHash": "0x25e24bddf0042536191b50d1de301cc2aaa3356b6aac5044c793dcbe358a72f9"
|
|
}
|
|
},
|
|
"schemaVersion": "2.0.0",
|
|
"updatedAt": "2018-05-27T11:31:46.254Z"
|
|
} |