safe-react/safe-contracts/build/contracts/DailyLimitModule.json
2018-05-14 09:48:41 +02:00

7922 lines
341 KiB
JSON

{
"contractName": "DailyLimitModule",
"abi": [
{
"constant": true,
"inputs": [],
"name": "TRANSFER_FUNCTION_IDENTIFIER",
"outputs": [
{
"name": "",
"type": "bytes4"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"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": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "data",
"type": "bytes"
}
],
"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": "0x608060405234801561001057600080fd5b50610d68806100206000396000f3006080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f03146100a9578063430e47f814610152578063481c6a75146101bb5780637de7edef1461021257806381c5e03b14610255578063a3f4df7e146102a2578063b74e452b14610332578063d7bffc921461035d578063fce7379a146103c2578063ffa1ad7414610455575b600080fd5b3480156100b557600080fd5b5061015060048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506104e5565b005b34801561015e57600080fd5b50610167610584565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b3480156101c757600080fd5b506101d06105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021e57600080fd5b50610253600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b005b34801561026157600080fd5b506102a0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610693565b005b3480156102ae57600080fd5b506102b761073a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f75780820151818401526020810190506102dc565b50505050905090810190601f1680156103245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033e57600080fd5b50610347610773565b6040518082815260200191505060405180910390f35b34801561036957600080fd5b5061039e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061078b565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103ce57600080fd5b50610453600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506107b5565b005b34801561046157600080fd5b5061046a6107c6565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104aa57808201518184015260208101905061048f565b50505050905090810190601f1680156104d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006104ef6107ff565b600090505b825181101561057f57818181518110151561050b57fe5b9060200190602002015160026000858481518110151561052757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555080806001019150506104f4565b505050565b7fa9059cbb0000000000000000000000000000000000000000000000000000000081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561062a57600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff161415151561065057600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106ef57600080fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b6000620151804281151561078357fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6107c133848484610889565b505050565b6040805190810160405280600581526020017f302e302e3100000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561084657600080fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e896040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561094c57600080fd5b505af1158015610960573d6000803e3d6000fd5b505050506040513d602081101561097657600080fd5b8101908080519060200190929190505050151561099257600080fd5b600085511480156109a35750600086115b806109bb5750600085511180156109ba5750600086145b5b15156109c657600080fd5b6000855114156109df5760009350869250859150610a64565b8693506020850151905060248501519250604485015191507fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515610a6357600080fd5b5b60008373ffffffffffffffffffffffffffffffffffffffff1614151515610a8a57600080fd5b600082111515610a9957600080fd5b610aa38483610c8d565b1515610aae57600080fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540192505081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b021640a88888860006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001836002811115610bb857fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610bf8578082015181840152602081019050610bdd565b50505050905090810190601f168015610c255780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610c4757600080fd5b505af1158015610c5b573d6000803e3d6000fd5b505050506040513d6020811015610c7157600080fd5b8101908080519060200190929190505050505050505050505050565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154610cde610773565b1115610cff57610cec610773565b8160020181905550600081600101819055505b80600001548382600101540111158015610d225750806001015483826001015401115b15610d305760019150610d35565b600091505b50929150505600a165627a7a72305820085a92f4808cf6f2b41a5812e1bccdce1566340ce475cdf150e85dbf780cf47d0029",
"deployedBytecode": "0x6080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f03146100a9578063430e47f814610152578063481c6a75146101bb5780637de7edef1461021257806381c5e03b14610255578063a3f4df7e146102a2578063b74e452b14610332578063d7bffc921461035d578063fce7379a146103c2578063ffa1ad7414610455575b600080fd5b3480156100b557600080fd5b5061015060048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506104e5565b005b34801561015e57600080fd5b50610167610584565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b3480156101c757600080fd5b506101d06105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021e57600080fd5b50610253600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b005b34801561026157600080fd5b506102a0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610693565b005b3480156102ae57600080fd5b506102b761073a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f75780820151818401526020810190506102dc565b50505050905090810190601f1680156103245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033e57600080fd5b50610347610773565b6040518082815260200191505060405180910390f35b34801561036957600080fd5b5061039e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061078b565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103ce57600080fd5b50610453600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506107b5565b005b34801561046157600080fd5b5061046a6107c6565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104aa57808201518184015260208101905061048f565b50505050905090810190601f1680156104d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006104ef6107ff565b600090505b825181101561057f57818181518110151561050b57fe5b9060200190602002015160026000858481518110151561052757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555080806001019150506104f4565b505050565b7fa9059cbb0000000000000000000000000000000000000000000000000000000081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561062a57600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff161415151561065057600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106ef57600080fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b6000620151804281151561078357fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6107c133848484610889565b505050565b6040805190810160405280600581526020017f302e302e3100000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561084657600080fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e896040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561094c57600080fd5b505af1158015610960573d6000803e3d6000fd5b505050506040513d602081101561097657600080fd5b8101908080519060200190929190505050151561099257600080fd5b600085511480156109a35750600086115b806109bb5750600085511180156109ba5750600086145b5b15156109c657600080fd5b6000855114156109df5760009350869250859150610a64565b8693506020850151905060248501519250604485015191507fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515610a6357600080fd5b5b60008373ffffffffffffffffffffffffffffffffffffffff1614151515610a8a57600080fd5b600082111515610a9957600080fd5b610aa38483610c8d565b1515610aae57600080fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540192505081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b021640a88888860006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001836002811115610bb857fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610bf8578082015181840152602081019050610bdd565b50505050905090810190601f168015610c255780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610c4757600080fd5b505af1158015610c5b573d6000803e3d6000fd5b505050506040513d6020811015610c7157600080fd5b8101908080519060200190929190505050505050505050505050565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154610cde610773565b1115610cff57610cec610773565b8160020181905550600081600101819055505b80600001548382600101540111158015610d225750806001015483826001015401115b15610d305760019150610d35565b600091505b50929150505600a165627a7a72305820085a92f4808cf6f2b41a5812e1bccdce1566340ce475cdf150e85dbf780cf47d0029",
"sourceMap": "296:3841:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;296:3841:18;;;;;;;",
"deployedSourceMap": "296:3841:18:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;991:222;;8:9:-1;5:2;;;30:1;27;20:12;5:2;991:222:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;441:67;;8:9:-1;5:2;;;30:1;27;20:12;5:2;441:67:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;262:28:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:28:8;;;;;;;;;;;;;;;;;;;;;;;;;;;626:208:6;;8:9:-1;5:2;;;30:1;27;20:12;5:2;626:208:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;1441:158:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1441:158:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;339:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;339:50:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4019:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4019:116:18;;;;;;;;;;;;;;;;;;;;;;;586:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;586:50:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3287:146;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3287:146:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;395:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;395:40:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;991:222;1104:9;1077:12;:10;:12::i;:::-;1116:1;1104:13;;1099:107;1123:6;:13;1119:1;:17;1099:107;;;1191:12;1204:1;1191:15;;;;;;;;;;;;;;;;;;1155:11;:22;1167:6;1174:1;1167:9;;;;;;;;;;;;;;;;;;1155:22;;;;;;;;;;;;;;;:33;;:51;;;;1138:3;;;;;;;1099:107;;;991:222;;;:::o;441:67::-;;;:::o;262:28:8:-;;;;;;;;;;;;;:::o;626:208:6:-;359:7:8;;;;;;;;;;;337:30;;:10;:30;;;329:39;;;;;;;;791:1:6;776:11;:16;;;;768:25;;;;;;;;816:11;803:10;;:24;;;;;;;;;;;;;;;;;;626:208;:::o;1441:158:18:-;359:7:8;;;;;;;;;;;337:30;;:10;:30;;;329:39;;;;;;;;1582:10:18;1550:11;:18;1562:5;1550:18;;;;;;;;;;;;;;;:29;;:42;;;;1441:158;;:::o;339:50::-;;;;;;;;;;;;;;;;;;;;:::o;4019:116::-;4081:4;4121:6;4115:3;:12;;;;;;;;4108:3;:20;4101:27;;4019:116;:::o;586:50::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3287:146::-;3382:44;3398:10;3410:2;3414:5;3421:4;3382:15;:44::i;:::-;3287:146;;;:::o;395:40::-;;;;;;;;;;;;;;;;;;;;:::o;392:268:8:-;606:1;594:7;;;;;;;;;;;586:21;;;578:30;;;;;;;;642:10;618:7;;:35;;;;;;;;;;;;;;;;;;392:268::o;1605:1298:18:-;1997:13;2020:16;2046:14;2233:25;1814:7;;;;;;;;;;;1801:29;;;1831:6;1801:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1801:37:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1801:37:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1801:37:18;;;;;;;;;;;;;;;;1793:46;;;;;;;;1939:1;1924:4;:11;:16;:29;;;;;1952:1;1944:5;:9;1924:29;:62;;;;1971:1;1957:4;:11;:15;:29;;;;;1985:1;1976:5;:10;1957:29;1924:62;1916:71;;;;;;;;2089:1;2074:4;:11;:16;2070:538;;;2114:1;2106:9;;2140:2;2129:13;;2165:5;2156:14;;2070:538;;;2217:2;2209:10;;2405:4;2399;2395:15;2389:22;2367:44;;2456:4;2450;2446:15;2440:22;2428:34;;2505:4;2499;2495:15;2489:22;2479:32;;2568:28;2546:50;;;:18;:50;;;;2538:59;;;;;;;;2070:538;2637:1;2625:8;:13;;;;2617:22;;;;;;;;2666:1;2657:6;:10;2649:19;;;;;;;;2750:27;2763:5;2770:6;2750:12;:27::i;:::-;2742:36;;;;;;;;2821:6;2788:11;:18;2800:5;2788:18;;;;;;;;;;;;;;;:29;;;:39;;;;;;;;;;;2837:7;;;;;;;;;;;:21;;;2859:2;2863:5;2870:4;2876:19;2837:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;2837:59:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2837:59:18;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2837:59:18;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2837:59:18;;;;;;;;;;;;;;;;;1605:1298;;;;;;;;:::o;3439:488::-;3526:4;3546:29;3578:11;:18;3590:5;3578:18;;;;;;;;;;;;;;;3546:50;;3620:10;:18;;;3610:7;:5;:7::i;:::-;:28;3606:126;;;3675:7;:5;:7::i;:::-;3654:10;:18;;:28;;;;3720:1;3696:10;:21;;:25;;;;3606:126;3782:10;:21;;;3772:6;3748:10;:21;;;:30;:55;;:125;;;;;3852:10;:21;;;3843:6;3819:10;:21;;;:30;:54;3748:125;3741:157;;;3894:4;3887:11;;;;3741:157;3915:5;3908:12;;3439:488;;;;;;:::o",
"source": "pragma solidity 0.4.23;\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 bytes4 public constant TRANSFER_FUNCTION_IDENTIFIER = hex\"a9059cbb\";\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 function executeInternal(address sender, address to, uint256 value, bytes data)\n internal\n {\n // Only Safe owners are allowed to execute daily limit transactions.\n require(OwnerManager(manager).isOwner(sender));\n // Data has to encode a token transfer or has to be empty.\n require(data.length == 0 && value > 0 || data.length > 0 && value == 0);\n address token;\n address receiver;\n uint256 amount;\n if (data.length == 0) {\n token = 0;\n receiver = to;\n amount = value;\n }\n else {\n token = to;\n bytes4 functionIdentifier;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n functionIdentifier := mload(add(data, 0x20))\n receiver := mload(add(data, 0x24))\n amount := mload(add(data, 0x44))\n }\n require(functionIdentifier == TRANSFER_FUNCTION_IDENTIFIER);\n }\n require(receiver != 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 manager.executeModule(to, value, data, Enum.Operation.Call);\n }\n\n /// @dev Returns if Safe transaction is a valid daily limit transaction.\n /// @param to Receiver address in case of Ether transfer, token address in case of a token transfer.\n /// @param value Ether value in case of an Ether transfer.\n /// @param data Encoded token transfer. Empty in case of Ether transfer.\n /// @return Returns if transaction can be executed.\n function executeDailyLimit(address to, uint256 value, bytes data)\n public\n {\n executeInternal(msg.sender, to, value, data);\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": [
1964
]
},
"id": 1965,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1677,
"literals": [
"solidity",
"0.4",
".23"
],
"nodeType": "PragmaDirective",
"src": "0:23:18"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
"file": "../Module.sol",
"id": 1678,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 878,
"src": "24:23:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
"file": "../ModuleManager.sol",
"id": 1679,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 1143,
"src": "48:30:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
"file": "../OwnerManager.sol",
"id": 1680,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 1439,
"src": "79:29:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
"file": "../Enum.sol",
"id": 1681,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 31,
"src": "109:21:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1682,
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 877,
"src": "325:6:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$877",
"typeString": "contract Module"
}
},
"id": 1683,
"nodeType": "InheritanceSpecifier",
"src": "325:6:18"
}
],
"contractDependencies": [
779,
877,
1559
],
"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": 1964,
"linearizedBaseContracts": [
1964,
877,
779,
1559
],
"name": "DailyLimitModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1686,
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "339:50:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1684,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "339:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "4461696c79204c696d6974204d6f64756c65",
"id": 1685,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "369:20:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
"typeString": "literal_string \"Daily Limit Module\""
},
"value": "Daily Limit Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 1689,
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "395:40:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1687,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "395:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e31",
"id": 1688,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "428:7:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
"typeString": "literal_string \"0.0.1\""
},
"value": "0.0.1"
},
"visibility": "public"
},
{
"constant": true,
"id": 1692,
"name": "TRANSFER_FUNCTION_IDENTIFIER",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "441:67:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1690,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "441:6:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "a9059cbb",
"id": 1691,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "495:13:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_abce0605a16ff5e998983a0af570b8ad942bb11e305eb20ae3ada0a3be24eb97",
"typeString": "literal_string (contains invalid UTF-8 sequence at position 0)"
},
"value": null
},
"visibility": "public"
},
{
"constant": false,
"id": 1696,
"name": "dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "586:50:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"typeName": {
"id": 1695,
"keyType": {
"id": 1693,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "595:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "586:31:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"valueType": {
"contractScope": null,
"id": 1694,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1703,
"src": "606:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
}
},
"value": null,
"visibility": "public"
},
{
"canonicalName": "DailyLimitModule.DailyLimit",
"id": 1703,
"members": [
{
"constant": false,
"id": 1698,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1703,
"src": "671:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1697,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "671:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1700,
"name": "spentToday",
"nodeType": "VariableDeclaration",
"scope": 1703,
"src": "699:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1699,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "699:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1702,
"name": "lastDay",
"nodeType": "VariableDeclaration",
"scope": 1703,
"src": "727:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1701,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "727:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "DailyLimit",
"nodeType": "StructDefinition",
"scope": 1964,
"src": "643:106:18",
"visibility": "public"
},
{
"body": {
"id": 1738,
"nodeType": "Block",
"src": "1067:146:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1712,
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 876,
"src": "1077:10:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1077:12:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1714,
"nodeType": "ExpressionStatement",
"src": "1077:12:18"
},
{
"body": {
"expression": {
"argumentTypes": null,
"id": 1735,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1726,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "1155:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1730,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1727,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1706,
"src": "1167:6:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1729,
"indexExpression": {
"argumentTypes": null,
"id": 1728,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1174:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1167:9:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1155:22:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1731,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1698,
"src": "1155:33:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1732,
"name": "_dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1709,
"src": "1191:12:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 1734,
"indexExpression": {
"argumentTypes": null,
"id": 1733,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1204:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1191:15:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1155:51:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1736,
"nodeType": "ExpressionStatement",
"src": "1155:51:18"
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1722,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1719,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1119:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1720,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1706,
"src": "1123:6:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1123:13:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1119:17:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1737,
"initializationExpression": {
"assignments": [
1716
],
"declarations": [
{
"constant": false,
"id": 1716,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1739,
"src": "1104:9:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1715,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1104:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1718,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1717,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1116:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1104:13:18"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1724,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1138:3:18",
"subExpression": {
"argumentTypes": null,
"id": 1723,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1138:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1725,
"nodeType": "ExpressionStatement",
"src": "1138:3:18"
},
"nodeType": "ForStatement",
"src": "1099:107:18"
}
]
},
"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": 1739,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1710,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1706,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1739,
"src": "1006:16:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1704,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1006:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1705,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1006:9:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1709,
"name": "_dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 1739,
"src": "1024:22:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1707,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1024:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1708,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1024:9:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1005:42:18"
},
"payable": false,
"returnParameters": {
"id": 1711,
"nodeType": "ParameterList",
"parameters": [],
"src": "1067:0:18"
},
"scope": 1964,
"src": "991:222:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1755,
"nodeType": "Block",
"src": "1540:59:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1753,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1748,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "1550:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1750,
"indexExpression": {
"argumentTypes": null,
"id": 1749,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1741,
"src": "1562:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1550:18:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1751,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1698,
"src": "1550:29:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1752,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1743,
"src": "1582:10:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1550:42:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1754,
"nodeType": "ExpressionStatement",
"src": "1550:42:18"
}
]
},
"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": 1756,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1746,
"modifierName": {
"argumentTypes": null,
"id": 1745,
"name": "authorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 857,
"src": "1525:10:18",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1525:10:18"
}
],
"name": "changeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1744,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1741,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1756,
"src": "1467:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1740,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1467:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1743,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1756,
"src": "1482:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1742,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1482:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1466:35:18"
},
"payable": false,
"returnParameters": {
"id": 1747,
"nodeType": "ParameterList",
"parameters": [],
"src": "1540:0:18"
},
"scope": 1964,
"src": "1441:158:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1875,
"nodeType": "Block",
"src": "1706:1197:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1772,
"name": "sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1758,
"src": "1831:6:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1769,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 844,
"src": "1814:7:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1142",
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$1142",
"typeString": "contract ModuleManager"
}
],
"id": 1768,
"name": "OwnerManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1438,
"src": "1801:12:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$1438_$",
"typeString": "type(contract OwnerManager)"
}
},
"id": 1770,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1801:21:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OwnerManager_$1438",
"typeString": "contract OwnerManager"
}
},
"id": 1771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 1428,
"src": "1801:29:18",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view external returns (bool)"
}
},
"id": 1773,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1801:37:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1767,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "1793:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1793:46:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1775,
"nodeType": "ExpressionStatement",
"src": "1793:46:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1793,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1784,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1777,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "1924:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1924:11:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1779,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1939:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1924:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1783,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1781,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "1944:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1782,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1952:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1944:9:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1924:29:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1792,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1788,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1785,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "1957:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1786,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1957:11:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1787,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1971:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1957:15:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1789,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "1976:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1790,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1985:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1976:10:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1957:29:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1924:62:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1776,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "1916:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1794,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1916:71:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1795,
"nodeType": "ExpressionStatement",
"src": "1916:71:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1797,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1997:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1796,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1997:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1798,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "1997:13:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1800,
"name": "receiver",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "2020:16:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1799,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2020:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1801,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "2020:16:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1803,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "2046:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1802,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2046:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1804,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "2046:14:18"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1808,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1805,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2074:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1806,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2074:11:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1807,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2089:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2074:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1836,
"nodeType": "Block",
"src": "2195:413:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1824,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1822,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2209:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1823,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1760,
"src": "2217:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2209:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1825,
"nodeType": "ExpressionStatement",
"src": "2209:10:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1827,
"name": "functionIdentifier",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "2233:25:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1826,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2233:6:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1828,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "2233:25:18"
},
{
"externalReferences": [
{
"functionIdentifier": {
"declaration": 1827,
"isOffset": false,
"isSlot": false,
"src": "2367:18:18",
"valueSize": 1
}
},
{
"data": {
"declaration": 1764,
"isOffset": false,
"isSlot": false,
"src": "2399:4:18",
"valueSize": 1
}
},
{
"receiver": {
"declaration": 1800,
"isOffset": false,
"isSlot": false,
"src": "2428:8:18",
"valueSize": 1
}
},
{
"amount": {
"declaration": 1803,
"isOffset": false,
"isSlot": false,
"src": "2479:6:18",
"valueSize": 1
}
},
{
"data": {
"declaration": 1764,
"isOffset": false,
"isSlot": false,
"src": "2450:4:18",
"valueSize": 1
}
},
{
"data": {
"declaration": 1764,
"isOffset": false,
"isSlot": false,
"src": "2499:4:18",
"valueSize": 1
}
}
],
"id": 1829,
"nodeType": "InlineAssembly",
"operations": "{\n functionIdentifier := mload(add(data, 0x20))\n receiver := mload(add(data, 0x24))\n amount := mload(add(data, 0x44))\n}",
"src": "2340:205:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 1833,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1831,
"name": "functionIdentifier",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1827,
"src": "2546:18:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1832,
"name": "TRANSFER_FUNCTION_IDENTIFIER",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1692,
"src": "2568:28:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "2546:50:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1830,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2538:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1834,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2538:59:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1835,
"nodeType": "ExpressionStatement",
"src": "2538:59:18"
}
]
},
"id": 1837,
"nodeType": "IfStatement",
"src": "2070:538:18",
"trueBody": {
"id": 1821,
"nodeType": "Block",
"src": "2092:89:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1811,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1809,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2106:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 1810,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2114:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2106:9:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1812,
"nodeType": "ExpressionStatement",
"src": "2106:9:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1815,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1813,
"name": "receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1800,
"src": "2129:8:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1814,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1760,
"src": "2140:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2129:13:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1816,
"nodeType": "ExpressionStatement",
"src": "2129:13:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1819,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1817,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2156:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1818,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2165:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2156:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1820,
"nodeType": "ExpressionStatement",
"src": "2156:14:18"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1841,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1839,
"name": "receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1800,
"src": "2625:8:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1840,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2637:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2625:13:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1838,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2617:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1842,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2617:22:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1843,
"nodeType": "ExpressionStatement",
"src": "2617:22:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1847,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1845,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2657:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1846,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2666:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2657:10:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1844,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2649:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1848,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2649:19:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1849,
"nodeType": "ExpressionStatement",
"src": "2649:19:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1852,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2763:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1853,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2770:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1851,
"name": "isUnderLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1950,
"src": "2750:12:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) returns (bool)"
}
},
"id": 1854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2750:27:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1850,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2742:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1855,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2742:36:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1856,
"nodeType": "ExpressionStatement",
"src": "2742:36:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1857,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "2788:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1859,
"indexExpression": {
"argumentTypes": null,
"id": 1858,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2800:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2788:18:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1860,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "2788:29:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"id": 1861,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2821:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2788:39:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1863,
"nodeType": "ExpressionStatement",
"src": "2788:39:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1867,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1760,
"src": "2859:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1868,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2863:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1869,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2870:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1870,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "2876:4:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 1871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "2876:14:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 1872,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2876:19:18",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 1864,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 844,
"src": "2837:7:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1142",
"typeString": "contract ModuleManager"
}
},
"id": 1866,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "executeModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 1033,
"src": "2837:21:18",
"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": 1873,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2837:59:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1874,
"nodeType": "ExpressionStatement",
"src": "2837:59:18"
}
]
},
"documentation": null,
"id": 1876,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeInternal",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1765,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1758,
"name": "sender",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1630:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1757,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1630:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1760,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1646:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1759,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1646:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1762,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1658:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1761,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1658:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1764,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1673:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1763,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1673:5:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1629:55:18"
},
"payable": false,
"returnParameters": {
"id": 1766,
"nodeType": "ParameterList",
"parameters": [],
"src": "1706:0:18"
},
"scope": 1964,
"src": "1605:1298:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1893,
"nodeType": "Block",
"src": "3372:61:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1886,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2465,
"src": "3398:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1887,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3398:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1888,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1878,
"src": "3410:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1889,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1880,
"src": "3414:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1890,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1882,
"src": "3421:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 1885,
"name": "executeInternal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1876,
"src": "3382:15:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (address,address,uint256,bytes memory)"
}
},
"id": 1891,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3382:44:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1892,
"nodeType": "ExpressionStatement",
"src": "3382:44:18"
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param to Receiver address in case of Ether transfer, token address in case of a token transfer.\n @param value Ether value in case of an Ether transfer.\n @param data Encoded token transfer. Empty in case of Ether transfer.\n @return Returns if transaction can be executed.",
"id": 1894,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1883,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1878,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "3314:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1877,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3314:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1880,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "3326:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1879,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3326:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1882,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "3341:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1881,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3341:5:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3313:39:18"
},
"payable": false,
"returnParameters": {
"id": 1884,
"nodeType": "ParameterList",
"parameters": [],
"src": "3372:0:18"
},
"scope": 1964,
"src": "3287:146:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1949,
"nodeType": "Block",
"src": "3536:391:18",
"statements": [
{
"assignments": [
1904
],
"declarations": [
{
"constant": false,
"id": 1904,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3546:29:18",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
},
"typeName": {
"contractScope": null,
"id": 1903,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1703,
"src": "3546:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1908,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1905,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "3578:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1907,
"indexExpression": {
"argumentTypes": null,
"id": 1906,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1896,
"src": "3590:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3578:18:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3546:50:18"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1913,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1909,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1963,
"src": "3610:5:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 1910,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3610:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1911,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3620:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1912,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1702,
"src": "3620:18:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3610:28:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1928,
"nodeType": "IfStatement",
"src": "3606:126:18",
"trueBody": {
"id": 1927,
"nodeType": "Block",
"src": "3640:92:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1919,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1914,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3654:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1916,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1702,
"src": "3654:18:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1917,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1963,
"src": "3675:5:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 1918,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3675:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3654:28:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1920,
"nodeType": "ExpressionStatement",
"src": "3654:28:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1925,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1921,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3696:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1923,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3696:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 1924,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3720:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3696:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1926,
"nodeType": "ExpressionStatement",
"src": "3696:25:18"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1943,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1935,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1932,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1929,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3748:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1930,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3748:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 1931,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "3772:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3748:30:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1933,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3782:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1934,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1698,
"src": "3782:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3748:55:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1942,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1939,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1936,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3819:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1937,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3819:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 1938,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "3843:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3819:30:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1940,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3852:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1941,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3852:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3819:54:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3748:125:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1946,
"nodeType": "IfStatement",
"src": "3741:157:18",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1944,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3894:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1902,
"id": 1945,
"nodeType": "Return",
"src": "3887:11:18"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1947,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3915:5:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1902,
"id": 1948,
"nodeType": "Return",
"src": "3908:12:18"
}
]
},
"documentation": null,
"id": 1950,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "isUnderLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1899,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1896,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3461:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1895,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3461:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1898,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3476:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1897,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3476:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3460:31:18"
},
"payable": false,
"returnParameters": {
"id": 1902,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1901,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3526:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1900,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3526:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3525:6:18"
},
"scope": 1964,
"src": "3439:488:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1962,
"nodeType": "Block",
"src": "4091:44:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1960,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1955,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2467,
"src": "4108:3:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1958,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1956,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2467,
"src": "4115:3:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 1957,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4121:6:18",
"subdenomination": "days",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "1"
},
"src": "4115:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1959,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4114:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4108:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1954,
"id": 1961,
"nodeType": "Return",
"src": "4101:27:18"
}
]
},
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
"id": 1963,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "today",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1951,
"nodeType": "ParameterList",
"parameters": [],
"src": "4033:2:18"
},
"payable": false,
"returnParameters": {
"id": 1954,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1953,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1963,
"src": "4081:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1952,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "4081:4:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4080:6:18"
},
"scope": 1964,
"src": "4019:116:18",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1965,
"src": "296:3841:18"
}
],
"src": "0:4138:18"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
"exportedSymbols": {
"DailyLimitModule": [
1964
]
},
"id": 1965,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1677,
"literals": [
"solidity",
"0.4",
".23"
],
"nodeType": "PragmaDirective",
"src": "0:23:18"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
"file": "../Module.sol",
"id": 1678,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 878,
"src": "24:23:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
"file": "../ModuleManager.sol",
"id": 1679,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 1143,
"src": "48:30:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
"file": "../OwnerManager.sol",
"id": 1680,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 1439,
"src": "79:29:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
"file": "../Enum.sol",
"id": 1681,
"nodeType": "ImportDirective",
"scope": 1965,
"sourceUnit": 31,
"src": "109:21:18",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1682,
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 877,
"src": "325:6:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$877",
"typeString": "contract Module"
}
},
"id": 1683,
"nodeType": "InheritanceSpecifier",
"src": "325:6:18"
}
],
"contractDependencies": [
779,
877,
1559
],
"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": 1964,
"linearizedBaseContracts": [
1964,
877,
779,
1559
],
"name": "DailyLimitModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1686,
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "339:50:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1684,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "339:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "4461696c79204c696d6974204d6f64756c65",
"id": 1685,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "369:20:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
"typeString": "literal_string \"Daily Limit Module\""
},
"value": "Daily Limit Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 1689,
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "395:40:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1687,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "395:6:18",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e31",
"id": 1688,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "428:7:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
"typeString": "literal_string \"0.0.1\""
},
"value": "0.0.1"
},
"visibility": "public"
},
{
"constant": true,
"id": 1692,
"name": "TRANSFER_FUNCTION_IDENTIFIER",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "441:67:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1690,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "441:6:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "a9059cbb",
"id": 1691,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "495:13:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_abce0605a16ff5e998983a0af570b8ad942bb11e305eb20ae3ada0a3be24eb97",
"typeString": "literal_string (contains invalid UTF-8 sequence at position 0)"
},
"value": null
},
"visibility": "public"
},
{
"constant": false,
"id": 1696,
"name": "dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 1964,
"src": "586:50:18",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"typeName": {
"id": 1695,
"keyType": {
"id": 1693,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "595:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "586:31:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"valueType": {
"contractScope": null,
"id": 1694,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1703,
"src": "606:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
}
},
"value": null,
"visibility": "public"
},
{
"canonicalName": "DailyLimitModule.DailyLimit",
"id": 1703,
"members": [
{
"constant": false,
"id": 1698,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1703,
"src": "671:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1697,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "671:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1700,
"name": "spentToday",
"nodeType": "VariableDeclaration",
"scope": 1703,
"src": "699:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1699,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "699:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1702,
"name": "lastDay",
"nodeType": "VariableDeclaration",
"scope": 1703,
"src": "727:15:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1701,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "727:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "DailyLimit",
"nodeType": "StructDefinition",
"scope": 1964,
"src": "643:106:18",
"visibility": "public"
},
{
"body": {
"id": 1738,
"nodeType": "Block",
"src": "1067:146:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1712,
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 876,
"src": "1077:10:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1077:12:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1714,
"nodeType": "ExpressionStatement",
"src": "1077:12:18"
},
{
"body": {
"expression": {
"argumentTypes": null,
"id": 1735,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1726,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "1155:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1730,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1727,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1706,
"src": "1167:6:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1729,
"indexExpression": {
"argumentTypes": null,
"id": 1728,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1174:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1167:9:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1155:22:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1731,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1698,
"src": "1155:33:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1732,
"name": "_dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1709,
"src": "1191:12:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 1734,
"indexExpression": {
"argumentTypes": null,
"id": 1733,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1204:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1191:15:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1155:51:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1736,
"nodeType": "ExpressionStatement",
"src": "1155:51:18"
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1722,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1719,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1119:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1720,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1706,
"src": "1123:6:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1123:13:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1119:17:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1737,
"initializationExpression": {
"assignments": [
1716
],
"declarations": [
{
"constant": false,
"id": 1716,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1739,
"src": "1104:9:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1715,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1104:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1718,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1717,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1116:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1104:13:18"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1724,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1138:3:18",
"subExpression": {
"argumentTypes": null,
"id": 1723,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1716,
"src": "1138:1:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1725,
"nodeType": "ExpressionStatement",
"src": "1138:3:18"
},
"nodeType": "ForStatement",
"src": "1099:107:18"
}
]
},
"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": 1739,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1710,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1706,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1739,
"src": "1006:16:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1704,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1006:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1705,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1006:9:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1709,
"name": "_dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 1739,
"src": "1024:22:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1707,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1024:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1708,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1024:9:18",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1005:42:18"
},
"payable": false,
"returnParameters": {
"id": 1711,
"nodeType": "ParameterList",
"parameters": [],
"src": "1067:0:18"
},
"scope": 1964,
"src": "991:222:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1755,
"nodeType": "Block",
"src": "1540:59:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1753,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1748,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "1550:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1750,
"indexExpression": {
"argumentTypes": null,
"id": 1749,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1741,
"src": "1562:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1550:18:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1751,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1698,
"src": "1550:29:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1752,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1743,
"src": "1582:10:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1550:42:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1754,
"nodeType": "ExpressionStatement",
"src": "1550:42:18"
}
]
},
"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": 1756,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1746,
"modifierName": {
"argumentTypes": null,
"id": 1745,
"name": "authorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 857,
"src": "1525:10:18",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1525:10:18"
}
],
"name": "changeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1744,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1741,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1756,
"src": "1467:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1740,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1467:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1743,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1756,
"src": "1482:18:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1742,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1482:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1466:35:18"
},
"payable": false,
"returnParameters": {
"id": 1747,
"nodeType": "ParameterList",
"parameters": [],
"src": "1540:0:18"
},
"scope": 1964,
"src": "1441:158:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1875,
"nodeType": "Block",
"src": "1706:1197:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1772,
"name": "sender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1758,
"src": "1831:6:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1769,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 844,
"src": "1814:7:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1142",
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$1142",
"typeString": "contract ModuleManager"
}
],
"id": 1768,
"name": "OwnerManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1438,
"src": "1801:12:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$1438_$",
"typeString": "type(contract OwnerManager)"
}
},
"id": 1770,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1801:21:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OwnerManager_$1438",
"typeString": "contract OwnerManager"
}
},
"id": 1771,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 1428,
"src": "1801:29:18",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view external returns (bool)"
}
},
"id": 1773,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1801:37:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1767,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "1793:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1793:46:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1775,
"nodeType": "ExpressionStatement",
"src": "1793:46:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1793,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1784,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1777,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "1924:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1778,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1924:11:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1779,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1939:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1924:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1783,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1781,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "1944:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1782,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1952:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1944:9:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1924:29:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1792,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1788,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1785,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "1957:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1786,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1957:11:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1787,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1971:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1957:15:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1789,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "1976:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1790,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1985:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1976:10:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1957:29:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1924:62:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1776,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "1916:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1794,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1916:71:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1795,
"nodeType": "ExpressionStatement",
"src": "1916:71:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1797,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1997:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1796,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1997:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1798,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "1997:13:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1800,
"name": "receiver",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "2020:16:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1799,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2020:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1801,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "2020:16:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1803,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "2046:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1802,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2046:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1804,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "2046:14:18"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1808,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1805,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2074:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 1806,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2074:11:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1807,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2089:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2074:16:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 1836,
"nodeType": "Block",
"src": "2195:413:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1824,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1822,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2209:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1823,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1760,
"src": "2217:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2209:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1825,
"nodeType": "ExpressionStatement",
"src": "2209:10:18"
},
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 1827,
"name": "functionIdentifier",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "2233:25:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1826,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2233:6:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1828,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "2233:25:18"
},
{
"externalReferences": [
{
"functionIdentifier": {
"declaration": 1827,
"isOffset": false,
"isSlot": false,
"src": "2367:18:18",
"valueSize": 1
}
},
{
"data": {
"declaration": 1764,
"isOffset": false,
"isSlot": false,
"src": "2399:4:18",
"valueSize": 1
}
},
{
"receiver": {
"declaration": 1800,
"isOffset": false,
"isSlot": false,
"src": "2428:8:18",
"valueSize": 1
}
},
{
"amount": {
"declaration": 1803,
"isOffset": false,
"isSlot": false,
"src": "2479:6:18",
"valueSize": 1
}
},
{
"data": {
"declaration": 1764,
"isOffset": false,
"isSlot": false,
"src": "2450:4:18",
"valueSize": 1
}
},
{
"data": {
"declaration": 1764,
"isOffset": false,
"isSlot": false,
"src": "2499:4:18",
"valueSize": 1
}
}
],
"id": 1829,
"nodeType": "InlineAssembly",
"operations": "{\n functionIdentifier := mload(add(data, 0x20))\n receiver := mload(add(data, 0x24))\n amount := mload(add(data, 0x44))\n}",
"src": "2340:205:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 1833,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1831,
"name": "functionIdentifier",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1827,
"src": "2546:18:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1832,
"name": "TRANSFER_FUNCTION_IDENTIFIER",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1692,
"src": "2568:28:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "2546:50:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1830,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2538:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1834,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2538:59:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1835,
"nodeType": "ExpressionStatement",
"src": "2538:59:18"
}
]
},
"id": 1837,
"nodeType": "IfStatement",
"src": "2070:538:18",
"trueBody": {
"id": 1821,
"nodeType": "Block",
"src": "2092:89:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1811,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1809,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2106:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 1810,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2114:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2106:9:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1812,
"nodeType": "ExpressionStatement",
"src": "2106:9:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1815,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1813,
"name": "receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1800,
"src": "2129:8:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1814,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1760,
"src": "2140:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2129:13:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1816,
"nodeType": "ExpressionStatement",
"src": "2129:13:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1819,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1817,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2156:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1818,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2165:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2156:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1820,
"nodeType": "ExpressionStatement",
"src": "2156:14:18"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1841,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1839,
"name": "receiver",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1800,
"src": "2625:8:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1840,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2637:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2625:13:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1838,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2617:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1842,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2617:22:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1843,
"nodeType": "ExpressionStatement",
"src": "2617:22:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1847,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1845,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2657:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1846,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2666:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2657:10:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1844,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2649:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1848,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2649:19:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1849,
"nodeType": "ExpressionStatement",
"src": "2649:19:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1852,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2763:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1853,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2770:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1851,
"name": "isUnderLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1950,
"src": "2750:12:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) returns (bool)"
}
},
"id": 1854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2750:27:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1850,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2468,
2469
],
"referencedDeclaration": 2468,
"src": "2742:7:18",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1855,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2742:36:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1856,
"nodeType": "ExpressionStatement",
"src": "2742:36:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1857,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "2788:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1859,
"indexExpression": {
"argumentTypes": null,
"id": 1858,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1797,
"src": "2800:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2788:18:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1860,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "2788:29:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"id": 1861,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1803,
"src": "2821:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2788:39:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1863,
"nodeType": "ExpressionStatement",
"src": "2788:39:18"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1867,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1760,
"src": "2859:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1868,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1762,
"src": "2863:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1869,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1764,
"src": "2870:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1870,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "2876:4:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 1871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "2876:14:18",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 1872,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2876:19:18",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 1864,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 844,
"src": "2837:7:18",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1142",
"typeString": "contract ModuleManager"
}
},
"id": 1866,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "executeModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 1033,
"src": "2837:21:18",
"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": 1873,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2837:59:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1874,
"nodeType": "ExpressionStatement",
"src": "2837:59:18"
}
]
},
"documentation": null,
"id": 1876,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeInternal",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1765,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1758,
"name": "sender",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1630:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1757,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1630:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1760,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1646:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1759,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1646:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1762,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1658:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1761,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1658:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1764,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1876,
"src": "1673:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1763,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1673:5:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1629:55:18"
},
"payable": false,
"returnParameters": {
"id": 1766,
"nodeType": "ParameterList",
"parameters": [],
"src": "1706:0:18"
},
"scope": 1964,
"src": "1605:1298:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1893,
"nodeType": "Block",
"src": "3372:61:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1886,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2465,
"src": "3398:3:18",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1887,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3398:10:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1888,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1878,
"src": "3410:2:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1889,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1880,
"src": "3414:5:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1890,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1882,
"src": "3421:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 1885,
"name": "executeInternal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1876,
"src": "3382:15:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (address,address,uint256,bytes memory)"
}
},
"id": 1891,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3382:44:18",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1892,
"nodeType": "ExpressionStatement",
"src": "3382:44:18"
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param to Receiver address in case of Ether transfer, token address in case of a token transfer.\n @param value Ether value in case of an Ether transfer.\n @param data Encoded token transfer. Empty in case of Ether transfer.\n @return Returns if transaction can be executed.",
"id": 1894,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1883,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1878,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "3314:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1877,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3314:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1880,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "3326:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1879,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3326:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1882,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "3341:10:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1881,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3341:5:18",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3313:39:18"
},
"payable": false,
"returnParameters": {
"id": 1884,
"nodeType": "ParameterList",
"parameters": [],
"src": "3372:0:18"
},
"scope": 1964,
"src": "3287:146:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1949,
"nodeType": "Block",
"src": "3536:391:18",
"statements": [
{
"assignments": [
1904
],
"declarations": [
{
"constant": false,
"id": 1904,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3546:29:18",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
},
"typeName": {
"contractScope": null,
"id": 1903,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1703,
"src": "3546:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1908,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1905,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1696,
"src": "3578:11:18",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1703_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1907,
"indexExpression": {
"argumentTypes": null,
"id": 1906,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1896,
"src": "3590:5:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3578:18:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3546:50:18"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1913,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1909,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1963,
"src": "3610:5:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 1910,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3610:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1911,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3620:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1912,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1702,
"src": "3620:18:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3610:28:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1928,
"nodeType": "IfStatement",
"src": "3606:126:18",
"trueBody": {
"id": 1927,
"nodeType": "Block",
"src": "3640:92:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1919,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1914,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3654:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1916,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1702,
"src": "3654:18:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1917,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1963,
"src": "3675:5:18",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 1918,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3675:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3654:28:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1920,
"nodeType": "ExpressionStatement",
"src": "3654:28:18"
},
{
"expression": {
"argumentTypes": null,
"id": 1925,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1921,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3696:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1923,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3696:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 1924,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3720:1:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3696:25:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1926,
"nodeType": "ExpressionStatement",
"src": "3696:25:18"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1943,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1935,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1932,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1929,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3748:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1930,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3748:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 1931,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "3772:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3748:30:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1933,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3782:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1934,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1698,
"src": "3782:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3748:55:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1942,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1939,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1936,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3819:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1937,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3819:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 1938,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1898,
"src": "3843:6:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3819:30:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1940,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1904,
"src": "3852:10:18",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1703_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 1941,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1700,
"src": "3852:21:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3819:54:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3748:125:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1946,
"nodeType": "IfStatement",
"src": "3741:157:18",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1944,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3894:4:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1902,
"id": 1945,
"nodeType": "Return",
"src": "3887:11:18"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1947,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3915:5:18",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1902,
"id": 1948,
"nodeType": "Return",
"src": "3908:12:18"
}
]
},
"documentation": null,
"id": 1950,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "isUnderLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1899,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1896,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3461:13:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1895,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3461:7:18",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1898,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3476:14:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1897,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3476:7:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3460:31:18"
},
"payable": false,
"returnParameters": {
"id": 1902,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1901,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1950,
"src": "3526:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1900,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3526:4:18",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3525:6:18"
},
"scope": 1964,
"src": "3439:488:18",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 1962,
"nodeType": "Block",
"src": "4091:44:18",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1960,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1955,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2467,
"src": "4108:3:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1958,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1956,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2467,
"src": "4115:3:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 1957,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4121:6:18",
"subdenomination": "days",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "1"
},
"src": "4115:12:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 1959,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4114:14:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4108:20:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1954,
"id": 1961,
"nodeType": "Return",
"src": "4101:27:18"
}
]
},
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
"id": 1963,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "today",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1951,
"nodeType": "ParameterList",
"parameters": [],
"src": "4033:2:18"
},
"payable": false,
"returnParameters": {
"id": 1954,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1953,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1963,
"src": "4081:4:18",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1952,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "4081:4:18",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4080:6:18"
},
"scope": 1964,
"src": "4019:116:18",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1965,
"src": "296:3841:18"
}
],
"src": "0:4138:18"
},
"compiler": {
"name": "solc",
"version": "0.4.23+commit.124ca40d.Emscripten.clang"
},
"networks": {
"4": {
"events": {},
"links": {},
"address": "0x302364976f0a5623088f52008335465f6b3389f9",
"transactionHash": "0x8ad6245cc111aa9b30c96651f8729b927e595cb0b6ff86aa6368721896b60a3b"
},
"1525950336085": {
"events": {},
"links": {},
"address": "0xe52c225329d3fb9f6933bd52e7067a24d20f7983",
"transactionHash": "0xaffd9cdbf1bd14f5f349af2782a1b4dbebd9ac97abedbcfb9aee5fb1707afe96"
},
"1526283540628": {
"events": {},
"links": {},
"address": "0x452dd8d6f81786c3ad3ec3cbcf024687659c682a",
"transactionHash": "0xaffd9cdbf1bd14f5f349af2782a1b4dbebd9ac97abedbcfb9aee5fb1707afe96"
}
},
"schemaVersion": "2.0.0",
"updatedAt": "2018-05-14T07:39:37.963Z"
}