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

6688 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": "0x608060405234801561001057600080fd5b5061129b806100206000396000f300608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f031461009e578063481c6a751461014757806363bae7c31461019e5780637de7edef1461020b57806381c5e03b1461024e578063a3f4df7e1461029b578063b74e452b1461032b578063d7bffc9214610356578063ffa1ad74146103bb575b600080fd5b3480156100aa57600080fd5b50610145600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061044b565b005b34801561015357600080fd5b5061015c6104ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101aa57600080fd5b50610209600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610510565b005b34801561021757600080fd5b5061024c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d00565b005b34801561025a57600080fd5b50610299600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ee3565b005b3480156102a757600080fd5b506102b0611019565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f05780820151818401526020810190506102d5565b50505050905090810190601f16801561031d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033757600080fd5b50610340611052565b6040518082815260200191505060405180910390f35b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061106a565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103c757600080fd5b506103d0611094565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104105780820151818401526020810190506103f5565b50505050905090810190601f16801561043d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006104556110cd565b600090505b82518110156104e557818181518110151561047157fe5b9060200190602002015160026000858481518110151561048d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550808060010191505061045a565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156105cf57600080fd5b505af11580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b810190808051906020019092919050505015156106a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e2081526020017f6f776e657200000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff1614151515610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f496e76616c696420746f20616464726573732070726f7669646564000000000081525060200191505060405180910390fd5b6000821115156107ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f496e76616c696420616d6f756e742070726f766964656400000000000000000081525060200191505060405180910390fd5b6107b584836111c0565b1515610829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4461696c79206c696d697420686173206265656e20726561636865640000000081525060200191505060405180910390fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555060008473ffffffffffffffffffffffffffffffffffffffff161415610a3c57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7848460006040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018060200183600281111561095157fe5b60ff168152602001828103825260008152602001602001945050505050602060405180830381600087803b15801561098857600080fd5b505af115801561099c573d6000803e3d6000fd5b505050506040513d60208110156109b257600080fd5b81019080805190602001909291905050501515610a37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f742065786563757465206574686572207472616e7366657281525060200191505060405180910390fd5b610cfa565b8282604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001836002811115610bbb57fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610bfb578082015181840152602081019050610be0565b50505050905090810190601f168015610c285780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b81019080805190602001909291905050501515610cf9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74206578656375746520746f6b656e207472616e7366657281525060200191505060405180910390fd5b5b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610ea0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b6000620151804281151561106257fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6040805190810160405280600581526020017f302e302e3200000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d616e616765722068617320616c7265616479206265656e207365740000000081525060200191505060405180910390fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154611211611052565b11156112325761121f611052565b8160020181905550600081600101819055505b806000015483826001015401111580156112555750806001015483826001015401115b156112635760019150611268565b600091505b50929150505600a165627a7a72305820c9fff2d2f4e7a988305f955b24a67b14ce9f8eb1e561d62a099c2c918f82fd300029",
"deployedBytecode": "0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328814f031461009e578063481c6a751461014757806363bae7c31461019e5780637de7edef1461020b57806381c5e03b1461024e578063a3f4df7e1461029b578063b74e452b1461032b578063d7bffc9214610356578063ffa1ad74146103bb575b600080fd5b3480156100aa57600080fd5b50610145600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061044b565b005b34801561015357600080fd5b5061015c6104ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101aa57600080fd5b50610209600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610510565b005b34801561021757600080fd5b5061024c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d00565b005b34801561025a57600080fd5b50610299600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ee3565b005b3480156102a757600080fd5b506102b0611019565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f05780820151818401526020810190506102d5565b50505050905090810190601f16801561031d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033757600080fd5b50610340611052565b6040518082815260200191505060405180910390f35b34801561036257600080fd5b50610397600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061106a565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156103c757600080fd5b506103d0611094565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104105780820151818401526020810190506103f5565b50505050905090810190601f16801561043d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006104556110cd565b600090505b82518110156104e557818181518110151561047157fe5b9060200190602002015160026000858481518110151561048d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550808060010191505061045a565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632f54bf6e336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156105cf57600080fd5b505af11580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b810190808051906020019092919050505015156106a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e2081526020017f6f776e657200000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff1614151515610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f496e76616c696420746f20616464726573732070726f7669646564000000000081525060200191505060405180910390fd5b6000821115156107ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f496e76616c696420616d6f756e742070726f766964656400000000000000000081525060200191505060405180910390fd5b6107b584836111c0565b1515610829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4461696c79206c696d697420686173206265656e20726561636865640000000081525060200191505060405180910390fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555060008473ffffffffffffffffffffffffffffffffffffffff161415610a3c57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a7848460006040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018060200183600281111561095157fe5b60ff168152602001828103825260008152602001602001945050505050602060405180830381600087803b15801561098857600080fd5b505af115801561099c573d6000803e3d6000fd5b505050506040513d60208110156109b257600080fd5b81019080805190602001909291905050501515610a37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f742065786563757465206574686572207472616e7366657281525060200191505060405180910390fd5b610cfa565b8282604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001836002811115610bbb57fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610bfb578082015181840152602081019050610be0565b50505050905090810190601f168015610c285780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b81019080805190602001909291905050501515610cf9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74206578656375746520746f6b656e207472616e7366657281525060200191505060405180910390fd5b5b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610deb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614151515610ea0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f496e76616c6964206d617374657220636f707920616464726573732070726f7681526020017f696465640000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4d6574686f642063616e206f6e6c792062652063616c6c65642066726f6d206d81526020017f616e61676572000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505050565b6040805190810160405280601281526020017f4461696c79204c696d6974204d6f64756c65000000000000000000000000000081525081565b6000620151804281151561106257fe5b064203905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b6040805190810160405280600581526020017f302e302e3200000000000000000000000000000000000000000000000000000081525081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4d616e616765722068617320616c7265616479206265656e207365740000000081525060200191505060405180910390fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060020154611211611052565b11156112325761121f611052565b8160020181905550600081600101819055505b806000015483826001015401111580156112555750806001015483826001015401115b156112635760019150611268565b600091505b50929150505600a165627a7a72305820c9fff2d2f4e7a988305f955b24a67b14ce9f8eb1e561d62a099c2c918f82fd300029",
"sourceMap": "318:3283:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;318:3283:17;;;;;;;",
"deployedSourceMap": "318:3283:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:222;;8:9:-1;5:2;;;30:1;27;20:12;5:2;940:222:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;270:28:4;;8:9:-1;5:2;;;30:1;27;20:12;5:2;270:28:4;;;;;;;;;;;;;;;;;;;;;;;;;;;1912:987:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1912:987:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;626:248:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;626:248:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;1390:158:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1390:158:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;361:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;361:50:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;361:50:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3483:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3483:116:17;;;;;;;;;;;;;;;;;;;;;;;535:50;;8:9:-1;5:2;;;30:1;27;20:12;5:2;535:50:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;417:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;417:40:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;417:40:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:222;1053:9;1026:12;:10;:12::i;:::-;1065:1;1053:13;;1048:107;1072:6;:13;1068:1;:17;1048:107;;;1140:12;1153:1;1140:15;;;;;;;;;;;;;;;;;;1104:11;:22;1116:6;1123:1;1116:9;;;;;;;;;;;;;;;;;;1104:22;;;;;;;;;;;;;;;:33;;:51;;;;1087:3;;;;;;;1048:107;;;940:222;;;:::o;270:28:4:-;;;;;;;;;;;;;:::o;1912:987:17:-;2669:17;2109:7;;;;;;;;;;;2096:29;;;2126:10;2096:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2096:41:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2096:41:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2096:41:17;;;;;;;;;;;;;;;;2088:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2203:1;2197:2;:7;;;;2189:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2263:1;2254:6;:10;2246:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2374:27;2387:5;2394:6;2374:12;:27::i;:::-;2366:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2477:6;2444:11;:18;2456:5;2444:18;;;;;;;;;;;;;;;:29;;;:39;;;;;;;;;;;2506:1;2497:5;:10;;;2493:400;;;2531:7;;;;;;;;;;;:33;;;2565:2;2569:6;2581:19;2531:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2531:70:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2531:70:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2531:70:17;;;;;;;;;;;;;;;;2523:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2493:400;;;2742:2;2746:6;2689:64;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2689:64:17;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;2689:64:17;2669:84;;2775:7;;;;;;;;;;;:33;;;2809:5;2816:1;2819:4;2825:19;2775: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;2775:70:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2775:70:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2775:70:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2775:70:17;;;;;;;;;;;;;;;;2767:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2493:400;1912:987;;;;:::o;626:248:9:-;367:7:4;;;;;;;;;;;345:30;;:10;:30;;;337:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;791:1:9;776:11;:16;;;;768:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;856:11;843:10;;:24;;;;;;;;;;;;;;;;;;626:248;:::o;1390:158:17:-;367:7:4;;;;;;;;;;;345:30;;:10;:30;;;337:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1531:10:17;1499:11;:18;1511:5;1499:18;;;;;;;;;;;;;;;:29;;:42;;;;1390:158;;:::o;361:50::-;;;;;;;;;;;;;;;;;;;;:::o;3483:116::-;3545:4;3585:6;3579:3;:12;;;;;;;;3572:3;:20;3565:27;;3483:116;:::o;535:50::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;417:40::-;;;;;;;;;;;;;;;;;;;;:::o;442:300:4:-;656:1;644:7;;;;;;;;;;;636:21;;;628:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;724:10;700:7;;:35;;;;;;;;;;;;;;;;;;442:300::o;2905:486:17:-;2992:4;3012:29;3044:11;:18;3056:5;3044:18;;;;;;;;;;;;;;;3012:50;;3086:10;:18;;;3076:7;:5;:7::i;:::-;:28;3072:126;;;3141:7;:5;:7::i;:::-;3120:10;:18;;:28;;;;3186:1;3162:10;:21;;:25;;;;3072:126;3245:10;:21;;;3235:6;3211:10;:21;;;:30;:55;;:126;;;;;3316:10;:21;;;3307:6;3283:10;:21;;;:30;:54;3211:126;3207:155;;;3358:4;3351:11;;;;3207:155;3379:5;3372:12;;2905:486;;;;;;:::o",
"source": "pragma solidity 0.4.24;\nimport \"../base/Module.sol\";\nimport \"../base/ModuleManager.sol\";\nimport \"../base/OwnerManager.sol\";\nimport \"../common/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.2\";\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": [
2110
]
},
"id": 2111,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1873,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:17"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/Module.sol",
"file": "../base/Module.sol",
"id": 1874,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 936,
"src": "24:28:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/ModuleManager.sol",
"file": "../base/ModuleManager.sol",
"id": 1875,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 1213,
"src": "53:35:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/OwnerManager.sol",
"file": "../base/OwnerManager.sol",
"id": 1876,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 1653,
"src": "89:34:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/Enum.sol",
"file": "../common/Enum.sol",
"id": 1877,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 1660,
"src": "124:28:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1878,
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 935,
"src": "347:6:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$935",
"typeString": "contract Module"
}
},
"id": 1879,
"nodeType": "InheritanceSpecifier",
"src": "347:6:17"
}
],
"contractDependencies": [
935,
1693,
1735
],
"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": 2110,
"linearizedBaseContracts": [
2110,
935,
1693,
1735
],
"name": "DailyLimitModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1882,
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 2110,
"src": "361:50:17",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1880,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "361:6:17",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "4461696c79204c696d6974204d6f64756c65",
"id": 1881,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "391:20:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
"typeString": "literal_string \"Daily Limit Module\""
},
"value": "Daily Limit Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 1885,
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 2110,
"src": "417:40:17",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1883,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "417:6:17",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e32",
"id": 1884,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "450:7:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b30367effb941b728181f67f3bd24a38a4fff408ee7fb3b074425c9fb5e9be74",
"typeString": "literal_string \"0.0.2\""
},
"value": "0.0.2"
},
"visibility": "public"
},
{
"constant": false,
"id": 1889,
"name": "dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 2110,
"src": "535:50:17",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"typeName": {
"id": 1888,
"keyType": {
"id": 1886,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "544:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "535:31:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"valueType": {
"contractScope": null,
"id": 1887,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1896,
"src": "555:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
}
},
"value": null,
"visibility": "public"
},
{
"canonicalName": "DailyLimitModule.DailyLimit",
"id": 1896,
"members": [
{
"constant": false,
"id": 1891,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1896,
"src": "620:18:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1890,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "620:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1893,
"name": "spentToday",
"nodeType": "VariableDeclaration",
"scope": 1896,
"src": "648:18:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1892,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "648:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1895,
"name": "lastDay",
"nodeType": "VariableDeclaration",
"scope": 1896,
"src": "676:15:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1894,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "676:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "DailyLimit",
"nodeType": "StructDefinition",
"scope": 2110,
"src": "592:106:17",
"visibility": "public"
},
{
"body": {
"id": 1931,
"nodeType": "Block",
"src": "1016:146:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1905,
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 934,
"src": "1026:10:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1906,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1026:12:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1907,
"nodeType": "ExpressionStatement",
"src": "1026:12:17"
},
{
"body": {
"expression": {
"argumentTypes": null,
"id": 1928,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1919,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "1104:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1923,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1920,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1899,
"src": "1116:6:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1922,
"indexExpression": {
"argumentTypes": null,
"id": 1921,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1123:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1116:9:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1104:22:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1924,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1891,
"src": "1104:33:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1925,
"name": "_dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1902,
"src": "1140:12:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 1927,
"indexExpression": {
"argumentTypes": null,
"id": 1926,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1153:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1140:15:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1104:51:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1929,
"nodeType": "ExpressionStatement",
"src": "1104:51:17"
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1915,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1912,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1068:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1913,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1899,
"src": "1072:6:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1914,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1072:13:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1068:17:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1930,
"initializationExpression": {
"assignments": [
1909
],
"declarations": [
{
"constant": false,
"id": 1909,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1932,
"src": "1053:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1908,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1053:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1911,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1910,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1065:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1053:13:17"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1917,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1087:3:17",
"subExpression": {
"argumentTypes": null,
"id": 1916,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1087:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1918,
"nodeType": "ExpressionStatement",
"src": "1087:3:17"
},
"nodeType": "ForStatement",
"src": "1048:107:17"
}
]
},
"documentation": "@dev Setup function sets initial storage of contract.\n @param tokens List of token addresses. Ether is represented with address 0x0.\n @param _dailyLimits List of daily limits in smalles units (e.g. Wei for Ether).",
"id": 1932,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1903,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1899,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1932,
"src": "955:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1897,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "955:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1898,
"length": null,
"nodeType": "ArrayTypeName",
"src": "955:9:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1902,
"name": "_dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 1932,
"src": "973:22:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1900,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "973:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1901,
"length": null,
"nodeType": "ArrayTypeName",
"src": "973:9:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "954:42:17"
},
"payable": false,
"returnParameters": {
"id": 1904,
"nodeType": "ParameterList",
"parameters": [],
"src": "1016:0:17"
},
"scope": 2110,
"src": "940:222:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1948,
"nodeType": "Block",
"src": "1489:59:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1946,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1941,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "1499:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1943,
"indexExpression": {
"argumentTypes": null,
"id": 1942,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1934,
"src": "1511:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1499:18:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1944,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1891,
"src": "1499:29:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1945,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1936,
"src": "1531:10:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1499:42:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1947,
"nodeType": "ExpressionStatement",
"src": "1499:42:17"
}
]
},
"documentation": "@dev Allows to update the daily limit for a specified token. This can only be done via a Safe transaction.\n @param token Token contract address.\n @param dailyLimit Daily limit in smallest token unit.",
"id": 1949,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1939,
"modifierName": {
"argumentTypes": null,
"id": 1938,
"name": "authorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 914,
"src": "1474:10:17",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1474:10:17"
}
],
"name": "changeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1937,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1934,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1949,
"src": "1416:13:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1933,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1416:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1936,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1949,
"src": "1431:18:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1935,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1431:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1415:35:17"
},
"payable": false,
"returnParameters": {
"id": 1940,
"nodeType": "ParameterList",
"parameters": [],
"src": "1489:0:17"
},
"scope": 2110,
"src": "1390:158:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2039,
"nodeType": "Block",
"src": "2001:898:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1963,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4491,
"src": "2126:3:17",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1964,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2126:10:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1960,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 900,
"src": "2109:7:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
],
"id": 1959,
"name": "OwnerManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1652,
"src": "2096:12:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$1652_$",
"typeString": "type(contract OwnerManager)"
}
},
"id": 1961,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2096:21:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OwnerManager_$1652",
"typeString": "contract OwnerManager"
}
},
"id": 1962,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 1602,
"src": "2096:29:17",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view external returns (bool)"
}
},
"id": 1965,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2096:41:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e206f776e6572",
"id": 1966,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2139:39:17",
"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": 1958,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2088:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1967,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2088:91:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1968,
"nodeType": "ExpressionStatement",
"src": "2088:91:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1972,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1970,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1953,
"src": "2197:2:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1971,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2203:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2197:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420746f20616464726573732070726f7669646564",
"id": 1973,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2206:29:17",
"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": 1969,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2189:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1974,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2189:47:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1975,
"nodeType": "ExpressionStatement",
"src": "2189:47:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1979,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1977,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2254:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1978,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2263:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2254:10:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420616d6f756e742070726f7669646564",
"id": 1980,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2266:25:17",
"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": 1976,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2246:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1981,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2246:46:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1982,
"nodeType": "ExpressionStatement",
"src": "2246:46:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1985,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2387:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1986,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2394:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1984,
"name": "isUnderLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2096,
"src": "2374:12:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) returns (bool)"
}
},
"id": 1987,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2374:27:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4461696c79206c696d697420686173206265656e2072656163686564",
"id": 1988,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2403:30:17",
"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": 1983,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2366:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1989,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2366:68:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1990,
"nodeType": "ExpressionStatement",
"src": "2366:68:17"
},
{
"expression": {
"argumentTypes": null,
"id": 1996,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1991,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "2444:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1993,
"indexExpression": {
"argumentTypes": null,
"id": 1992,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2456:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2444:18:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1994,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "2444:29:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"id": 1995,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2477:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2444:39:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1997,
"nodeType": "ExpressionStatement",
"src": "2444:39:17"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2000,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1998,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2497:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1999,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2506:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2497:10:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 2037,
"nodeType": "Block",
"src": "2655:238:17",
"statements": [
{
"assignments": [
2016
],
"declarations": [
{
"constant": false,
"id": 2016,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "2669:17:17",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2015,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2669:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2023,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "7472616e7366657228616464726573732c75696e7432353629",
"id": 2019,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2713:27:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
"value": "transfer(address,uint256)"
},
{
"argumentTypes": null,
"id": 2020,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1953,
"src": "2742:2:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2021,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2746:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 2017,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4478,
"src": "2689:3:17",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 2018,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSignature",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2689:23:17",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (string memory) pure returns (bytes memory)"
}
},
"id": 2022,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2689:64:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2669:84:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2027,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2809:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2028,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2816:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"id": 2029,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2016,
"src": "2819:4:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2030,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "2825:4:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 2031,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "2825:14:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 2032,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2825:19:17",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"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_$1658",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 2025,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 900,
"src": "2775:7:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
},
"id": 2026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 1138,
"src": "2775:33:17",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1658_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
}
},
"id": 2033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2775:70:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f74206578656375746520746f6b656e207472616e73666572",
"id": 2034,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2847:34:17",
"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": 2024,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2767:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2035,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2767:115:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2036,
"nodeType": "ExpressionStatement",
"src": "2767:115:17"
}
]
},
"id": 2038,
"nodeType": "IfStatement",
"src": "2493:400:17",
"trueBody": {
"id": 2014,
"nodeType": "Block",
"src": "2509:140:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2004,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1953,
"src": "2565:2:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2005,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2569:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "",
"id": 2006,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2577:2:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2007,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "2581:4:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 2008,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "2581:14:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 2009,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2581:19:17",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"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_$1658",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 2002,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 900,
"src": "2531:7:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
},
"id": 2003,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 1138,
"src": "2531:33:17",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1658_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
}
},
"id": 2010,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2531:70:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f742065786563757465206574686572207472616e73666572",
"id": 2011,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2603:34:17",
"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": 2001,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2523:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2012,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2523:115:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2013,
"nodeType": "ExpressionStatement",
"src": "2523:115:17"
}
]
}
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param token Address of the token that should be transfered (0 for Ether)\n @param to Address to which the tokens should be transfered\n @param amount Amount of tokens (or Ether) that should be transfered\n @return Returns if transaction can be executed.",
"id": 2040,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1956,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1951,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "1939:13:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1950,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1939:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1953,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "1954:10:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1952,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1954:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1955,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "1966:14:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1954,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1966:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1938:43:17"
},
"payable": false,
"returnParameters": {
"id": 1957,
"nodeType": "ParameterList",
"parameters": [],
"src": "2001:0:17"
},
"scope": 2110,
"src": "1912:987:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2095,
"nodeType": "Block",
"src": "3002:389:17",
"statements": [
{
"assignments": [
2050
],
"declarations": [
{
"constant": false,
"id": 2050,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "3012:29:17",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
},
"typeName": {
"contractScope": null,
"id": 2049,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1896,
"src": "3012:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2054,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2051,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "3044:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 2053,
"indexExpression": {
"argumentTypes": null,
"id": 2052,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2042,
"src": "3056:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3044:18:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3012:50:17"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2059,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2055,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2109,
"src": "3076:5:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2056,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3076:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2057,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3086:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2058,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1895,
"src": "3086:18:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3076:28:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2074,
"nodeType": "IfStatement",
"src": "3072:126:17",
"trueBody": {
"id": 2073,
"nodeType": "Block",
"src": "3106:92:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2065,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2060,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3120:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2062,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1895,
"src": "3120:18:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2063,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2109,
"src": "3141:5:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3141:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3120:28:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2066,
"nodeType": "ExpressionStatement",
"src": "3120:28:17"
},
{
"expression": {
"argumentTypes": null,
"id": 2071,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2067,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3162:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2069,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3162:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 2070,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3186:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3162:25:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2072,
"nodeType": "ExpressionStatement",
"src": "3162:25:17"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2089,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2081,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2075,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3211:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2076,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3211:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 2077,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2044,
"src": "3235:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3211:30:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2079,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3245:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2080,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1891,
"src": "3245:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3211:55:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2088,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2082,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3283:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2083,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3283:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 2084,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2044,
"src": "3307:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3283:30:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2086,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3316:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2087,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3316:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3283:54:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3211:126:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2092,
"nodeType": "IfStatement",
"src": "3207:155:17",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2090,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3358:4:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2048,
"id": 2091,
"nodeType": "Return",
"src": "3351:11:17"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2093,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3379:5:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2048,
"id": 2094,
"nodeType": "Return",
"src": "3372:12:17"
}
]
},
"documentation": null,
"id": 2096,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "isUnderLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2045,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2042,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "2927:13:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2041,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2927:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2044,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "2942:14:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2043,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2942:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2926:31:17"
},
"payable": false,
"returnParameters": {
"id": 2048,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2047,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "2992:4:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2046,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2992:4:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2991:6:17"
},
"scope": 2110,
"src": "2905:486:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2108,
"nodeType": "Block",
"src": "3555:44:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2101,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4493,
"src": "3572:3:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2104,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2102,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4493,
"src": "3579:3:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 2103,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3585:6:17",
"subdenomination": "days",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "1"
},
"src": "3579:12:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2105,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "3578:14:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3572:20:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2100,
"id": 2107,
"nodeType": "Return",
"src": "3565:27:17"
}
]
},
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
"id": 2109,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "today",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2097,
"nodeType": "ParameterList",
"parameters": [],
"src": "3497:2:17"
},
"payable": false,
"returnParameters": {
"id": 2100,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2099,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2109,
"src": "3545:4:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2098,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3545:4:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3544:6:17"
},
"scope": 2110,
"src": "3483:116:17",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 2111,
"src": "318:3283:17"
}
],
"src": "0:3602:17"
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/DailyLimitModule.sol",
"exportedSymbols": {
"DailyLimitModule": [
2110
]
},
"id": 2111,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1873,
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:17"
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/Module.sol",
"file": "../base/Module.sol",
"id": 1874,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 936,
"src": "24:28:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/ModuleManager.sol",
"file": "../base/ModuleManager.sol",
"id": 1875,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 1213,
"src": "53:35:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/base/OwnerManager.sol",
"file": "../base/OwnerManager.sol",
"id": 1876,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 1653,
"src": "89:34:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/common/Enum.sol",
"file": "../common/Enum.sol",
"id": 1877,
"nodeType": "ImportDirective",
"scope": 2111,
"sourceUnit": 1660,
"src": "124:28:17",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1878,
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 935,
"src": "347:6:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$935",
"typeString": "contract Module"
}
},
"id": 1879,
"nodeType": "InheritanceSpecifier",
"src": "347:6:17"
}
],
"contractDependencies": [
935,
1693,
1735
],
"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": 2110,
"linearizedBaseContracts": [
2110,
935,
1693,
1735
],
"name": "DailyLimitModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 1882,
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 2110,
"src": "361:50:17",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1880,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "361:6:17",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "4461696c79204c696d6974204d6f64756c65",
"id": 1881,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "391:20:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_821ea27acfbc77b49f7a021dbe2eb92017d46b8bdda0bff9901cbc8ee143ceb3",
"typeString": "literal_string \"Daily Limit Module\""
},
"value": "Daily Limit Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 1885,
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 2110,
"src": "417:40:17",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 1883,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "417:6:17",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e32",
"id": 1884,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "450:7:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b30367effb941b728181f67f3bd24a38a4fff408ee7fb3b074425c9fb5e9be74",
"typeString": "literal_string \"0.0.2\""
},
"value": "0.0.2"
},
"visibility": "public"
},
{
"constant": false,
"id": 1889,
"name": "dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 2110,
"src": "535:50:17",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"typeName": {
"id": 1888,
"keyType": {
"id": 1886,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "544:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "535:31:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit)"
},
"valueType": {
"contractScope": null,
"id": 1887,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1896,
"src": "555:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
}
},
"value": null,
"visibility": "public"
},
{
"canonicalName": "DailyLimitModule.DailyLimit",
"id": 1896,
"members": [
{
"constant": false,
"id": 1891,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1896,
"src": "620:18:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1890,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "620:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1893,
"name": "spentToday",
"nodeType": "VariableDeclaration",
"scope": 1896,
"src": "648:18:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1892,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "648:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1895,
"name": "lastDay",
"nodeType": "VariableDeclaration",
"scope": 1896,
"src": "676:15:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1894,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "676:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "DailyLimit",
"nodeType": "StructDefinition",
"scope": 2110,
"src": "592:106:17",
"visibility": "public"
},
{
"body": {
"id": 1931,
"nodeType": "Block",
"src": "1016:146:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1905,
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 934,
"src": "1026:10:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1906,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1026:12:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1907,
"nodeType": "ExpressionStatement",
"src": "1026:12:17"
},
{
"body": {
"expression": {
"argumentTypes": null,
"id": 1928,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1919,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "1104:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1923,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1920,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1899,
"src": "1116:6:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1922,
"indexExpression": {
"argumentTypes": null,
"id": 1921,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1123:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1116:9:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1104:22:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1924,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1891,
"src": "1104:33:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1925,
"name": "_dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1902,
"src": "1140:12:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"id": 1927,
"indexExpression": {
"argumentTypes": null,
"id": 1926,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1153:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1140:15:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1104:51:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1929,
"nodeType": "ExpressionStatement",
"src": "1104:51:17"
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1915,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1912,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1068:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1913,
"name": "tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1899,
"src": "1072:6:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1914,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1072:13:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1068:17:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1930,
"initializationExpression": {
"assignments": [
1909
],
"declarations": [
{
"constant": false,
"id": 1909,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1932,
"src": "1053:9:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1908,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1053:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1911,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1910,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1065:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1053:13:17"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1917,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1087:3:17",
"subExpression": {
"argumentTypes": null,
"id": 1916,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1909,
"src": "1087:1:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1918,
"nodeType": "ExpressionStatement",
"src": "1087:3:17"
},
"nodeType": "ForStatement",
"src": "1048:107:17"
}
]
},
"documentation": "@dev Setup function sets initial storage of contract.\n @param tokens List of token addresses. Ether is represented with address 0x0.\n @param _dailyLimits List of daily limits in smalles units (e.g. Wei for Ether).",
"id": 1932,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1903,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1899,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1932,
"src": "955:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1897,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "955:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1898,
"length": null,
"nodeType": "ArrayTypeName",
"src": "955:9:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1902,
"name": "_dailyLimits",
"nodeType": "VariableDeclaration",
"scope": 1932,
"src": "973:22:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1900,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "973:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1901,
"length": null,
"nodeType": "ArrayTypeName",
"src": "973:9:17",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "954:42:17"
},
"payable": false,
"returnParameters": {
"id": 1904,
"nodeType": "ParameterList",
"parameters": [],
"src": "1016:0:17"
},
"scope": 2110,
"src": "940:222:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1948,
"nodeType": "Block",
"src": "1489:59:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1946,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1941,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "1499:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1943,
"indexExpression": {
"argumentTypes": null,
"id": 1942,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1934,
"src": "1511:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1499:18:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1944,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1891,
"src": "1499:29:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1945,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1936,
"src": "1531:10:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1499:42:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1947,
"nodeType": "ExpressionStatement",
"src": "1499:42:17"
}
]
},
"documentation": "@dev Allows to update the daily limit for a specified token. This can only be done via a Safe transaction.\n @param token Token contract address.\n @param dailyLimit Daily limit in smallest token unit.",
"id": 1949,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 1939,
"modifierName": {
"argumentTypes": null,
"id": 1938,
"name": "authorized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 914,
"src": "1474:10:17",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1474:10:17"
}
],
"name": "changeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1937,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1934,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1949,
"src": "1416:13:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1933,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1416:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1936,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 1949,
"src": "1431:18:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1935,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1431:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1415:35:17"
},
"payable": false,
"returnParameters": {
"id": 1940,
"nodeType": "ParameterList",
"parameters": [],
"src": "1489:0:17"
},
"scope": 2110,
"src": "1390:158:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2039,
"nodeType": "Block",
"src": "2001:898:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1963,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4491,
"src": "2126:3:17",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1964,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2126:10:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1960,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 900,
"src": "2109:7:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
],
"id": 1959,
"name": "OwnerManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1652,
"src": "2096:12:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_OwnerManager_$1652_$",
"typeString": "type(contract OwnerManager)"
}
},
"id": 1961,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2096:21:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OwnerManager_$1652",
"typeString": "contract OwnerManager"
}
},
"id": 1962,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isOwner",
"nodeType": "MemberAccess",
"referencedDeclaration": 1602,
"src": "2096:29:17",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view external returns (bool)"
}
},
"id": 1965,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2096:41:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c656420627920616e206f776e6572",
"id": 1966,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2139:39:17",
"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": 1958,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2088:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1967,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2088:91:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1968,
"nodeType": "ExpressionStatement",
"src": "2088:91:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1972,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1970,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1953,
"src": "2197:2:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1971,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2203:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2197:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420746f20616464726573732070726f7669646564",
"id": 1973,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2206:29:17",
"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": 1969,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2189:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1974,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2189:47:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1975,
"nodeType": "ExpressionStatement",
"src": "2189:47:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1979,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1977,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2254:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1978,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2263:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2254:10:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420616d6f756e742070726f7669646564",
"id": 1980,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2266:25:17",
"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": 1976,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2246:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1981,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2246:46:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1982,
"nodeType": "ExpressionStatement",
"src": "2246:46:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1985,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2387:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1986,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2394:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1984,
"name": "isUnderLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2096,
"src": "2374:12:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) returns (bool)"
}
},
"id": 1987,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2374:27:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4461696c79206c696d697420686173206265656e2072656163686564",
"id": 1988,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2403:30:17",
"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": 1983,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2366:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1989,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2366:68:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1990,
"nodeType": "ExpressionStatement",
"src": "2366:68:17"
},
{
"expression": {
"argumentTypes": null,
"id": 1996,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1991,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "2444:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 1993,
"indexExpression": {
"argumentTypes": null,
"id": 1992,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2456:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2444:18:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"id": 1994,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "2444:29:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"id": 1995,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2477:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "2444:39:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1997,
"nodeType": "ExpressionStatement",
"src": "2444:39:17"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2000,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1998,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2497:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 1999,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2506:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2497:10:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 2037,
"nodeType": "Block",
"src": "2655:238:17",
"statements": [
{
"assignments": [
2016
],
"declarations": [
{
"constant": false,
"id": 2016,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "2669:17:17",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2015,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2669:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2023,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "7472616e7366657228616464726573732c75696e7432353629",
"id": 2019,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2713:27:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
"value": "transfer(address,uint256)"
},
{
"argumentTypes": null,
"id": 2020,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1953,
"src": "2742:2:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2021,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2746:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 2017,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4478,
"src": "2689:3:17",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 2018,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSignature",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2689:23:17",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (string memory) pure returns (bytes memory)"
}
},
"id": 2022,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2689:64:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2669:84:17"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2027,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1951,
"src": "2809:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2028,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2816:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"id": 2029,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2016,
"src": "2819:4:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2030,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "2825:4:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 2031,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "2825:14:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 2032,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2825:19:17",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"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_$1658",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 2025,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 900,
"src": "2775:7:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
},
"id": 2026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 1138,
"src": "2775:33:17",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1658_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
}
},
"id": 2033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2775:70:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f74206578656375746520746f6b656e207472616e73666572",
"id": 2034,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2847:34:17",
"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": 2024,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2767:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2035,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2767:115:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2036,
"nodeType": "ExpressionStatement",
"src": "2767:115:17"
}
]
},
"id": 2038,
"nodeType": "IfStatement",
"src": "2493:400:17",
"trueBody": {
"id": 2014,
"nodeType": "Block",
"src": "2509:140:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2004,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1953,
"src": "2565:2:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2005,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1955,
"src": "2569:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "",
"id": 2006,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2577:2:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2007,
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1659,
"src": "2581:4:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$1659_$",
"typeString": "type(contract Enum)"
}
},
"id": 2008,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 1658,
"src": "2581:14:17",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$1658_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 2009,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2581:19:17",
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$1658",
"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_$1658",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 2002,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 900,
"src": "2531:7:17",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1212",
"typeString": "contract ModuleManager"
}
},
"id": 2003,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 1138,
"src": "2531:33:17",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1658_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
}
},
"id": 2010,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2531:70:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f742065786563757465206574686572207472616e73666572",
"id": 2011,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2603:34:17",
"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": 2001,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4494,
4495
],
"referencedDeclaration": 4495,
"src": "2523:7:17",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2012,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2523:115:17",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2013,
"nodeType": "ExpressionStatement",
"src": "2523:115:17"
}
]
}
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid daily limit transaction.\n @param token Address of the token that should be transfered (0 for Ether)\n @param to Address to which the tokens should be transfered\n @param amount Amount of tokens (or Ether) that should be transfered\n @return Returns if transaction can be executed.",
"id": 2040,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "executeDailyLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1956,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1951,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "1939:13:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1950,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1939:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1953,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "1954:10:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1952,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1954:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1955,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 2040,
"src": "1966:14:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1954,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1966:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1938:43:17"
},
"payable": false,
"returnParameters": {
"id": 1957,
"nodeType": "ParameterList",
"parameters": [],
"src": "2001:0:17"
},
"scope": 2110,
"src": "1912:987:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2095,
"nodeType": "Block",
"src": "3002:389:17",
"statements": [
{
"assignments": [
2050
],
"declarations": [
{
"constant": false,
"id": 2050,
"name": "dailyLimit",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "3012:29:17",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
},
"typeName": {
"contractScope": null,
"id": 2049,
"name": "DailyLimit",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1896,
"src": "3012:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2054,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2051,
"name": "dailyLimits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1889,
"src": "3044:11:17",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DailyLimit_$1896_storage_$",
"typeString": "mapping(address => struct DailyLimitModule.DailyLimit storage ref)"
}
},
"id": 2053,
"indexExpression": {
"argumentTypes": null,
"id": 2052,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2042,
"src": "3056:5:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3044:18:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage",
"typeString": "struct DailyLimitModule.DailyLimit storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "3012:50:17"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2059,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2055,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2109,
"src": "3076:5:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2056,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3076:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2057,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3086:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2058,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1895,
"src": "3086:18:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3076:28:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2074,
"nodeType": "IfStatement",
"src": "3072:126:17",
"trueBody": {
"id": 2073,
"nodeType": "Block",
"src": "3106:92:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2065,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2060,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3120:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2062,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "lastDay",
"nodeType": "MemberAccess",
"referencedDeclaration": 1895,
"src": "3120:18:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2063,
"name": "today",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2109,
"src": "3141:5:17",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2064,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3141:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3120:28:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2066,
"nodeType": "ExpressionStatement",
"src": "3120:28:17"
},
{
"expression": {
"argumentTypes": null,
"id": 2071,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2067,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3162:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2069,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3162:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 2070,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3186:1:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "3162:25:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2072,
"nodeType": "ExpressionStatement",
"src": "3162:25:17"
}
]
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 2089,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2081,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2075,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3211:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2076,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3211:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 2077,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2044,
"src": "3235:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3211:30:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2079,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3245:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2080,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "dailyLimit",
"nodeType": "MemberAccess",
"referencedDeclaration": 1891,
"src": "3245:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3211:55:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2088,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2082,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3283:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2083,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3283:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 2084,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2044,
"src": "3307:6:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3283:30:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2086,
"name": "dailyLimit",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2050,
"src": "3316:10:17",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DailyLimit_$1896_storage_ptr",
"typeString": "struct DailyLimitModule.DailyLimit storage pointer"
}
},
"id": 2087,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "spentToday",
"nodeType": "MemberAccess",
"referencedDeclaration": 1893,
"src": "3316:21:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3283:54:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3211:126:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2092,
"nodeType": "IfStatement",
"src": "3207:155:17",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2090,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3358:4:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2048,
"id": 2091,
"nodeType": "Return",
"src": "3351:11:17"
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2093,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3379:5:17",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2048,
"id": 2094,
"nodeType": "Return",
"src": "3372:12:17"
}
]
},
"documentation": null,
"id": 2096,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "isUnderLimit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2045,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2042,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "2927:13:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2041,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2927:7:17",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2044,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "2942:14:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2043,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2942:7:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2926:31:17"
},
"payable": false,
"returnParameters": {
"id": 2048,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2047,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2096,
"src": "2992:4:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2046,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2992:4:17",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2991:6:17"
},
"scope": 2110,
"src": "2905:486:17",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 2108,
"nodeType": "Block",
"src": "3555:44:17",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2101,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4493,
"src": "3572:3:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2104,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2102,
"name": "now",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4493,
"src": "3579:3:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 2103,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3585:6:17",
"subdenomination": "days",
"typeDescriptions": {
"typeIdentifier": "t_rational_86400_by_1",
"typeString": "int_const 86400"
},
"value": "1"
},
"src": "3579:12:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 2105,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "3578:14:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3572:20:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2100,
"id": 2107,
"nodeType": "Return",
"src": "3565:27:17"
}
]
},
"documentation": "@dev Returns last midnight as Unix timestamp.\n @return Unix timestamp.",
"id": 2109,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "today",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2097,
"nodeType": "ParameterList",
"parameters": [],
"src": "3497:2:17"
},
"payable": false,
"returnParameters": {
"id": 2100,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2099,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2109,
"src": "3545:4:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2098,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3545:4:17",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3544:6:17"
},
"scope": 2110,
"src": "3483:116:17",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 2111,
"src": "318:3283:17"
}
],
"src": "0:3602:17"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {
"4": {
"events": {},
"links": {},
"address": "0xb2fdbcdbb9b57c5fbc91073840344a015708b480",
"transactionHash": "0x73a2310190df9e9a2d0b58d3ad2221e0650cb3971a657fe91ca2d86f86c247e8"
}
},
"schemaVersion": "2.0.0",
"updatedAt": "2018-09-26T08:56:03.722Z"
}