safe-react/safe-contracts/build/contracts/DailyLimitModule.json

6706 lines
307 KiB
JSON

{
"contractName": "DailyLimitModule",
"abi": [
{
"constant": true,
"inputs": [],
"name": "manager",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_masterCopy",
"type": "address"
}
],
"name": "changeMasterCopy",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "NAME",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "dailyLimits",
"outputs": [
{
"name": "dailyLimit",
"type": "uint256"
},
{
"name": "spentToday",
"type": "uint256"
},
{
"name": "lastDay",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "VERSION",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokens",
"type": "address[]"
},
{
"name": "_dailyLimits",
"type": "uint256[]"
}
],
"name": "setup",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
},
{
"name": "dailyLimit",
"type": "uint256"
}
],
"name": "changeDailyLimit",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"name": "executeDailyLimit",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "today",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5061129b806100206000396000f300608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f031461009e578063481c6a751461014757806363bae7c31461019e5780637de7edef1461020b57806381c5e03b1461024e578063a3f4df7e1461029b578063b74e452b1461032b578063d7bffc9214610356578063ffa1ad74146103bb575b600080fd5b3480156100aa57600080fd5b50610145600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061044b565b005b34801561015357600080fd5b5061015c6104ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101aa57600080fd5b50610209600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610510565b005b34801561021757600080fd5b5061024c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d00565b005b34801561025a57600080fd5b50610299600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ee3565b005b3480156102a757600080fd5b506102b0611019565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f05780820151818401526020810190506102d5565b50505050905090810190601f16801561031d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033757600080fd5b50610340611052565b6040518082815260200191505060405180910390f35b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061106a565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103c757600080fd5b506103d0611094565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104105780820151818401526020810190506103f5565b50505050905090810190601f16801561043d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006104556110cd565b600090505b82518110156104e557818181518110151561047157fe5b9060200190602002015160026000858481518110151561048d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550808060010191505061045a565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156105cf57600080fd5b505af11580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b810190808051906020019092919050505015156106a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e2081526020017f6f776e657200000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff1614151515610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f496e76616c696420746f20616464726573732070726f7669646564000000000081525060200191505060405180910390fd5b6000821115156107ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f496e76616c696420616d6f756e742070726f766964656400000000000000000081525060200191505060405180910390fd5b6107b584836111c0565b1515610829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4461696c79206c696d697420686173206265656e20726561636865640000000081525060200191505060405180910390fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555060008473ffffffffffffffffffffffffffffffffffffffff161415610a3c57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7848460006040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018060200183600281111561095157fe5b60ff168152602001828103825260008152602001602001945050505050602060405180830381600087803b15801561098857600080fd5b505af115801561099c573d6000803e3d6000fd5b505050506040513d60208110156109b257600080fd5b81019080805190602001909291905050501515610a37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f742065786563757465206574686572207472616e7366657281525060200191505060405180910390fd5b610cfa565b8282604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001836002811115610bbb57fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610bfb578082015181840152602081019050610be0565b50505050905090810190601f168015610c285780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b81019080805190602001909291905050501515610cf9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74206578656375746520746f6b656e207472616e7366657281525060200191505060405180910390fd5b5b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610ea0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b6000620151804281151561106257fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6040805190810160405280600581526020017f302e302e3100000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d616e616765722068617320616c7265616479206265656e207365740000000081525060200191505060405180910390fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154611211611052565b11156112325761121f611052565b8160020181905550600081600101819055505b806000015483826001015401111580156112555750806001015483826001015401115b156112635760019150611268565b600091505b50929150505600a165627a7a72305820829e0119c133a410205606912728b71003dbd7359410bad5c3588c1681dc2d3d0029",
"deployedBytecode": "0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f031461009e578063481c6a751461014757806363bae7c31461019e5780637de7edef1461020b57806381c5e03b1461024e578063a3f4df7e1461029b578063b74e452b1461032b578063d7bffc9214610356578063ffa1ad74146103bb575b600080fd5b3480156100aa57600080fd5b50610145600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061044b565b005b34801561015357600080fd5b5061015c6104ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101aa57600080fd5b50610209600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610510565b005b34801561021757600080fd5b5061024c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d00565b005b34801561025a57600080fd5b50610299600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ee3565b005b3480156102a757600080fd5b506102b0611019565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f05780820151818401526020810190506102d5565b50505050905090810190601f16801561031d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033757600080fd5b50610340611052565b6040518082815260200191505060405180910390f35b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061106a565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103c757600080fd5b506103d0611094565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104105780820151818401526020810190506103f5565b50505050905090810190601f16801561043d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006104556110cd565b600090505b82518110156104e557818181518110151561047157fe5b9060200190602002015160026000858481518110151561048d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550808060010191505061045a565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156105cf57600080fd5b505af11580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b810190808051906020019092919050505015156106a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e2081526020017f6f776e657200000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff1614151515610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f496e76616c696420746f20616464726573732070726f7669646564000000000081525060200191505060405180910390fd5b6000821115156107ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f496e76616c696420616d6f756e742070726f766964656400000000000000000081525060200191505060405180910390fd5b6107b584836111c0565b1515610829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4461696c79206c696d697420686173206265656e20726561636865640000000081525060200191505060405180910390fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555060008473ffffffffffffffffffffffffffffffffffffffff161415610a3c57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7848460006040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018060200183600281111561095157fe5b60ff168152602001828103825260008152602001602001945050505050602060405180830381600087803b15801561098857600080fd5b505af115801561099c573d6000803e3d6000fd5b505050506040513d60208110156109b257600080fd5b81019080805190602001909291905050501515610a37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f742065786563757465206574686572207472616e7366657281525060200191505060405180910390fd5b610cfa565b8282604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001836002811115610bbb57fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610bfb578082015181840152602081019050610be0565b50505050905090810190601f168015610c285780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b81019080805190602001909291905050501515610cf9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74206578656375746520746f6b656e207472616e7366657281525060200191505060405180910390fd5b5b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610ea0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b6000620151804281151561106257fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6040805190810160405280600581526020017f302e302e3100000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d616e616765722068617320616c7265616479206265656e207365740000000081525060200191505060405180910390fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154611211611052565b11156112325761121f611052565b8160020181905550600081600101819055505b806000015483826001015401111580156112555750806001015483826001015401115b156112635760019150611268565b600091505b50929150505600a165627a7a72305820829e0119c133a410205606912728b71003dbd7359410bad5c3588c1681dc2d3d0029",
"sourceMap": "296:3283:20:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;296:3283:20;;;;;;;",
"deployedSourceMap": "296:3283:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;918:222;;8:9:-1;5:2;;;30:1;27;20:12;5:2;918:222:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;262:28:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:28:8;;;;;;;;;;;;;;;;;;;;;;;;;;;1890:987:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1890:987:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;626:248:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;626:248:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1368:158:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1368:158:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;339:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;339:50:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3461:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3461:116:20;;;;;;;;;;;;;;;;;;;;;;;513:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;513:50:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;395:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;395:40:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;918:222;1031:9;1004:12;:10;:12::i;:::-;1043:1;1031:13;;1026:107;1050:6;:13;1046:1;:17;1026:107;;;1118:12;1131:1;1118:15;;;;;;;;;;;;;;;;;;1082:11;:22;1094:6;1101:1;1094:9;;;;;;;;;;;;;;;;;;1082:22;;;;;;;;;;;;;;;:33;;:51;;;;1065:3;;;;;;;1026:107;;;918:222;;;:::o;262:28:8:-;;;;;;;;;;;;;:::o;1890:987:20:-;2647:17;2087:7;;;;;;;;;;;2074:29;;;2104:10;2074:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2074:41:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2074:41:20;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2074:41:20;;;;;;;;;;;;;;;;2066:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2181:1;2175:2;:7;;;;2167:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2241:1;2232:6;:10;2224:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2352:27;2365:5;2372:6;2352:12;:27::i;:::-;2344:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2455:6;2422:11;:18;2434:5;2422:18;;;;;;;;;;;;;;;:29;;;:39;;;;;;;;;;;2484:1;2475:5;:10;;;2471:400;;;2509:7;;;;;;;;;;;:33;;;2543:2;2547:6;2559:19;2509:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2509:70:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2509:70:20;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2509:70:20;;;;;;;;;;;;;;;;2501:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2471:400;;;2720:2;2724:6;2667:64;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2667:64:20;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;2667:64:20;2647:84;;2753:7;;;;;;;;;;;:33;;;2787:5;2794:1;2797:4;2803:19;2753:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2753:70:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2753:70:20;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2753:70:20;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2753:70:20;;;;;;;;;;;;;;;;2745:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2471:400;1890:987;;;;:::o;626:248:5:-;359:7:8;;;;;;;;;;;337:30;;:10;:30;;;329:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;791:1:5;776:11;:16;;;;768:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;856:11;843:10;;:24;;;;;;;;;;;;;;;;;;626:248;:::o;1368:158:20:-;359:7:8;;;;;;;;;;;337:30;;:10;:30;;;329:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1509:10:20;1477:11;:18;1489:5;1477:18;;;;;;;;;;;;;;;:29;;:42;;;;1368:158;;:::o;339:50::-;;;;;;;;;;;;;;;;;;;;:::o;3461:116::-;3523:4;3563:6;3557:3;:12;;;;;;;;3550:3;:20;3543:27;;3461:116;:::o;513:50::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;395:40::-;;;;;;;;;;;;;;;;;;;;:::o;434:300:8:-;648:1;636:7;;;;;;;;;;;628:21;;;620:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;716:10;692:7;;:35;;;;;;;;;;;;;;;;;;434:300::o;2883:486:20:-;2970:4;2990:29;3022:11;:18;3034:5;3022:18;;;;;;;;;;;;;;;2990:50;;3064:10;:18;;;3054:7;:5;:7::i;:::-;:28;3050:126;;;3119:7;:5;:7::i;:::-;3098:10;:18;;:28;;;;3164:1;3140:10;:21;;:25;;;;3050:126;3223:10;:21;;;3213:6;3189:10;:21;;;:30;:55;;:126;;;;;3294:10;:21;;;3285:6;3261:10;:21;;;:30;:54;3189:126;3185:155;;;3336:4;3329:11;;;;3185:155;3357:5;3350:12;;2883:486;;;;;;:::o",
"source": "pragma solidity 0.4.24;\nimport \"../Module.sol\";\nimport \"../ModuleManager.sol\";\nimport \"../OwnerManager.sol\";\nimport \"../Enum.sol\";\n\n\n/// @title Daily Limit Module - Allows to transfer limited amounts of ERC20 tokens and Ether without confirmations.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract DailyLimitModule is Module {\n\n string public constant NAME = \"Daily Limit Module\";\n string public constant VERSION = \"0.0.1\";\n\n // dailyLimits mapping maps token address to daily limit settings.\n mapping (address => DailyLimit) public dailyLimits;\n\n struct DailyLimit {\n uint256 dailyLimit;\n uint256 spentToday;\n uint256 lastDay;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param tokens List of token addresses. Ether is represented with address 0x0.\n /// @param _dailyLimits List of daily limits in smalles units (e.g. Wei for Ether).\n function setup(address[] tokens, uint256[] _dailyLimits)\n public\n {\n setManager();\n for (uint256 i = 0; i < tokens.length; i++)\n dailyLimits[tokens[i]].dailyLimit = _dailyLimits[i];\n }\n\n /// @dev Allows to update the daily limit for a specified token. This can only be done via a Safe transaction.\n /// @param token Token contract address.\n /// @param dailyLimit Daily limit in smallest token unit.\n function changeDailyLimit(address token, uint256 dailyLimit)\n public\n authorized\n {\n dailyLimits[token].dailyLimit = dailyLimit;\n }\n\n /// @dev Returns if Safe transaction is a valid daily limit transaction.\n /// @param token Address of the token that should be transfered (0 for Ether)\n /// @param to Address to which the tokens should be transfered\n /// @param amount Amount of tokens (or Ether) that should be transfered\n /// @return Returns if transaction can be executed.\n function executeDailyLimit(address token, address to, uint256 amount)\n public\n {\n // Only Safe owners are allowed to execute daily limit transactions.\n require(OwnerManager(manager).isOwner(msg.sender), \"Method can only be called by an owner\");\n require(to != 0, \"Invalid to address provided\");\n require(amount > 0, \"Invalid amount provided\");\n // Validate that transfer is not exceeding daily limit.\n require(isUnderLimit(token, amount), \"Daily limit has been reached\");\n dailyLimits[token].spentToday += amount;\n if (token == 0) {\n require(manager.execTransactionFromModule(to, amount, \"\", Enum.Operation.Call), \"Could not execute ether transfer\");\n } else {\n bytes memory data = abi.encodeWithSignature(\"transfer(address,uint256)\", to, amount);\n require(manager.execTransactionFromModule(token, 0, data, Enum.Operation.Call), \"Could not execute token transfer\");\n }\n }\n\n function isUnderLimit(address token, uint256 amount)\n internal\n returns (bool)\n {\n DailyLimit storage dailyLimit = dailyLimits[token];\n if (today() > dailyLimit.lastDay) {\n dailyLimit.lastDay = today();\n dailyLimit.spentToday = 0;\n }\n if (dailyLimit.spentToday + amount <= dailyLimit.dailyLimit && \n dailyLimit.spentToday + amount > dailyLimit.spentToday)\n return true;\n return false;\n }\n\n /// @dev Returns last midnight as Unix timestamp.\n /// @return Unix timestamp.\n function today()\n public\n view\n returns (uint)\n {\n return now - (now % 1 days);\n }\n}\n",
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
"ast": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
"exportedSymbols": {
"DailyLimitModule": [
3415
]
},
"id": 3416,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3178,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:20"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
"file": "../Module.sol",
"id": 3179,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 1862,
"src": "24:23:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
"file": "../ModuleManager.sol",
"id": 3180,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 2233,
"src": "48:30:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
"file": "../OwnerManager.sol",
"id": 3181,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 2889,
"src": "79:29:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
"file": "../Enum.sol",
"id": 3182,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 31,
"src": "109:21:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 3183,
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1861,
"src": "325:6:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$1861",
"typeString": "contract Module"
}
},
"id": 3184,
"nodeType": "InheritanceSpecifier",
"src": "325:6:20"
}
],
"contractDependencies": [
632,
1861,
3065
],
"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": 3415,
"linearizedBaseContracts": [
3415,
1861,
632,
3065
],
"name": "DailyLimitModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 3187,
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 3415,
"src": "339:50:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 3185,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "339:6:20",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "4461696c79204c696d6974204d6f64756c65",
"id": 3186,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "369:20:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
"typeString": "literal_string \"Daily Limit Module\""
},
"value": "Daily Limit Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 3190,
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 3415,
"src": "395:40:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 3188,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "395:6:20",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e31",
"id": 3189,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "428:7:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
"typeString": "literal_string \"0.0.1\""
},
"value": "0.0.1"
},
"visibility": "public"
},
{
"constant": false,
"id": 3194,
"name": "dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 3415,
"src": "513:50:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"typeName": {
"id": 3193,
"keyType": {
"id": 3191,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "522:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "513:31:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"valueType": {
"contractScope": null,
"id": 3192,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3201,
"src": "533:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
}
},
"value": null,
"visibility": "public"
},
{
"canonicalName": "DailyLimitModule.DailyLimit",
"id": 3201,
"members": [
{
"constant": false,
"id": 3196,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 3201,
"src": "598:18:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3195,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "598:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3198,
"name": "spentToday",
"nodeType": "VariableDeclaration",
"scope": 3201,
"src": "626:18:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3197,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "626:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3200,
"name": "lastDay",
"nodeType": "VariableDeclaration",
"scope": 3201,
"src": "654:15:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3199,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "654:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "DailyLimit",
"nodeType": "StructDefinition",
"scope": 3415,
"src": "570:106:20",
"visibility": "public"
},
{
"body": {
"id": 3236,
"nodeType": "Block",
"src": "994:146:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3210,
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1860,
"src": "1004:10:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 3211,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1004:12:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3212,
"nodeType": "ExpressionStatement",
"src": "1004:12:20"
},
{
"body": {
"expression": {
"argumentTypes": null,
"id": 3233,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3224,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "1082:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3228,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3225,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3204,
"src": "1094:6:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 3227,
"indexExpression": {
"argumentTypes": null,
"id": 3226,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1101:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1094:9:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1082:22:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 3229,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 3196,
"src": "1082:33:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3230,
"name": "_dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3207,
"src": "1118:12:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 3232,
"indexExpression": {
"argumentTypes": null,
"id": 3231,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1131:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1118:15:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1082:51:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3234,
"nodeType": "ExpressionStatement",
"src": "1082:51:20"
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3220,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3217,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1046:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3218,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3204,
"src": "1050:6:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 3219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1050:13:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1046:17:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3235,
"initializationExpression": {
"assignments": [
3214
],
"declarations": [
{
"constant": false,
"id": 3214,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 3237,
"src": "1031:9:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3213,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1031:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3216,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 3215,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1043:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1031:13:20"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 3222,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1065:3:20",
"subExpression": {
"argumentTypes": null,
"id": 3221,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1065:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3223,
"nodeType": "ExpressionStatement",
"src": "1065:3:20"
},
"nodeType": "ForStatement",
"src": "1026:107:20"
}
]
},
"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": 3237,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3208,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3204,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 3237,
"src": "933:16:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 3202,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "933:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 3203,
"length": null,
"nodeType": "ArrayTypeName",
"src": "933:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3207,
"name": "_dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 3237,
"src": "951:22:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 3205,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "951:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3206,
"length": null,
"nodeType": "ArrayTypeName",
"src": "951:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "932:42:20"
},
"payable": false,
"returnParameters": {
"id": 3209,
"nodeType": "ParameterList",
"parameters": [],
"src": "994:0:20"
},
"scope": 3415,
"src": "918:222:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3253,
"nodeType": "Block",
"src": "1467:59:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3251,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3246,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "1477:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3248,
"indexExpression": {
"argumentTypes": null,
"id": 3247,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3239,
"src": "1489:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1477:18:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 3249,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 3196,
"src": "1477:29:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3250,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3241,
"src": "1509:10:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1477:42:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3252,
"nodeType": "ExpressionStatement",
"src": "1477:42:20"
}
]
},
"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": 3254,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 3244,
"modifierName": {
"argumentTypes": null,
"id": 3243,
"name": "authorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1840,
"src": "1452:10:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1452:10:20"
}
],
"name": "changeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3242,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3239,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3254,
"src": "1394:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3238,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1394:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3241,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 3254,
"src": "1409:18:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3240,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1409:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1393:35:20"
},
"payable": false,
"returnParameters": {
"id": 3245,
"nodeType": "ParameterList",
"parameters": [],
"src": "1467:0:20"
},
"scope": 3415,
"src": "1368:158:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3344,
"nodeType": "Block",
"src": "1979:898:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3268,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4036,
"src": "2104:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3269,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2104:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3265,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1826,
"src": "2087:7:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
],
"id": 3264,
"name": "OwnerManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2888,
"src": "2074:12:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$2888_$",
"typeString": "type(contract OwnerManager)"
}
},
"id": 3266,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2074:21:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OwnerManager_$2888",
"typeString": "contract OwnerManager"
}
},
"id": 3267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 2838,
"src": "2074:29:20",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view external returns (bool)"
}
},
"id": 3270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2074:41:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e206f776e6572",
"id": 3271,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2117:39:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4df072353ff501a1071e1cc3e2eb3ee0ebb21a35321efe90c0960bf2f4356640",
"typeString": "literal_string \"Method can only be called by an owner\""
},
"value": "Method can only be called by an owner"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4df072353ff501a1071e1cc3e2eb3ee0ebb21a35321efe90c0960bf2f4356640",
"typeString": "literal_string \"Method can only be called by an owner\""
}
],
"id": 3263,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2066:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3272,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2066:91:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3273,
"nodeType": "ExpressionStatement",
"src": "2066:91:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3277,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3275,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3258,
"src": "2175:2:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3276,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2181:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2175:7:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420746f20616464726573732070726f7669646564",
"id": 3278,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2184:29:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5adba0692e08f8080ea3ec2bf95727d181df9c72d0fc6db8f77e3703d9523f1",
"typeString": "literal_string \"Invalid to address provided\""
},
"value": "Invalid to address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c5adba0692e08f8080ea3ec2bf95727d181df9c72d0fc6db8f77e3703d9523f1",
"typeString": "literal_string \"Invalid to address provided\""
}
],
"id": 3274,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2167:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3279,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2167:47:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3280,
"nodeType": "ExpressionStatement",
"src": "2167:47:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3282,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2232:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3283,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2241:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2232:10:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420616d6f756e742070726f7669646564",
"id": 3285,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2244:25:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_991bec80688b0edba4751e32429f6879002de57199ff2c6b5bf0742d348ba58f",
"typeString": "literal_string \"Invalid amount provided\""
},
"value": "Invalid amount provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_991bec80688b0edba4751e32429f6879002de57199ff2c6b5bf0742d348ba58f",
"typeString": "literal_string \"Invalid amount provided\""
}
],
"id": 3281,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2224:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2224:46:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3287,
"nodeType": "ExpressionStatement",
"src": "2224:46:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3290,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2365:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3291,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2372:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3289,
"name": "isUnderLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3401,
"src": "2352:12:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) returns (bool)"
}
},
"id": 3292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2352:27:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4461696c79206c696d697420686173206265656e2072656163686564",
"id": 3293,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2381:30:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8c8c9a9731e3c1970f356c6998c7e6418ab5b55402b68846f03a8bbe49c05905",
"typeString": "literal_string \"Daily limit has been reached\""
},
"value": "Daily limit has been reached"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8c8c9a9731e3c1970f356c6998c7e6418ab5b55402b68846f03a8bbe49c05905",
"typeString": "literal_string \"Daily limit has been reached\""
}
],
"id": 3288,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2344:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2344:68:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3295,
"nodeType": "ExpressionStatement",
"src": "2344:68:20"
},
{
"expression": {
"argumentTypes": null,
"id": 3301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3296,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "2422:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3298,
"indexExpression": {
"argumentTypes": null,
"id": 3297,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2434:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2422:18:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 3299,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "2422:29:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"id": 3300,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2455:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2422:39:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3302,
"nodeType": "ExpressionStatement",
"src": "2422:39:20"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3305,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3303,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2475:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3304,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2484:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2475:10:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 3342,
"nodeType": "Block",
"src": "2633:238:20",
"statements": [
{
"assignments": [
3321
],
"declarations": [
{
"constant": false,
"id": 3321,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "2647:17:20",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3320,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2647:5:20",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3328,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "7472616e7366657228616464726573732c75696e7432353629",
"id": 3324,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2691:27:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
"value": "transfer(address,uint256)"
},
{
"argumentTypes": null,
"id": 3325,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3258,
"src": "2720:2:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3326,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2724:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3322,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4023,
"src": "2667:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 3323,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSignature",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2667:23:20",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (string memory) pure returns (bytes memory)"
}
},
"id": 3327,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2667:64:20",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2647:84:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3332,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2787:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 3333,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2794:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"id": 3334,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3321,
"src": "2797:4:20",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3335,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "2803:4:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 3336,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "2803:14:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 3337,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2803:19:20",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 3330,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1826,
"src": "2753:7:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
},
"id": 3331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 2059,
"src": "2753:33:20",
"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": 3338,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2753:70:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f74206578656375746520746f6b656e207472616e73666572",
"id": 3339,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2825:34:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_00c0b742664159361be6aebbe2af44c4ae7eb95e13260265d1e1cf75d2593709",
"typeString": "literal_string \"Could not execute token transfer\""
},
"value": "Could not execute token transfer"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_00c0b742664159361be6aebbe2af44c4ae7eb95e13260265d1e1cf75d2593709",
"typeString": "literal_string \"Could not execute token transfer\""
}
],
"id": 3329,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2745:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3340,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2745:115:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3341,
"nodeType": "ExpressionStatement",
"src": "2745:115:20"
}
]
},
"id": 3343,
"nodeType": "IfStatement",
"src": "2471:400:20",
"trueBody": {
"id": 3319,
"nodeType": "Block",
"src": "2487:140:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3309,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3258,
"src": "2543:2:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3310,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2547:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "",
"id": 3311,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2555:2:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3312,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "2559:4:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 3313,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "2559:14:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 3314,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2559:19:20",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 3307,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1826,
"src": "2509:7:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
},
"id": 3308,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 2059,
"src": "2509:33:20",
"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": 3315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2509:70:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f742065786563757465206574686572207472616e73666572",
"id": 3316,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2581:34:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2fae53cac084168982e43888b6e5eff084959ab65d511777b56b4cbb265d2586",
"typeString": "literal_string \"Could not execute ether transfer\""
},
"value": "Could not execute ether transfer"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2fae53cac084168982e43888b6e5eff084959ab65d511777b56b4cbb265d2586",
"typeString": "literal_string \"Could not execute ether transfer\""
}
],
"id": 3306,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2501:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2501:115:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3318,
"nodeType": "ExpressionStatement",
"src": "2501:115:20"
}
]
}
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param token Address of the token that should be transfered (0 for Ether)\n @param to Address to which the tokens should be transfered\n @param amount Amount of tokens (or Ether) that should be transfered\n @return Returns if transaction can be executed.",
"id": 3345,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3261,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3256,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "1917:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3255,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1917:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3258,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "1932:10:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3257,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1932:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3260,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "1944:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3259,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1944:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1916:43:20"
},
"payable": false,
"returnParameters": {
"id": 3262,
"nodeType": "ParameterList",
"parameters": [],
"src": "1979:0:20"
},
"scope": 3415,
"src": "1890:987:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3400,
"nodeType": "Block",
"src": "2980:389:20",
"statements": [
{
"assignments": [
3355
],
"declarations": [
{
"constant": false,
"id": 3355,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2990:29:20",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
},
"typeName": {
"contractScope": null,
"id": 3354,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3201,
"src": "2990:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3359,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3356,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "3022:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3358,
"indexExpression": {
"argumentTypes": null,
"id": 3357,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3347,
"src": "3034:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3022:18:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2990:50:20"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3360,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3414,
"src": "3054:5:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 3361,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3054:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3362,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3064:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3363,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 3200,
"src": "3064:18:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3054:28:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 3379,
"nodeType": "IfStatement",
"src": "3050:126:20",
"trueBody": {
"id": 3378,
"nodeType": "Block",
"src": "3084:92:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3370,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3365,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3098:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3367,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 3200,
"src": "3098:18:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3368,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3414,
"src": "3119:5:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 3369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3119:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3098:28:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3371,
"nodeType": "ExpressionStatement",
"src": "3098:28:20"
},
{
"expression": {
"argumentTypes": null,
"id": 3376,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3372,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3140:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3374,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3140:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 3375,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3164:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3140:25:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3377,
"nodeType": "ExpressionStatement",
"src": "3140:25:20"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 3394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3386,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3383,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3380,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3189:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3381,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3189:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 3382,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3349,
"src": "3213:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3189:30:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3384,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3223:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3385,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 3196,
"src": "3223:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3189:55:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3387,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3261:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3388,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3261:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 3389,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3349,
"src": "3285:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3261:30:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3391,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3294:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3392,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3294:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3261:54:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3189:126:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 3397,
"nodeType": "IfStatement",
"src": "3185:155:20",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3395,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3336:4:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3353,
"id": 3396,
"nodeType": "Return",
"src": "3329:11:20"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 3398,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3357:5:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 3353,
"id": 3399,
"nodeType": "Return",
"src": "3350:12:20"
}
]
},
"documentation": null,
"id": 3401,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "isUnderLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3350,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3347,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2905:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3346,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2905:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3349,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2920:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3348,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2920:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2904:31:20"
},
"payable": false,
"returnParameters": {
"id": 3353,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3352,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2970:4:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3351,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2970:4:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2969:6:20"
},
"scope": 3415,
"src": "2883:486:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3413,
"nodeType": "Block",
"src": "3533:44:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3406,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4038,
"src": "3550:3:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3407,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4038,
"src": "3557:3:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 3408,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3563:6:20",
"subdenomination": "days",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "1"
},
"src": "3557:12:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 3410,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "3556:14:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3550:20:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3405,
"id": 3412,
"nodeType": "Return",
"src": "3543:27:20"
}
]
},
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
"id": 3414,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "today",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3402,
"nodeType": "ParameterList",
"parameters": [],
"src": "3475:2:20"
},
"payable": false,
"returnParameters": {
"id": 3405,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3404,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3414,
"src": "3523:4:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3403,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3523:4:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3522:6:20"
},
"scope": 3415,
"src": "3461:116:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 3416,
"src": "296:3283:20"
}
],
"src": "0:3580:20"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
"exportedSymbols": {
"DailyLimitModule": [
3415
]
},
"id": 3416,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3178,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:20"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
"file": "../Module.sol",
"id": 3179,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 1862,
"src": "24:23:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
"file": "../ModuleManager.sol",
"id": 3180,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 2233,
"src": "48:30:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
"file": "../OwnerManager.sol",
"id": 3181,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 2889,
"src": "79:29:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
"file": "../Enum.sol",
"id": 3182,
"nodeType": "ImportDirective",
"scope": 3416,
"sourceUnit": 31,
"src": "109:21:20",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 3183,
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1861,
"src": "325:6:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$1861",
"typeString": "contract Module"
}
},
"id": 3184,
"nodeType": "InheritanceSpecifier",
"src": "325:6:20"
}
],
"contractDependencies": [
632,
1861,
3065
],
"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": 3415,
"linearizedBaseContracts": [
3415,
1861,
632,
3065
],
"name": "DailyLimitModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 3187,
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 3415,
"src": "339:50:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 3185,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "339:6:20",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "4461696c79204c696d6974204d6f64756c65",
"id": 3186,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "369:20:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
"typeString": "literal_string \"Daily Limit Module\""
},
"value": "Daily Limit Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 3190,
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 3415,
"src": "395:40:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 3188,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "395:6:20",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e31",
"id": 3189,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "428:7:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
"typeString": "literal_string \"0.0.1\""
},
"value": "0.0.1"
},
"visibility": "public"
},
{
"constant": false,
"id": 3194,
"name": "dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 3415,
"src": "513:50:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"typeName": {
"id": 3193,
"keyType": {
"id": 3191,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "522:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "513:31:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"valueType": {
"contractScope": null,
"id": 3192,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3201,
"src": "533:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
}
},
"value": null,
"visibility": "public"
},
{
"canonicalName": "DailyLimitModule.DailyLimit",
"id": 3201,
"members": [
{
"constant": false,
"id": 3196,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 3201,
"src": "598:18:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3195,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "598:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3198,
"name": "spentToday",
"nodeType": "VariableDeclaration",
"scope": 3201,
"src": "626:18:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3197,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "626:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3200,
"name": "lastDay",
"nodeType": "VariableDeclaration",
"scope": 3201,
"src": "654:15:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3199,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "654:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "DailyLimit",
"nodeType": "StructDefinition",
"scope": 3415,
"src": "570:106:20",
"visibility": "public"
},
{
"body": {
"id": 3236,
"nodeType": "Block",
"src": "994:146:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3210,
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1860,
"src": "1004:10:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 3211,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1004:12:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3212,
"nodeType": "ExpressionStatement",
"src": "1004:12:20"
},
{
"body": {
"expression": {
"argumentTypes": null,
"id": 3233,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3224,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "1082:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3228,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3225,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3204,
"src": "1094:6:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 3227,
"indexExpression": {
"argumentTypes": null,
"id": 3226,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1101:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1094:9:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1082:22:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 3229,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 3196,
"src": "1082:33:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3230,
"name": "_dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3207,
"src": "1118:12:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 3232,
"indexExpression": {
"argumentTypes": null,
"id": 3231,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1131:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1118:15:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1082:51:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3234,
"nodeType": "ExpressionStatement",
"src": "1082:51:20"
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3220,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3217,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1046:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3218,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3204,
"src": "1050:6:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 3219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1050:13:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1046:17:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 3235,
"initializationExpression": {
"assignments": [
3214
],
"declarations": [
{
"constant": false,
"id": 3214,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 3237,
"src": "1031:9:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3213,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1031:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3216,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 3215,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1043:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1031:13:20"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 3222,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1065:3:20",
"subExpression": {
"argumentTypes": null,
"id": 3221,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3214,
"src": "1065:1:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3223,
"nodeType": "ExpressionStatement",
"src": "1065:3:20"
},
"nodeType": "ForStatement",
"src": "1026:107:20"
}
]
},
"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": 3237,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3208,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3204,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 3237,
"src": "933:16:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 3202,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "933:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 3203,
"length": null,
"nodeType": "ArrayTypeName",
"src": "933:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3207,
"name": "_dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 3237,
"src": "951:22:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 3205,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "951:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3206,
"length": null,
"nodeType": "ArrayTypeName",
"src": "951:9:20",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "932:42:20"
},
"payable": false,
"returnParameters": {
"id": 3209,
"nodeType": "ParameterList",
"parameters": [],
"src": "994:0:20"
},
"scope": 3415,
"src": "918:222:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3253,
"nodeType": "Block",
"src": "1467:59:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3251,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3246,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "1477:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3248,
"indexExpression": {
"argumentTypes": null,
"id": 3247,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3239,
"src": "1489:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1477:18:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 3249,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 3196,
"src": "1477:29:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 3250,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3241,
"src": "1509:10:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1477:42:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3252,
"nodeType": "ExpressionStatement",
"src": "1477:42:20"
}
]
},
"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": 3254,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 3244,
"modifierName": {
"argumentTypes": null,
"id": 3243,
"name": "authorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1840,
"src": "1452:10:20",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1452:10:20"
}
],
"name": "changeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3242,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3239,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3254,
"src": "1394:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3238,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1394:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3241,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 3254,
"src": "1409:18:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3240,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1409:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1393:35:20"
},
"payable": false,
"returnParameters": {
"id": 3245,
"nodeType": "ParameterList",
"parameters": [],
"src": "1467:0:20"
},
"scope": 3415,
"src": "1368:158:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3344,
"nodeType": "Block",
"src": "1979:898:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3268,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4036,
"src": "2104:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3269,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2104:10:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3265,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1826,
"src": "2087:7:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
],
"id": 3264,
"name": "OwnerManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2888,
"src": "2074:12:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$2888_$",
"typeString": "type(contract OwnerManager)"
}
},
"id": 3266,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2074:21:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OwnerManager_$2888",
"typeString": "contract OwnerManager"
}
},
"id": 3267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 2838,
"src": "2074:29:20",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view external returns (bool)"
}
},
"id": 3270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2074:41:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e206f776e6572",
"id": 3271,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2117:39:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4df072353ff501a1071e1cc3e2eb3ee0ebb21a35321efe90c0960bf2f4356640",
"typeString": "literal_string \"Method can only be called by an owner\""
},
"value": "Method can only be called by an owner"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4df072353ff501a1071e1cc3e2eb3ee0ebb21a35321efe90c0960bf2f4356640",
"typeString": "literal_string \"Method can only be called by an owner\""
}
],
"id": 3263,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2066:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3272,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2066:91:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3273,
"nodeType": "ExpressionStatement",
"src": "2066:91:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3277,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3275,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3258,
"src": "2175:2:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3276,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2181:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2175:7:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420746f20616464726573732070726f7669646564",
"id": 3278,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2184:29:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5adba0692e08f8080ea3ec2bf95727d181df9c72d0fc6db8f77e3703d9523f1",
"typeString": "literal_string \"Invalid to address provided\""
},
"value": "Invalid to address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c5adba0692e08f8080ea3ec2bf95727d181df9c72d0fc6db8f77e3703d9523f1",
"typeString": "literal_string \"Invalid to address provided\""
}
],
"id": 3274,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2167:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3279,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2167:47:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3280,
"nodeType": "ExpressionStatement",
"src": "2167:47:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3284,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3282,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2232:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3283,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2241:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2232:10:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420616d6f756e742070726f7669646564",
"id": 3285,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2244:25:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_991bec80688b0edba4751e32429f6879002de57199ff2c6b5bf0742d348ba58f",
"typeString": "literal_string \"Invalid amount provided\""
},
"value": "Invalid amount provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_991bec80688b0edba4751e32429f6879002de57199ff2c6b5bf0742d348ba58f",
"typeString": "literal_string \"Invalid amount provided\""
}
],
"id": 3281,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2224:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2224:46:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3287,
"nodeType": "ExpressionStatement",
"src": "2224:46:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3290,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2365:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3291,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2372:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3289,
"name": "isUnderLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3401,
"src": "2352:12:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) returns (bool)"
}
},
"id": 3292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2352:27:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4461696c79206c696d697420686173206265656e2072656163686564",
"id": 3293,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2381:30:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8c8c9a9731e3c1970f356c6998c7e6418ab5b55402b68846f03a8bbe49c05905",
"typeString": "literal_string \"Daily limit has been reached\""
},
"value": "Daily limit has been reached"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8c8c9a9731e3c1970f356c6998c7e6418ab5b55402b68846f03a8bbe49c05905",
"typeString": "literal_string \"Daily limit has been reached\""
}
],
"id": 3288,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2344:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3294,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2344:68:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3295,
"nodeType": "ExpressionStatement",
"src": "2344:68:20"
},
{
"expression": {
"argumentTypes": null,
"id": 3301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3296,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "2422:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3298,
"indexExpression": {
"argumentTypes": null,
"id": 3297,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2434:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2422:18:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 3299,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "2422:29:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"id": 3300,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2455:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2422:39:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3302,
"nodeType": "ExpressionStatement",
"src": "2422:39:20"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 3305,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3303,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2475:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3304,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2484:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2475:10:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 3342,
"nodeType": "Block",
"src": "2633:238:20",
"statements": [
{
"assignments": [
3321
],
"declarations": [
{
"constant": false,
"id": 3321,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "2647:17:20",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 3320,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2647:5:20",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3328,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "7472616e7366657228616464726573732c75696e7432353629",
"id": 3324,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2691:27:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
"value": "transfer(address,uint256)"
},
{
"argumentTypes": null,
"id": 3325,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3258,
"src": "2720:2:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3326,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2724:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 3322,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4023,
"src": "2667:3:20",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 3323,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSignature",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2667:23:20",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (string memory) pure returns (bytes memory)"
}
},
"id": 3327,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2667:64:20",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2647:84:20"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3332,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3256,
"src": "2787:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 3333,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2794:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"id": 3334,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3321,
"src": "2797:4:20",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3335,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "2803:4:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 3336,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "2803:14:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 3337,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2803:19:20",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 3330,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1826,
"src": "2753:7:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
},
"id": 3331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 2059,
"src": "2753:33:20",
"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": 3338,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2753:70:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f74206578656375746520746f6b656e207472616e73666572",
"id": 3339,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2825:34:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_00c0b742664159361be6aebbe2af44c4ae7eb95e13260265d1e1cf75d2593709",
"typeString": "literal_string \"Could not execute token transfer\""
},
"value": "Could not execute token transfer"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_00c0b742664159361be6aebbe2af44c4ae7eb95e13260265d1e1cf75d2593709",
"typeString": "literal_string \"Could not execute token transfer\""
}
],
"id": 3329,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2745:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3340,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2745:115:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3341,
"nodeType": "ExpressionStatement",
"src": "2745:115:20"
}
]
},
"id": 3343,
"nodeType": "IfStatement",
"src": "2471:400:20",
"trueBody": {
"id": 3319,
"nodeType": "Block",
"src": "2487:140:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3309,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3258,
"src": "2543:2:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3310,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "2547:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "",
"id": 3311,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2555:2:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3312,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "2559:4:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 3313,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "2559:14:20",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 3314,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2559:19:20",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 3307,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1826,
"src": "2509:7:20",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$2232",
"typeString": "contract ModuleManager"
}
},
"id": 3308,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 2059,
"src": "2509:33:20",
"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": 3315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2509:70:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f742065786563757465206574686572207472616e73666572",
"id": 3316,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2581:34:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2fae53cac084168982e43888b6e5eff084959ab65d511777b56b4cbb265d2586",
"typeString": "literal_string \"Could not execute ether transfer\""
},
"value": "Could not execute ether transfer"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2fae53cac084168982e43888b6e5eff084959ab65d511777b56b4cbb265d2586",
"typeString": "literal_string \"Could not execute ether transfer\""
}
],
"id": 3306,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4039,
4040
],
"referencedDeclaration": 4040,
"src": "2501:7:20",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2501:115:20",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3318,
"nodeType": "ExpressionStatement",
"src": "2501:115:20"
}
]
}
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param token Address of the token that should be transfered (0 for Ether)\n @param to Address to which the tokens should be transfered\n @param amount Amount of tokens (or Ether) that should be transfered\n @return Returns if transaction can be executed.",
"id": 3345,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3261,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3256,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "1917:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3255,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1917:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3258,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "1932:10:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3257,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1932:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3260,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3345,
"src": "1944:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3259,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1944:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1916:43:20"
},
"payable": false,
"returnParameters": {
"id": 3262,
"nodeType": "ParameterList",
"parameters": [],
"src": "1979:0:20"
},
"scope": 3415,
"src": "1890:987:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 3400,
"nodeType": "Block",
"src": "2980:389:20",
"statements": [
{
"assignments": [
3355
],
"declarations": [
{
"constant": false,
"id": 3355,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2990:29:20",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
},
"typeName": {
"contractScope": null,
"id": 3354,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3201,
"src": "2990:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3359,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3356,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3194,
"src": "3022:11:20",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$3201_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 3358,
"indexExpression": {
"argumentTypes": null,
"id": 3357,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3347,
"src": "3034:5:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3022:18:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2990:50:20"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3364,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3360,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3414,
"src": "3054:5:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 3361,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3054:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3362,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3064:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3363,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 3200,
"src": "3064:18:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3054:28:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 3379,
"nodeType": "IfStatement",
"src": "3050:126:20",
"trueBody": {
"id": 3378,
"nodeType": "Block",
"src": "3084:92:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 3370,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3365,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3098:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3367,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 3200,
"src": "3098:18:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 3368,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3414,
"src": "3119:5:20",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 3369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3119:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3098:28:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3371,
"nodeType": "ExpressionStatement",
"src": "3098:28:20"
},
{
"expression": {
"argumentTypes": null,
"id": 3376,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3372,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3140:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3374,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3140:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 3375,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3164:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3140:25:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3377,
"nodeType": "ExpressionStatement",
"src": "3140:25:20"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 3394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3386,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3383,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3380,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3189:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3381,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3189:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 3382,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3349,
"src": "3213:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3189:30:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3384,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3223:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3385,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 3196,
"src": "3223:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3189:55:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3393,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3387,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3261:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3388,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3261:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 3389,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3349,
"src": "3285:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3261:30:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3391,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3355,
"src": "3294:10:20",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$3201_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 3392,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 3198,
"src": "3294:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3261:54:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3189:126:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 3397,
"nodeType": "IfStatement",
"src": "3185:155:20",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 3395,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3336:4:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 3353,
"id": 3396,
"nodeType": "Return",
"src": "3329:11:20"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 3398,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3357:5:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 3353,
"id": 3399,
"nodeType": "Return",
"src": "3350:12:20"
}
]
},
"documentation": null,
"id": 3401,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "isUnderLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3350,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3347,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2905:13:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3346,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2905:7:20",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3349,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2920:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3348,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2920:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2904:31:20"
},
"payable": false,
"returnParameters": {
"id": 3353,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3352,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3401,
"src": "2970:4:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3351,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2970:4:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2969:6:20"
},
"scope": 3415,
"src": "2883:486:20",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3413,
"nodeType": "Block",
"src": "3533:44:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3406,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4038,
"src": "3550:3:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3407,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4038,
"src": "3557:3:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 3408,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3563:6:20",
"subdenomination": "days",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "1"
},
"src": "3557:12:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 3410,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "3556:14:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3550:20:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3405,
"id": 3412,
"nodeType": "Return",
"src": "3543:27:20"
}
]
},
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
"id": 3414,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "today",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3402,
"nodeType": "ParameterList",
"parameters": [],
"src": "3475:2:20"
},
"payable": false,
"returnParameters": {
"id": 3405,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3404,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 3414,
"src": "3523:4:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3403,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3523:4:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3522:6:20"
},
"scope": 3415,
"src": "3461:116:20",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 3416,
"src": "296:3283:20"
}
],
"src": "0:3580:20"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {
"4": {
"events": {},
"links": {},
"address": "0x7cfb7607cc60339ccd817b6354e102eba6b49ff1",
"transactionHash": "0x9479ecd87f9e5b0746693a16f7ce7f469176203015dcdb15a8ae1328c9816ebe"
},
"1530013596495": {
"events": {},
"links": {},
"address": "0x2c9ce286dfc3b59f113c51130417a46e9a646a6d",
"transactionHash": "0x02608c4ea7f319af8a9b630a79ed662d2215f6c1346b4695102205ee761daf5f"
},
"1530525742205": {
"events": {},
"links": {},
"address": "0x3677fea71a2c8f03d54e7f5360bd9a05a020bdda",
"transactionHash": "0x9325cfc4774c2add944a1a9458f74c8815e0bb04bf77f12b5bfb1fdae443836b"
},
"1530611935189": {
"events": {},
"links": {},
"address": "0x7533d313863f3342d83491b17c4a8e8fff65a192",
"transactionHash": "0x9325cfc4774c2add944a1a9458f74c8815e0bb04bf77f12b5bfb1fdae443836b"
}
},
"schemaVersion": "2.0.0",
"updatedAt": "2018-07-03T09:59:18.533Z"
}