diff --git a/.env.example b/.env.example
index 33d8a508..266bbc27 100644
--- a/.env.example
+++ b/.env.example
@@ -26,3 +26,7 @@ REACT_APP_APP_VERSION=$npm_package_version
# For Apps
REACT_APP_GNOSIS_APPS_URL=https://safe-apps.staging.gnosisdev.com
+
+# Contracts Addresses
+REACT_APP_SPENDING_LIMIT_MODULE_ADDRESS=0x9e9Bf12b5a66c0f0A7435835e0365477E121B110
+
diff --git a/.prettierignore b/.prettierignore
index 0b56bd82..5660707c 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,7 +1,7 @@
!.eslintrc.js
build
-config
-contracts
+/config
+/contracts
flow-typed
flow-typed/npm
migrations
@@ -9,5 +9,5 @@ node_modules
public
scripts
src/assets
-src/config
+src/types/contracts
test
\ No newline at end of file
diff --git a/package.json b/package.json
index 83c1d90b..359a7976 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "safe-react",
- "version": "2.15.1",
+ "version": "2.16.0",
"description": "Allowing crypto users manage funds in a safer way",
"website": "https://github.com/gnosis/safe-react#readme",
"bugs": {
@@ -16,7 +16,7 @@
"email": "safe@gnosis.io"
},
"main": "public/electron.js",
- "postinstall": "electron-builder install-app-deps",
+ "postinstall": "patch-package electron-builder install-app-deps",
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"build-desktop": "cross-env REACT_APP_BUILD_FOR_DESKTOP=true REACT_APP_ENV=production yarn build-mainnet",
@@ -26,11 +26,12 @@
"electron-build": "electron-builder --mac --windows --linux",
"electron-dev": "concurrently \"BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\"",
"format:staged": "lint-staged",
- "generate-types": "yarn generate-types:contracts",
+ "generate-types": "yarn generate-types:contracts && yarn generate-types:spendingLimit",
"generate-types:contracts": "cross-env typechain --target=web3-v1 --outDir './src/types/contracts' './node_modules/@gnosis.pm/safe-contracts/build/contracts/*.json'",
+ "generate-types:spendingLimit": "cross-env typechain --target=web3-v1 --outDir './src/types/contracts' ./src/logic/contracts/artifacts/*.json",
"lint:check": "eslint './src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "yarn lint:check --fix",
- "postinstall": "electron-builder install-app-deps && yarn generate-types",
+ "postinstall": "patch-package && electron-builder install-app-deps && yarn generate-types",
"preelectron-pack": "yarn build",
"prettier:check": "yarn prettier --check",
"prettier:fix": "yarn prettier --write",
@@ -168,16 +169,16 @@
"dependencies": {
"@gnosis.pm/safe-apps-sdk": "https://github.com/gnosis/safe-apps-sdk.git#3f0689f",
"@gnosis.pm/safe-contracts": "1.1.1-dev.2",
- "@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#03ff672d6f73366297986d58631f9582fe2ed4a3",
+ "@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#ff29c3c",
"@gnosis.pm/util-contracts": "2.0.6",
- "@ledgerhq/hw-transport-node-hid-singleton": "5.29.0",
+ "@ledgerhq/hw-transport-node-hid-singleton": "5.30.0",
"@material-ui/core": "4.11.0",
"@material-ui/icons": "4.9.1",
"@material-ui/lab": "4.0.0-alpha.56",
"@openzeppelin/contracts": "3.1.0",
- "@sentry/react": "^5.27.3",
- "@sentry/tracing": "^5.27.3",
- "@truffle/contract": "4.2.28",
+ "@sentry/react": "^5.27.0",
+ "@sentry/tracing": "^5.27.0",
+ "@truffle/contract": "4.2.30",
"async-sema": "^3.1.0",
"axios": "0.21.0",
"bignumber.js": "9.0.1",
@@ -209,25 +210,25 @@
"material-ui-search-bar": "^1.0.0",
"notistack": "https://github.com/gnosis/notistack.git#v0.9.4",
"qrcode.react": "1.0.0",
- "query-string": "6.13.6",
+ "query-string": "6.13.7",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-final-form": "^6.5.2",
"react-final-form-listeners": "^1.0.2",
- "react-ga": "3.2.0",
+ "react-ga": "3.2.1",
"react-hot-loader": "4.13.0",
"react-qr-reader": "^2.2.1",
- "react-redux": "7.2.1",
+ "react-redux": "7.2.2",
"react-router-dom": "5.2.0",
"react-scripts": "^3.4.3",
- "react-window": "^1.8.5",
+ "react-window": "^1.8.6",
"recompose": "^0.30.0",
"redux": "4.0.5",
"redux-actions": "^2.6.5",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"semver": "7.3.2",
- "styled-components": "^5.2.0",
+ "styled-components": "^5.2.1",
"web3": "1.2.11",
"web3-core": "^1.2.11",
"web3-eth-contract": "^1.2.11",
@@ -238,7 +239,7 @@
"@storybook/addon-actions": "^5.3.19",
"@storybook/addon-links": "^5.3.19",
"@storybook/addons": "^5.3.19",
- "@storybook/preset-create-react-app": "^3.1.4",
+ "@storybook/preset-create-react-app": "^3.1.5",
"@storybook/react": "^5.3.19",
"@testing-library/jest-dom": "5.11.5",
"@testing-library/react": "10.4.9",
@@ -258,24 +259,25 @@
"cross-env": "^7.0.2",
"dotenv": "^8.2.0",
"dotenv-expand": "^5.1.0",
- "electron": "9.3.3",
+ "electron": "^9.3.3",
"electron-builder": "22.9.1",
"electron-notarize": "1.0.0",
"eslint": "6.8.0",
- "eslint-config-prettier": "6.14.0",
- "eslint-plugin-import": "2.22.1",
+ "eslint-config-prettier": "^6.14.0",
+ "eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
- "eslint-plugin-sort-destructure-keys": "1.3.5",
+ "eslint-plugin-sort-destructure-keys": "^1.3.5",
"ethereumjs-abi": "0.6.8",
"husky": "^4.3.0",
"lint-staged": "^10.5.1",
"node-sass": "^4.14.1",
- "prettier": "2.1.2",
+ "patch-package": "^6.2.2",
+ "postinstall-postinstall": "^2.1.0",
+ "prettier": "^2.1.2",
"react-app-rewired": "^2.1.6",
- "react-docgen-typescript-loader": "^3.7.2",
- "typechain": "^2.0.0",
+ "typechain": "^4.0.0",
"typescript": "4.0.5",
"wait-on": "5.2.0"
}
diff --git a/patches/web3-eth+1.2.11.patch b/patches/web3-eth+1.2.11.patch
new file mode 100644
index 00000000..9de3c1ca
--- /dev/null
+++ b/patches/web3-eth+1.2.11.patch
@@ -0,0 +1,19 @@
+diff --git a/node_modules/web3-eth/src/getNetworkType.js b/node_modules/web3-eth/src/getNetworkType.js
+index 3be3a20..88edbd9 100644
+--- a/node_modules/web3-eth/src/getNetworkType.js
++++ b/node_modules/web3-eth/src/getNetworkType.js
+@@ -63,6 +63,14 @@ var getNetworkType = function (callback) {
+ id === 42) {
+ returnValue = 'kovan';
+ }
++ if (genesis.hash === '0x0b6d3e680af2fc525392c720666cce58e3d8e6fe75ba4b48cb36bcc69039229b' &&
++ id === 246) {
++ returnValue = 'energyWebChain';
++ }
++ if (genesis.hash === '0xebd8b413ca7b7f84a8dd20d17519ce2b01954c74d94a0a739a3e416abe0e43e5' &&
++ id === 73799) {
++ returnValue = 'volta';
++ }
+
+ if (_.isFunction(callback)) {
+ callback(null, returnValue);
diff --git a/patches/web3-eth-ens+1.2.11.patch b/patches/web3-eth-ens+1.2.11.patch
new file mode 100644
index 00000000..ea9249fb
--- /dev/null
+++ b/patches/web3-eth-ens+1.2.11.patch
@@ -0,0 +1,15 @@
+diff --git a/node_modules/web3-eth-ens/src/config.js b/node_modules/web3-eth-ens/src/config.js
+index b12e5f5..e0abf2d 100644
+--- a/node_modules/web3-eth-ens/src/config.js
++++ b/node_modules/web3-eth-ens/src/config.js
+@@ -30,7 +30,9 @@ var config = {
+ main: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
+ ropsten: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
+ rinkeby: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
+- goerli: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
++ goerli: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
++ energyWebChain: "0x0A6d64413c07E10E890220BBE1c49170080C6Ca0",
++ volta: "0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac",
+ },
+ // These ids obtained at ensdomains docs:
+ // https://docs.ens.domains/contract-developer-guide/writing-a-resolver
diff --git a/public/electron.js b/public/electron.js
index 140a1f26..ae9368b8 100644
--- a/public/electron.js
+++ b/public/electron.js
@@ -85,7 +85,7 @@ function getOpenedWindow(url, options) {
function createWindow(port = DEFAULT_PORT) {
mainWindow = new BrowserWindow({
show: false,
- width: 1024,
+ width: 1366,
height: 768,
webPreferences: {
preload: path.join(__dirname, '../scripts/preload.js'),
diff --git a/src/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg b/src/assets/icons/apps.svg
similarity index 100%
rename from src/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg
rename to src/assets/icons/apps.svg
diff --git a/src/components/AppLayout/Sidebar/SafeHeader/index.tsx b/src/components/AppLayout/Sidebar/SafeHeader/index.tsx
index 16a0268d..ee1503d4 100644
--- a/src/components/AppLayout/Sidebar/SafeHeader/index.tsx
+++ b/src/components/AppLayout/Sidebar/SafeHeader/index.tsx
@@ -130,10 +130,13 @@ const SafeHeader = ({
return (
<>
+ {/* Network */}
{networkInfo.label}
+
+ {/* Identicon */}
@@ -142,6 +145,7 @@ const SafeHeader = ({
+ {/* SafeInfo */}
{safeName}
diff --git a/src/components/AppLayout/Sidebar/index.tsx b/src/components/AppLayout/Sidebar/index.tsx
index 673b994d..b01876a8 100644
--- a/src/components/AppLayout/Sidebar/index.tsx
+++ b/src/components/AppLayout/Sidebar/index.tsx
@@ -16,7 +16,7 @@ const HelpContainer = styled.div`
const HelpCenterLink = styled.a`
height: 30px;
width: 166px;
- padding: 6px 0 0 16px;
+ padding: 6px 0 8px 16px;
margin: 14px 0px;
text-decoration: none;
display: block;
diff --git a/src/components/AppLayout/Sidebar/useSidebarItems.tsx b/src/components/AppLayout/Sidebar/useSidebarItems.tsx
index 4cf8e76b..c31b4cbe 100644
--- a/src/components/AppLayout/Sidebar/useSidebarItems.tsx
+++ b/src/components/AppLayout/Sidebar/useSidebarItems.tsx
@@ -19,7 +19,7 @@ const useSidebarItems = (): ListItemType[] => {
}
return useMemo((): ListItemType[] => {
- if (!matchSafe || !matchSafeWithAddress) {
+ if (!matchSafe || !matchSafeWithAddress || !featuresEnabled) {
return []
}
@@ -63,7 +63,7 @@ const useSidebarItems = (): ListItemType[] => {
},
...safeSidebar,
]
- }, [matchSafe, matchSafeWithAction, matchSafeWithAddress, safeAppsEnabled])
+ }, [matchSafe, matchSafeWithAction, matchSafeWithAddress, safeAppsEnabled, featuresEnabled])
}
export { useSidebarItems }
diff --git a/src/components/AppLayout/index.tsx b/src/components/AppLayout/index.tsx
index 4ac72c9e..1426788a 100644
--- a/src/components/AppLayout/index.tsx
+++ b/src/components/AppLayout/index.tsx
@@ -6,53 +6,62 @@ import Header from './Header'
import Footer from './Footer'
import Sidebar from './Sidebar'
-const Grid = styled.div`
- height: 100%;
- overflow: auto;
+const Container = styled.div`
+ height: 100vh;
+ width: 100vw;
+ display: flex;
+ flex-direction: column;
+
background-color: ${({ theme }) => theme.colors.background};
- display: grid;
- grid-template-columns: 200px 1fr;
- grid-template-rows: 54px 1fr;
- grid-template-areas:
- 'topbar topbar'
- 'sidebar body';
`
-const GridTopbarWrapper = styled.nav`
+const HeaderWrapper = styled.nav`
+ height: 54px;
+ width: 100%;
+ z-index: 1;
+
background-color: white;
- box-shadow: 0 2px 4px 0 rgba(212, 212, 211, 0.59);
- border-bottom: 2px solid ${({ theme }) => theme.colors.separator};
- z-index: 999;
- grid-area: topbar;
+ box-shadow: 0 0 4px 0 rgba(212, 212, 211, 0.59);
`
-const GridSidebarWrapper = styled.aside`
- width: 200px;
- padding: 62px 8px 0 8px;
+const BodyWrapper = styled.div`
+ height: calc(100% - 54px);
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+`
+
+const SidebarWrapper = styled.aside`
height: 100%;
+ width: 200px;
+ display: flex;
+ flex-direction: column;
+ z-index: 1;
+
+ padding: 8px 8px 0 8px;
background-color: ${({ theme }) => theme.colors.white};
border-right: 2px solid ${({ theme }) => theme.colors.separator};
+`
+
+const ContentWrapper = styled.section`
+ width: 100%;
display: flex;
flex-direction: column;
- box-sizing: border-box;
- position: fixed;
- grid-area: sidebar;
-`
+ overflow-x: auto;
-const GridBodyWrapper = styled.section`
- margin: 0 16px 0 16px;
- grid-area: body;
- display: flex;
- flex-direction: column;
- align-content: stretch;
-`
+ padding: 0 16px;
-export const BodyWrapper = styled.div`
- flex: 1 100%;
-`
+ > :nth-child(1) {
+ flex-grow: 1;
+ width: 100%;
+ align-items: center;
+ justify-content: center;
+ }
-export const FooterWrapper = styled.footer`
- margin: 0 16px;
+ > :nth-child(2) {
+ width: 100%;
+ height: 59px;
+ }
`
type Props = {
@@ -77,29 +86,29 @@ const Layout: React.FC = ({
children,
sidebarItems,
}): React.ReactElement => (
-
-
+
+
-
-
-
-
-
- {children}
-
+
+
+
+
+
+
+ {children}
-
-
-
+
+
+
)
export default Layout
diff --git a/src/components/ConnectButton/index.tsx b/src/components/ConnectButton/index.tsx
index c382253a..a3a2d3a4 100644
--- a/src/components/ConnectButton/index.tsx
+++ b/src/components/ConnectButton/index.tsx
@@ -8,7 +8,6 @@ import { fetchProvider, removeProvider } from 'src/logic/wallets/store/actions'
import transactionDataCheck from 'src/logic/wallets/transactionDataCheck'
import { getSupportedWallets } from 'src/logic/wallets/utils/walletList'
import { store } from 'src/store'
-import { BLOCKNATIVE_KEY } from 'src/utils/constants'
const networkId = getNetworkId()
@@ -18,7 +17,6 @@ let providerName
const wallets = getSupportedWallets()
export const onboard = Onboard({
- dappId: BLOCKNATIVE_KEY,
networkId: networkId,
subscriptions: {
wallet: (wallet) => {
diff --git a/src/components/LoaderContainer/index.tsx b/src/components/LoaderContainer/index.tsx
new file mode 100644
index 00000000..3b706e04
--- /dev/null
+++ b/src/components/LoaderContainer/index.tsx
@@ -0,0 +1,9 @@
+import styled from 'styled-components'
+
+export const LoadingContainer = styled.div`
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+`
diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx
index 9a7f23e9..40b6d1f7 100644
--- a/src/components/Modal/index.tsx
+++ b/src/components/Modal/index.tsx
@@ -1,52 +1,70 @@
import Modal from '@material-ui/core/Modal'
-import { withStyles } from '@material-ui/core/styles'
+import { makeStyles, createStyles } from '@material-ui/core/styles'
import cn from 'classnames'
-import * as React from 'react'
+import React, { ReactElement, ReactNode } from 'react'
import { sm } from 'src/theme/variables'
-const styles = () => ({
- root: {
- alignItems: 'center',
- justifyContent: 'center',
- display: 'flex',
- overflowY: 'scroll',
- },
- paper: {
- position: 'absolute',
- top: '120px',
- width: '500px',
- height: '530px',
- borderRadius: sm,
- backgroundColor: '#ffffff',
- boxShadow: '0 0 5px 0 rgba(74, 85, 121, 0.5)',
- '&:focus': {
- outline: 'none',
+const useStyles = makeStyles(
+ createStyles({
+ root: {
+ alignItems: 'center',
+ justifyContent: 'center',
+ display: 'flex',
+ overflowY: 'scroll',
},
- display: 'flex',
- flexDirection: 'column',
- },
-})
+ paper: {
+ position: 'absolute',
+ top: '120px',
+ width: '500px',
+ height: '540px',
+ borderRadius: sm,
+ backgroundColor: '#ffffff',
+ boxShadow: '0 0 5px 0 rgba(74, 85, 121, 0.5)',
+ '&:focus': {
+ outline: 'none',
+ },
+ display: 'flex',
+ flexDirection: 'column',
+ },
+ }),
+)
+
+interface GnoModalProps {
+ children: ReactNode
+ description: string
+ // type copied from Material-UI Modal's `close` prop
+ handleClose?: {
+ bivarianceHack(event: Record, reason: 'backdropClick' | 'escapeKeyDown'): void
+ }['bivarianceHack']
+ modalClassName?: string
+ open: boolean
+ paperClassName?: string
+ title: string
+}
const GnoModal = ({
children,
- classes,
description,
handleClose,
modalClassName,
open,
paperClassName,
title,
-}: any) => (
-
- {children}
-
-)
+}: GnoModalProps): ReactElement => {
+ const classes = useStyles()
-export default withStyles(styles as any)(GnoModal)
+ return (
+
+ {children}
+
+ )
+}
+
+export default GnoModal
diff --git a/src/components/ScanQRModal/ScanQRWrapper/index.tsx b/src/components/ScanQRModal/ScanQRWrapper/index.tsx
index 9982e6c4..110845ae 100644
--- a/src/components/ScanQRModal/ScanQRWrapper/index.tsx
+++ b/src/components/ScanQRModal/ScanQRWrapper/index.tsx
@@ -1,9 +1,8 @@
import { makeStyles } from '@material-ui/core/styles'
-import { useState } from 'react'
-import * as React from 'react'
+import React, { ReactElement, useState } from 'react'
import QRIcon from 'src/assets/icons/qrcode.svg'
-import ScanQRModal from 'src/components/ScanQRModal'
+import { ScanQRModal } from 'src/components/ScanQRModal'
import Img from 'src/components/layout/Img'
const useStyles = makeStyles({
@@ -12,7 +11,11 @@ const useStyles = makeStyles({
},
})
-export const ScanQRWrapper = (props) => {
+type Props = {
+ handleScan: (dataResult: string, closeQrModal: () => void) => void
+}
+
+export const ScanQRWrapper = ({ handleScan }: Props): ReactElement => {
const classes = useStyles()
const [qrModalOpen, setQrModalOpen] = useState(false)
@@ -25,7 +28,7 @@ export const ScanQRWrapper = (props) => {
}
const onScanFinished = (value) => {
- props.handleScan(value, closeQrModal)
+ handleScan(value, closeQrModal)
}
return (
@@ -34,9 +37,7 @@ export const ScanQRWrapper = (props) => {
alt="Scan QR"
className={classes.qrCodeBtn}
height={20}
- onClick={() => {
- openQrModal()
- }}
+ onClick={() => openQrModal()}
role="button"
src={QRIcon}
testId="qr-icon"
diff --git a/src/components/ScanQRModal/index.tsx b/src/components/ScanQRModal/index.tsx
index c4a12798..737ea4e2 100644
--- a/src/components/ScanQRModal/index.tsx
+++ b/src/components/ScanQRModal/index.tsx
@@ -1,6 +1,6 @@
import CircularProgress from '@material-ui/core/CircularProgress'
import IconButton from '@material-ui/core/IconButton'
-import { withStyles } from '@material-ui/core/styles'
+import { makeStyles } from '@material-ui/core/styles'
import Close from '@material-ui/icons/Close'
import * as React from 'react'
import QrReader from 'react-qr-reader'
@@ -15,11 +15,21 @@ import Col from 'src/components/layout/Col'
import Hairline from 'src/components/layout/Hairline'
import Paragraph from 'src/components/layout/Paragraph'
import Row from 'src/components/layout/Row'
+import { useEffect, useState } from 'react'
-const { useEffect, useState } = React
+const useStyles = makeStyles(styles)
-const ScanQRModal = ({ classes, isOpen, onClose, onScan }) => {
- const [hasWebcam, setHasWebcam] = useState(null)
+type Props = {
+ isOpen: boolean
+ onClose: () => void
+ onScan: (value: string) => void
+}
+
+export const ScanQRModal = ({ isOpen, onClose, onScan }: Props): React.ReactElement => {
+ const classes = useStyles()
+ const [useWebcam, setUseWebcam] = useState(null)
+ const [fileUploadModalOpen, setFileUploadModalOpen] = useState(false)
+ const [error, setError] = useState(null)
const scannerRef: any = React.createRef()
const openImageDialog = React.useCallback(() => {
scannerRef.current.openImageDialog()
@@ -28,22 +38,35 @@ const ScanQRModal = ({ classes, isOpen, onClose, onScan }) => {
useEffect(() => {
checkWebcam(
() => {
- setHasWebcam(true)
+ setUseWebcam(true)
},
() => {
- setHasWebcam(false)
+ setUseWebcam(false)
},
)
}, [])
useEffect(() => {
- // this fires only when the hasWebcam changes to false (null > false (user doesn't have webcam)
- // , true > false (user switched from webcam to file upload))
- // Doesn't fire on re-render
- if (hasWebcam === false) {
+ if (useWebcam === false && !fileUploadModalOpen && !error) {
+ setFileUploadModalOpen(true)
openImageDialog()
}
- }, [hasWebcam, openImageDialog])
+ }, [useWebcam, openImageDialog, fileUploadModalOpen, setFileUploadModalOpen, error])
+
+ const onFileScannedResolve = (error: string | null, successData: string | null) => {
+ if (successData) {
+ onScan(successData)
+ }
+ if (error) {
+ console.error('Error uploading file', error)
+ setError(`The QR could not be read`)
+ }
+ if (!useWebcam) {
+ setError(`The QR could not be read`)
+ }
+
+ setFileUploadModalOpen(false)
+ }
return (
@@ -57,19 +80,16 @@ const ScanQRModal = ({ classes, isOpen, onClose, onScan }) => {
- {hasWebcam === null ? (
+ {error}
+ {useWebcam === null ? (
) : (
{
- console.error(err)
- }}
- onScan={(data) => {
- if (data) onScan(data)
- }}
+ legacyMode={!useWebcam}
+ onError={(err) => onFileScannedResolve(err, null)}
+ onScan={(data) => onFileScannedResolve(null, data)}
ref={scannerRef}
style={{ width: '400px', height: '400px' }}
/>
@@ -85,11 +105,9 @@ const ScanQRModal = ({ classes, isOpen, onClose, onScan }) => {
color="primary"
minWidth={154}
onClick={() => {
- if (hasWebcam) {
- setHasWebcam(false)
- } else {
- openImageDialog()
- }
+ setUseWebcam(false)
+ setError(null)
+ setFileUploadModalOpen(false)
}}
variant="contained"
>
@@ -99,5 +117,3 @@ const ScanQRModal = ({ classes, isOpen, onClose, onScan }) => {
)
}
-
-export default withStyles(styles as any)(ScanQRModal)
diff --git a/src/components/ScanQRModal/style.ts b/src/components/ScanQRModal/style.ts
index 78cf9ef1..9181360a 100644
--- a/src/components/ScanQRModal/style.ts
+++ b/src/components/ScanQRModal/style.ts
@@ -1,6 +1,7 @@
import { background, lg, secondaryText, sm } from 'src/theme/variables'
+import { createStyles } from '@material-ui/core'
-export const styles = () => ({
+export const styles = createStyles({
heading: {
padding: lg,
justifyContent: 'space-between',
diff --git a/src/components/forms/validator.test.ts b/src/components/forms/validator.test.ts
index 0eff1983..3f5d45ef 100644
--- a/src/components/forms/validator.test.ts
+++ b/src/components/forms/validator.test.ts
@@ -169,13 +169,19 @@ describe('Forms > Validators', () => {
it('Returns undefined for an address not contained in the passed array', async () => {
const addresses = ['0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe']
- expect(uniqueAddress(addresses)('0xe7e3272a84cf3fe180345b9f7234ba705eB5E2CA')).toBeUndefined()
+ expect(uniqueAddress(addresses)()).toBeUndefined()
})
- it('Returns an error message for an address already contained in the array', async () => {
- const addresses = ['0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe']
+ it('Returns an error message for an array with duplicated values', async () => {
+ const addresses = ['0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe']
- expect(uniqueAddress(addresses)(addresses[0])).toEqual(ADDRESS_REPEATED_ERROR)
+ expect(uniqueAddress(addresses)()).toEqual(ADDRESS_REPEATED_ERROR)
+ })
+
+ it('Returns an error message for an array with duplicated checksum and not checksum values', async () => {
+ const addresses = ['0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae']
+
+ expect(uniqueAddress(addresses)()).toEqual(ADDRESS_REPEATED_ERROR)
})
})
diff --git a/src/components/forms/validator.ts b/src/components/forms/validator.ts
index e6f2d9d5..1f01b4d0 100644
--- a/src/components/forms/validator.ts
+++ b/src/components/forms/validator.ts
@@ -1,13 +1,11 @@
-import { List } from 'immutable'
+import { getWeb3 } from 'src/logic/wallets/getWeb3'
import memoize from 'lodash.memoize'
import { isFeatureEnabled } from 'src/config'
import { FEATURES } from 'src/config/networks/network.d'
-
-import { sameAddress } from 'src/logic/wallets/ethAddresses'
-import { getWeb3 } from 'src/logic/wallets/getWeb3'
+import { List } from 'immutable'
type ValidatorReturnType = string | undefined
-type GenericValidatorType = (...args: unknown[]) => ValidatorReturnType
+export type GenericValidatorType = (...args: unknown[]) => ValidatorReturnType
type AsyncValidator = (...args: unknown[]) => Promise
export type Validator = GenericValidatorType | AsyncValidator
@@ -89,13 +87,18 @@ export const minMaxLength = (minLen: number, maxLen: number) => (value: string):
export const ADDRESS_REPEATED_ERROR = 'Address already introduced'
-export const uniqueAddress = (addresses: string[] | List): GenericValidatorType =>
- memoize(
- (value: string): ValidatorReturnType => {
- const addressAlreadyExists = addresses.some((address) => sameAddress(value, address))
- return addressAlreadyExists ? ADDRESS_REPEATED_ERROR : undefined
- },
- )
+export const uniqueAddress = (addresses: string[] | List): GenericValidatorType => (): ValidatorReturnType => {
+ // @ts-expect-error both list and array have signatures for map but TS thinks they're not compatible
+ const lowercaseAddresses = addresses.map((address) => address.toLowerCase())
+ const uniqueAddresses = new Set(lowercaseAddresses)
+ const lengthPropName = 'size' in addresses ? 'size' : 'length'
+
+ if (uniqueAddresses.size !== addresses?.[lengthPropName]) {
+ return ADDRESS_REPEATED_ERROR
+ }
+
+ return undefined
+}
export const composeValidators = (...validators: Validator[]) => (value: unknown): ValidatorReturnType =>
validators.reduce(
diff --git a/src/config/__tests__/config.test.ts b/src/config/__tests__/config.test.ts
index 021a4a20..e9a6ef40 100644
--- a/src/config/__tests__/config.test.ts
+++ b/src/config/__tests__/config.test.ts
@@ -80,7 +80,7 @@ describe('Config Services', () => {
jest.mock('src/utils/constants', () => ({
NODE_ENV: 'production',
NETWORK: 'MAINNET',
- APP_ENV: 'production'
+ APP_ENV: 'production',
}))
const { getTxServiceUrl, getGnosisSafeAppsUrl } = require('src/config')
const TX_SERVICE_URL = mainnet.environment.production.txServiceUrl
@@ -100,7 +100,7 @@ describe('Config Services', () => {
jest.mock('src/utils/constants', () => ({
NODE_ENV: 'production',
NETWORK: 'XDAI',
- APP_ENV: 'production'
+ APP_ENV: 'production',
}))
const { getTxServiceUrl, getGnosisSafeAppsUrl } = require('src/config')
const TX_SERVICE_URL = xdai.environment.production.txServiceUrl
diff --git a/src/config/index.ts b/src/config/index.ts
index 5dd3dcd6..d8660603 100644
--- a/src/config/index.ts
+++ b/src/config/index.ts
@@ -32,9 +32,9 @@ const getCurrentEnvironment = (): string => {
}
type NetworkSpecificConfiguration = EnvironmentSettings & {
- network: NetworkSettings,
- disabledFeatures?: SafeFeatures,
- disabledWallets?: Wallets,
+ network: NetworkSettings
+ disabledFeatures?: SafeFeatures
+ disabledWallets?: Wallets
}
const configuration = (): NetworkSpecificConfiguration => {
@@ -60,7 +60,7 @@ const configuration = (): NetworkSpecificConfiguration => {
...networkBaseConfig,
network: configFile.network,
disabledFeatures: configFile.disabledFeatures,
- disabledWallets: configFile.disabledWallets
+ disabledWallets: configFile.disabledWallets,
}
}
@@ -137,10 +137,10 @@ const fetchContractABI = memoize(
(url, contractAddress) => `${url}_${contractAddress}`,
)
-const getNetworkExplorerApiKey = (networkExplorerName: string): string | undefined=> {
+const getNetworkExplorerApiKey = (networkExplorerName: string): string | undefined => {
switch (networkExplorerName.toLowerCase()) {
case 'etherscan': {
- return ETHERSCAN_API_KEY
+ return ETHERSCAN_API_KEY
}
default: {
return undefined
@@ -148,7 +148,7 @@ const getNetworkExplorerApiKey = (networkExplorerName: string): string | undefin
}
}
-export const getContractABI = async (contractAddress: string) =>{
+export const getContractABI = async (contractAddress: string) => {
const { apiUrl, name } = getNetworkExplorerInfo()
const apiKey = getNetworkExplorerApiKey(name)
@@ -181,7 +181,7 @@ export const getExplorerInfo = (hash: string): BlockScanInfo => {
const type = hash.length > 42 ? 'tx' : 'address'
return () => ({
url: `${url}/${type}/${hash}`,
- alt: name || '',
+ alt: name || '',
})
}
}
diff --git a/src/config/networks/__tests__/networks.test.ts b/src/config/networks/__tests__/networks.test.ts
index 00a79dfd..6cdc0861 100644
--- a/src/config/networks/__tests__/networks.test.ts
+++ b/src/config/networks/__tests__/networks.test.ts
@@ -41,11 +41,10 @@ describe('Networks config files test', () => {
return
}
- const environmentConfigKeys = Object
- .keys(networkConfigElement)
- .filter((environmentConfigKey) =>
- environmentConfigKey.endsWith('Uri') && !!networkConfigElement[environmentConfigKey]
- )
+ const environmentConfigKeys = Object.keys(networkConfigElement).filter(
+ (environmentConfigKey) =>
+ environmentConfigKey.endsWith('Uri') && !!networkConfigElement[environmentConfigKey],
+ )
// Then
environmentConfigKeys.forEach((environmentConfigKey) => {
@@ -53,7 +52,10 @@ describe('Networks config files test', () => {
const isValid = isValidURL(networkConfigElementUri)
if (!isValid) {
- console.log(`Invalid URI in "${networkFileName}" at ${environment}.${environmentConfigKey}:`, networkConfigElementUri)
+ console.log(
+ `Invalid URI in "${networkFileName}" at ${environment}.${environmentConfigKey}:`,
+ networkConfigElementUri,
+ )
}
expect(isValid).toBeTruthy()
diff --git a/src/config/networks/energy_web_chain.ts b/src/config/networks/energy_web_chain.ts
index ececc4bf..df13c013 100644
--- a/src/config/networks/energy_web_chain.ts
+++ b/src/config/networks/energy_web_chain.ts
@@ -1,5 +1,5 @@
import EwcLogo from 'src/config/assets/token_ewc.svg'
-import { EnvironmentSettings, ETHEREUM_NETWORK, FEATURES, NetworkConfig, WALLETS } from 'src/config/networks/network.d'
+import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig, WALLETS } from 'src/config/networks/network.d'
// @todo (agustin) we need to use fixed gasPrice because the oracle is not working right now and it's returning 0
// once the oracle is fixed we need to remove the fixed value
@@ -61,9 +61,6 @@ const mainnet: NetworkConfig = {
WALLETS.AUTHEREUM,
WALLETS.LATTICE,
],
- disabledFeatures: [
- FEATURES.ENS_LOOKUP,
- ],
}
export default mainnet
diff --git a/src/config/networks/index.ts b/src/config/networks/index.ts
index 682b33d3..03ef405b 100644
--- a/src/config/networks/index.ts
+++ b/src/config/networks/index.ts
@@ -11,5 +11,5 @@ export default {
rinkeby,
xdai,
energy_web_chain,
- volta
+ volta,
}
diff --git a/src/config/networks/mainnet.ts b/src/config/networks/mainnet.ts
index 0a7ca3a4..5aea9a61 100644
--- a/src/config/networks/mainnet.ts
+++ b/src/config/networks/mainnet.ts
@@ -42,7 +42,7 @@ const mainnet: NetworkConfig = {
decimals: 18,
logoUri: EtherLogo,
},
- }
+ },
}
export default mainnet
diff --git a/src/config/networks/network.d.ts b/src/config/networks/network.d.ts
index fed876bb..2cd2f1a7 100644
--- a/src/config/networks/network.d.ts
+++ b/src/config/networks/network.d.ts
@@ -51,12 +51,12 @@ export enum ETHEREUM_NETWORK {
export type NetworkSettings = {
// TODO: id now seems to be unnecessary
- id: ETHEREUM_NETWORK,
- backgroundColor: string,
- textColor: string,
- label: string,
- isTestNet: boolean,
- nativeCoin: Token,
+ id: ETHEREUM_NETWORK
+ backgroundColor: string
+ textColor: string
+ label: string
+ isTestNet: boolean
+ nativeCoin: Token
}
// something around this to display or not some critical sections in the app, depending on the network support
@@ -73,14 +73,16 @@ export type GasPriceOracle = {
gasParameter: string
}
-type GasPrice = {
- gasPrice: number
- gasPriceOracle?: GasPriceOracle
-} | {
- gasPrice?: number
- // for infura there's a REST API Token required stored in: `REACT_APP_INFURA_TOKEN`
- gasPriceOracle: GasPriceOracle
-}
+type GasPrice =
+ | {
+ gasPrice: number
+ gasPriceOracle?: GasPriceOracle
+ }
+ | {
+ gasPrice?: number
+ // for infura there's a REST API Token required stored in: `REACT_APP_INFURA_TOKEN`
+ gasPriceOracle: GasPriceOracle
+ }
export type EnvironmentSettings = GasPrice & {
txServiceUrl: string
diff --git a/src/config/networks/volta.ts b/src/config/networks/volta.ts
index 350ad99a..40ef4ebd 100644
--- a/src/config/networks/volta.ts
+++ b/src/config/networks/volta.ts
@@ -1,5 +1,5 @@
import EwcLogo from 'src/config/assets/token_ewc.svg'
-import { EnvironmentSettings, ETHEREUM_NETWORK, FEATURES, NetworkConfig, WALLETS } from 'src/config/networks/network.d'
+import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig, WALLETS } from 'src/config/networks/network.d'
const baseConfig: EnvironmentSettings = {
txServiceUrl: 'https://safe-transaction.volta.gnosis.io/api/v1',
@@ -53,14 +53,10 @@ const mainnet: NetworkConfig = {
WALLETS.TORUS,
WALLETS.TRUST,
WALLETS.UNILOGIN,
- WALLETS.WALLET_CONNECT,
WALLETS.WALLET_LINK,
WALLETS.AUTHEREUM,
WALLETS.LATTICE,
],
- disabledFeatures: [
- FEATURES.ENS_LOOKUP,
- ],
}
export default mainnet
diff --git a/src/config/networks/xdai.ts b/src/config/networks/xdai.ts
index b6aa7b24..743f85fe 100644
--- a/src/config/networks/xdai.ts
+++ b/src/config/networks/xdai.ts
@@ -14,12 +14,11 @@ const baseConfig: EnvironmentSettings = {
const xDai: NetworkConfig = {
environment: {
staging: {
- ...baseConfig
+ ...baseConfig,
},
production: {
...baseConfig,
safeAppsUrl: 'https://apps-xdai.gnosis-safe.io',
-
},
},
network: {
@@ -52,9 +51,7 @@ const xDai: NetworkConfig = {
WALLETS.AUTHEREUM,
WALLETS.LATTICE,
],
- disabledFeatures: [
- FEATURES.ENS_LOOKUP,
- ],
+ disabledFeatures: [FEATURES.ENS_LOOKUP],
}
export default xDai
diff --git a/src/index.tsx b/src/index.tsx
index 745f223c..aad9a089 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -23,7 +23,7 @@ Sentry.init({
dsn: SENTRY_DSN,
release: `safe-react@${process.env.REACT_APP_APP_VERSION}`,
integrations: [new Integrations.BrowserTracing()],
- sampleRate: 1,
+ sampleRate: 0.2,
})
const root = document.getElementById('root')
diff --git a/src/logic/addressBook/store/selectors/index.ts b/src/logic/addressBook/store/selectors/index.ts
index 7460909f..128b9aa7 100644
--- a/src/logic/addressBook/store/selectors/index.ts
+++ b/src/logic/addressBook/store/selectors/index.ts
@@ -8,6 +8,10 @@ import { AddressBookState } from 'src/logic/addressBook/model/addressBook'
export const addressBookSelector = (state: AppReduxState): AddressBookState => state[ADDRESS_BOOK_REDUCER_ID]
+export const addressBookAddressesListSelector = createSelector(addressBookSelector, (addressBook): string[] => {
+ return addressBook.map((entry) => entry.address)
+})
+
export const getNameFromAddressBookSelector = createSelector(
addressBookSelector,
(_, address) => address,
diff --git a/src/logic/addressBook/utils/__tests__/addressBookUtils.test.ts b/src/logic/addressBook/utils/__tests__/addressBookUtils.test.ts
index 4541c2f7..8ff40278 100644
--- a/src/logic/addressBook/utils/__tests__/addressBookUtils.test.ts
+++ b/src/logic/addressBook/utils/__tests__/addressBookUtils.test.ts
@@ -2,7 +2,6 @@ import { List } from 'immutable'
import {
checkIfEntryWasDeletedFromAddressBook,
getAddressBookFromStorage,
- getAddressesListFromAddressBook,
getNameFromAddressBook,
getOwnersWithNameFromAddressBook,
isValidAddressBookName,
@@ -28,24 +27,6 @@ const getMockOldAddressBookEntry = ({ address = '', name = '', isOwner = false }
}
}
-describe('getAddressesListFromAdbk', () => {
- const entry1 = getMockAddressBookEntry('123456', 'test1')
- const entry2 = getMockAddressBookEntry('78910', 'test2')
- const entry3 = getMockAddressBookEntry('4781321', 'test3')
-
- it('It should returns the list of addresses within the addressBook given a safeAddressBook', () => {
- // given
- const safeAddressBook = [entry1, entry2, entry3]
- const expectedResult = [entry1.address, entry2.address, entry3.address]
-
- // when
- const result = getAddressesListFromAddressBook(safeAddressBook)
-
- // then
- expect(result).toStrictEqual(expectedResult)
- })
-})
-
describe('getNameFromSafeAddressBook', () => {
const entry1 = getMockAddressBookEntry('123456', 'test1')
const entry2 = getMockAddressBookEntry('78910', 'test2')
diff --git a/src/logic/addressBook/utils/index.ts b/src/logic/addressBook/utils/index.ts
index 11656a8b..f4e835de 100644
--- a/src/logic/addressBook/utils/index.ts
+++ b/src/logic/addressBook/utils/index.ts
@@ -56,9 +56,6 @@ export const saveAddressBook = async (addressBook: AddressBookState): Promise
- addressBook.map((entry) => entry.address)
-
type GetNameFromAddressBookOptions = {
filterOnlyValidName: boolean
}
diff --git a/src/logic/collectibles/utils/index.ts b/src/logic/collectibles/utils/index.ts
index c117aead..8f7b346b 100644
--- a/src/logic/collectibles/utils/index.ts
+++ b/src/logic/collectibles/utils/index.ts
@@ -1,4 +1,4 @@
-import { getNetworkId } from 'src/config'
+import { getNetworkId, getNetworkInfo } from 'src/config'
import { ETHEREUM_NETWORK } from 'src/config/networks/network.d'
import { nftAssetsListAddressesSelector } from 'src/logic/collectibles/store/selectors'
import { TxServiceModel } from 'src/logic/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions'
@@ -18,6 +18,14 @@ export const CK_ADDRESS = {
[ETHEREUM_NETWORK.RINKEBY]: '0x16baf0de678e52367adc69fd067e5edd1d33e3bf',
}
+// Note: xDAI ENS is missing, once we have it we need to add it here
+const ENS_CONTRACT_ADDRESS = {
+ [ETHEREUM_NETWORK.MAINNET]: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
+ [ETHEREUM_NETWORK.RINKEBY]: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
+ [ETHEREUM_NETWORK.ENERGY_WEB_CHAIN]: '0x0A6d64413c07E10E890220BBE1c49170080C6Ca0',
+ [ETHEREUM_NETWORK.VOLTA]: '0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac',
+}
+
// safeTransferFrom(address,address,uint256)
export const SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH = '42842e0e'
@@ -50,12 +58,11 @@ export const getERC721Symbol = async (contractAddress: string): Promise
try {
const ERC721token = await getERC721TokenContract()
const tokenInstance = await ERC721token.at(contractAddress)
- tokenSymbol = tokenInstance.symbol()
+ tokenSymbol = await tokenInstance.symbol()
} catch (err) {
// If the contract address is an ENS token contract, we know that the ERC721 standard is not proper implemented
// The method symbol() is missing
- const ENS_TOKEN_CONTRACT = '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85'
- if (sameAddress(contractAddress, ENS_TOKEN_CONTRACT)) {
+ if (isENSContract(contractAddress)) {
return 'ENS'
}
console.error(`Failed to retrieve token symbol for ERC721 token ${contractAddress}`)
@@ -64,6 +71,11 @@ export const getERC721Symbol = async (contractAddress: string): Promise
return tokenSymbol
}
+export const isENSContract = (contractAddress: string): boolean => {
+ const { id } = getNetworkInfo()
+ return sameAddress(contractAddress, ENS_CONTRACT_ADDRESS[id])
+}
+
/**
* Verifies if the provided contract is a valid ERC721
* @param {string} contractAddress
diff --git a/src/logic/contracts/api/masterCopies.ts b/src/logic/contracts/api/masterCopies.ts
new file mode 100644
index 00000000..0890911e
--- /dev/null
+++ b/src/logic/contracts/api/masterCopies.ts
@@ -0,0 +1,47 @@
+import axios from 'axios'
+import { getTxServiceUrl } from 'src/config'
+import memoize from 'lodash.memoize'
+
+export enum MasterCopyDeployer {
+ GNOSIS = 'Gnosis',
+ CIRCLES = 'Circles',
+}
+
+type MasterCopyFetch = {
+ address: string
+ version: string
+}
+
+export type MasterCopy = {
+ address: string
+ version: string
+ deployer: MasterCopyDeployer
+ deployerRepoUrl: string
+}
+
+const extractMasterCopyInfo = (mc: MasterCopyFetch): MasterCopy => {
+ const isCircles = mc.version.toLowerCase().includes(MasterCopyDeployer.CIRCLES.toLowerCase())
+ const dashIndex = mc.version.indexOf('-')
+
+ const masterCopy = {
+ address: mc.address,
+ version: !isCircles ? mc.version : mc.version.substring(0, dashIndex),
+ deployer: !isCircles ? MasterCopyDeployer.GNOSIS : MasterCopyDeployer.CIRCLES,
+ deployerRepoUrl: !isCircles
+ ? 'https://github.com/gnosis/safe-contracts/releases'
+ : 'https://github.com/CirclesUBI/safe-contracts/releases',
+ }
+ return masterCopy
+}
+
+export const fetchMasterCopies = memoize(
+ async (): Promise => {
+ const url = `${getTxServiceUrl()}/about/master-copies/`
+ try {
+ const res = await axios.get<{ address: string; version: string }[]>(url)
+ return res.data.map(extractMasterCopyInfo)
+ } catch (error) {
+ console.error('Fetching data from master-copies errored', error)
+ }
+ },
+)
diff --git a/src/logic/contracts/artifacts/AllowanceModule.json b/src/logic/contracts/artifacts/AllowanceModule.json
new file mode 100644
index 00000000..72664b24
--- /dev/null
+++ b/src/logic/contracts/artifacts/AllowanceModule.json
@@ -0,0 +1,38072 @@
+{
+ "contractName": "AllowanceModule",
+ "abi": [
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ }
+ ],
+ "name": "AddDelegate",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "DeleteAllowance",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "value",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "nonce",
+ "type": "uint16"
+ }
+ ],
+ "name": "ExecuteAllowanceTransfer",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "paymentToken",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "paymentReceiver",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "payment",
+ "type": "uint96"
+ }
+ ],
+ "name": "PayAllowanceTransfer",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ }
+ ],
+ "name": "RemoveDelegate",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "ResetAllowance",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "allowanceAmount",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "resetTime",
+ "type": "uint16"
+ }
+ ],
+ "name": "SetAllowance",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "ALLOWANCE_TRANSFER_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "DOMAIN_SEPARATOR_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "NAME",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "VERSION",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "allowances",
+ "outputs": [
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint96",
+ "name": "spent",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint16",
+ "name": "resetTimeMin",
+ "type": "uint16"
+ },
+ {
+ "internalType": "uint32",
+ "name": "lastResetMin",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint16",
+ "name": "nonce",
+ "type": "uint16"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "uint48",
+ "name": "",
+ "type": "uint48"
+ }
+ ],
+ "name": "delegates",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "internalType": "uint48",
+ "name": "prev",
+ "type": "uint48"
+ },
+ {
+ "internalType": "uint48",
+ "name": "next",
+ "type": "uint48"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "delegatesStart",
+ "outputs": [
+ {
+ "internalType": "uint48",
+ "name": "",
+ "type": "uint48"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "name": "tokens",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "allowanceAmount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint16",
+ "name": "resetTimeMin",
+ "type": "uint16"
+ },
+ {
+ "internalType": "uint32",
+ "name": "resetBaseMin",
+ "type": "uint32"
+ }
+ ],
+ "name": "setAllowance",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "resetAllowance",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "deleteAllowance",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "contract GnosisSafe",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "address payable",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "address",
+ "name": "paymentToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "payment",
+ "type": "uint96"
+ },
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "signature",
+ "type": "bytes"
+ }
+ ],
+ "name": "executeAllowanceTransfer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getChainId",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "address",
+ "name": "paymentToken",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "payment",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint16",
+ "name": "nonce",
+ "type": "uint16"
+ }
+ ],
+ "name": "generateTransferHash",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ }
+ ],
+ "name": "getTokens",
+ "outputs": [
+ {
+ "internalType": "address[]",
+ "name": "",
+ "type": "address[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "getTokenAllowance",
+ "outputs": [
+ {
+ "internalType": "uint256[5]",
+ "name": "",
+ "type": "uint256[5]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ }
+ ],
+ "name": "addDelegate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "removeAllowances",
+ "type": "bool"
+ }
+ ],
+ "name": "removeDelegate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "internalType": "uint48",
+ "name": "start",
+ "type": "uint48"
+ },
+ {
+ "internalType": "uint8",
+ "name": "pageSize",
+ "type": "uint8"
+ }
+ ],
+ "name": "getDelegates",
+ "outputs": [
+ {
+ "internalType": "address[]",
+ "name": "results",
+ "type": "address[]"
+ },
+ {
+ "internalType": "uint48",
+ "name": "next",
+ "type": "uint48"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+ ],
+ "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"AddDelegate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"DeleteAllowance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"nonce\",\"type\":\"uint16\"}],\"name\":\"ExecuteAllowanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"paymentReceiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"}],\"name\":\"PayAllowanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"RemoveDelegate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"ResetAllowance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"allowanceAmount\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"resetTime\",\"type\":\"uint16\"}],\"name\":\"SetAllowance\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ALLOWANCE_TRANSFER_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NAME\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"addDelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowances\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"spent\",\"type\":\"uint96\"},{\"internalType\":\"uint16\",\"name\":\"resetTimeMin\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"lastResetMin\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"nonce\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"prev\",\"type\":\"uint48\"},{\"internalType\":\"uint48\",\"name\":\"next\",\"type\":\"uint48\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegatesStart\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"deleteAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract GnosisSafe\",\"name\":\"safe\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"executeAllowanceTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"internalType\":\"uint16\",\"name\":\"nonce\",\"type\":\"uint16\"}],\"name\":\"generateTransferHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"start\",\"type\":\"uint48\"},{\"internalType\":\"uint8\",\"name\":\"pageSize\",\"type\":\"uint8\"}],\"name\":\"getDelegates\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"results\",\"type\":\"address[]\"},{\"internalType\":\"uint48\",\"name\":\"next\",\"type\":\"uint48\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenAllowance\",\"outputs\":[{\"internalType\":\"uint256[5]\",\"name\":\"\",\"type\":\"uint256[5]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"getTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"removeAllowances\",\"type\":\"bool\"}],\"name\":\"removeDelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"resetAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"allowanceAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint16\",\"name\":\"resetTimeMin\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"resetBaseMin\",\"type\":\"uint32\"}],\"name\":\"setAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addDelegate(address)\":{\"details\":\"Allows to add a delegate.\",\"params\":{\"delegate\":\"Delegate that should be added.\"}},\"deleteAllowance(address,address)\":{\"details\":\"Allows to remove the allowance for a specific delegate and token. This will set all values except the `nonce` to 0.\",\"params\":{\"delegate\":\"Delegate whose allowance should be updated.\",\"token\":\"Token contract address.\"}},\"executeAllowanceTransfer(address,address,address,uint96,address,uint96,address,bytes)\":{\"details\":\"Allows to use the allowance to perform a transfer.\",\"params\":{\"amount\":\"Amount that should be transferred.\",\"delegate\":\"Delegate whose allowance should be updated.\",\"payment\":\"Amount to should be paid for executing the transfer.\",\"paymentToken\":\"Token that should be used to pay for the execution of the transfer.\",\"safe\":\"The Safe whose funds should be used.\",\"signature\":\"Signature generated by the delegate to authorize the transfer.\",\"to\":\"Address that should receive the tokens.\",\"token\":\"Token contract address.\"}},\"generateTransferHash(address,address,address,uint96,address,uint96,uint16)\":{\"details\":\"Generates the transfer hash that should be signed to authorize a transfer\"},\"getChainId()\":{\"details\":\"Returns the chain id used by this contract.\"},\"removeDelegate(address,bool)\":{\"details\":\"Allows to remove a delegate.\",\"params\":{\"delegate\":\"Delegate that should be removed.\",\"removeAllowances\":\"Indicator if allowances should also be removed. This should be set to `true` unless this causes an out of gas, in this case the allowances should be \\\"manually\\\" deleted via `deleteAllowance`.\"}},\"resetAllowance(address,address)\":{\"details\":\"Allows to reset the allowance for a specific delegate and token.\",\"params\":{\"delegate\":\"Delegate whose allowance should be updated.\",\"token\":\"Token contract address.\"}},\"setAllowance(address,address,uint96,uint16,uint32)\":{\"details\":\"Allows to update the allowance for a specified token. This can only be done via a Safe transaction.\",\"params\":{\"allowanceAmount\":\"allowance in smallest token unit.\",\"delegate\":\"Delegate whose allowance should be updated.\",\"resetBaseMin\":\"Time based on which the reset time should be increased\",\"resetTimeMin\":\"Time after which the allowance should reset\",\"token\":\"Token contract address.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/AlowanceModule.sol\":\"AllowanceModule\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/AlowanceModule.sol\":{\"keccak256\":\"0xed6f4e2905b6a8db7fb78796508fe6960c013cb2042a2ea73cf078d531cc9344\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://b4f51be45551ac96510d2769817469c533ec8fae7756b249981ab2443be06f0f\",\"dweb:/ipfs/QmdffjxcbPKVZ7axEUUjjZCjua1cjHvCJqURSNAcEs3Wse\"]},\"/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/Enum.sol\":{\"keccak256\":\"0xa15c9e6e366069b4477ea65de7ba06f32ff700396a322db449122889dd6d9df2\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://bd2141eb7313cff613a507ce3b4ed457be7152e184d597892055e02f21cf3c7a\",\"dweb:/ipfs/Qmeh5aLDdRrpTNbgGiXHfefcg3HtYDYKhd1QuXj4bE5CQk\"]},\"/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/SignatureDecoder.sol\":{\"keccak256\":\"0xb26a989d4e56a911382da0d4f6ce6e51106533910b9dbb136234169a04688eff\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://5d09885b659d1c8cb5b5a7002982704254f250fe03720fb282b03540b4095d85\",\"dweb:/ipfs/QmfWMeJrG4viiNdj8GGXvD1miDDHZ6QeWrcC1sjoQxDPTW\"]}},\"version\":1}",
+ "bytecode": "0x608060405234801561001057600080fd5b50613a98806100206000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063b713c9d4116100ad578063dd43a79f11610071578063dd43a79f1461093c578063e71bdf411461098c578063eb37abe0146109d0578063f56e81fa14610a97578063ffa1ad7414610b2f57610121565b8063b713c9d4146105cc578063beaeb388146106aa578063c19bf50e14610744578063ce60c692146107a8578063d626e0431461084657610121565b80634515641a116100f45780634515641a146101e0578063885133e31461036c5780638d0e8e1d146103d057806394b31fbd14610489578063a3f4df7e1461054957610121565b80631db61b5414610126578063310a3bb1146101445780633408e470146101a457806343abf5fe146101c2575b600080fd5b61012e610bb2565b6040518082815260200191505060405180910390f35b6101866004803603602081101561015a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bd9565b604051808265ffffffffffff16815260200191505060405180910390f35b6101ac610bfe565b6040518082815260200191505060405180910390f35b6101ca610c0b565b6040518082815260200191505060405180910390f35b61036a60048036036101008110156101f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102e457600080fd5b8201836020820111156102f657600080fd5b8035906020019184600183028401116401000000008311171561031857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610c32565b005b6103ce6004803603604081101561038257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110a1565b005b610432600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111c9565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561047557808201518184015260208101905061045a565b505050509050019250505060405180910390f35b61050b6004803603606081101561049f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112d4565b6040518082600560200280838360005b8381101561053657808201518184015260208101905061051b565b5050505090500191505060405180910390f35b610551611360565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610591578082015181840152602081019050610576565b50505050905090810190601f1680156105be5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61064e600480360360608110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611399565b60405180866bffffffffffffffffffffffff168152602001856bffffffffffffffffffffffff1681526020018461ffff1681526020018363ffffffff1681526020018261ffff1681526020019550505050505060405180910390f35b610742600480360360a08110156106c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803561ffff169060200190929190803563ffffffff169060200190929190505050611445565b005b6107a66004803603604081101561075a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118fe565b005b6107fc600480360360408110156107be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803565ffffffffffff1690602001909291905050506119cf565b604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018365ffffffffffff1681526020018265ffffffffffff168152602001935050505060405180910390f35b610926600480360360e081101561085c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803561ffff169060200190929190505050611a4a565b6040518082815260200191505060405180910390f35b61098a6004803603604081101561095257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611a6f565b005b6109ce600480360360208110156109a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120ae565b005b610a31600480360360608110156109e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803565ffffffffffff169060200190929190803560ff169060200190929190505050612581565b60405180806020018365ffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015610a82578082015181840152602081019050610a67565b50505050905001935050505060405180910390f35b610b0360048036036060811015610aad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061293d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b37612995565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b77578082015181840152602081019050610b5c565b50505050905090810190601f168015610ba45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b7f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b81565b60026020528060005260406000206000915054906101000a900465ffffffffffff1681565b6000804690508091505090565b7f80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb60001b81565b610c3a613855565b610c4589848a6129ce565b90506060610c5c8a8a8a8a8a8a8860800151612c2c565b90506001826080015101826080019061ffff16908161ffff1681525050600087836020015101905082602001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff16118015610cd3575082600001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611155b610d28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001806139ad603a913960400191505060405180910390fd5b8083602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250506000866bffffffffffffffffffffffff161115610ecd57610d6f613855565b8a73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610db257610dad8c878a6129ce565b610db4565b835b905086816020015101915080602001516bffffffffffffffffffffffff16826bffffffffffffffffffffffff16118015610e0e575080600001516bffffffffffffffffffffffff16826bffffffffffffffffffffffff1611155b610e63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526048815260200180613a1b6048913960600191505060405180910390fd5b8181602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250508a73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610ecb57610eca8c878a84612e40565b5b505b610ed98b868c86612e40565b610ee58585848e612fdd565b6000866bffffffffffffffffffffffff161115610fbf57610f088b883289613130565b8a73ffffffffffffffffffffffffffffffffffffffff167fad71d7a737da41277b5ade17fd65b00671e3ab35f23778a98c8d925dc66e3d9d8689328a604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815260200194505050505060405180910390a25b610fcb8b8b8b8b613130565b8a73ffffffffffffffffffffffffffffffffffffffff167fa11cca2c2027e28ab0046aab4d4040f59d8b06e819ccd974c1e53e86aa814c19868c8c8c6001896080015103604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018261ffff1681526020019550505050505060405180910390a25050505050505050505050565b6110a9613855565b6110b43384846129ce565b9050600081600001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050600081602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250506000816040019061ffff16908161ffff16815250506000816060019063ffffffff16908163ffffffff168152505061114233848484612e40565b3373ffffffffffffffffffffffffffffffffffffffff167f9a9bc79dd7e42545ba12d5659704d73a9364d4a18e0a98ca1c992a3bc999d2718484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a2505050565b6060600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156112c757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161127d575b5050505050905092915050565b6112dc6138ae565b6112e4613855565b6112ef8585856129ce565b90506040518060a0016040528082600001516bffffffffffffffffffffffff16815260200182602001516bffffffffffffffffffffffff168152602001826040015161ffff168152602001826060015163ffffffff168152602001826080015161ffff168152509150509392505050565b6040518060400160405280601081526020017f416c6c6f77616e6365204d6f64756c650000000000000000000000000000000081525081565b600060205282600052604060002060205281600052604060002060205280600052604060002060009250925050508060000160009054906101000a90046bffffffffffffffffffffffff169080600001600c9054906101000a90046bffffffffffffffffffffffff16908060000160189054906101000a900461ffff169080600001601a9054906101000a900463ffffffff169080600001601e9054906101000a900461ffff16905085565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f64656c656761746520213d20616464726573732830290000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008765ffffffffffff1665ffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180613918603c913960400191505060405180910390fd5b6115f7613855565b6116023387876129ce565b90506000816080015161ffff161415611708576001816080019061ffff16908161ffff1681525050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020859080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6000603c428161171457fe5b04905060008363ffffffff1611156117dc578063ffffffff168363ffffffff1611156117a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f7265736574426173654d696e203c3d2063757272656e744d696e00000000000081525060200191505060405180910390fd5b8361ffff1683820363ffffffff16816117bd57fe5b068103826060019063ffffffff16908163ffffffff1681525050611809565b6000826060015163ffffffff1614156118085780826060019063ffffffff16908163ffffffff16815250505b5b83826040019061ffff16908161ffff16815250508482600001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff168152505061185133888885612e40565b3373ffffffffffffffffffffffffffffffffffffffff167f49caa04c5e1e168069c09df7f88c07ca87be980b0bf4570ab77fe9aae3ca7eba88888888604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018261ffff16815260200194505050505060405180910390a250505050505050565b611906613855565b6119113384846129ce565b9050600081602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff168152505061194833848484612e40565b3373ffffffffffffffffffffffffffffffffffffffff167fa39af38687a2c1e52c987a84d807fd238b83b08a9da657f184a72fcd2b71360c8484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a2505050565b6003602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900465ffffffffffff169080600001601a9054906101000a900465ffffffffffff16905083565b6000611a5b88888888888888612c2c565b805190602001209050979650505050505050565b611a776138d0565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008465ffffffffffff1665ffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815260200160008201601a9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161415611bd157506120aa565b8115611dd6576000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b8180549050811015611dd3576000828281548110611c7457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611ca9613855565b611cb43388846129ce565b9050600081600001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050600081602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250506000816040019061ffff16908161ffff16815250506000816060019063ffffffff16908163ffffffff1681525050611d4233888484612e40565b3373ffffffffffffffffffffffffffffffffffffffff167f9a9bc79dd7e42545ba12d5659704d73a9364d4a18e0a98ca1c992a3bc999d2718884604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a250508080600101915050611c5a565b50505b6000816020015165ffffffffffff161415611e56578060400151600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548165ffffffffffff021916908365ffffffffffff160217905550611ee5565b8060400151600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836020015165ffffffffffff1665ffffffffffff168152602001908152602001600020600001601a6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b6000816040015165ffffffffffff1614611f88578060200151600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836040015165ffffffffffff1665ffffffffffff16815260200190815260200160002060000160146101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008465ffffffffffff1665ffffffffffff168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a81549065ffffffffffff021916905560008201601a6101000a81549065ffffffffffff021916905550503373ffffffffffffffffffffffffffffffffffffffff167fdccc2d936ded24d2153d2760581a7f0dcb23ec71190c9726b3584cdd700214d484604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a2505b5050565b600081905060008165ffffffffffff161415612132576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f696e64657820213d2075696e742830290000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612296578273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461228f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f63757272656e7444656c6567617465203d3d2064656c6567617465000000000081525060200191505060405180910390fd5b505061257e565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900465ffffffffffff16905060405180606001604052808573ffffffffffffffffffffffffffffffffffffffff168152602001600065ffffffffffff1681526020018265ffffffffffff16815250600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008565ffffffffffff1665ffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001601a6101000a81548165ffffffffffff021916908365ffffffffffff16021790555090505082600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff16815260200190815260200160002060000160146101000a81548165ffffffffffff021916908365ffffffffffff16021790555082600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548165ffffffffffff021916908365ffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f2fd5b26f00131bd8ca0fc556207292b85a6bec241341df82724333227458e63085604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25050505b50565b606060008260ff1667ffffffffffffffff8111801561259f57600080fd5b506040519080825280602002602001820160405280156125ce5781602001602082028036833780820191505090505b509150600080808665ffffffffffff16141561263b57600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900465ffffffffffff1661263d565b855b90506126476138d0565b600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815260200160008201601a9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff168152505090505b600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16141580156127a957508560ff168360ff16105b15612928578060000151858460ff16815181106127c257fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508280600101935050600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000826040015165ffffffffffff1665ffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815260200160008201601a9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815250509050612763565b80600001519350828552505050935093915050565b6001602052826000526040600020602052816000526040600020818154811061296257fe5b90600052602060002001600092509250509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b6129d6613855565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160008201600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681526020016000820160189054906101000a900461ffff1661ffff1661ffff16815260200160008201601a9054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201601e9054906101000a900461ffff1661ffff1661ffff168152505090506000603c4281612b8957fe5b0490506000826040015161ffff16118015612bbe5750816040015161ffff16810363ffffffff16826060015163ffffffff1611155b15612c2457600082602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050816040015161ffff168260600151820363ffffffff1681612c0957fe5b068103826060019063ffffffff16908163ffffffff16815250505b509392505050565b60606000612c38610bfe565b905060007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b8230604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405160208183030381529060405280519060200120905060007f80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb60001b8b8b8b8b8b8b8b604051602001808981526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff168152602001856bffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018261ffff16815260200198505050505050505050604051602081830303815290604052805190602001209050601960f81b600160f81b838360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040529350505050979650505050505050565b806000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060408201518160000160186101000a81548161ffff021916908361ffff160217905550606082015181600001601a6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001601e6101000a81548161ffff021916908361ffff16021790555090505050505050565b6000612fe98484613524565b90508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156130d457508073ffffffffffffffffffffffffffffffffffffffff16600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b613129576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260598152602001806139546059913960600191505060405180910390fd5b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156132be578373ffffffffffffffffffffffffffffffffffffffff1663468721a7838360006040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff168152602001806020018360018111156131d857fe5b8152602001828103825260008152602001602001945050505050602060405180830381600087803b15801561320c57600080fd5b505af1158015613220573d6000803e3d6000fd5b505050506040513d602081101561323657600080fd5b81019080805190602001909291905050506132b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f742065786563757465206574686572207472616e7366657281525060200191505060405180910390fd5b61351e565b60608282604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff168152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018360018111156133e357fe5b8152602001828103825284818151815260200191508051906020019080838360005b83811015613420578082015181840152602081019050613405565b50505050905090810190601f16801561344d5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561346f57600080fd5b505af1158015613483573d6000803e3d6000fd5b505050506040513d602081101561349957600080fd5b810190808051906020019092919050505061351c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74206578656375746520746f6b656e207472616e7366657281525060200191505060405180910390fd5b505b50505050565b6000808351141561353757339050613820565b60418351146135ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f7369676e6174757265732e6c656e677468203d3d20363500000000000000000081525060200191505060405180910390fd5b60008060006135be866000613826565b80935081945082955050505060008360ff161415613627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806139e76034913960400191505060405180910390fd5b60018360ff16141561363b57339350613779565b601e8360ff16111561370a576001858051906020012060405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012060048503848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156136f9573d6000803e3d6000fd5b505050602060405103519350613778565b6001858051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561376b573d6000803e3d6000fd5b5050506020604051035193505b5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561381c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f6f776e657220213d20616464726573732830290000000000000000000000000081525060200191505060405180910390fd5b5050505b92915050565b60008060008360410260208101860151925060408101860151915060ff60418201870151169350509250925092565b6040518060a0016040528060006bffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff168152602001600061ffff168152602001600063ffffffff168152602001600061ffff1681525090565b6040518060a00160405280600590602082028036833780820191505090505090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff168152509056fe64656c6567617465735b6d73672e73656e6465725d5b75696e7434382864656c6567617465295d2e64656c6567617465203d3d2064656c6567617465657870656374656444656c6567617465203d3d207369676e65722026262064656c6567617465735b616464726573732873616665295d5b75696e743438287369676e6572295d2e64656c6567617465203d3d207369676e65726e65775370656e74203e20616c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d20616c6c6f77616e63652e616d6f756e74436f6e7472616374207369676e61747572657320617265206e6f7420737570706f727465642062792074686973206d6f64756c656e65775370656e74203e207061796d656e74416c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d207061796d656e74416c6c6f77616e63652e616d6f756e74a26469706673582212208a2846ee32dc079a0bad3b0fd56b368cddc175a616dcdd81307e8555c23d4e6464736f6c63430007010033",
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063b713c9d4116100ad578063dd43a79f11610071578063dd43a79f1461093c578063e71bdf411461098c578063eb37abe0146109d0578063f56e81fa14610a97578063ffa1ad7414610b2f57610121565b8063b713c9d4146105cc578063beaeb388146106aa578063c19bf50e14610744578063ce60c692146107a8578063d626e0431461084657610121565b80634515641a116100f45780634515641a146101e0578063885133e31461036c5780638d0e8e1d146103d057806394b31fbd14610489578063a3f4df7e1461054957610121565b80631db61b5414610126578063310a3bb1146101445780633408e470146101a457806343abf5fe146101c2575b600080fd5b61012e610bb2565b6040518082815260200191505060405180910390f35b6101866004803603602081101561015a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bd9565b604051808265ffffffffffff16815260200191505060405180910390f35b6101ac610bfe565b6040518082815260200191505060405180910390f35b6101ca610c0b565b6040518082815260200191505060405180910390f35b61036a60048036036101008110156101f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102e457600080fd5b8201836020820111156102f657600080fd5b8035906020019184600183028401116401000000008311171561031857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610c32565b005b6103ce6004803603604081101561038257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110a1565b005b610432600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111c9565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561047557808201518184015260208101905061045a565b505050509050019250505060405180910390f35b61050b6004803603606081101561049f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112d4565b6040518082600560200280838360005b8381101561053657808201518184015260208101905061051b565b5050505090500191505060405180910390f35b610551611360565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610591578082015181840152602081019050610576565b50505050905090810190601f1680156105be5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61064e600480360360608110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611399565b60405180866bffffffffffffffffffffffff168152602001856bffffffffffffffffffffffff1681526020018461ffff1681526020018363ffffffff1681526020018261ffff1681526020019550505050505060405180910390f35b610742600480360360a08110156106c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803561ffff169060200190929190803563ffffffff169060200190929190505050611445565b005b6107a66004803603604081101561075a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118fe565b005b6107fc600480360360408110156107be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803565ffffffffffff1690602001909291905050506119cf565b604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018365ffffffffffff1681526020018265ffffffffffff168152602001935050505060405180910390f35b610926600480360360e081101561085c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080356bffffffffffffffffffffffff169060200190929190803561ffff169060200190929190505050611a4a565b6040518082815260200191505060405180910390f35b61098a6004803603604081101561095257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611a6f565b005b6109ce600480360360208110156109a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120ae565b005b610a31600480360360608110156109e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803565ffffffffffff169060200190929190803560ff169060200190929190505050612581565b60405180806020018365ffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015610a82578082015181840152602081019050610a67565b50505050905001935050505060405180910390f35b610b0360048036036060811015610aad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061293d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b37612995565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b77578082015181840152602081019050610b5c565b50505050905090810190601f168015610ba45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b7f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b81565b60026020528060005260406000206000915054906101000a900465ffffffffffff1681565b6000804690508091505090565b7f80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb60001b81565b610c3a613855565b610c4589848a6129ce565b90506060610c5c8a8a8a8a8a8a8860800151612c2c565b90506001826080015101826080019061ffff16908161ffff1681525050600087836020015101905082602001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff16118015610cd3575082600001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611155b610d28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001806139ad603a913960400191505060405180910390fd5b8083602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250506000866bffffffffffffffffffffffff161115610ecd57610d6f613855565b8a73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610db257610dad8c878a6129ce565b610db4565b835b905086816020015101915080602001516bffffffffffffffffffffffff16826bffffffffffffffffffffffff16118015610e0e575080600001516bffffffffffffffffffffffff16826bffffffffffffffffffffffff1611155b610e63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526048815260200180613a1b6048913960600191505060405180910390fd5b8181602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250508a73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614610ecb57610eca8c878a84612e40565b5b505b610ed98b868c86612e40565b610ee58585848e612fdd565b6000866bffffffffffffffffffffffff161115610fbf57610f088b883289613130565b8a73ffffffffffffffffffffffffffffffffffffffff167fad71d7a737da41277b5ade17fd65b00671e3ab35f23778a98c8d925dc66e3d9d8689328a604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815260200194505050505060405180910390a25b610fcb8b8b8b8b613130565b8a73ffffffffffffffffffffffffffffffffffffffff167fa11cca2c2027e28ab0046aab4d4040f59d8b06e819ccd974c1e53e86aa814c19868c8c8c6001896080015103604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018261ffff1681526020019550505050505060405180910390a25050505050505050505050565b6110a9613855565b6110b43384846129ce565b9050600081600001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050600081602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250506000816040019061ffff16908161ffff16815250506000816060019063ffffffff16908163ffffffff168152505061114233848484612e40565b3373ffffffffffffffffffffffffffffffffffffffff167f9a9bc79dd7e42545ba12d5659704d73a9364d4a18e0a98ca1c992a3bc999d2718484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a2505050565b6060600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156112c757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161127d575b5050505050905092915050565b6112dc6138ae565b6112e4613855565b6112ef8585856129ce565b90506040518060a0016040528082600001516bffffffffffffffffffffffff16815260200182602001516bffffffffffffffffffffffff168152602001826040015161ffff168152602001826060015163ffffffff168152602001826080015161ffff168152509150509392505050565b6040518060400160405280601081526020017f416c6c6f77616e6365204d6f64756c650000000000000000000000000000000081525081565b600060205282600052604060002060205281600052604060002060205280600052604060002060009250925050508060000160009054906101000a90046bffffffffffffffffffffffff169080600001600c9054906101000a90046bffffffffffffffffffffffff16908060000160189054906101000a900461ffff169080600001601a9054906101000a900463ffffffff169080600001601e9054906101000a900461ffff16905085565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f64656c656761746520213d20616464726573732830290000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008765ffffffffffff1665ffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180613918603c913960400191505060405180910390fd5b6115f7613855565b6116023387876129ce565b90506000816080015161ffff161415611708576001816080019061ffff16908161ffff1681525050600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020859080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6000603c428161171457fe5b04905060008363ffffffff1611156117dc578063ffffffff168363ffffffff1611156117a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f7265736574426173654d696e203c3d2063757272656e744d696e00000000000081525060200191505060405180910390fd5b8361ffff1683820363ffffffff16816117bd57fe5b068103826060019063ffffffff16908163ffffffff1681525050611809565b6000826060015163ffffffff1614156118085780826060019063ffffffff16908163ffffffff16815250505b5b83826040019061ffff16908161ffff16815250508482600001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff168152505061185133888885612e40565b3373ffffffffffffffffffffffffffffffffffffffff167f49caa04c5e1e168069c09df7f88c07ca87be980b0bf4570ab77fe9aae3ca7eba88888888604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018261ffff16815260200194505050505060405180910390a250505050505050565b611906613855565b6119113384846129ce565b9050600081602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff168152505061194833848484612e40565b3373ffffffffffffffffffffffffffffffffffffffff167fa39af38687a2c1e52c987a84d807fd238b83b08a9da657f184a72fcd2b71360c8484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a2505050565b6003602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900465ffffffffffff169080600001601a9054906101000a900465ffffffffffff16905083565b6000611a5b88888888888888612c2c565b805190602001209050979650505050505050565b611a776138d0565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008465ffffffffffff1665ffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815260200160008201601a9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161415611bd157506120aa565b8115611dd6576000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b8180549050811015611dd3576000828281548110611c7457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611ca9613855565b611cb43388846129ce565b9050600081600001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050600081602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff16815250506000816040019061ffff16908161ffff16815250506000816060019063ffffffff16908163ffffffff1681525050611d4233888484612e40565b3373ffffffffffffffffffffffffffffffffffffffff167f9a9bc79dd7e42545ba12d5659704d73a9364d4a18e0a98ca1c992a3bc999d2718884604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a250508080600101915050611c5a565b50505b6000816020015165ffffffffffff161415611e56578060400151600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548165ffffffffffff021916908365ffffffffffff160217905550611ee5565b8060400151600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836020015165ffffffffffff1665ffffffffffff168152602001908152602001600020600001601a6101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b6000816040015165ffffffffffff1614611f88578060200151600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836040015165ffffffffffff1665ffffffffffff16815260200190815260200160002060000160146101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008465ffffffffffff1665ffffffffffff168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a81549065ffffffffffff021916905560008201601a6101000a81549065ffffffffffff021916905550503373ffffffffffffffffffffffffffffffffffffffff167fdccc2d936ded24d2153d2760581a7f0dcb23ec71190c9726b3584cdd700214d484604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a2505b5050565b600081905060008165ffffffffffff161415612132576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f696e64657820213d2075696e742830290000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612296578273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461228f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f63757272656e7444656c6567617465203d3d2064656c6567617465000000000081525060200191505060405180910390fd5b505061257e565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900465ffffffffffff16905060405180606001604052808573ffffffffffffffffffffffffffffffffffffffff168152602001600065ffffffffffff1681526020018265ffffffffffff16815250600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008565ffffffffffff1665ffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001601a6101000a81548165ffffffffffff021916908365ffffffffffff16021790555090505082600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff16815260200190815260200160002060000160146101000a81548165ffffffffffff021916908365ffffffffffff16021790555082600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548165ffffffffffff021916908365ffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f2fd5b26f00131bd8ca0fc556207292b85a6bec241341df82724333227458e63085604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25050505b50565b606060008260ff1667ffffffffffffffff8111801561259f57600080fd5b506040519080825280602002602001820160405280156125ce5781602001602082028036833780820191505090505b509150600080808665ffffffffffff16141561263b57600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900465ffffffffffff1661263d565b855b90506126476138d0565b600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815260200160008201601a9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff168152505090505b600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16141580156127a957508560ff168360ff16105b15612928578060000151858460ff16815181106127c257fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508280600101935050600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000826040015165ffffffffffff1665ffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815260200160008201601a9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815250509050612763565b80600001519350828552505050935093915050565b6001602052826000526040600020602052816000526040600020818154811061296257fe5b90600052602060002001600092509250509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b6129d6613855565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160008201600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681526020016000820160189054906101000a900461ffff1661ffff1661ffff16815260200160008201601a9054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201601e9054906101000a900461ffff1661ffff1661ffff168152505090506000603c4281612b8957fe5b0490506000826040015161ffff16118015612bbe5750816040015161ffff16810363ffffffff16826060015163ffffffff1611155b15612c2457600082602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050816040015161ffff168260600151820363ffffffff1681612c0957fe5b068103826060019063ffffffff16908163ffffffff16815250505b509392505050565b60606000612c38610bfe565b905060007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b8230604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405160208183030381529060405280519060200120905060007f80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb60001b8b8b8b8b8b8b8b604051602001808981526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff168152602001856bffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018261ffff16815260200198505050505050505050604051602081830303815290604052805190602001209050601960f81b600160f81b838360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040529350505050979650505050505050565b806000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060408201518160000160186101000a81548161ffff021916908361ffff160217905550606082015181600001601a6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001601e6101000a81548161ffff021916908361ffff16021790555090505050505050565b6000612fe98484613524565b90508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156130d457508073ffffffffffffffffffffffffffffffffffffffff16600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008365ffffffffffff1665ffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b613129576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260598152602001806139546059913960600191505060405180910390fd5b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156132be578373ffffffffffffffffffffffffffffffffffffffff1663468721a7838360006040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff168152602001806020018360018111156131d857fe5b8152602001828103825260008152602001602001945050505050602060405180830381600087803b15801561320c57600080fd5b505af1158015613220573d6000803e3d6000fd5b505050506040513d602081101561323657600080fd5b81019080805190602001909291905050506132b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f742065786563757465206574686572207472616e7366657281525060200191505060405180910390fd5b61351e565b60608282604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff168152602001925050506040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090508473ffffffffffffffffffffffffffffffffffffffff1663468721a78560008460006040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018360018111156133e357fe5b8152602001828103825284818151815260200191508051906020019080838360005b83811015613420578082015181840152602081019050613405565b50505050905090810190601f16801561344d5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561346f57600080fd5b505af1158015613483573d6000803e3d6000fd5b505050506040513d602081101561349957600080fd5b810190808051906020019092919050505061351c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74206578656375746520746f6b656e207472616e7366657281525060200191505060405180910390fd5b505b50505050565b6000808351141561353757339050613820565b60418351146135ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f7369676e6174757265732e6c656e677468203d3d20363500000000000000000081525060200191505060405180910390fd5b60008060006135be866000613826565b80935081945082955050505060008360ff161415613627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806139e76034913960400191505060405180910390fd5b60018360ff16141561363b57339350613779565b601e8360ff16111561370a576001858051906020012060405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012060048503848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156136f9573d6000803e3d6000fd5b505050602060405103519350613778565b6001858051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561376b573d6000803e3d6000fd5b5050506020604051035193505b5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561381c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f6f776e657220213d20616464726573732830290000000000000000000000000081525060200191505060405180910390fd5b5050505b92915050565b60008060008360410260208101860151925060408101860151915060ff60418201870151169350509250925092565b6040518060a0016040528060006bffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff168152602001600061ffff168152602001600063ffffffff168152602001600061ffff1681525090565b6040518060a00160405280600590602082028036833780820191505090505090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff168152509056fe64656c6567617465735b6d73672e73656e6465725d5b75696e7434382864656c6567617465295d2e64656c6567617465203d3d2064656c6567617465657870656374656444656c6567617465203d3d207369676e65722026262064656c6567617465735b616464726573732873616665295d5b75696e743438287369676e6572295d2e64656c6567617465203d3d207369676e65726e65775370656e74203e20616c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d20616c6c6f77616e63652e616d6f756e74436f6e7472616374207369676e61747572657320617265206e6f7420737570706f727465642062792074686973206d6f64756c656e65775370656e74203e207061796d656e74416c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d207061796d656e74416c6c6f77616e63652e616d6f756e74a26469706673582212208a2846ee32dc079a0bad3b0fd56b368cddc175a616dcdd81307e8555c23d4e6464736f6c63430007010033",
+ "immutableReferences": {},
+ "sourceMap": "648:17265:0:-:0;;;;;;;;;;;;;;;;;;;",
+ "deployedSourceMap": "648:17265:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;801:118;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1592:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;9986:219;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1023:120;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7570:2353;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6536:419;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;14011:136;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14153:427;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;700:48;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1337:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3430:1390;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5985:303;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1690:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11015:366;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;15781:1365;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;14680:773;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;17152:759;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1465:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;754:40;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;801:118;853:66;801:118;;;:::o;1592:48::-;;;;;;;;;;;;;;;;;;;;;;:::o;9986:219::-;10029:7;10048:10;10161:9;10155:15;;10196:2;10189:9;;;9986:219;:::o;1023:120::-;1077:66;1023:120;;;:::o;7570:2353::-;7867:26;;:::i;:::-;7896:44;7917:4;7924:8;7934:5;7896:12;:44::i;:::-;7867:73;;7950:29;7982:98;8015:4;8022:5;8029:2;8033:6;8041:12;8055:7;8064:9;:15;;;7982:24;:98::i;:::-;7950:130;;8151:1;8133:9;:15;;;:19;8115:9;:15;;:37;;;;;;;;;;;8162:15;8198:6;8180:9;:15;;;:24;8162:42;;8280:9;:15;;;8269:26;;:8;:26;;;:58;;;;;8311:9;:16;;;8299:28;;:8;:28;;;;8269:58;8261:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8418:8;8400:9;:15;;:26;;;;;;;;;;;8450:1;8440:7;:11;;;8436:748;;;8543:33;;:::i;:::-;8595:5;8579:21;;:12;:21;;;:87;;8615:51;8636:4;8643:8;8653:12;8615;:51::i;:::-;8579:87;;;8603:9;8579:87;8543:123;;8716:7;8691:16;:22;;;:32;8680:43;;8807:16;:22;;;8796:33;;:8;:33;;;:72;;;;;8845:16;:23;;;8833:35;;:8;:35;;;;8796:72;8788:157;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8984:8;8959:16;:22;;:33;;;;;;;;;;;9094:5;9078:21;;:12;:21;;;9074:99;;9101:72;9125:4;9132:8;9142:12;9156:16;9101:15;:72::i;:::-;9074:99;8436:748;;9193:58;9217:4;9224:8;9234:5;9241:9;9193:15;:58::i;:::-;9330:59;9345:8;9355:9;9366:16;9384:4;9330:14;:59::i;:::-;9414:1;9404:7;:11;;;9400:344;;;9525:48;9534:4;9540:12;9554:9;9565:7;9525:8;:48::i;:::-;9683:4;9654:79;;;9690:8;9700:12;9714:9;9725:7;9654:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9400:344;9779:33;9788:4;9794:5;9801:2;9805:6;9779:8;:33::i;:::-;9860:4;9827:89;;;9867:8;9877:5;9884:2;9888:6;9914:1;9896:9;:15;;;:19;9827:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7570:2353;;;;;;;;;;;:::o;6536:419::-;6623:26;;:::i;:::-;6652:41;6665:10;6677:8;6687:5;6652:12;:41::i;:::-;6623:70;;6722:1;6703:9;:16;;:20;;;;;;;;;;;6751:1;6733:9;:15;;:19;;;;;;;;;;;6787:1;6762:9;:22;;:26;;;;;;;;;;;6823:1;6798:9;:22;;:26;;;;;;;;;;;6834:55;6850:10;6862:8;6872:5;6879:9;6834:15;:55::i;:::-;6920:10;6904:44;;;6932:8;6942:5;6904:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;6536:419;;;:::o;14011:136::-;14083:16;14118:6;:12;14125:4;14118:12;;;;;;;;;;;;;;;:22;14131:8;14118:22;;;;;;;;;;;;;;;14111:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14011:136;;;;:::o;14153:427::-;14248:17;;:::i;:::-;14277:26;;:::i;:::-;14306:35;14319:4;14325:8;14335:5;14306:12;:35::i;:::-;14277:64;;14351:222;;;;;;;;14380:9;:16;;;14372:25;;14351:222;;;;14419:9;:15;;;14411:24;;14351:222;;;;14457:9;:22;;;14449:31;;14351:222;;;;14502:9;:22;;;14494:31;;14351:222;;;;14547:9;:15;;;14539:24;;14351:222;;;;;;14153:427;;;;;:::o;700:48::-;;;;;;;;;;;;;;;;;;;:::o;1337:88::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3430:1390::-;3608:1;3588:22;;:8;:22;;;;3580:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3707:8;3655:60;;:9;:21;3665:10;3655:21;;;;;;;;;;;;;;;:39;3684:8;3655:39;;;;;;;;;;;;;;;:48;;;;;;;;;;;;:60;;;3647:133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3790:26;;:::i;:::-;3819:41;3832:10;3844:8;3854:5;3819:12;:41::i;:::-;3790:70;;3893:1;3874:9;:15;;;:20;;;3870:210;;;4014:1;3996:9;:15;;:19;;;;;;;;;;;4029:6;:18;4036:10;4029:18;;;;;;;;;;;;;;;:28;4048:8;4029:28;;;;;;;;;;;;;;;4063:5;4029:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3870:210;4206:17;4251:2;4233:15;:20;;;;;;4206:48;;4283:1;4268:12;:16;;;4264:307;;;4324:10;4308:26;;:12;:26;;;;4300:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4448:12;4418:42;;4432:12;4419:10;:25;4418:42;;;;;;;;4404:10;:57;4379:9;:22;;:82;;;;;;;;;;;4264:307;;;4508:1;4482:9;:22;;;:27;;;4478:93;;;4550:10;4525:9;:22;;:35;;;;;;;;;;;4478:93;4264:307;4605:12;4580:9;:22;;:37;;;;;;;;;;;4646:15;4627:9;:16;;:34;;;;;;;;;;;4671:55;4687:10;4699:8;4709:5;4716:9;4671:15;:55::i;:::-;4754:10;4741:72;;;4766:8;4776:5;4783:15;4800:12;4741:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3430:1390;;;;;;;:::o;5985:303::-;6059:26;;:::i;:::-;6088:41;6101:10;6113:8;6123:5;6088:12;:41::i;:::-;6059:70;;6157:1;6139:9;:15;;:19;;;;;;;;;;;6168:55;6184:10;6196:8;6206:5;6213:9;6168:15;:55::i;:::-;6253:10;6238:43;;;6265:8;6275:5;6238:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;5985:303;;;:::o;1690:65::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;11015:366::-;11236:7;11272:101;11310:4;11316:5;11323:2;11327:6;11335:12;11349:7;11358:5;11272:24;:101::i;:::-;11262:112;;;;;;11255:119;;11015:366;;;;;;;;;:::o;15781:1365::-;15863:23;;:::i;:::-;15889:9;:21;15899:10;15889:21;;;;;;;;;;;;;;;:39;15918:8;15889:39;;;;;;;;;;;;;;;15863:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16019:1;15991:30;;:7;:16;;;:30;;;15988:42;;;16023:7;;;15988:42;16043:16;16039:698;;;16075:32;16110:6;:18;16117:10;16110:18;;;;;;;;;;;;;;;:28;16129:8;16110:28;;;;;;;;;;;;;;;16075:63;;16157:9;16152:575;16176:14;:21;;;;16172:1;:25;16152:575;;;16222:13;16238:14;16253:1;16238:17;;;;;;;;;;;;;;;;;;;;;;;;;16222:33;;16339:26;;:::i;:::-;16368:41;16381:10;16393:8;16403:5;16368:12;:41::i;:::-;16339:70;;16446:1;16427:9;:16;;:20;;;;;;;;;;;16483:1;16465:9;:15;;:19;;;;;;;;;;;16527:1;16502:9;:22;;:26;;;;;;;;;;;16571:1;16546:9;:22;;:26;;;;;;;;;;;16590:55;16606:10;16618:8;16628:5;16635:9;16590:15;:55::i;:::-;16684:10;16668:44;;;16696:8;16706:5;16668:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;16152:575;;16199:3;;;;;;;16152:575;;;;16039:698;;16766:1;16750:7;:12;;;:17;;;16746:175;;;16812:7;:12;;;16783:14;:26;16798:10;16783:26;;;;;;;;;;;;;;;;:41;;;;;;;;;;;;;;;;;;16746:175;;;16898:7;:12;;;16855:9;:21;16865:10;16855:21;;;;;;;;;;;;;;;:35;16877:7;:12;;;16855:35;;;;;;;;;;;;;;;:40;;;:55;;;;;;;;;;;;;;;;;;16746:175;16950:1;16934:7;:12;;;:17;;;16930:103;;17010:7;:12;;;16967:9;:21;16977:10;16967:21;;;;;;;;;;;;;;;:35;16989:7;:12;;;16967:35;;;;;;;;;;;;;;;:40;;;:55;;;;;;;;;;;;;;;;;;16930:103;17049:9;:21;17059:10;17049:21;;;;;;;;;;;;;;;:39;17078:8;17049:39;;;;;;;;;;;;;;;;17042:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17118:10;17103:36;;;17130:8;17103:36;;;;;;;;;;;;;;;;;;;;15781:1365;;;;:::o;14680:773::-;14736:12;14758:8;14736:31;;14799:1;14785:5;:16;;;;14777:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14832:23;14858:9;:21;14868:10;14858:21;;;;;;;;;;;;;;;:28;14880:5;14858:28;;;;;;;;;;;;;;;:37;;;;;;;;;;;;14832:63;;14935:1;14908:29;;:15;:29;;;14905:264;;15044:8;15025:27;;:15;:27;;;15017:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15152:7;;;;14905:264;15178:17;15198:14;:26;15213:10;15198:26;;;;;;;;;;;;;;;;;;;;;;;;;15178:46;;15265:33;;;;;;;;15274:8;15265:33;;;;;;15284:1;15265:33;;;;;;15287:10;15265:33;;;;;15234:9;:21;15244:10;15234:21;;;;;;;;;;;;;;;:28;15256:5;15234:28;;;;;;;;;;;;;;;:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15349:5;15308:9;:21;15318:10;15308:21;;;;;;;;;;;;;;;:33;15330:10;15308:33;;;;;;;;;;;;;;;:38;;;:46;;;;;;;;;;;;;;;;;;15393:5;15364:14;:26;15379:10;15364:26;;;;;;;;;;;;;;;;:34;;;;;;;;;;;;;;;;;;15425:10;15413:33;;;15437:8;15413:33;;;;;;;;;;;;;;;;;;;;14680:773;;;;;:::o;17152:759::-;17239:24;17265:11;17312:8;17298:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17288:33;;17331:7;17352:19;17384:1;17375:5;:10;;;;17374:43;;17397:14;:20;17412:4;17397:20;;;;;;;;;;;;;;;;;;;;;;;;;17374:43;;;17389:5;17374:43;17352:65;;17427:23;;:::i;:::-;17453:9;:15;17463:4;17453:15;;;;;;;;;;;;;;;:29;17469:12;17453:29;;;;;;;;;;;;;;;17427:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17492:178;17526:1;17498:30;;:7;:16;;;:30;;;;:46;;;;;17536:8;17532:12;;:1;:12;;;17498:46;17492:178;;;17573:7;:16;;;17560:7;17568:1;17560:10;;;;;;;;;;;;;;;:29;;;;;;;;;;;17603:3;;;;;;;17630:9;:15;17640:4;17630:15;;;;;;;;;;;;;;;:29;17646:7;:12;;;17630:29;;;;;;;;;;;;;;;17620:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17492:178;;;17693:7;:16;;;17679:31;;17893:1;17884:7;17877:18;17863:42;;;;;;;;;:::o;1465:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;754:40::-;;;;;;;;;;;;;;;;;;;:::o;4826:786::-;4917:26;;:::i;:::-;4967:10;:16;4978:4;4967:16;;;;;;;;;;;;;;;:26;4984:8;4967:26;;;;;;;;;;;;;;;:33;4994:5;4967:33;;;;;;;;;;;;;;;4955:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5072:17;5117:2;5099:15;:20;;;;;;5072:48;;5257:1;5232:9;:22;;;:26;;;:91;;;;;5301:9;:22;;;5288:35;;:10;:35;5262:61;;:9;:22;;;:61;;;;5232:91;5228:352;;;5357:1;5339:9;:15;;:19;;;;;;;;;;;5546:9;:22;;;5506:62;;5520:9;:22;;;5507:10;:35;5506:62;;;;;;;;5492:10;:77;5467:9;:22;;:102;;;;;;;;;;;5228:352;5589:16;4826:786;;;;;:::o;10288:634::-;10514:12;10538:15;10556:12;:10;:12::i;:::-;10538:30;;10578:23;853:66;10625:25;;10652:7;10661:4;10614:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10604:63;;;;;;10578:89;;10677:20;1077:66;10734:27;;10763:4;10769:5;10776:2;10780:6;10788:12;10802:7;10811:5;10723:94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10700:127;;;;;;10677:150;;10866:4;10861:10;;10878:4;10873:10;;10885:15;10902:12;10844:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10837:78;;;;;10288:634;;;;;;;;;:::o;5618:170::-;5772:9;5736:10;:16;5747:4;5736:16;;;;;;;;;;;;;;;:26;5753:8;5736:26;;;;;;;;;;;;;;;:33;5763:5;5736:33;;;;;;;;;;;;;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5618:170;;;;:::o;11387:449::-;11532:14;11549:45;11566:9;11577:16;11549;:45::i;:::-;11532:62;;11645:6;11625:26;;:16;:26;;;:89;;;;;11708:6;11655:59;;:9;:24;11673:4;11655:24;;;;;;;;;;;;;;;:40;11687:6;11655:40;;;;;;;;;;;;;;;:49;;;;;;;;;;;;:59;;;11625:89;11604:225;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11387:449;;;;;:::o;13436:569::-;13560:1;13543:19;;:5;:19;;;13539:460;;;13643:4;:30;;;13674:2;13678:6;13690:19;13643:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13635:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13539:460;;;13778:17;13851:2;13855:6;13798:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13778:84;;13884:4;:30;;;13915:5;13922:1;13925:4;13931:19;13884:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13876:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13539:460;;13436:569;;;;:::o;11979:1451::-;12082:13;12198:1;12178:9;:16;:21;12174:44;;;12208:10;12201:17;;;;12174:44;12346:2;12326:9;:16;:22;12318:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12386:7;12403:9;12422;12453:28;12468:9;12479:1;12453:14;:28::i;:::-;12441:40;;;;;;;;;;;;12553:1;12548;:6;;;12544:748;;;12570:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12544:748;12658:1;12653;:6;;;12649:643;;;12801:10;12793:18;;12649:643;;;12836:2;12832:1;:6;;;12828:464;;;13010:116;13093:16;13083:27;;;;;;13030:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13020:92;;;;;;13118:1;13114;:5;13121:1;13124;13010:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13002:124;;12828:464;;;13234:47;13254:16;13244:27;;;;;;13273:1;13276;13279;13234:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13226:55;;12828:464;12649:643;13397:1;13380:19;;:5;:19;;;;13372:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11979:1451;;;;;;;;:::o;1264:921:3:-;1373:7;1382:9;1393;1693:3;1687:4;1683:14;1755:4;1741:12;1737:23;1725:10;1721:40;1715:47;1710:52;;1820:4;1806:12;1802:23;1790:10;1786:40;1780:47;1775:52;;2164:4;2155;2141:12;2137:23;2125:10;2121:40;2115:47;2111:58;2106:63;;1649:530;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o",
+ "source": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.8.0;\n\nimport \"./Enum.sol\";\nimport \"./SignatureDecoder.sol\";\n\ninterface GnosisSafe {\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModule(address to, uint256 value, bytes calldata data, Enum.Operation operation)\n external\n returns (bool success);\n}\n\ncontract AllowanceModule is SignatureDecoder {\n\n string public constant NAME = \"Allowance Module\";\n string public constant VERSION = \"0.1.0\";\n\n bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n // keccak256(\n // \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n // );\n\n bytes32 public constant ALLOWANCE_TRANSFER_TYPEHASH = 0x80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb;\n // keccak256(\n // \"AllowanceTransfer(address safe,address token,uint96 amount,address paymentToken,uint96 payment,uint16 nonce)\"\n // );\n\n // Safe -> Delegate -> Allowance\n mapping(address => mapping (address => mapping(address => Allowance))) public allowances;\n // Safe -> Delegate -> Tokens\n mapping(address => mapping (address => address[])) public tokens;\n // Safe -> Delegates double linked list entry points\n mapping(address => uint48) public delegatesStart;\n // Safe -> Delegates double linked list\n mapping(address => mapping (uint48 => Delegate)) public delegates;\n\n // We use a double linked list for the delegates. The id is the first 6 bytes. \n // To double check the address in case of collision, the address is part of the struct.\n struct Delegate {\n address delegate;\n uint48 prev;\n uint48 next;\n }\n\n // The allowance info is optimized to fit into one word of storage.\n struct Allowance {\n uint96 amount;\n uint96 spent;\n uint16 resetTimeMin; // Maximum reset time span is 65k minutes\n uint32 lastResetMin;\n uint16 nonce;\n }\n\n event AddDelegate(address indexed safe, address delegate);\n event RemoveDelegate(address indexed safe, address delegate);\n event ExecuteAllowanceTransfer(address indexed safe, address delegate, address token, address to, uint96 value, uint16 nonce);\n event PayAllowanceTransfer(address indexed safe, address delegate, address paymentToken, address paymentReceiver, uint96 payment);\n event SetAllowance(address indexed safe, address delegate, address token, uint96 allowanceAmount, uint16 resetTime);\n event ResetAllowance(address indexed safe, address delegate, address token);\n event DeleteAllowance(address indexed safe, address delegate, address token);\n\n /// @dev Allows to update the allowance for a specified token. This can only be done via a Safe transaction.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param token Token contract address.\n /// @param allowanceAmount allowance in smallest token unit.\n /// @param resetTimeMin Time after which the allowance should reset\n /// @param resetBaseMin Time based on which the reset time should be increased\n function setAllowance(address delegate, address token, uint96 allowanceAmount, uint16 resetTimeMin, uint32 resetBaseMin)\n public\n {\n require(delegate != address(0), \"delegate != address(0)\");\n require(delegates[msg.sender][uint48(delegate)].delegate == delegate, \"delegates[msg.sender][uint48(delegate)].delegate == delegate\");\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n if (allowance.nonce == 0) { // New token\n // Nonce should never be 0 once allowance has been activated\n allowance.nonce = 1;\n tokens[msg.sender][delegate].push(token);\n }\n // Divide by 60 to get current time in minutes\n // solium-disable-next-line security/no-block-members\n uint32 currentMin = uint32(block.timestamp / 60);\n if (resetBaseMin > 0) {\n require(resetBaseMin <= currentMin, \"resetBaseMin <= currentMin\");\n allowance.lastResetMin = currentMin - ((currentMin - resetBaseMin) % resetTimeMin);\n } else if (allowance.lastResetMin == 0) {\n allowance.lastResetMin = currentMin;\n }\n allowance.resetTimeMin = resetTimeMin;\n allowance.amount = allowanceAmount;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit SetAllowance(msg.sender, delegate, token, allowanceAmount, resetTimeMin);\n }\n\n function getAllowance(address safe, address delegate, address token) private view returns (Allowance memory allowance) {\n allowance = allowances[safe][delegate][token];\n // solium-disable-next-line security/no-block-members\n uint32 currentMin = uint32(block.timestamp / 60);\n // Check if we should reset the time. We do this on load to minimize storage read/ writes\n if (allowance.resetTimeMin > 0 && allowance.lastResetMin <= currentMin - allowance.resetTimeMin) {\n allowance.spent = 0;\n // Resets happen in regular intervals and `lastResetMin` should be aligned to that\n allowance.lastResetMin = currentMin - ((currentMin - allowance.lastResetMin) % allowance.resetTimeMin);\n }\n return allowance;\n }\n\n function updateAllowance(address safe, address delegate, address token, Allowance memory allowance) private {\n allowances[safe][delegate][token] = allowance;\n }\n\n /// @dev Allows to reset the allowance for a specific delegate and token.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param token Token contract address.\n function resetAllowance(address delegate, address token) public {\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n allowance.spent = 0;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit ResetAllowance(msg.sender, delegate, token);\n }\n\n /// @dev Allows to remove the allowance for a specific delegate and token. This will set all values except the `nonce` to 0.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param token Token contract address.\n function deleteAllowance(address delegate, address token)\n public\n {\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n allowance.amount = 0;\n allowance.spent = 0;\n allowance.resetTimeMin = 0;\n allowance.lastResetMin = 0;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit DeleteAllowance(msg.sender, delegate, token);\n }\n\n /// @dev Allows to use the allowance to perform a transfer.\n /// @param safe The Safe whose funds should be used.\n /// @param token Token contract address.\n /// @param to Address that should receive the tokens.\n /// @param amount Amount that should be transferred.\n /// @param paymentToken Token that should be used to pay for the execution of the transfer.\n /// @param payment Amount to should be paid for executing the transfer.\n /// @param delegate Delegate whose allowance should be updated.\n /// @param signature Signature generated by the delegate to authorize the transfer.\n function executeAllowanceTransfer(\n GnosisSafe safe,\n address token,\n address payable to,\n uint96 amount,\n address paymentToken,\n uint96 payment,\n address delegate,\n bytes memory signature\n ) public {\n // Get current state\n Allowance memory allowance = getAllowance(address(safe), delegate, token);\n bytes memory transferHashData = generateTransferHashData(address(safe), token, to, amount, paymentToken, payment, allowance.nonce);\n\n // Update state\n allowance.nonce = allowance.nonce + 1;\n uint96 newSpent = allowance.spent + amount;\n // Check new spent amount and overflow\n require(newSpent > allowance.spent && newSpent <= allowance.amount, \"newSpent > allowance.spent && newSpent <= allowance.amount\");\n allowance.spent = newSpent;\n if (payment > 0) {\n // Use updated allowance if token and paymentToken are the same\n Allowance memory paymentAllowance = paymentToken == token ? allowance : getAllowance(address(safe), delegate, paymentToken);\n newSpent = paymentAllowance.spent + payment;\n // Check new spent amount and overflow\n require(newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount, \"newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount\");\n paymentAllowance.spent = newSpent;\n // Update payment allowance if different from allowance\n if (paymentToken != token) updateAllowance(address(safe), delegate, paymentToken, paymentAllowance);\n }\n updateAllowance(address(safe), delegate, token, allowance);\n\n // Perform external interactions\n // Check signature\n checkSignature(delegate, signature, transferHashData, safe);\n\n if (payment > 0) {\n // Transfer payment\n // solium-disable-next-line security/no-tx-origin\n transfer(safe, paymentToken, tx.origin, payment);\n // solium-disable-next-line security/no-tx-origin\n emit PayAllowanceTransfer(address(safe), delegate, paymentToken, tx.origin, payment);\n }\n // Transfer token\n transfer(safe, token, to, amount);\n emit ExecuteAllowanceTransfer(address(safe), delegate, token, to, amount, allowance.nonce - 1);\n }\n\n /// @dev Returns the chain id used by this contract.\n function getChainId() public pure returns (uint256) {\n uint256 id;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n id := chainid()\n }\n return id;\n }\n\n /// @dev Generates the data for the transfer hash (required for signing)\n function generateTransferHashData(\n address safe,\n address token,\n address to,\n uint96 amount,\n address paymentToken,\n uint96 payment,\n uint16 nonce\n ) private view returns (bytes memory) {\n uint256 chainId = getChainId();\n bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, chainId, this));\n bytes32 transferHash = keccak256(\n abi.encode(ALLOWANCE_TRANSFER_TYPEHASH, safe, token, to, amount, paymentToken, payment, nonce)\n );\n return abi.encodePacked(byte(0x19), byte(0x01), domainSeparator, transferHash);\n }\n\n /// @dev Generates the transfer hash that should be signed to authorize a transfer\n function generateTransferHash(\n address safe,\n address token,\n address to,\n uint96 amount,\n address paymentToken,\n uint96 payment,\n uint16 nonce\n ) public view returns (bytes32) {\n return keccak256(generateTransferHashData(\n safe, token, to, amount, paymentToken, payment, nonce\n ));\n }\n\n function checkSignature(address expectedDelegate, bytes memory signature, bytes memory transferHashData, GnosisSafe safe) private view {\n address signer = recoverSignature(signature, transferHashData);\n require(\n expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer,\n \"expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer\"\n );\n }\n\n // We use the same format as used for the Safe contract, except that we only support exactly 1 signature and no contract signatures.\n function recoverSignature(bytes memory signature, bytes memory transferHashData) private view returns (address owner) {\n // If there is no signature data msg.sender should be used\n if (signature.length == 0) return msg.sender;\n // Check that the provided signature data is as long as 1 encoded ecsda signature\n require(signature.length == 65, \"signatures.length == 65\");\n uint8 v;\n bytes32 r;\n bytes32 s;\n (v, r, s) = signatureSplit(signature, 0);\n // If v is 0 then it is a contract signature\n if (v == 0) {\n revert(\"Contract signatures are not supported by this module\");\n } else if (v == 1) {\n // If v is 1 we also use msg.sender, this is so that we are compatible to the GnosisSafe signature scheme\n owner = msg.sender;\n } else if (v > 30) {\n // To support eth_sign and similar we adjust v and hash the transferHashData with the Ethereum message prefix before applying ecrecover\n owner = ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", keccak256(transferHashData))), v - 4, r, s);\n } else {\n // Use ecrecover with the messageHash for EOA signatures\n owner = ecrecover(keccak256(transferHashData), v, r, s);\n }\n // 0 for the recovered owner indicates that an error happened.\n require(owner != address(0), \"owner != address(0)\");\n }\n\n function transfer(GnosisSafe safe, address token, address payable to, uint96 amount) private {\n if (token == address(0)) {\n // solium-disable-next-line security/no-send\n require(safe.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(safe.execTransactionFromModule(token, 0, data, Enum.Operation.Call), \"Could not execute token transfer\");\n }\n }\n\n function getTokens(address safe, address delegate) public view returns (address[] memory) {\n return tokens[safe][delegate];\n }\n\n function getTokenAllowance(address safe, address delegate, address token) public view returns (uint256[5] memory) {\n Allowance memory allowance = getAllowance(safe, delegate, token);\n return [\n uint256(allowance.amount),\n uint256(allowance.spent),\n uint256(allowance.resetTimeMin),\n uint256(allowance.lastResetMin),\n uint256(allowance.nonce)\n ];\n }\n\n /// @dev Allows to add a delegate.\n /// @param delegate Delegate that should be added.\n function addDelegate(address delegate) public {\n uint48 index = uint48(delegate);\n require(index != uint(0), \"index != uint(0)\");\n address currentDelegate = delegates[msg.sender][index].delegate;\n if(currentDelegate != address(0)) {\n // We have a collision for the indices of delegates\n require(currentDelegate == delegate, \"currentDelegate == delegate\");\n // Delegate already exists, nothing to do\n return;\n }\n uint48 startIndex = delegatesStart[msg.sender];\n delegates[msg.sender][index] = Delegate(delegate, 0, startIndex);\n delegates[msg.sender][startIndex].prev = index;\n delegatesStart[msg.sender] = index;\n emit AddDelegate(msg.sender, delegate);\n }\n\n /// @dev Allows to remove a delegate.\n /// @param delegate Delegate that should be removed.\n /// @param removeAllowances Indicator if allowances should also be removed. This should be set to `true` unless this causes an out of gas, in this case the allowances should be \"manually\" deleted via `deleteAllowance`.\n function removeDelegate(address delegate, bool removeAllowances) public {\n Delegate memory current = delegates[msg.sender][uint48(delegate)];\n // Delegate doesn't exists, nothing to do\n if(current.delegate == address(0)) return;\n if (removeAllowances) {\n address[] storage delegateTokens = tokens[msg.sender][delegate];\n for (uint256 i = 0; i < delegateTokens.length; i++) {\n address token = delegateTokens[i];\n // Set all allowance params except the nonce to 0\n Allowance memory allowance = getAllowance(msg.sender, delegate, token);\n allowance.amount = 0;\n allowance.spent = 0;\n allowance.resetTimeMin = 0;\n allowance.lastResetMin = 0;\n updateAllowance(msg.sender, delegate, token, allowance);\n emit DeleteAllowance(msg.sender, delegate, token);\n }\n }\n if (current.prev == 0) {\n delegatesStart[msg.sender] = current.next;\n } else {\n delegates[msg.sender][current.prev].next = current.next;\n }\n if (current.next != 0) {\n delegates[msg.sender][current.next].prev = current.prev;\n }\n delete delegates[msg.sender][uint48(delegate)];\n emit RemoveDelegate(msg.sender, delegate);\n }\n\n function getDelegates(address safe, uint48 start, uint8 pageSize) public view returns (address[] memory results, uint48 next) {\n results = new address[](pageSize);\n uint8 i = 0;\n uint48 initialIndex = (start != 0) ? start : delegatesStart[safe];\n Delegate memory current = delegates[safe][initialIndex];\n while(current.delegate != address(0) && i < pageSize) {\n results[i] = current.delegate;\n i++;\n current = delegates[safe][current.next];\n }\n next = uint48(current.delegate);\n // Set the length of the array the number that has been used.\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n mstore(results, i)\n }\n }\n}",
+ "sourcePath": "/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/AlowanceModule.sol",
+ "ast": {
+ "absolutePath": "/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/AlowanceModule.sol",
+ "exportedSymbols": {
+ "AllowanceModule": [
+ 1428
+ ],
+ "GnosisSafe": [
+ 18
+ ]
+ },
+ "id": 1429,
+ "license": "LGPL-3.0-only",
+ "nodeType": "SourceUnit",
+ "nodes": [
+ {
+ "id": 1,
+ "literals": [
+ "solidity",
+ ">=",
+ "0.7",
+ ".0",
+ "<",
+ "0.8",
+ ".0"
+ ],
+ "nodeType": "PragmaDirective",
+ "src": "42:31:0"
+ },
+ {
+ "absolutePath": "/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/Enum.sol",
+ "file": "./Enum.sol",
+ "id": 2,
+ "nodeType": "ImportDirective",
+ "scope": 1429,
+ "sourceUnit": 1436,
+ "src": "75:20:0",
+ "symbolAliases": [],
+ "unitAlias": ""
+ },
+ {
+ "absolutePath": "/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/SignatureDecoder.sol",
+ "file": "./SignatureDecoder.sol",
+ "id": 3,
+ "nodeType": "ImportDirective",
+ "scope": 1429,
+ "sourceUnit": 1552,
+ "src": "96:32:0",
+ "symbolAliases": [],
+ "unitAlias": ""
+ },
+ {
+ "abstract": false,
+ "baseContracts": [],
+ "contractDependencies": [],
+ "contractKind": "interface",
+ "fullyImplemented": false,
+ "id": 18,
+ "linearizedBaseContracts": [
+ 18
+ ],
+ "name": "GnosisSafe",
+ "nodeType": "ContractDefinition",
+ "nodes": [
+ {
+ "documentation": {
+ "id": 4,
+ "nodeType": "StructuredDocumentation",
+ "src": "157:325:0",
+ "text": "@dev Allows a Module to execute a Safe transaction without any further confirmations.\n @param to Destination address of module transaction.\n @param value Ether value of module transaction.\n @param data Data payload of module transaction.\n @param operation Operation type of module transaction."
+ },
+ "functionSelector": "468721a7",
+ "id": 17,
+ "implemented": false,
+ "kind": "function",
+ "modifiers": [],
+ "name": "execTransactionFromModule",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 13,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 6,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "522:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 5,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "522:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 8,
+ "mutability": "mutable",
+ "name": "value",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "534:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 7,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "534:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 10,
+ "mutability": "mutable",
+ "name": "data",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "549:19:0",
+ "stateVariable": false,
+ "storageLocation": "calldata",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_calldata_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 9,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "549:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 12,
+ "mutability": "mutable",
+ "name": "operation",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "570:24:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ },
+ "typeName": {
+ "id": 11,
+ "name": "Enum.Operation",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 1434,
+ "src": "570:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "521:74:0"
+ },
+ "returnParameters": {
+ "id": 16,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 15,
+ "mutability": "mutable",
+ "name": "success",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "630:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "typeName": {
+ "id": 14,
+ "name": "bool",
+ "nodeType": "ElementaryTypeName",
+ "src": "630:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "629:14:0"
+ },
+ "scope": 18,
+ "src": "487:157:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "external"
+ }
+ ],
+ "scope": 1429,
+ "src": "130:516:0"
+ },
+ {
+ "abstract": false,
+ "baseContracts": [
+ {
+ "baseName": {
+ "id": 19,
+ "name": "SignatureDecoder",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 1551,
+ "src": "676:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_SignatureDecoder_$1551",
+ "typeString": "contract SignatureDecoder"
+ }
+ },
+ "id": 20,
+ "nodeType": "InheritanceSpecifier",
+ "src": "676:16:0"
+ }
+ ],
+ "contractDependencies": [
+ 1551
+ ],
+ "contractKind": "contract",
+ "fullyImplemented": true,
+ "id": 1428,
+ "linearizedBaseContracts": [
+ 1428,
+ 1551
+ ],
+ "name": "AllowanceModule",
+ "nodeType": "ContractDefinition",
+ "nodes": [
+ {
+ "constant": true,
+ "functionSelector": "a3f4df7e",
+ "id": 23,
+ "mutability": "constant",
+ "name": "NAME",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "700:48:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_memory_ptr",
+ "typeString": "string"
+ },
+ "typeName": {
+ "id": 21,
+ "name": "string",
+ "nodeType": "ElementaryTypeName",
+ "src": "700:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_storage_ptr",
+ "typeString": "string"
+ }
+ },
+ "value": {
+ "hexValue": "416c6c6f77616e6365204d6f64756c65",
+ "id": 22,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "730:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_08f58094bad74d8c1150a9739fed54fd2f5fa3e2ab1381a21213c5b33d83bad3",
+ "typeString": "literal_string \"Allowance Module\""
+ },
+ "value": "Allowance Module"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": true,
+ "functionSelector": "ffa1ad74",
+ "id": 26,
+ "mutability": "constant",
+ "name": "VERSION",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "754:40:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_memory_ptr",
+ "typeString": "string"
+ },
+ "typeName": {
+ "id": 24,
+ "name": "string",
+ "nodeType": "ElementaryTypeName",
+ "src": "754:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_storage_ptr",
+ "typeString": "string"
+ }
+ },
+ "value": {
+ "hexValue": "302e312e30",
+ "id": 25,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "787:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_aa7cdbe2cce2ec7b606b0e199ddd9b264a6e645e767fb8479a7917dcd1b8693f",
+ "typeString": "literal_string \"0.1.0\""
+ },
+ "value": "0.1.0"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": true,
+ "functionSelector": "1db61b54",
+ "id": 29,
+ "mutability": "constant",
+ "name": "DOMAIN_SEPARATOR_TYPEHASH",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "801:118:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 27,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "801:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "value": {
+ "hexValue": "307834376537393533346132343539353265386231363839336133333662383561336439656139666138633537336633643830336166623932613739343639323138",
+ "id": 28,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "853:66:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_32523383700587834770323112271211932718128200013265661849047136999858837557784_by_1",
+ "typeString": "int_const 3252...(69 digits omitted)...7784"
+ },
+ "value": "0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": true,
+ "functionSelector": "43abf5fe",
+ "id": 32,
+ "mutability": "constant",
+ "name": "ALLOWANCE_TRANSFER_TYPEHASH",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1023:120:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 30,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "1023:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "value": {
+ "hexValue": "307838306230303632383039333230393465376363393635383633656235313138646330376535643237326336363730633461376338373239396530346663656562",
+ "id": 31,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "1077:66:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_58207052191903435170300093819667864394893463916847536691962682627702085635819_by_1",
+ "typeString": "int_const 5820...(69 digits omitted)...5819"
+ },
+ "value": "0x80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "b713c9d4",
+ "id": 40,
+ "mutability": "mutable",
+ "name": "allowances",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1337:88:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance)))"
+ },
+ "typeName": {
+ "id": 39,
+ "keyType": {
+ "id": 33,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1345:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1337:70:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance)))"
+ },
+ "valueType": {
+ "id": 38,
+ "keyType": {
+ "id": 34,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1365:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1356:50:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$",
+ "typeString": "mapping(address => mapping(address => struct AllowanceModule.Allowance))"
+ },
+ "valueType": {
+ "id": 37,
+ "keyType": {
+ "id": 35,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1384:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1376:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$",
+ "typeString": "mapping(address => struct AllowanceModule.Allowance)"
+ },
+ "valueType": {
+ "id": 36,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "1395:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ }
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "f56e81fa",
+ "id": 47,
+ "mutability": "mutable",
+ "name": "tokens",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1465:64:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[]))"
+ },
+ "typeName": {
+ "id": 46,
+ "keyType": {
+ "id": 41,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1473:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1465:50:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[]))"
+ },
+ "valueType": {
+ "id": 45,
+ "keyType": {
+ "id": 42,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1493:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1484:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[])"
+ },
+ "valueType": {
+ "baseType": {
+ "id": 43,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1504:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 44,
+ "nodeType": "ArrayTypeName",
+ "src": "1504:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "310a3bb1",
+ "id": 51,
+ "mutability": "mutable",
+ "name": "delegatesStart",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1592:48:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ },
+ "typeName": {
+ "id": 50,
+ "keyType": {
+ "id": 48,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1600:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1592:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ },
+ "valueType": {
+ "id": 49,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "1611:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "ce60c692",
+ "id": 57,
+ "mutability": "mutable",
+ "name": "delegates",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1690:65:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate))"
+ },
+ "typeName": {
+ "id": 56,
+ "keyType": {
+ "id": 52,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1698:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1690:48:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate))"
+ },
+ "valueType": {
+ "id": 55,
+ "keyType": {
+ "id": 53,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "1718:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1709:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate)"
+ },
+ "valueType": {
+ "id": 54,
+ "name": "Delegate",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 64,
+ "src": "1728:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ }
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "canonicalName": "AllowanceModule.Delegate",
+ "id": 64,
+ "members": [
+ {
+ "constant": false,
+ "id": 59,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 64,
+ "src": "1964:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 58,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1964:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 61,
+ "mutability": "mutable",
+ "name": "prev",
+ "nodeType": "VariableDeclaration",
+ "scope": 64,
+ "src": "1990:11:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 60,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "1990:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 63,
+ "mutability": "mutable",
+ "name": "next",
+ "nodeType": "VariableDeclaration",
+ "scope": 64,
+ "src": "2011:11:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 62,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "2011:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "name": "Delegate",
+ "nodeType": "StructDefinition",
+ "scope": 1428,
+ "src": "1938:91:0",
+ "visibility": "public"
+ },
+ {
+ "canonicalName": "AllowanceModule.Allowance",
+ "id": 75,
+ "members": [
+ {
+ "constant": false,
+ "id": 66,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2134:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 65,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2134:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 68,
+ "mutability": "mutable",
+ "name": "spent",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2157:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 67,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2157:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 70,
+ "mutability": "mutable",
+ "name": "resetTimeMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2179:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 69,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2179:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 72,
+ "mutability": "mutable",
+ "name": "lastResetMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2250:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 71,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "2250:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 74,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2279:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 73,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2279:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "name": "Allowance",
+ "nodeType": "StructDefinition",
+ "scope": 1428,
+ "src": "2107:191:0",
+ "visibility": "public"
+ },
+ {
+ "anonymous": false,
+ "id": 81,
+ "name": "AddDelegate",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 80,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 77,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 81,
+ "src": "2322:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 76,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2322:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 79,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 81,
+ "src": "2344:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 78,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2344:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2321:40:0"
+ },
+ "src": "2304:58:0"
+ },
+ {
+ "anonymous": false,
+ "id": 87,
+ "name": "RemoveDelegate",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 86,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 83,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 87,
+ "src": "2388:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 82,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2388:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 85,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 87,
+ "src": "2410:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 84,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2410:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2387:40:0"
+ },
+ "src": "2367:61:0"
+ },
+ {
+ "anonymous": false,
+ "id": 101,
+ "name": "ExecuteAllowanceTransfer",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 100,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 89,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2464:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 88,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2464:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 91,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2486:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 90,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2486:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 93,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2504:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 92,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2504:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 95,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2519:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 94,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2519:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 97,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "value",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2531:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 96,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2531:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 99,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2545:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 98,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2545:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2463:95:0"
+ },
+ "src": "2433:126:0"
+ },
+ {
+ "anonymous": false,
+ "id": 113,
+ "name": "PayAllowanceTransfer",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 112,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 103,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2591:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 102,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2591:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 105,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2613:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 104,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2613:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 107,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2631:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 106,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2631:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 109,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "paymentReceiver",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2653:23:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 108,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2653:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 111,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2678:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 110,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2678:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2590:103:0"
+ },
+ "src": "2564:130:0"
+ },
+ {
+ "anonymous": false,
+ "id": 125,
+ "name": "SetAllowance",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 124,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 115,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2718:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 114,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2718:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 117,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2740:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 116,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2740:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 119,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2758:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 118,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2758:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 121,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "allowanceAmount",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2773:22:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 120,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2773:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 123,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "resetTime",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2797:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 122,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2797:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2717:97:0"
+ },
+ "src": "2699:116:0"
+ },
+ {
+ "anonymous": false,
+ "id": 133,
+ "name": "ResetAllowance",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 132,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 127,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 133,
+ "src": "2841:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 126,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2841:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 129,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 133,
+ "src": "2863:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 128,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2863:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 131,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 133,
+ "src": "2881:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 130,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2881:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2840:55:0"
+ },
+ "src": "2820:76:0"
+ },
+ {
+ "anonymous": false,
+ "id": 141,
+ "name": "DeleteAllowance",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 140,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 135,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 141,
+ "src": "2923:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 134,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2923:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 137,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 141,
+ "src": "2945:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 136,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2945:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 139,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 141,
+ "src": "2963:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 138,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2963:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2922:55:0"
+ },
+ "src": "2901:77:0"
+ },
+ {
+ "body": {
+ "id": 289,
+ "nodeType": "Block",
+ "src": "3570:1250:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 161,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 156,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3588:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 159,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3608:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 158,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "3600:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 157,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "3600:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 160,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3600:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "3588:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "64656c656761746520213d2061646472657373283029",
+ "id": 162,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3612:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_47a766b6b1495cbb254fe5e4828ba3622b8f5a171138d82c6bfaf22ff04f26eb",
+ "typeString": "literal_string \"delegate != address(0)\""
+ },
+ "value": "delegate != address(0)"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_47a766b6b1495cbb254fe5e4828ba3622b8f5a171138d82c6bfaf22ff04f26eb",
+ "typeString": "literal_string \"delegate != address(0)\""
+ }
+ ],
+ "id": 155,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "3580:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 163,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3580:57:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 164,
+ "nodeType": "ExpressionStatement",
+ "src": "3580:57:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 177,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 166,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "3655:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 169,
+ "indexExpression": {
+ "expression": {
+ "id": 167,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "3665:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 168,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "3665:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "3655:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 174,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 172,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3684:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 171,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "3677:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 170,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "3677:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 173,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3677:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "3655:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 175,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "3655:48:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 176,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3707:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "3655:60:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "64656c6567617465735b6d73672e73656e6465725d5b75696e7434382864656c6567617465295d2e64656c6567617465203d3d2064656c6567617465",
+ "id": 178,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3717:62:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_58537fa1960fbebccc117b6218b0af08a9f148039299593ea287e665dd534bb1",
+ "typeString": "literal_string \"delegates[msg.sender][uint48(delegate)].delegate == delegate\""
+ },
+ "value": "delegates[msg.sender][uint48(delegate)].delegate == delegate"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_58537fa1960fbebccc117b6218b0af08a9f148039299593ea287e665dd534bb1",
+ "typeString": "literal_string \"delegates[msg.sender][uint48(delegate)].delegate == delegate\""
+ }
+ ],
+ "id": 165,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "3647:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 179,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3647:133:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 180,
+ "nodeType": "ExpressionStatement",
+ "src": "3647:133:0"
+ },
+ {
+ "assignments": [
+ 182
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 182,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 289,
+ "src": "3790:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 181,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "3790:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 189,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 184,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "3832:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 185,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "3832:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 186,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3844:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 187,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "3854:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 183,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "3819:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 188,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3819:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "3790:70:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 193,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 190,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "3874:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 191,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "3874:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 192,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3893:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "3874:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 211,
+ "nodeType": "IfStatement",
+ "src": "3870:210:0",
+ "trueBody": {
+ "id": 210,
+ "nodeType": "Block",
+ "src": "3896:184:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 198,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 194,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "3996:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 196,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "3996:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "31",
+ "id": 197,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4014:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "3996:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 199,
+ "nodeType": "ExpressionStatement",
+ "src": "3996:19:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 207,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "4063:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 200,
+ "name": "tokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47,
+ "src": "4029:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[] storage ref))"
+ }
+ },
+ "id": 204,
+ "indexExpression": {
+ "expression": {
+ "id": 201,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "4036:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 202,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "4036:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4029:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[] storage ref)"
+ }
+ },
+ "id": 205,
+ "indexExpression": {
+ "id": 203,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "4048:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4029:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage",
+ "typeString": "address[] storage ref"
+ }
+ },
+ "id": 206,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "push",
+ "nodeType": "MemberAccess",
+ "src": "4029:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$",
+ "typeString": "function (address)"
+ }
+ },
+ "id": 208,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4029:40:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 209,
+ "nodeType": "ExpressionStatement",
+ "src": "4029:40:0"
+ }
+ ]
+ }
+ },
+ {
+ "assignments": [
+ 213
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 213,
+ "mutability": "mutable",
+ "name": "currentMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 289,
+ "src": "4206:17:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 212,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "4206:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 221,
+ "initialValue": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 219,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 216,
+ "name": "block",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -4,
+ "src": "4233:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_block",
+ "typeString": "block"
+ }
+ },
+ "id": 217,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "timestamp",
+ "nodeType": "MemberAccess",
+ "src": "4233:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "/",
+ "rightExpression": {
+ "hexValue": "3630",
+ "id": 218,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4251:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_60_by_1",
+ "typeString": "int_const 60"
+ },
+ "value": "60"
+ },
+ "src": "4233:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ ],
+ "id": 215,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "4226:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint32_$",
+ "typeString": "type(uint32)"
+ },
+ "typeName": {
+ "id": 214,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "4226:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 220,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4226:28:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "4206:48:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 224,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 222,
+ "name": "resetBaseMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 152,
+ "src": "4268:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 223,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4283:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "4268:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 250,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 247,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4482:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 248,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "4482:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 249,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4508:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "4482:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 258,
+ "nodeType": "IfStatement",
+ "src": "4478:93:0",
+ "trueBody": {
+ "id": 257,
+ "nodeType": "Block",
+ "src": "4511:60:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 255,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 251,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4525:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 253,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "4525:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 254,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4550:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4525:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 256,
+ "nodeType": "ExpressionStatement",
+ "src": "4525:35:0"
+ }
+ ]
+ }
+ },
+ "id": 259,
+ "nodeType": "IfStatement",
+ "src": "4264:307:0",
+ "trueBody": {
+ "id": 246,
+ "nodeType": "Block",
+ "src": "4286:186:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 228,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 226,
+ "name": "resetBaseMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 152,
+ "src": "4308:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "id": 227,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4324:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4308:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "7265736574426173654d696e203c3d2063757272656e744d696e",
+ "id": 229,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4336:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_1ede17760f99a36e22c97a9975aa792b767bce45958763871f51d908d7d840ba",
+ "typeString": "literal_string \"resetBaseMin <= currentMin\""
+ },
+ "value": "resetBaseMin <= currentMin"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_1ede17760f99a36e22c97a9975aa792b767bce45958763871f51d908d7d840ba",
+ "typeString": "literal_string \"resetBaseMin <= currentMin\""
+ }
+ ],
+ "id": 225,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "4300:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 230,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4300:65:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 231,
+ "nodeType": "ExpressionStatement",
+ "src": "4300:65:0"
+ },
+ {
+ "expression": {
+ "id": 244,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 232,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4379:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 234,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "4379:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 243,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 235,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4404:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 241,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 238,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 236,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4419:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "id": 237,
+ "name": "resetBaseMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 152,
+ "src": "4432:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4419:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 239,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "4418:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "%",
+ "rightExpression": {
+ "id": 240,
+ "name": "resetTimeMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 150,
+ "src": "4448:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "4418:42:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 242,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "4417:44:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4404:57:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4379:82:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 245,
+ "nodeType": "ExpressionStatement",
+ "src": "4379:82:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "id": 264,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 260,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4580:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 262,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "4580:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 263,
+ "name": "resetTimeMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 150,
+ "src": "4605:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "4580:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 265,
+ "nodeType": "ExpressionStatement",
+ "src": "4580:37:0"
+ },
+ {
+ "expression": {
+ "id": 270,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 266,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4627:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 268,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "4627:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 269,
+ "name": "allowanceAmount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 148,
+ "src": "4646:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "4627:34:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 271,
+ "nodeType": "ExpressionStatement",
+ "src": "4627:34:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 273,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "4687:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 274,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "4687:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 275,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "4699:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 276,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "4709:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 277,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4716:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 272,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "4671:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 278,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4671:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 279,
+ "nodeType": "ExpressionStatement",
+ "src": "4671:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 281,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "4754:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 282,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "4754:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 283,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "4766:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 284,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "4776:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 285,
+ "name": "allowanceAmount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 148,
+ "src": "4783:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 286,
+ "name": "resetTimeMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 150,
+ "src": "4800:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 280,
+ "name": "SetAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 125,
+ "src": "4741:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_uint16_$returns$__$",
+ "typeString": "function (address,address,address,uint96,uint16)"
+ }
+ },
+ "id": 287,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4741:72:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 288,
+ "nodeType": "EmitStatement",
+ "src": "4736:77:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 142,
+ "nodeType": "StructuredDocumentation",
+ "src": "2984:441:0",
+ "text": "@dev Allows to update the allowance for a specified token. This can only be done via a Safe transaction.\n @param delegate Delegate whose allowance should be updated.\n @param token Token contract address.\n @param allowanceAmount allowance in smallest token unit.\n @param resetTimeMin Time after which the allowance should reset\n @param resetBaseMin Time based on which the reset time should be increased"
+ },
+ "functionSelector": "beaeb388",
+ "id": 290,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "setAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 153,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 144,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3452:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 143,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "3452:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 146,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3470:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 145,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "3470:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 148,
+ "mutability": "mutable",
+ "name": "allowanceAmount",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3485:22:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 147,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "3485:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 150,
+ "mutability": "mutable",
+ "name": "resetTimeMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3509:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 149,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "3509:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 152,
+ "mutability": "mutable",
+ "name": "resetBaseMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3530:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 151,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "3530:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "3451:99:0"
+ },
+ "returnParameters": {
+ "id": 154,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "3570:0:0"
+ },
+ "scope": 1428,
+ "src": "3430:1390:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 359,
+ "nodeType": "Block",
+ "src": "4945:667:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 309,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 301,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "4955:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 302,
+ "name": "allowances",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 40,
+ "src": "4967:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref)))"
+ }
+ },
+ "id": 304,
+ "indexExpression": {
+ "id": 303,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 292,
+ "src": "4978:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4967:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$",
+ "typeString": "mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref))"
+ }
+ },
+ "id": 306,
+ "indexExpression": {
+ "id": 305,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 294,
+ "src": "4984:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4967:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$",
+ "typeString": "mapping(address => struct AllowanceModule.Allowance storage ref)"
+ }
+ },
+ "id": 308,
+ "indexExpression": {
+ "id": 307,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 296,
+ "src": "4994:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4967:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage",
+ "typeString": "struct AllowanceModule.Allowance storage ref"
+ }
+ },
+ "src": "4955:45:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 310,
+ "nodeType": "ExpressionStatement",
+ "src": "4955:45:0"
+ },
+ {
+ "assignments": [
+ 312
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 312,
+ "mutability": "mutable",
+ "name": "currentMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 359,
+ "src": "5072:17:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 311,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "5072:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 320,
+ "initialValue": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 318,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 315,
+ "name": "block",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -4,
+ "src": "5099:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_block",
+ "typeString": "block"
+ }
+ },
+ "id": 316,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "timestamp",
+ "nodeType": "MemberAccess",
+ "src": "5099:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "/",
+ "rightExpression": {
+ "hexValue": "3630",
+ "id": 317,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "5117:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_60_by_1",
+ "typeString": "int_const 60"
+ },
+ "value": "60"
+ },
+ "src": "5099:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ ],
+ "id": 314,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "5092:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint32_$",
+ "typeString": "type(uint32)"
+ },
+ "typeName": {
+ "id": 313,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "5092:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 319,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "5092:28:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "5072:48:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 332,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 324,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 321,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5232:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 322,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "5232:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 323,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "5257:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "5232:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 331,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 325,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5262:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 326,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "5262:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 330,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 327,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 312,
+ "src": "5288:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "expression": {
+ "id": 328,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5301:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 329,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "5301:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "5288:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5262:61:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "5232:91:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 356,
+ "nodeType": "IfStatement",
+ "src": "5228:352:0",
+ "trueBody": {
+ "id": 355,
+ "nodeType": "Block",
+ "src": "5325:255:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 337,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 333,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5339:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 335,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "5339:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 336,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "5357:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "5339:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 338,
+ "nodeType": "ExpressionStatement",
+ "src": "5339:19:0"
+ },
+ {
+ "expression": {
+ "id": 353,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 339,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5467:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 341,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "5467:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 352,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 342,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 312,
+ "src": "5492:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 350,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 346,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 343,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 312,
+ "src": "5507:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "expression": {
+ "id": 344,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5520:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 345,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "5520:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5507:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 347,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "5506:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "%",
+ "rightExpression": {
+ "expression": {
+ "id": 348,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5546:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 349,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "5546:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "5506:62:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 351,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "5505:64:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5492:77:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5467:102:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 354,
+ "nodeType": "ExpressionStatement",
+ "src": "5467:102:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "id": 357,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5596:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "functionReturnParameters": 300,
+ "id": 358,
+ "nodeType": "Return",
+ "src": "5589:16:0"
+ }
+ ]
+ },
+ "id": 360,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 297,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 292,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4848:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 291,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "4848:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 294,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4862:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 293,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "4862:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 296,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4880:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 295,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "4880:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "4847:47:0"
+ },
+ "returnParameters": {
+ "id": 300,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 299,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4917:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 298,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "4917:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "4916:28:0"
+ },
+ "scope": 1428,
+ "src": "4826:786:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 381,
+ "nodeType": "Block",
+ "src": "5726:62:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 379,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 371,
+ "name": "allowances",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 40,
+ "src": "5736:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref)))"
+ }
+ },
+ "id": 375,
+ "indexExpression": {
+ "id": 372,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 362,
+ "src": "5747:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "5736:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$",
+ "typeString": "mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref))"
+ }
+ },
+ "id": 376,
+ "indexExpression": {
+ "id": 373,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 364,
+ "src": "5753:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "5736:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$",
+ "typeString": "mapping(address => struct AllowanceModule.Allowance storage ref)"
+ }
+ },
+ "id": 377,
+ "indexExpression": {
+ "id": 374,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 366,
+ "src": "5763:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "5736:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage",
+ "typeString": "struct AllowanceModule.Allowance storage ref"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 378,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 368,
+ "src": "5772:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "src": "5736:45:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage",
+ "typeString": "struct AllowanceModule.Allowance storage ref"
+ }
+ },
+ "id": 380,
+ "nodeType": "ExpressionStatement",
+ "src": "5736:45:0"
+ }
+ ]
+ },
+ "id": 382,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "updateAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 369,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 362,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5643:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 361,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "5643:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 364,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5657:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 363,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "5657:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 366,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5675:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 365,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "5675:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 368,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5690:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 367,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "5690:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "5642:75:0"
+ },
+ "returnParameters": {
+ "id": 370,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "5726:0:0"
+ },
+ "scope": 1428,
+ "src": "5618:170:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 420,
+ "nodeType": "Block",
+ "src": "6049:239:0",
+ "statements": [
+ {
+ "assignments": [
+ 391
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 391,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 420,
+ "src": "6059:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 390,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "6059:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 398,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 393,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6101:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 394,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6101:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 395,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 385,
+ "src": "6113:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 396,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 387,
+ "src": "6123:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 392,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "6088:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 397,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6088:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "6059:70:0"
+ },
+ {
+ "expression": {
+ "id": 403,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 399,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 391,
+ "src": "6139:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 401,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "6139:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 402,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6157:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6139:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 404,
+ "nodeType": "ExpressionStatement",
+ "src": "6139:19:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 406,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6184:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 407,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6184:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 408,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 385,
+ "src": "6196:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 409,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 387,
+ "src": "6206:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 410,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 391,
+ "src": "6213:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 405,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "6168:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 411,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6168:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 412,
+ "nodeType": "ExpressionStatement",
+ "src": "6168:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 414,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6253:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 415,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6253:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 416,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 385,
+ "src": "6265:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 417,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 387,
+ "src": "6275:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 413,
+ "name": "ResetAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 133,
+ "src": "6238:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address,address)"
+ }
+ },
+ "id": 418,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6238:43:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 419,
+ "nodeType": "EmitStatement",
+ "src": "6233:48:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 383,
+ "nodeType": "StructuredDocumentation",
+ "src": "5794:186:0",
+ "text": "@dev Allows to reset the allowance for a specific delegate and token.\n @param delegate Delegate whose allowance should be updated.\n @param token Token contract address."
+ },
+ "functionSelector": "c19bf50e",
+ "id": 421,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "resetAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 388,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 385,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 421,
+ "src": "6009:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 384,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6009:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 387,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 421,
+ "src": "6027:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 386,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6027:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "6008:33:0"
+ },
+ "returnParameters": {
+ "id": 389,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "6049:0:0"
+ },
+ "scope": 1428,
+ "src": "5985:303:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 477,
+ "nodeType": "Block",
+ "src": "6613:342:0",
+ "statements": [
+ {
+ "assignments": [
+ 430
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 430,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 477,
+ "src": "6623:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 429,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "6623:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 437,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 432,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6665:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 433,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6665:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 434,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 424,
+ "src": "6677:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 435,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 426,
+ "src": "6687:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 431,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "6652:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 436,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6652:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "6623:70:0"
+ },
+ {
+ "expression": {
+ "id": 442,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 438,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6703:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 440,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "6703:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 441,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6722:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6703:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 443,
+ "nodeType": "ExpressionStatement",
+ "src": "6703:20:0"
+ },
+ {
+ "expression": {
+ "id": 448,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 444,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6733:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 446,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "6733:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 447,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6751:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6733:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 449,
+ "nodeType": "ExpressionStatement",
+ "src": "6733:19:0"
+ },
+ {
+ "expression": {
+ "id": 454,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 450,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6762:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 452,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "6762:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 453,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6787:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6762:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 455,
+ "nodeType": "ExpressionStatement",
+ "src": "6762:26:0"
+ },
+ {
+ "expression": {
+ "id": 460,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 456,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6798:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 458,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "6798:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 459,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6823:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6798:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 461,
+ "nodeType": "ExpressionStatement",
+ "src": "6798:26:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 463,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6850:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 464,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6850:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 465,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 424,
+ "src": "6862:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 466,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 426,
+ "src": "6872:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 467,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6879:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 462,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "6834:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 468,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6834:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 469,
+ "nodeType": "ExpressionStatement",
+ "src": "6834:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 471,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6920:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 472,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6920:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 473,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 424,
+ "src": "6932:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 474,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 426,
+ "src": "6942:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 470,
+ "name": "DeleteAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 141,
+ "src": "6904:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address,address)"
+ }
+ },
+ "id": 475,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6904:44:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 476,
+ "nodeType": "EmitStatement",
+ "src": "6899:49:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 422,
+ "nodeType": "StructuredDocumentation",
+ "src": "6294:237:0",
+ "text": "@dev Allows to remove the allowance for a specific delegate and token. This will set all values except the `nonce` to 0.\n @param delegate Delegate whose allowance should be updated.\n @param token Token contract address."
+ },
+ "functionSelector": "885133e3",
+ "id": 478,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "deleteAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 427,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 424,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 478,
+ "src": "6561:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 423,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6561:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 426,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 478,
+ "src": "6579:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 425,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6579:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "6560:33:0"
+ },
+ "returnParameters": {
+ "id": 428,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "6613:0:0"
+ },
+ "scope": 1428,
+ "src": "6536:419:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 685,
+ "nodeType": "Block",
+ "src": "7828:2095:0",
+ "statements": [
+ {
+ "assignments": [
+ 499
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 499,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 685,
+ "src": "7867:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 498,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "7867:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 508,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 503,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "7917:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 502,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "7909:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 501,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7909:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 504,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "7909:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 505,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "7924:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 506,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "7934:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 500,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "7896:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 507,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "7896:44:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "7867:73:0"
+ },
+ {
+ "assignments": [
+ 510
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 510,
+ "mutability": "mutable",
+ "name": "transferHashData",
+ "nodeType": "VariableDeclaration",
+ "scope": 685,
+ "src": "7950:29:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 509,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "7950:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 524,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 514,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "8015:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 513,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "8007:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 512,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "8007:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 515,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8007:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 516,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "8022:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 517,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 485,
+ "src": "8029:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 518,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "8033:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 519,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "8041:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 520,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "8055:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "expression": {
+ "id": 521,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8064:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 522,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "8064:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 511,
+ "name": "generateTransferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 766,
+ "src": "7982:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_address_$_t_uint96_$_t_uint16_$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function (address,address,address,uint96,address,uint96,uint16) view returns (bytes memory)"
+ }
+ },
+ "id": 523,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "7982:98:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "7950:130:0"
+ },
+ {
+ "expression": {
+ "id": 532,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 525,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8115:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 527,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "8115:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 531,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 528,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8133:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 529,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "8133:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "+",
+ "rightExpression": {
+ "hexValue": "31",
+ "id": 530,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8151:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "8133:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "8115:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 533,
+ "nodeType": "ExpressionStatement",
+ "src": "8115:37:0"
+ },
+ {
+ "assignments": [
+ 535
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 535,
+ "mutability": "mutable",
+ "name": "newSpent",
+ "nodeType": "VariableDeclaration",
+ "scope": 685,
+ "src": "8162:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 534,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "8162:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 540,
+ "initialValue": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 539,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 536,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8180:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 537,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8180:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "+",
+ "rightExpression": {
+ "id": 538,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "8198:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8180:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "8162:42:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 550,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 545,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 542,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8269:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "expression": {
+ "id": 543,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8280:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 544,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8280:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8269:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 549,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 546,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8299:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "expression": {
+ "id": 547,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8311:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 548,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "8311:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8299:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "8269:58:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "6e65775370656e74203e20616c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d20616c6c6f77616e63652e616d6f756e74",
+ "id": 551,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8329:60:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_a7359a8519961096cf8fb65715f77dbc4de2755aabf21e3445e245a34ee622da",
+ "typeString": "literal_string \"newSpent > allowance.spent && newSpent <= allowance.amount\""
+ },
+ "value": "newSpent > allowance.spent && newSpent <= allowance.amount"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_a7359a8519961096cf8fb65715f77dbc4de2755aabf21e3445e245a34ee622da",
+ "typeString": "literal_string \"newSpent > allowance.spent && newSpent <= allowance.amount\""
+ }
+ ],
+ "id": 541,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "8261:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 552,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8261:129:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 553,
+ "nodeType": "ExpressionStatement",
+ "src": "8261:129:0"
+ },
+ {
+ "expression": {
+ "id": 558,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 554,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8400:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 556,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8400:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 557,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8418:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8400:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 559,
+ "nodeType": "ExpressionStatement",
+ "src": "8400:26:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 562,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 560,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "8440:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 561,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8450:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "8440:11:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 620,
+ "nodeType": "IfStatement",
+ "src": "8436:748:0",
+ "trueBody": {
+ "id": 619,
+ "nodeType": "Block",
+ "src": "8453:731:0",
+ "statements": [
+ {
+ "assignments": [
+ 564
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 564,
+ "mutability": "mutable",
+ "name": "paymentAllowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 619,
+ "src": "8543:33:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 563,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "8543:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 578,
+ "initialValue": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 567,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 565,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "8579:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 566,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "8595:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "8579:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseExpression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 572,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "8636:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 571,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "8628:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 570,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "8628:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 573,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8628:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 574,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "8643:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 575,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "8653:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 569,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "8615:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 576,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8615:51:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 577,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "Conditional",
+ "src": "8579:87:0",
+ "trueExpression": {
+ "id": 568,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8603:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "8543:123:0"
+ },
+ {
+ "expression": {
+ "id": 584,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 579,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8680:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 583,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 580,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8691:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 581,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8691:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "+",
+ "rightExpression": {
+ "id": 582,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "8716:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8691:32:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8680:43:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 585,
+ "nodeType": "ExpressionStatement",
+ "src": "8680:43:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 595,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 590,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 587,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8796:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "expression": {
+ "id": 588,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8807:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 589,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8807:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8796:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 594,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 591,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8833:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "expression": {
+ "id": 592,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8845:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 593,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "8845:23:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8833:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "8796:72:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "6e65775370656e74203e207061796d656e74416c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d207061796d656e74416c6c6f77616e63652e616d6f756e74",
+ "id": 596,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8870:74:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_b549d52c5706645679000944ae1bcaec935d0b8c387f4240a09789be7dc8c0d4",
+ "typeString": "literal_string \"newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount\""
+ },
+ "value": "newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_b549d52c5706645679000944ae1bcaec935d0b8c387f4240a09789be7dc8c0d4",
+ "typeString": "literal_string \"newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount\""
+ }
+ ],
+ "id": 586,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "8788:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 597,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8788:157:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 598,
+ "nodeType": "ExpressionStatement",
+ "src": "8788:157:0"
+ },
+ {
+ "expression": {
+ "id": 603,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 599,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8959:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 601,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8959:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 602,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8984:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8959:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 604,
+ "nodeType": "ExpressionStatement",
+ "src": "8959:33:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 607,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 605,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9078:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "id": 606,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9094:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "9078:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 618,
+ "nodeType": "IfStatement",
+ "src": "9074:99:0",
+ "trueBody": {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 611,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9125:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 610,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9117:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 609,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9117:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 612,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9117:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 613,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9132:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 614,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9142:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 615,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "9156:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 608,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "9101:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 616,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9101:72:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 617,
+ "nodeType": "ExpressionStatement",
+ "src": "9101:72:0"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 624,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9217:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 623,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9209:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 622,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9209:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 625,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9209:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 626,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9224:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 627,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9234:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 628,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "9241:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 621,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "9193:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 629,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9193:58:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 630,
+ "nodeType": "ExpressionStatement",
+ "src": "9193:58:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 632,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9345:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 633,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 495,
+ "src": "9355:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "id": 634,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 510,
+ "src": "9366:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "id": 635,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9384:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 631,
+ "name": "checkSignature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 840,
+ "src": "9330:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_contract$_GnosisSafe_$18_$returns$__$",
+ "typeString": "function (address,bytes memory,bytes memory,contract GnosisSafe) view"
+ }
+ },
+ "id": 636,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9330:59:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 637,
+ "nodeType": "ExpressionStatement",
+ "src": "9330:59:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 640,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 638,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "9404:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 639,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "9414:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "9404:11:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 662,
+ "nodeType": "IfStatement",
+ "src": "9400:344:0",
+ "trueBody": {
+ "id": 661,
+ "nodeType": "Block",
+ "src": "9417:327:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 642,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9534:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ {
+ "id": 643,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9540:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "expression": {
+ "id": 644,
+ "name": "tx",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -26,
+ "src": "9554:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_transaction",
+ "typeString": "tx"
+ }
+ },
+ "id": 645,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "origin",
+ "nodeType": "MemberAccess",
+ "src": "9554:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 646,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "9565:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 641,
+ "name": "transfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1006,
+ "src": "9525:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_GnosisSafe_$18_$_t_address_$_t_address_payable_$_t_uint96_$returns$__$",
+ "typeString": "function (contract GnosisSafe,address,address payable,uint96)"
+ }
+ },
+ "id": 647,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9525:48:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 648,
+ "nodeType": "ExpressionStatement",
+ "src": "9525:48:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 652,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9683:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 651,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9675:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 650,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9675:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 653,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9675:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 654,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9690:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 655,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9700:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "expression": {
+ "id": 656,
+ "name": "tx",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -26,
+ "src": "9714:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_transaction",
+ "typeString": "tx"
+ }
+ },
+ "id": 657,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "origin",
+ "nodeType": "MemberAccess",
+ "src": "9714:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 658,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "9725:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 649,
+ "name": "PayAllowanceTransfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 113,
+ "src": "9654:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_address_$_t_uint96_$returns$__$",
+ "typeString": "function (address,address,address,address,uint96)"
+ }
+ },
+ "id": 659,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9654:79:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 660,
+ "nodeType": "EmitStatement",
+ "src": "9649:84:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 664,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9788:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ {
+ "id": 665,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9794:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 666,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 485,
+ "src": "9801:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 667,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "9805:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 663,
+ "name": "transfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1006,
+ "src": "9779:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_GnosisSafe_$18_$_t_address_$_t_address_payable_$_t_uint96_$returns$__$",
+ "typeString": "function (contract GnosisSafe,address,address payable,uint96)"
+ }
+ },
+ "id": 668,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9779:33:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 669,
+ "nodeType": "ExpressionStatement",
+ "src": "9779:33:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 673,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9860:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 672,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9852:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 671,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9852:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 674,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9852:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 675,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9867:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 676,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9877:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 677,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 485,
+ "src": "9884:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 678,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "9888:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 682,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 679,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "9896:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 680,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "9896:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "hexValue": "31",
+ "id": 681,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "9914:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "9896:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 670,
+ "name": "ExecuteAllowanceTransfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 101,
+ "src": "9827:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_uint16_$returns$__$",
+ "typeString": "function (address,address,address,address,uint96,uint16)"
+ }
+ },
+ "id": 683,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9827:89:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 684,
+ "nodeType": "EmitStatement",
+ "src": "9822:94:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 479,
+ "nodeType": "StructuredDocumentation",
+ "src": "6961:604:0",
+ "text": "@dev Allows to use the allowance to perform a transfer.\n @param safe The Safe whose funds should be used.\n @param token Token contract address.\n @param to Address that should receive the tokens.\n @param amount Amount that should be transferred.\n @param paymentToken Token that should be used to pay for the execution of the transfer.\n @param payment Amount to should be paid for executing the transfer.\n @param delegate Delegate whose allowance should be updated.\n @param signature Signature generated by the delegate to authorize the transfer."
+ },
+ "functionSelector": "4515641a",
+ "id": 686,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "executeAllowanceTransfer",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 496,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 481,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7613:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ "typeName": {
+ "id": 480,
+ "name": "GnosisSafe",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 18,
+ "src": "7613:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 483,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7638:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 482,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7638:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 485,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7661:18:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ "typeName": {
+ "id": 484,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7661:15:0",
+ "stateMutability": "payable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 487,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7689:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 486,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "7689:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 489,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7712:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 488,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7712:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 491,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7742:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 490,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "7742:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 493,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7766:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 492,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7766:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 495,
+ "mutability": "mutable",
+ "name": "signature",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7792:22:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 494,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "7792:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "7603:217:0"
+ },
+ "returnParameters": {
+ "id": 497,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "7828:0:0"
+ },
+ "scope": 1428,
+ "src": "7570:2353:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 698,
+ "nodeType": "Block",
+ "src": "10038:167:0",
+ "statements": [
+ {
+ "assignments": [
+ 693
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 693,
+ "mutability": "mutable",
+ "name": "id",
+ "nodeType": "VariableDeclaration",
+ "scope": 698,
+ "src": "10048:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 692,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "10048:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 694,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10048:10:0"
+ },
+ {
+ "AST": {
+ "nodeType": "YulBlock",
+ "src": "10141:39:0",
+ "statements": [
+ {
+ "nodeType": "YulAssignment",
+ "src": "10155:15:0",
+ "value": {
+ "arguments": [],
+ "functionName": {
+ "name": "chainid",
+ "nodeType": "YulIdentifier",
+ "src": "10161:7:0"
+ },
+ "nodeType": "YulFunctionCall",
+ "src": "10161:9:0"
+ },
+ "variableNames": [
+ {
+ "name": "id",
+ "nodeType": "YulIdentifier",
+ "src": "10155:2:0"
+ }
+ ]
+ }
+ ]
+ },
+ "evmVersion": "istanbul",
+ "externalReferences": [
+ {
+ "declaration": 693,
+ "isOffset": false,
+ "isSlot": false,
+ "src": "10155:2:0",
+ "valueSize": 1
+ }
+ ],
+ "id": 695,
+ "nodeType": "InlineAssembly",
+ "src": "10132:48:0"
+ },
+ {
+ "expression": {
+ "id": 696,
+ "name": "id",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 693,
+ "src": "10196:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "functionReturnParameters": 691,
+ "id": 697,
+ "nodeType": "Return",
+ "src": "10189:9:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 687,
+ "nodeType": "StructuredDocumentation",
+ "src": "9929:52:0",
+ "text": "@dev Returns the chain id used by this contract."
+ },
+ "functionSelector": "3408e470",
+ "id": 699,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getChainId",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 688,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "10005:2:0"
+ },
+ "returnParameters": {
+ "id": 691,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 690,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 699,
+ "src": "10029:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 689,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "10029:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "10028:9:0"
+ },
+ "scope": 1428,
+ "src": "9986:219:0",
+ "stateMutability": "pure",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 765,
+ "nodeType": "Block",
+ "src": "10528:394:0",
+ "statements": [
+ {
+ "assignments": [
+ 720
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 720,
+ "mutability": "mutable",
+ "name": "chainId",
+ "nodeType": "VariableDeclaration",
+ "scope": 765,
+ "src": "10538:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 719,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "10538:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 723,
+ "initialValue": {
+ "arguments": [],
+ "expression": {
+ "argumentTypes": [],
+ "id": 721,
+ "name": "getChainId",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 699,
+ "src": "10556:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$",
+ "typeString": "function () pure returns (uint256)"
+ }
+ },
+ "id": 722,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10556:12:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10538:30:0"
+ },
+ {
+ "assignments": [
+ 725
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 725,
+ "mutability": "mutable",
+ "name": "domainSeparator",
+ "nodeType": "VariableDeclaration",
+ "scope": 765,
+ "src": "10578:23:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 724,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "10578:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 734,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 729,
+ "name": "DOMAIN_SEPARATOR_TYPEHASH",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 29,
+ "src": "10625:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 730,
+ "name": "chainId",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 720,
+ "src": "10652:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "id": 731,
+ "name": "this",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -28,
+ "src": "10661:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_AllowanceModule_$1428",
+ "typeString": "contract AllowanceModule"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ {
+ "typeIdentifier": "t_contract$_AllowanceModule_$1428",
+ "typeString": "contract AllowanceModule"
+ }
+ ],
+ "expression": {
+ "id": 727,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "10614:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 728,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encode",
+ "nodeType": "MemberAccess",
+ "src": "10614:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 732,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10614:52:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 726,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "10604:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 733,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10604:63:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10578:89:0"
+ },
+ {
+ "assignments": [
+ 736
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 736,
+ "mutability": "mutable",
+ "name": "transferHash",
+ "nodeType": "VariableDeclaration",
+ "scope": 765,
+ "src": "10677:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 735,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "10677:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 750,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 740,
+ "name": "ALLOWANCE_TRANSFER_TYPEHASH",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 32,
+ "src": "10734:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 741,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 702,
+ "src": "10763:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 742,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 704,
+ "src": "10769:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 743,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 706,
+ "src": "10776:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 744,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 708,
+ "src": "10780:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 745,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 710,
+ "src": "10788:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 746,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 712,
+ "src": "10802:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 747,
+ "name": "nonce",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 714,
+ "src": "10811:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "expression": {
+ "id": 738,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "10723:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 739,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encode",
+ "nodeType": "MemberAccess",
+ "src": "10723:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 748,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10723:94:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 737,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "10700:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 749,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10700:127:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10677:150:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "hexValue": "30783139",
+ "id": 755,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "10866:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_25_by_1",
+ "typeString": "int_const 25"
+ },
+ "value": "0x19"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_25_by_1",
+ "typeString": "int_const 25"
+ }
+ ],
+ "id": 754,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "10861:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_bytes1_$",
+ "typeString": "type(bytes1)"
+ },
+ "typeName": {
+ "id": 753,
+ "name": "byte",
+ "nodeType": "ElementaryTypeName",
+ "src": "10861:4:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 756,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10861:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "hexValue": "30783031",
+ "id": 759,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "10878:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "0x01"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ }
+ ],
+ "id": 758,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "10873:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_bytes1_$",
+ "typeString": "type(bytes1)"
+ },
+ "typeName": {
+ "id": 757,
+ "name": "byte",
+ "nodeType": "ElementaryTypeName",
+ "src": "10873:4:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 760,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10873:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ }
+ },
+ {
+ "id": 761,
+ "name": "domainSeparator",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 725,
+ "src": "10885:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 762,
+ "name": "transferHash",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 736,
+ "src": "10902:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ },
+ {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "expression": {
+ "id": 751,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "10844:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 752,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encodePacked",
+ "nodeType": "MemberAccess",
+ "src": "10844:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 763,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10844:71:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "functionReturnParameters": 718,
+ "id": 764,
+ "nodeType": "Return",
+ "src": "10837:78:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 700,
+ "nodeType": "StructuredDocumentation",
+ "src": "10211:72:0",
+ "text": "@dev Generates the data for the transfer hash (required for signing)"
+ },
+ "id": 766,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "generateTransferHashData",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 715,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 702,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10331:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 701,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10331:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 704,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10353:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 703,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10353:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 706,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10376:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 705,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10376:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 708,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10396:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 707,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "10396:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 710,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10419:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 709,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10419:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 712,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10449:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 711,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "10449:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 714,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10473:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 713,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "10473:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "10321:170:0"
+ },
+ "returnParameters": {
+ "id": 718,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 717,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10514:12:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 716,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "10514:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "10513:14:0"
+ },
+ "scope": 1428,
+ "src": "10288:634:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 798,
+ "nodeType": "Block",
+ "src": "11245:136:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 788,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 769,
+ "src": "11310:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 789,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 771,
+ "src": "11316:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 790,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 773,
+ "src": "11323:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 791,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 775,
+ "src": "11327:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 792,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 777,
+ "src": "11335:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 793,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 779,
+ "src": "11349:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 794,
+ "name": "nonce",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 781,
+ "src": "11358:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 787,
+ "name": "generateTransferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 766,
+ "src": "11272:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_address_$_t_uint96_$_t_uint16_$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function (address,address,address,uint96,address,uint96,uint16) view returns (bytes memory)"
+ }
+ },
+ "id": 795,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11272:101:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 786,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "11262:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 796,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11262:112:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "functionReturnParameters": 785,
+ "id": 797,
+ "nodeType": "Return",
+ "src": "11255:119:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 767,
+ "nodeType": "StructuredDocumentation",
+ "src": "10928:82:0",
+ "text": "@dev Generates the transfer hash that should be signed to authorize a transfer"
+ },
+ "functionSelector": "d626e043",
+ "id": 799,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "generateTransferHash",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 782,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 769,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11054:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 768,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11054:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 771,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11076:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 770,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11076:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 773,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11099:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 772,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11099:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 775,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11119:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 774,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "11119:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 777,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11142:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 776,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11142:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 779,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11172:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 778,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "11172:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 781,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11196:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 780,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "11196:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "11044:170:0"
+ },
+ "returnParameters": {
+ "id": 785,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 784,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11236:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 783,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "11236:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "11235:9:0"
+ },
+ "scope": 1428,
+ "src": "11015:366:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 839,
+ "nodeType": "Block",
+ "src": "11522:314:0",
+ "statements": [
+ {
+ "assignments": [
+ 811
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 811,
+ "mutability": "mutable",
+ "name": "signer",
+ "nodeType": "VariableDeclaration",
+ "scope": 839,
+ "src": "11532:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 810,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11532:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 816,
+ "initialValue": {
+ "arguments": [
+ {
+ "id": 813,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 803,
+ "src": "11566:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "id": 814,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 805,
+ "src": "11577:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 812,
+ "name": "recoverSignature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 950,
+ "src": "11549:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_address_$",
+ "typeString": "function (bytes memory,bytes memory) view returns (address)"
+ }
+ },
+ "id": 815,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11549:45:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "11532:62:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 835,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 820,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 818,
+ "name": "expectedDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 801,
+ "src": "11625:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 819,
+ "name": "signer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 811,
+ "src": "11645:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "11625:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 834,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 821,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "11655:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 826,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 824,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 807,
+ "src": "11673:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 823,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "11665:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 822,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11665:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 825,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11665:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "11655:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 831,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 829,
+ "name": "signer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 811,
+ "src": "11687:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 828,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "11680:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 827,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "11680:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 830,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11680:14:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "11655:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 832,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "11655:49:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 833,
+ "name": "signer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 811,
+ "src": "11708:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "11655:59:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "11625:89:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "657870656374656444656c6567617465203d3d207369676e65722026262064656c6567617465735b616464726573732873616665295d5b75696e743438287369676e6572295d2e64656c6567617465203d3d207369676e6572",
+ "id": 836,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "11728:91:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_967a409fd152609403ac7b3349d7ced54d05d2ee8664844edf017668d343240b",
+ "typeString": "literal_string \"expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer\""
+ },
+ "value": "expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_967a409fd152609403ac7b3349d7ced54d05d2ee8664844edf017668d343240b",
+ "typeString": "literal_string \"expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer\""
+ }
+ ],
+ "id": 817,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "11604:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 837,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11604:225:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 838,
+ "nodeType": "ExpressionStatement",
+ "src": "11604:225:0"
+ }
+ ]
+ },
+ "id": 840,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "checkSignature",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 808,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 801,
+ "mutability": "mutable",
+ "name": "expectedDelegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11411:24:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 800,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11411:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 803,
+ "mutability": "mutable",
+ "name": "signature",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11437:22:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 802,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "11437:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 805,
+ "mutability": "mutable",
+ "name": "transferHashData",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11461:29:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 804,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "11461:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 807,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11492:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ "typeName": {
+ "id": 806,
+ "name": "GnosisSafe",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 18,
+ "src": "11492:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "11410:98:0"
+ },
+ "returnParameters": {
+ "id": 809,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "11522:0:0"
+ },
+ "scope": 1428,
+ "src": "11387:449:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 949,
+ "nodeType": "Block",
+ "src": "12097:1333:0",
+ "statements": [
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 852,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 849,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 842,
+ "src": "12178:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "id": 850,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "length",
+ "nodeType": "MemberAccess",
+ "src": "12178:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 851,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12198:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "12178:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 856,
+ "nodeType": "IfStatement",
+ "src": "12174:44:0",
+ "trueBody": {
+ "expression": {
+ "expression": {
+ "id": 853,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "12208:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 854,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "12208:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "functionReturnParameters": 848,
+ "id": 855,
+ "nodeType": "Return",
+ "src": "12201:17:0"
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 861,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 858,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 842,
+ "src": "12326:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "id": 859,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "length",
+ "nodeType": "MemberAccess",
+ "src": "12326:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "3635",
+ "id": 860,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12346:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_65_by_1",
+ "typeString": "int_const 65"
+ },
+ "value": "65"
+ },
+ "src": "12326:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "7369676e6174757265732e6c656e677468203d3d203635",
+ "id": 862,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12350:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_596a1fa41ba579d6aea221d825354132f4526efd6f16816b6df5045603592f81",
+ "typeString": "literal_string \"signatures.length == 65\""
+ },
+ "value": "signatures.length == 65"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_596a1fa41ba579d6aea221d825354132f4526efd6f16816b6df5045603592f81",
+ "typeString": "literal_string \"signatures.length == 65\""
+ }
+ ],
+ "id": 857,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "12318:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 863,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "12318:58:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 864,
+ "nodeType": "ExpressionStatement",
+ "src": "12318:58:0"
+ },
+ {
+ "assignments": [
+ 866
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 866,
+ "mutability": "mutable",
+ "name": "v",
+ "nodeType": "VariableDeclaration",
+ "scope": 949,
+ "src": "12386:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "typeName": {
+ "id": 865,
+ "name": "uint8",
+ "nodeType": "ElementaryTypeName",
+ "src": "12386:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 867,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "12386:7:0"
+ },
+ {
+ "assignments": [
+ 869
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 869,
+ "mutability": "mutable",
+ "name": "r",
+ "nodeType": "VariableDeclaration",
+ "scope": 949,
+ "src": "12403:9:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 868,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "12403:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 870,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "12403:9:0"
+ },
+ {
+ "assignments": [
+ 872
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 872,
+ "mutability": "mutable",
+ "name": "s",
+ "nodeType": "VariableDeclaration",
+ "scope": 949,
+ "src": "12422:9:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 871,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "12422:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 873,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "12422:9:0"
+ },
+ {
+ "expression": {
+ "id": 882,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "components": [
+ {
+ "id": 874,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12442:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ {
+ "id": 875,
+ "name": "r",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 869,
+ "src": "12445:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 876,
+ "name": "s",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 872,
+ "src": "12448:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "id": 877,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "TupleExpression",
+ "src": "12441:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
+ "typeString": "tuple(uint8,bytes32,bytes32)"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "id": 879,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 842,
+ "src": "12468:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "hexValue": "30",
+ "id": 880,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12479:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 878,
+ "name": "signatureSplit",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1550,
+ "src": "12453:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$_t_bytes32_$_t_bytes32_$",
+ "typeString": "function (bytes memory,uint256) pure returns (uint8,bytes32,bytes32)"
+ }
+ },
+ "id": 881,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "12453:28:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
+ "typeString": "tuple(uint8,bytes32,bytes32)"
+ }
+ },
+ "src": "12441:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 883,
+ "nodeType": "ExpressionStatement",
+ "src": "12441:40:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 886,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 884,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12548:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 885,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12553:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "12548:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 894,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 892,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12653:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "31",
+ "id": 893,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12658:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "12653:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 903,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 901,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12832:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "3330",
+ "id": 902,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12836:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_30_by_1",
+ "typeString": "int_const 30"
+ },
+ "value": "30"
+ },
+ "src": "12832:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "id": 935,
+ "nodeType": "Block",
+ "src": "13143:149:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 933,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 924,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "13226:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 927,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 844,
+ "src": "13254:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 926,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "13244:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 928,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13244:27:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 929,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "13273:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ {
+ "id": 930,
+ "name": "r",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 869,
+ "src": "13276:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 931,
+ "name": "s",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 872,
+ "src": "13279:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "id": 925,
+ "name": "ecrecover",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -6,
+ "src": "13234:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
+ "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
+ }
+ },
+ "id": 932,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13234:47:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "13226:55:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 934,
+ "nodeType": "ExpressionStatement",
+ "src": "13226:55:0"
+ }
+ ]
+ },
+ "id": 936,
+ "nodeType": "IfStatement",
+ "src": "12828:464:0",
+ "trueBody": {
+ "id": 923,
+ "nodeType": "Block",
+ "src": "12840:297:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 921,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 904,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "13002:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
+ "id": 909,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13047:34:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
+ "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
+ },
+ "value": "\u0019Ethereum Signed Message:\n32"
+ },
+ {
+ "arguments": [
+ {
+ "id": 911,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 844,
+ "src": "13093:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 910,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "13083:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 912,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13083:27:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
+ "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "expression": {
+ "id": 907,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "13030:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 908,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encodePacked",
+ "nodeType": "MemberAccess",
+ "src": "13030:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 913,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13030:81:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 906,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "13020:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 914,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13020:92:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 917,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 915,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "13114:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "hexValue": "34",
+ "id": 916,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13118:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_4_by_1",
+ "typeString": "int_const 4"
+ },
+ "value": "4"
+ },
+ "src": "13114:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ {
+ "id": 918,
+ "name": "r",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 869,
+ "src": "13121:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 919,
+ "name": "s",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 872,
+ "src": "13124:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "id": 905,
+ "name": "ecrecover",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -6,
+ "src": "13010:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
+ "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
+ }
+ },
+ "id": 920,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13010:116:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "13002:124:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 922,
+ "nodeType": "ExpressionStatement",
+ "src": "13002:124:0"
+ }
+ ]
+ }
+ },
+ "id": 937,
+ "nodeType": "IfStatement",
+ "src": "12649:643:0",
+ "trueBody": {
+ "id": 900,
+ "nodeType": "Block",
+ "src": "12661:161:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 898,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 895,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "12793:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 896,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "12801:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 897,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "12801:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "12793:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 899,
+ "nodeType": "ExpressionStatement",
+ "src": "12793:18:0"
+ }
+ ]
+ }
+ },
+ "id": 938,
+ "nodeType": "IfStatement",
+ "src": "12544:748:0",
+ "trueBody": {
+ "id": 891,
+ "nodeType": "Block",
+ "src": "12556:87:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "hexValue": "436f6e7472616374207369676e61747572657320617265206e6f7420737570706f727465642062792074686973206d6f64756c65",
+ "id": 888,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12577:54:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_b39fc396439fa2d21053daa8df1e6090b76cf041fa302da73b109291b14237bd",
+ "typeString": "literal_string \"Contract signatures are not supported by this module\""
+ },
+ "value": "Contract signatures are not supported by this module"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_stringliteral_b39fc396439fa2d21053daa8df1e6090b76cf041fa302da73b109291b14237bd",
+ "typeString": "literal_string \"Contract signatures are not supported by this module\""
+ }
+ ],
+ "id": 887,
+ "name": "revert",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -19,
+ -19
+ ],
+ "referencedDeclaration": -19,
+ "src": "12570:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (string memory) pure"
+ }
+ },
+ "id": 889,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "12570:62:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 890,
+ "nodeType": "ExpressionStatement",
+ "src": "12570:62:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 945,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 940,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "13380:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 943,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13397:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 942,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "13389:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 941,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13389:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 944,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13389:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "13380:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "6f776e657220213d2061646472657373283029",
+ "id": 946,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13401:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_fa07c4489b96a4ba6d7948f5dd634975ac28da03dfd4c4c31f4f8e50c9c4d088",
+ "typeString": "literal_string \"owner != address(0)\""
+ },
+ "value": "owner != address(0)"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_fa07c4489b96a4ba6d7948f5dd634975ac28da03dfd4c4c31f4f8e50c9c4d088",
+ "typeString": "literal_string \"owner != address(0)\""
+ }
+ ],
+ "id": 939,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "13372:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 947,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13372:51:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 948,
+ "nodeType": "ExpressionStatement",
+ "src": "13372:51:0"
+ }
+ ]
+ },
+ "id": 950,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "recoverSignature",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 845,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 842,
+ "mutability": "mutable",
+ "name": "signature",
+ "nodeType": "VariableDeclaration",
+ "scope": 950,
+ "src": "12005:22:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 841,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "12005:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 844,
+ "mutability": "mutable",
+ "name": "transferHashData",
+ "nodeType": "VariableDeclaration",
+ "scope": 950,
+ "src": "12029:29:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 843,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "12029:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "12004:55:0"
+ },
+ "returnParameters": {
+ "id": 848,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 847,
+ "mutability": "mutable",
+ "name": "owner",
+ "nodeType": "VariableDeclaration",
+ "scope": 950,
+ "src": "12082:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 846,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "12082:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "12081:15:0"
+ },
+ "scope": 1428,
+ "src": "11979:1451:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 1005,
+ "nodeType": "Block",
+ "src": "13529:476:0",
+ "statements": [
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 966,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 961,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 954,
+ "src": "13543:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 964,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13560:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 963,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "13552:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 962,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13552:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 965,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13552:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "13543:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "id": 1003,
+ "nodeType": "Block",
+ "src": "13764:235:0",
+ "statements": [
+ {
+ "assignments": [
+ 982
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 982,
+ "mutability": "mutable",
+ "name": "data",
+ "nodeType": "VariableDeclaration",
+ "scope": 1003,
+ "src": "13778:17:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 981,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "13778:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 989,
+ "initialValue": {
+ "arguments": [
+ {
+ "hexValue": "7472616e7366657228616464726573732c75696e7432353629",
+ "id": 985,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13822:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
+ "typeString": "literal_string \"transfer(address,uint256)\""
+ },
+ "value": "transfer(address,uint256)"
+ },
+ {
+ "id": 986,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 956,
+ "src": "13851:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 987,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 958,
+ "src": "13855:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
+ "typeString": "literal_string \"transfer(address,uint256)\""
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "expression": {
+ "id": 983,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "13798:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 984,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encodeWithSignature",
+ "nodeType": "MemberAccess",
+ "src": "13798:23:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function (string memory) pure returns (bytes memory)"
+ }
+ },
+ "id": 988,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13798:64:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "13778:84:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 993,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 954,
+ "src": "13915:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "hexValue": "30",
+ "id": 994,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13922:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ {
+ "id": 995,
+ "name": "data",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 982,
+ "src": "13925:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "expression": {
+ "expression": {
+ "id": 996,
+ "name": "Enum",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1435,
+ "src": "13931:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_contract$_Enum_$1435_$",
+ "typeString": "type(contract Enum)"
+ }
+ },
+ "id": 997,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "Operation",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 1434,
+ "src": "13931:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_enum$_Operation_$1434_$",
+ "typeString": "type(enum Enum.Operation)"
+ }
+ },
+ "id": 998,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "Call",
+ "nodeType": "MemberAccess",
+ "src": "13931:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "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_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ ],
+ "expression": {
+ "id": 991,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 952,
+ "src": "13884:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "id": 992,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "execTransactionFromModule",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 17,
+ "src": "13884:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1434_$returns$_t_bool_$",
+ "typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
+ }
+ },
+ "id": 999,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13884:67:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "436f756c64206e6f74206578656375746520746f6b656e207472616e73666572",
+ "id": 1000,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13953:34:0",
+ "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": 990,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "13876:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 1001,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13876:112:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1002,
+ "nodeType": "ExpressionStatement",
+ "src": "13876:112:0"
+ }
+ ]
+ },
+ "id": 1004,
+ "nodeType": "IfStatement",
+ "src": "13539:460:0",
+ "trueBody": {
+ "id": 980,
+ "nodeType": "Block",
+ "src": "13564:194:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 970,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 956,
+ "src": "13674:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 971,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 958,
+ "src": "13678:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "hexValue": "",
+ "id": 972,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13686:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
+ "typeString": "literal_string \"\""
+ },
+ "value": ""
+ },
+ {
+ "expression": {
+ "expression": {
+ "id": 973,
+ "name": "Enum",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1435,
+ "src": "13690:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_contract$_Enum_$1435_$",
+ "typeString": "type(contract Enum)"
+ }
+ },
+ "id": 974,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "Operation",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 1434,
+ "src": "13690:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_enum$_Operation_$1434_$",
+ "typeString": "type(enum Enum.Operation)"
+ }
+ },
+ "id": 975,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "Call",
+ "nodeType": "MemberAccess",
+ "src": "13690:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
+ "typeString": "literal_string \"\""
+ },
+ {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ ],
+ "expression": {
+ "id": 968,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 952,
+ "src": "13643:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "id": 969,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "execTransactionFromModule",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 17,
+ "src": "13643:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1434_$returns$_t_bool_$",
+ "typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
+ }
+ },
+ "id": 976,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13643:67:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "436f756c64206e6f742065786563757465206574686572207472616e73666572",
+ "id": 977,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13712:34:0",
+ "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": 967,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "13635:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 978,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13635:112:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 979,
+ "nodeType": "ExpressionStatement",
+ "src": "13635:112:0"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "id": 1006,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "transfer",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 959,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 952,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13454:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ "typeName": {
+ "id": 951,
+ "name": "GnosisSafe",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 18,
+ "src": "13454:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 954,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13471:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 953,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13471:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 956,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13486:18:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ "typeName": {
+ "id": 955,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13486:15:0",
+ "stateMutability": "payable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 958,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13506:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 957,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "13506:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "13453:67:0"
+ },
+ "returnParameters": {
+ "id": 960,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "13529:0:0"
+ },
+ "scope": 1428,
+ "src": "13436:569:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 1022,
+ "nodeType": "Block",
+ "src": "14101:46:0",
+ "statements": [
+ {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1016,
+ "name": "tokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47,
+ "src": "14118:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[] storage ref))"
+ }
+ },
+ "id": 1018,
+ "indexExpression": {
+ "id": 1017,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1008,
+ "src": "14125:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14118:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[] storage ref)"
+ }
+ },
+ "id": 1020,
+ "indexExpression": {
+ "id": 1019,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1010,
+ "src": "14131:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14118:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage",
+ "typeString": "address[] storage ref"
+ }
+ },
+ "functionReturnParameters": 1015,
+ "id": 1021,
+ "nodeType": "Return",
+ "src": "14111:29:0"
+ }
+ ]
+ },
+ "functionSelector": "8d0e8e1d",
+ "id": 1023,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getTokens",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1011,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1008,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1023,
+ "src": "14030:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1007,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14030:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1010,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1023,
+ "src": "14044:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1009,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14044:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14029:32:0"
+ },
+ "returnParameters": {
+ "id": 1015,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1014,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 1023,
+ "src": "14083:16:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1012,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14083:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1013,
+ "nodeType": "ArrayTypeName",
+ "src": "14083:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14082:18:0"
+ },
+ "scope": 1428,
+ "src": "14011:136:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1071,
+ "nodeType": "Block",
+ "src": "14267:313:0",
+ "statements": [
+ {
+ "assignments": [
+ 1037
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1037,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 1071,
+ "src": "14277:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 1036,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "14277:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1043,
+ "initialValue": {
+ "arguments": [
+ {
+ "id": 1039,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1025,
+ "src": "14319:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1040,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1027,
+ "src": "14325:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1041,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1029,
+ "src": "14335:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1038,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "14306:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 1042,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14306:35:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "14277:64:0"
+ },
+ {
+ "expression": {
+ "components": [
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1046,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14380:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1047,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "14380:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 1045,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14372:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1044,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14372:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1048,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14372:25:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1051,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14419:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1052,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "14419:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 1050,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14411:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1049,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14411:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1053,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14411:24:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1056,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14457:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1057,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "14457:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 1055,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14449:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1054,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14449:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1058,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14449:31:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1061,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14502:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1062,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "14502:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ ],
+ "id": 1060,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14494:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1059,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14494:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1063,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14494:31:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1066,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14547:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1067,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "14547:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 1065,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14539:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1064,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14539:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1068,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14539:24:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ }
+ ],
+ "id": 1069,
+ "isConstant": false,
+ "isInlineArray": true,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "14358:215:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr",
+ "typeString": "uint256[5] memory"
+ }
+ },
+ "functionReturnParameters": 1035,
+ "id": 1070,
+ "nodeType": "Return",
+ "src": "14351:222:0"
+ }
+ ]
+ },
+ "functionSelector": "94b31fbd",
+ "id": 1072,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getTokenAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1030,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1025,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14180:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1024,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14180:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1027,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14194:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1026,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14194:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1029,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14212:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1028,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14212:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14179:47:0"
+ },
+ "returnParameters": {
+ "id": 1035,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1034,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14248:17:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr",
+ "typeString": "uint256[5]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1031,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14248:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "id": 1033,
+ "length": {
+ "hexValue": "35",
+ "id": 1032,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14256:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_5_by_1",
+ "typeString": "int_const 5"
+ },
+ "value": "5"
+ },
+ "nodeType": "ArrayTypeName",
+ "src": "14248:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr",
+ "typeString": "uint256[5]"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14247:19:0"
+ },
+ "scope": 1428,
+ "src": "14153:427:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1164,
+ "nodeType": "Block",
+ "src": "14726:727:0",
+ "statements": [
+ {
+ "assignments": [
+ 1079
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1079,
+ "mutability": "mutable",
+ "name": "index",
+ "nodeType": "VariableDeclaration",
+ "scope": 1164,
+ "src": "14736:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1078,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "14736:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1084,
+ "initialValue": {
+ "arguments": [
+ {
+ "id": 1082,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "14758:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1081,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14751:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1080,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "14751:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1083,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14751:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "14736:31:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 1091,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1086,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "14785:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1089,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14799:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1088,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14794:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1087,
+ "name": "uint",
+ "nodeType": "ElementaryTypeName",
+ "src": "14794:4:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1090,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14794:7:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "src": "14785:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "696e64657820213d2075696e74283029",
+ "id": 1092,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14803:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_4a2d9edd74f24662f88947ce284e3a1e9e02725c0905850305b1ce7e8ee456f2",
+ "typeString": "literal_string \"index != uint(0)\""
+ },
+ "value": "index != uint(0)"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_4a2d9edd74f24662f88947ce284e3a1e9e02725c0905850305b1ce7e8ee456f2",
+ "typeString": "literal_string \"index != uint(0)\""
+ }
+ ],
+ "id": 1085,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "14777:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 1093,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14777:45:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1094,
+ "nodeType": "ExpressionStatement",
+ "src": "14777:45:0"
+ },
+ {
+ "assignments": [
+ 1096
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1096,
+ "mutability": "mutable",
+ "name": "currentDelegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1164,
+ "src": "14832:23:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1095,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14832:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1104,
+ "initialValue": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1097,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "14858:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1100,
+ "indexExpression": {
+ "expression": {
+ "id": 1098,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "14868:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1099,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "14868:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14858:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1102,
+ "indexExpression": {
+ "id": 1101,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "14880:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14858:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1103,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "14858:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "14832:63:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1110,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1105,
+ "name": "currentDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1096,
+ "src": "14908:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1108,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14935:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1107,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14927:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 1106,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14927:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1109,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14927:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "14908:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1120,
+ "nodeType": "IfStatement",
+ "src": "14905:264:0",
+ "trueBody": {
+ "id": 1119,
+ "nodeType": "Block",
+ "src": "14939:230:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1114,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1112,
+ "name": "currentDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1096,
+ "src": "15025:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 1113,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "15044:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "15025:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "63757272656e7444656c6567617465203d3d2064656c6567617465",
+ "id": 1115,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "15054:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_015a46159767c793786ac6026f0bf920b0e1b83347241b23bbb8e98c67f949b3",
+ "typeString": "literal_string \"currentDelegate == delegate\""
+ },
+ "value": "currentDelegate == delegate"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_015a46159767c793786ac6026f0bf920b0e1b83347241b23bbb8e98c67f949b3",
+ "typeString": "literal_string \"currentDelegate == delegate\""
+ }
+ ],
+ "id": 1111,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "15017:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 1116,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15017:67:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1117,
+ "nodeType": "ExpressionStatement",
+ "src": "15017:67:0"
+ },
+ {
+ "functionReturnParameters": 1077,
+ "id": 1118,
+ "nodeType": "Return",
+ "src": "15152:7:0"
+ }
+ ]
+ }
+ },
+ {
+ "assignments": [
+ 1122
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1122,
+ "mutability": "mutable",
+ "name": "startIndex",
+ "nodeType": "VariableDeclaration",
+ "scope": 1164,
+ "src": "15178:17:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1121,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "15178:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1127,
+ "initialValue": {
+ "baseExpression": {
+ "id": 1123,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "15198:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1126,
+ "indexExpression": {
+ "expression": {
+ "id": 1124,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15213:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1125,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15213:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15198:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "15178:46:0"
+ },
+ {
+ "expression": {
+ "id": 1139,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1128,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "15234:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1132,
+ "indexExpression": {
+ "expression": {
+ "id": 1129,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15244:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1130,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15244:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15234:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1133,
+ "indexExpression": {
+ "id": 1131,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "15256:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "15234:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "id": 1135,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "15274:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "hexValue": "30",
+ "id": 1136,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "15284:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ {
+ "id": 1137,
+ "name": "startIndex",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1122,
+ "src": "15287:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ ],
+ "id": 1134,
+ "name": "Delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 64,
+ "src": "15265:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_struct$_Delegate_$64_storage_ptr_$",
+ "typeString": "type(struct AllowanceModule.Delegate storage pointer)"
+ }
+ },
+ "id": 1138,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "structConstructorCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15265:33:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "src": "15234:64:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1140,
+ "nodeType": "ExpressionStatement",
+ "src": "15234:64:0"
+ },
+ {
+ "expression": {
+ "id": 1149,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1141,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "15308:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1145,
+ "indexExpression": {
+ "expression": {
+ "id": 1142,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15318:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1143,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15318:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15308:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1146,
+ "indexExpression": {
+ "id": 1144,
+ "name": "startIndex",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1122,
+ "src": "15330:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15308:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1147,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "15308:38:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 1148,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "15349:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "15308:46:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1150,
+ "nodeType": "ExpressionStatement",
+ "src": "15308:46:0"
+ },
+ {
+ "expression": {
+ "id": 1156,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "id": 1151,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "15364:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1154,
+ "indexExpression": {
+ "expression": {
+ "id": 1152,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15379:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1153,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15379:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "15364:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 1155,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "15393:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "15364:34:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1157,
+ "nodeType": "ExpressionStatement",
+ "src": "15364:34:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1159,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15425:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1160,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15425:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1161,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "15437:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1158,
+ "name": "AddDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 81,
+ "src": "15413:11:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address)"
+ }
+ },
+ "id": 1162,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15413:33:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1163,
+ "nodeType": "EmitStatement",
+ "src": "15408:38:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 1073,
+ "nodeType": "StructuredDocumentation",
+ "src": "14586:89:0",
+ "text": "@dev Allows to add a delegate.\n @param delegate Delegate that should be added."
+ },
+ "functionSelector": "e71bdf41",
+ "id": 1165,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "addDelegate",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1076,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1075,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1165,
+ "src": "14701:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1074,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14701:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14700:18:0"
+ },
+ "returnParameters": {
+ "id": 1077,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "14726:0:0"
+ },
+ "scope": 1428,
+ "src": "14680:773:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1338,
+ "nodeType": "Block",
+ "src": "15853:1293:0",
+ "statements": [
+ {
+ "assignments": [
+ 1174
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1174,
+ "mutability": "mutable",
+ "name": "current",
+ "nodeType": "VariableDeclaration",
+ "scope": 1338,
+ "src": "15863:23:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ },
+ "typeName": {
+ "id": 1173,
+ "name": "Delegate",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 64,
+ "src": "15863:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1184,
+ "initialValue": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1175,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "15889:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1178,
+ "indexExpression": {
+ "expression": {
+ "id": 1176,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15899:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1177,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15899:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15889:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1183,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 1181,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "15918:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1180,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "15911:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1179,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "15911:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1182,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15911:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15889:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "15863:65:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1191,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1185,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "15991:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1186,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "15991:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1189,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16019:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1188,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "16011:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 1187,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "16011:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1190,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16011:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "15991:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1193,
+ "nodeType": "IfStatement",
+ "src": "15988:42:0",
+ "trueBody": {
+ "functionReturnParameters": 1172,
+ "id": 1192,
+ "nodeType": "Return",
+ "src": "16023:7:0"
+ }
+ },
+ {
+ "condition": {
+ "id": 1194,
+ "name": "removeAllowances",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1170,
+ "src": "16043:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1275,
+ "nodeType": "IfStatement",
+ "src": "16039:698:0",
+ "trueBody": {
+ "id": 1274,
+ "nodeType": "Block",
+ "src": "16061:676:0",
+ "statements": [
+ {
+ "assignments": [
+ 1199
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1199,
+ "mutability": "mutable",
+ "name": "delegateTokens",
+ "nodeType": "VariableDeclaration",
+ "scope": 1274,
+ "src": "16075:32:0",
+ "stateVariable": false,
+ "storageLocation": "storage",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1197,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "16075:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1198,
+ "nodeType": "ArrayTypeName",
+ "src": "16075:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1206,
+ "initialValue": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1200,
+ "name": "tokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47,
+ "src": "16110:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[] storage ref))"
+ }
+ },
+ "id": 1203,
+ "indexExpression": {
+ "expression": {
+ "id": 1201,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16117:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1202,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16117:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16110:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[] storage ref)"
+ }
+ },
+ "id": 1205,
+ "indexExpression": {
+ "id": 1204,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16129:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16110:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage",
+ "typeString": "address[] storage ref"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16075:63:0"
+ },
+ {
+ "body": {
+ "id": 1272,
+ "nodeType": "Block",
+ "src": "16204:523:0",
+ "statements": [
+ {
+ "assignments": [
+ 1219
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1219,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 1272,
+ "src": "16222:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1218,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "16222:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1223,
+ "initialValue": {
+ "baseExpression": {
+ "id": 1220,
+ "name": "delegateTokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1199,
+ "src": "16238:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[] storage pointer"
+ }
+ },
+ "id": 1222,
+ "indexExpression": {
+ "id": 1221,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1208,
+ "src": "16253:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16238:17:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16222:33:0"
+ },
+ {
+ "assignments": [
+ 1225
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1225,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 1272,
+ "src": "16339:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 1224,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "16339:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1232,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1227,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16381:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1228,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16381:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1229,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16393:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1230,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1219,
+ "src": "16403:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1226,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "16368:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 1231,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16368:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16339:70:0"
+ },
+ {
+ "expression": {
+ "id": 1237,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1233,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16427:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1235,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "16427:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1236,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16446:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16427:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 1238,
+ "nodeType": "ExpressionStatement",
+ "src": "16427:20:0"
+ },
+ {
+ "expression": {
+ "id": 1243,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1239,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16465:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1241,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "16465:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1242,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16483:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16465:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 1244,
+ "nodeType": "ExpressionStatement",
+ "src": "16465:19:0"
+ },
+ {
+ "expression": {
+ "id": 1249,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1245,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16502:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1247,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "16502:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1248,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16527:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16502:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 1250,
+ "nodeType": "ExpressionStatement",
+ "src": "16502:26:0"
+ },
+ {
+ "expression": {
+ "id": 1255,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1251,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16546:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1253,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "16546:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1254,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16571:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16546:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 1256,
+ "nodeType": "ExpressionStatement",
+ "src": "16546:26:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1258,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16606:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1259,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16606:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1260,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16618:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1261,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1219,
+ "src": "16628:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1262,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16635:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 1257,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "16590:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 1263,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16590:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1264,
+ "nodeType": "ExpressionStatement",
+ "src": "16590:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1266,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16684:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1267,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16684:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1268,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16696:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1269,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1219,
+ "src": "16706:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1265,
+ "name": "DeleteAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 141,
+ "src": "16668:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address,address)"
+ }
+ },
+ "id": 1270,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16668:44:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1271,
+ "nodeType": "EmitStatement",
+ "src": "16663:49:0"
+ }
+ ]
+ },
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 1214,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1211,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1208,
+ "src": "16172:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<",
+ "rightExpression": {
+ "expression": {
+ "id": 1212,
+ "name": "delegateTokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1199,
+ "src": "16176:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[] storage pointer"
+ }
+ },
+ "id": 1213,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "length",
+ "nodeType": "MemberAccess",
+ "src": "16176:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "src": "16172:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1273,
+ "initializationExpression": {
+ "assignments": [
+ 1208
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1208,
+ "mutability": "mutable",
+ "name": "i",
+ "nodeType": "VariableDeclaration",
+ "scope": 1273,
+ "src": "16157:9:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 1207,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "16157:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1210,
+ "initialValue": {
+ "hexValue": "30",
+ "id": 1209,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16169:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16157:13:0"
+ },
+ "loopExpression": {
+ "expression": {
+ "id": 1216,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "UnaryOperation",
+ "operator": "++",
+ "prefix": false,
+ "src": "16199:3:0",
+ "subExpression": {
+ "id": 1215,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1208,
+ "src": "16199:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "id": 1217,
+ "nodeType": "ExpressionStatement",
+ "src": "16199:3:0"
+ },
+ "nodeType": "ForStatement",
+ "src": "16152:575:0"
+ }
+ ]
+ }
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "id": 1279,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1276,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16750:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1277,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "16750:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 1278,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16766:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16750:17:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "id": 1301,
+ "nodeType": "Block",
+ "src": "16841:80:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1299,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1289,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "16855:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1294,
+ "indexExpression": {
+ "expression": {
+ "id": 1290,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16865:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1291,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16865:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16855:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1295,
+ "indexExpression": {
+ "expression": {
+ "id": 1292,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16877:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1293,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "16877:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16855:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1296,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16855:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1297,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16898:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1298,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16898:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "16855:55:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1300,
+ "nodeType": "ExpressionStatement",
+ "src": "16855:55:0"
+ }
+ ]
+ },
+ "id": 1302,
+ "nodeType": "IfStatement",
+ "src": "16746:175:0",
+ "trueBody": {
+ "id": 1288,
+ "nodeType": "Block",
+ "src": "16769:66:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1286,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "id": 1280,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "16783:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1283,
+ "indexExpression": {
+ "expression": {
+ "id": 1281,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16798:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1282,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16798:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "16783:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1284,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16812:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1285,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16812:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "16783:41:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1287,
+ "nodeType": "ExpressionStatement",
+ "src": "16783:41:0"
+ }
+ ]
+ }
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "id": 1306,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1303,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16934:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1304,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16934:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 1305,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16950:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16934:17:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1320,
+ "nodeType": "IfStatement",
+ "src": "16930:103:0",
+ "trueBody": {
+ "id": 1319,
+ "nodeType": "Block",
+ "src": "16953:80:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1317,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1307,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "16967:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1312,
+ "indexExpression": {
+ "expression": {
+ "id": 1308,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16977:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1309,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16977:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16967:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1313,
+ "indexExpression": {
+ "expression": {
+ "id": 1310,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16989:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1311,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16989:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16967:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1314,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "16967:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1315,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "17010:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1316,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "17010:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "16967:55:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1318,
+ "nodeType": "ExpressionStatement",
+ "src": "16967:55:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "id": 1330,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "UnaryOperation",
+ "operator": "delete",
+ "prefix": true,
+ "src": "17042:46:0",
+ "subExpression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1321,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "17049:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1324,
+ "indexExpression": {
+ "expression": {
+ "id": 1322,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "17059:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1323,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "17059:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17049:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1329,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 1327,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "17078:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1326,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "17071:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1325,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17071:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1328,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17071:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "17049:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1331,
+ "nodeType": "ExpressionStatement",
+ "src": "17042:46:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1333,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "17118:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1334,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "17118:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1335,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "17130:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1332,
+ "name": "RemoveDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 87,
+ "src": "17103:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address)"
+ }
+ },
+ "id": 1336,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17103:36:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1337,
+ "nodeType": "EmitStatement",
+ "src": "17098:41:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 1166,
+ "nodeType": "StructuredDocumentation",
+ "src": "15459:317:0",
+ "text": "@dev Allows to remove a delegate.\n @param delegate Delegate that should be removed.\n @param removeAllowances Indicator if allowances should also be removed. This should be set to `true` unless this causes an out of gas, in this case the allowances should be \"manually\" deleted via `deleteAllowance`."
+ },
+ "functionSelector": "dd43a79f",
+ "id": 1339,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "removeDelegate",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1171,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1168,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1339,
+ "src": "15805:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1167,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "15805:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1170,
+ "mutability": "mutable",
+ "name": "removeAllowances",
+ "nodeType": "VariableDeclaration",
+ "scope": 1339,
+ "src": "15823:21:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "typeName": {
+ "id": 1169,
+ "name": "bool",
+ "nodeType": "ElementaryTypeName",
+ "src": "15823:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "15804:41:0"
+ },
+ "returnParameters": {
+ "id": 1172,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "15853:0:0"
+ },
+ "scope": 1428,
+ "src": "15781:1365:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1426,
+ "nodeType": "Block",
+ "src": "17278:633:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1359,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 1353,
+ "name": "results",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1349,
+ "src": "17288:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "id": 1357,
+ "name": "pageSize",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1345,
+ "src": "17312:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ ],
+ "id": 1356,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "NewExpression",
+ "src": "17298:13:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$",
+ "typeString": "function (uint256) pure returns (address[] memory)"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1354,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17302:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1355,
+ "nodeType": "ArrayTypeName",
+ "src": "17302:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ }
+ },
+ "id": 1358,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17298:23:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "src": "17288:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "id": 1360,
+ "nodeType": "ExpressionStatement",
+ "src": "17288:33:0"
+ },
+ {
+ "assignments": [
+ 1362
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1362,
+ "mutability": "mutable",
+ "name": "i",
+ "nodeType": "VariableDeclaration",
+ "scope": 1426,
+ "src": "17331:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "typeName": {
+ "id": 1361,
+ "name": "uint8",
+ "nodeType": "ElementaryTypeName",
+ "src": "17331:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1364,
+ "initialValue": {
+ "hexValue": "30",
+ "id": 1363,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "17341:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "17331:11:0"
+ },
+ {
+ "assignments": [
+ 1366
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1366,
+ "mutability": "mutable",
+ "name": "initialIndex",
+ "nodeType": "VariableDeclaration",
+ "scope": 1426,
+ "src": "17352:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1365,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17352:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1376,
+ "initialValue": {
+ "condition": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "id": 1369,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1367,
+ "name": "start",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1343,
+ "src": "17375:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 1368,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "17384:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "17375:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ }
+ ],
+ "id": 1370,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "17374:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseExpression": {
+ "baseExpression": {
+ "id": 1372,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "17397:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1374,
+ "indexExpression": {
+ "id": 1373,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1341,
+ "src": "17412:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17397:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1375,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "Conditional",
+ "src": "17374:43:0",
+ "trueExpression": {
+ "id": 1371,
+ "name": "start",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1343,
+ "src": "17389:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "17352:65:0"
+ },
+ {
+ "assignments": [
+ 1378
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1378,
+ "mutability": "mutable",
+ "name": "current",
+ "nodeType": "VariableDeclaration",
+ "scope": 1426,
+ "src": "17427:23:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ },
+ "typeName": {
+ "id": 1377,
+ "name": "Delegate",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 64,
+ "src": "17427:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1384,
+ "initialValue": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1379,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "17453:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1381,
+ "indexExpression": {
+ "id": 1380,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1341,
+ "src": "17463:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17453:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1383,
+ "indexExpression": {
+ "id": 1382,
+ "name": "initialIndex",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1366,
+ "src": "17469:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17453:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "17427:55:0"
+ },
+ {
+ "body": {
+ "id": 1415,
+ "nodeType": "Block",
+ "src": "17546:124:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1401,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "id": 1396,
+ "name": "results",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1349,
+ "src": "17560:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "id": 1398,
+ "indexExpression": {
+ "id": 1397,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1362,
+ "src": "17568:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "17560:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1399,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17573:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1400,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "17573:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "17560:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1402,
+ "nodeType": "ExpressionStatement",
+ "src": "17560:29:0"
+ },
+ {
+ "expression": {
+ "id": 1404,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "UnaryOperation",
+ "operator": "++",
+ "prefix": false,
+ "src": "17603:3:0",
+ "subExpression": {
+ "id": 1403,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1362,
+ "src": "17603:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "id": 1405,
+ "nodeType": "ExpressionStatement",
+ "src": "17603:3:0"
+ },
+ {
+ "expression": {
+ "id": 1413,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 1406,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17620:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1407,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "17630:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1409,
+ "indexExpression": {
+ "id": 1408,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1341,
+ "src": "17640:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17630:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1412,
+ "indexExpression": {
+ "expression": {
+ "id": 1410,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17646:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1411,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "17646:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17630:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "src": "17620:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1414,
+ "nodeType": "ExpressionStatement",
+ "src": "17620:39:0"
+ }
+ ]
+ },
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 1395,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1391,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1385,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17498:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1386,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "17498:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1389,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "17526:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1388,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "17518:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 1387,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17518:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1390,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17518:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "17498:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 1394,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1392,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1362,
+ "src": "17532:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<",
+ "rightExpression": {
+ "id": 1393,
+ "name": "pageSize",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1345,
+ "src": "17536:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "src": "17532:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "17498:46:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1416,
+ "nodeType": "WhileStatement",
+ "src": "17492:178:0"
+ },
+ {
+ "expression": {
+ "id": 1423,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 1417,
+ "name": "next",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1351,
+ "src": "17679:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1420,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17693:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1421,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "17693:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1419,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "17686:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1418,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17686:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1422,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17686:24:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "17679:31:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1424,
+ "nodeType": "ExpressionStatement",
+ "src": "17679:31:0"
+ },
+ {
+ "AST": {
+ "nodeType": "YulBlock",
+ "src": "17863:42:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "name": "results",
+ "nodeType": "YulIdentifier",
+ "src": "17884:7:0"
+ },
+ {
+ "name": "i",
+ "nodeType": "YulIdentifier",
+ "src": "17893:1:0"
+ }
+ ],
+ "functionName": {
+ "name": "mstore",
+ "nodeType": "YulIdentifier",
+ "src": "17877:6:0"
+ },
+ "nodeType": "YulFunctionCall",
+ "src": "17877:18:0"
+ },
+ "nodeType": "YulExpressionStatement",
+ "src": "17877:18:0"
+ }
+ ]
+ },
+ "evmVersion": "istanbul",
+ "externalReferences": [
+ {
+ "declaration": 1362,
+ "isOffset": false,
+ "isSlot": false,
+ "src": "17893:1:0",
+ "valueSize": 1
+ },
+ {
+ "declaration": 1349,
+ "isOffset": false,
+ "isSlot": false,
+ "src": "17884:7:0",
+ "valueSize": 1
+ }
+ ],
+ "id": 1425,
+ "nodeType": "InlineAssembly",
+ "src": "17854:51:0"
+ }
+ ]
+ },
+ "functionSelector": "eb37abe0",
+ "id": 1427,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getDelegates",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1346,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1341,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17174:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1340,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17174:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1343,
+ "mutability": "mutable",
+ "name": "start",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17188:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1342,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17188:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1345,
+ "mutability": "mutable",
+ "name": "pageSize",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17202:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "typeName": {
+ "id": 1344,
+ "name": "uint8",
+ "nodeType": "ElementaryTypeName",
+ "src": "17202:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "17173:44:0"
+ },
+ "returnParameters": {
+ "id": 1352,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1349,
+ "mutability": "mutable",
+ "name": "results",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17239:24:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1347,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17239:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1348,
+ "nodeType": "ArrayTypeName",
+ "src": "17239:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1351,
+ "mutability": "mutable",
+ "name": "next",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17265:11:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1350,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17265:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "17238:39:0"
+ },
+ "scope": 1428,
+ "src": "17152:759:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ }
+ ],
+ "scope": 1429,
+ "src": "648:17265:0"
+ }
+ ],
+ "src": "42:17871:0"
+ },
+ "legacyAST": {
+ "absolutePath": "/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/AlowanceModule.sol",
+ "exportedSymbols": {
+ "AllowanceModule": [
+ 1428
+ ],
+ "GnosisSafe": [
+ 18
+ ]
+ },
+ "id": 1429,
+ "license": "LGPL-3.0-only",
+ "nodeType": "SourceUnit",
+ "nodes": [
+ {
+ "id": 1,
+ "literals": [
+ "solidity",
+ ">=",
+ "0.7",
+ ".0",
+ "<",
+ "0.8",
+ ".0"
+ ],
+ "nodeType": "PragmaDirective",
+ "src": "42:31:0"
+ },
+ {
+ "absolutePath": "/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/Enum.sol",
+ "file": "./Enum.sol",
+ "id": 2,
+ "nodeType": "ImportDirective",
+ "scope": 1429,
+ "sourceUnit": 1436,
+ "src": "75:20:0",
+ "symbolAliases": [],
+ "unitAlias": ""
+ },
+ {
+ "absolutePath": "/home/fer/repos/protofire/gnosis/safe-modules/allowances/contracts/SignatureDecoder.sol",
+ "file": "./SignatureDecoder.sol",
+ "id": 3,
+ "nodeType": "ImportDirective",
+ "scope": 1429,
+ "sourceUnit": 1552,
+ "src": "96:32:0",
+ "symbolAliases": [],
+ "unitAlias": ""
+ },
+ {
+ "abstract": false,
+ "baseContracts": [],
+ "contractDependencies": [],
+ "contractKind": "interface",
+ "fullyImplemented": false,
+ "id": 18,
+ "linearizedBaseContracts": [
+ 18
+ ],
+ "name": "GnosisSafe",
+ "nodeType": "ContractDefinition",
+ "nodes": [
+ {
+ "documentation": {
+ "id": 4,
+ "nodeType": "StructuredDocumentation",
+ "src": "157:325:0",
+ "text": "@dev Allows a Module to execute a Safe transaction without any further confirmations.\n @param to Destination address of module transaction.\n @param value Ether value of module transaction.\n @param data Data payload of module transaction.\n @param operation Operation type of module transaction."
+ },
+ "functionSelector": "468721a7",
+ "id": 17,
+ "implemented": false,
+ "kind": "function",
+ "modifiers": [],
+ "name": "execTransactionFromModule",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 13,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 6,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "522:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 5,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "522:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 8,
+ "mutability": "mutable",
+ "name": "value",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "534:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 7,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "534:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 10,
+ "mutability": "mutable",
+ "name": "data",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "549:19:0",
+ "stateVariable": false,
+ "storageLocation": "calldata",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_calldata_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 9,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "549:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 12,
+ "mutability": "mutable",
+ "name": "operation",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "570:24:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ },
+ "typeName": {
+ "id": 11,
+ "name": "Enum.Operation",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 1434,
+ "src": "570:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "521:74:0"
+ },
+ "returnParameters": {
+ "id": 16,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 15,
+ "mutability": "mutable",
+ "name": "success",
+ "nodeType": "VariableDeclaration",
+ "scope": 17,
+ "src": "630:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "typeName": {
+ "id": 14,
+ "name": "bool",
+ "nodeType": "ElementaryTypeName",
+ "src": "630:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "629:14:0"
+ },
+ "scope": 18,
+ "src": "487:157:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "external"
+ }
+ ],
+ "scope": 1429,
+ "src": "130:516:0"
+ },
+ {
+ "abstract": false,
+ "baseContracts": [
+ {
+ "baseName": {
+ "id": 19,
+ "name": "SignatureDecoder",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 1551,
+ "src": "676:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_SignatureDecoder_$1551",
+ "typeString": "contract SignatureDecoder"
+ }
+ },
+ "id": 20,
+ "nodeType": "InheritanceSpecifier",
+ "src": "676:16:0"
+ }
+ ],
+ "contractDependencies": [
+ 1551
+ ],
+ "contractKind": "contract",
+ "fullyImplemented": true,
+ "id": 1428,
+ "linearizedBaseContracts": [
+ 1428,
+ 1551
+ ],
+ "name": "AllowanceModule",
+ "nodeType": "ContractDefinition",
+ "nodes": [
+ {
+ "constant": true,
+ "functionSelector": "a3f4df7e",
+ "id": 23,
+ "mutability": "constant",
+ "name": "NAME",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "700:48:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_memory_ptr",
+ "typeString": "string"
+ },
+ "typeName": {
+ "id": 21,
+ "name": "string",
+ "nodeType": "ElementaryTypeName",
+ "src": "700:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_storage_ptr",
+ "typeString": "string"
+ }
+ },
+ "value": {
+ "hexValue": "416c6c6f77616e6365204d6f64756c65",
+ "id": 22,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "730:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_08f58094bad74d8c1150a9739fed54fd2f5fa3e2ab1381a21213c5b33d83bad3",
+ "typeString": "literal_string \"Allowance Module\""
+ },
+ "value": "Allowance Module"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": true,
+ "functionSelector": "ffa1ad74",
+ "id": 26,
+ "mutability": "constant",
+ "name": "VERSION",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "754:40:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_memory_ptr",
+ "typeString": "string"
+ },
+ "typeName": {
+ "id": 24,
+ "name": "string",
+ "nodeType": "ElementaryTypeName",
+ "src": "754:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_storage_ptr",
+ "typeString": "string"
+ }
+ },
+ "value": {
+ "hexValue": "302e312e30",
+ "id": 25,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "787:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_aa7cdbe2cce2ec7b606b0e199ddd9b264a6e645e767fb8479a7917dcd1b8693f",
+ "typeString": "literal_string \"0.1.0\""
+ },
+ "value": "0.1.0"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": true,
+ "functionSelector": "1db61b54",
+ "id": 29,
+ "mutability": "constant",
+ "name": "DOMAIN_SEPARATOR_TYPEHASH",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "801:118:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 27,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "801:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "value": {
+ "hexValue": "307834376537393533346132343539353265386231363839336133333662383561336439656139666138633537336633643830336166623932613739343639323138",
+ "id": 28,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "853:66:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_32523383700587834770323112271211932718128200013265661849047136999858837557784_by_1",
+ "typeString": "int_const 3252...(69 digits omitted)...7784"
+ },
+ "value": "0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": true,
+ "functionSelector": "43abf5fe",
+ "id": 32,
+ "mutability": "constant",
+ "name": "ALLOWANCE_TRANSFER_TYPEHASH",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1023:120:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 30,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "1023:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "value": {
+ "hexValue": "307838306230303632383039333230393465376363393635383633656235313138646330376535643237326336363730633461376338373239396530346663656562",
+ "id": 31,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "1077:66:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_58207052191903435170300093819667864394893463916847536691962682627702085635819_by_1",
+ "typeString": "int_const 5820...(69 digits omitted)...5819"
+ },
+ "value": "0x80b006280932094e7cc965863eb5118dc07e5d272c6670c4a7c87299e04fceeb"
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "b713c9d4",
+ "id": 40,
+ "mutability": "mutable",
+ "name": "allowances",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1337:88:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance)))"
+ },
+ "typeName": {
+ "id": 39,
+ "keyType": {
+ "id": 33,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1345:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1337:70:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance)))"
+ },
+ "valueType": {
+ "id": 38,
+ "keyType": {
+ "id": 34,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1365:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1356:50:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$",
+ "typeString": "mapping(address => mapping(address => struct AllowanceModule.Allowance))"
+ },
+ "valueType": {
+ "id": 37,
+ "keyType": {
+ "id": 35,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1384:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1376:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$",
+ "typeString": "mapping(address => struct AllowanceModule.Allowance)"
+ },
+ "valueType": {
+ "id": 36,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "1395:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ }
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "f56e81fa",
+ "id": 47,
+ "mutability": "mutable",
+ "name": "tokens",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1465:64:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[]))"
+ },
+ "typeName": {
+ "id": 46,
+ "keyType": {
+ "id": 41,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1473:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1465:50:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[]))"
+ },
+ "valueType": {
+ "id": 45,
+ "keyType": {
+ "id": 42,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1493:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1484:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[])"
+ },
+ "valueType": {
+ "baseType": {
+ "id": 43,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1504:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 44,
+ "nodeType": "ArrayTypeName",
+ "src": "1504:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "310a3bb1",
+ "id": 51,
+ "mutability": "mutable",
+ "name": "delegatesStart",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1592:48:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ },
+ "typeName": {
+ "id": 50,
+ "keyType": {
+ "id": 48,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1600:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1592:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ },
+ "valueType": {
+ "id": 49,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "1611:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "constant": false,
+ "functionSelector": "ce60c692",
+ "id": 57,
+ "mutability": "mutable",
+ "name": "delegates",
+ "nodeType": "VariableDeclaration",
+ "scope": 1428,
+ "src": "1690:65:0",
+ "stateVariable": true,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate))"
+ },
+ "typeName": {
+ "id": 56,
+ "keyType": {
+ "id": 52,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1698:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1690:48:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate))"
+ },
+ "valueType": {
+ "id": 55,
+ "keyType": {
+ "id": 53,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "1718:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Mapping",
+ "src": "1709:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate)"
+ },
+ "valueType": {
+ "id": 54,
+ "name": "Delegate",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 64,
+ "src": "1728:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ }
+ }
+ }
+ },
+ "visibility": "public"
+ },
+ {
+ "canonicalName": "AllowanceModule.Delegate",
+ "id": 64,
+ "members": [
+ {
+ "constant": false,
+ "id": 59,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 64,
+ "src": "1964:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 58,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1964:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 61,
+ "mutability": "mutable",
+ "name": "prev",
+ "nodeType": "VariableDeclaration",
+ "scope": 64,
+ "src": "1990:11:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 60,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "1990:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 63,
+ "mutability": "mutable",
+ "name": "next",
+ "nodeType": "VariableDeclaration",
+ "scope": 64,
+ "src": "2011:11:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 62,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "2011:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "name": "Delegate",
+ "nodeType": "StructDefinition",
+ "scope": 1428,
+ "src": "1938:91:0",
+ "visibility": "public"
+ },
+ {
+ "canonicalName": "AllowanceModule.Allowance",
+ "id": 75,
+ "members": [
+ {
+ "constant": false,
+ "id": 66,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2134:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 65,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2134:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 68,
+ "mutability": "mutable",
+ "name": "spent",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2157:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 67,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2157:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 70,
+ "mutability": "mutable",
+ "name": "resetTimeMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2179:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 69,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2179:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 72,
+ "mutability": "mutable",
+ "name": "lastResetMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2250:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 71,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "2250:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 74,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 75,
+ "src": "2279:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 73,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2279:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "name": "Allowance",
+ "nodeType": "StructDefinition",
+ "scope": 1428,
+ "src": "2107:191:0",
+ "visibility": "public"
+ },
+ {
+ "anonymous": false,
+ "id": 81,
+ "name": "AddDelegate",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 80,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 77,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 81,
+ "src": "2322:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 76,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2322:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 79,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 81,
+ "src": "2344:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 78,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2344:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2321:40:0"
+ },
+ "src": "2304:58:0"
+ },
+ {
+ "anonymous": false,
+ "id": 87,
+ "name": "RemoveDelegate",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 86,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 83,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 87,
+ "src": "2388:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 82,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2388:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 85,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 87,
+ "src": "2410:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 84,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2410:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2387:40:0"
+ },
+ "src": "2367:61:0"
+ },
+ {
+ "anonymous": false,
+ "id": 101,
+ "name": "ExecuteAllowanceTransfer",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 100,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 89,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2464:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 88,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2464:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 91,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2486:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 90,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2486:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 93,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2504:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 92,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2504:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 95,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2519:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 94,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2519:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 97,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "value",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2531:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 96,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2531:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 99,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 101,
+ "src": "2545:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 98,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2545:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2463:95:0"
+ },
+ "src": "2433:126:0"
+ },
+ {
+ "anonymous": false,
+ "id": 113,
+ "name": "PayAllowanceTransfer",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 112,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 103,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2591:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 102,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2591:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 105,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2613:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 104,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2613:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 107,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2631:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 106,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2631:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 109,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "paymentReceiver",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2653:23:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 108,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2653:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 111,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 113,
+ "src": "2678:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 110,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2678:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2590:103:0"
+ },
+ "src": "2564:130:0"
+ },
+ {
+ "anonymous": false,
+ "id": 125,
+ "name": "SetAllowance",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 124,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 115,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2718:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 114,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2718:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 117,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2740:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 116,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2740:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 119,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2758:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 118,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2758:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 121,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "allowanceAmount",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2773:22:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 120,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "2773:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 123,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "resetTime",
+ "nodeType": "VariableDeclaration",
+ "scope": 125,
+ "src": "2797:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 122,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "2797:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2717:97:0"
+ },
+ "src": "2699:116:0"
+ },
+ {
+ "anonymous": false,
+ "id": 133,
+ "name": "ResetAllowance",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 132,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 127,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 133,
+ "src": "2841:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 126,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2841:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 129,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 133,
+ "src": "2863:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 128,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2863:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 131,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 133,
+ "src": "2881:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 130,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2881:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2840:55:0"
+ },
+ "src": "2820:76:0"
+ },
+ {
+ "anonymous": false,
+ "id": 141,
+ "name": "DeleteAllowance",
+ "nodeType": "EventDefinition",
+ "parameters": {
+ "id": 140,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 135,
+ "indexed": true,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 141,
+ "src": "2923:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 134,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2923:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 137,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 141,
+ "src": "2945:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 136,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2945:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 139,
+ "indexed": false,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 141,
+ "src": "2963:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 138,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "2963:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "2922:55:0"
+ },
+ "src": "2901:77:0"
+ },
+ {
+ "body": {
+ "id": 289,
+ "nodeType": "Block",
+ "src": "3570:1250:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 161,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 156,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3588:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 159,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3608:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 158,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "3600:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 157,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "3600:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 160,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3600:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "3588:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "64656c656761746520213d2061646472657373283029",
+ "id": 162,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3612:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_47a766b6b1495cbb254fe5e4828ba3622b8f5a171138d82c6bfaf22ff04f26eb",
+ "typeString": "literal_string \"delegate != address(0)\""
+ },
+ "value": "delegate != address(0)"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_47a766b6b1495cbb254fe5e4828ba3622b8f5a171138d82c6bfaf22ff04f26eb",
+ "typeString": "literal_string \"delegate != address(0)\""
+ }
+ ],
+ "id": 155,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "3580:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 163,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3580:57:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 164,
+ "nodeType": "ExpressionStatement",
+ "src": "3580:57:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 177,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 166,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "3655:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 169,
+ "indexExpression": {
+ "expression": {
+ "id": 167,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "3665:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 168,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "3665:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "3655:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 174,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 172,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3684:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 171,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "3677:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 170,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "3677:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 173,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3677:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "3655:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 175,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "3655:48:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 176,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3707:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "3655:60:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "64656c6567617465735b6d73672e73656e6465725d5b75696e7434382864656c6567617465295d2e64656c6567617465203d3d2064656c6567617465",
+ "id": 178,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3717:62:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_58537fa1960fbebccc117b6218b0af08a9f148039299593ea287e665dd534bb1",
+ "typeString": "literal_string \"delegates[msg.sender][uint48(delegate)].delegate == delegate\""
+ },
+ "value": "delegates[msg.sender][uint48(delegate)].delegate == delegate"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_58537fa1960fbebccc117b6218b0af08a9f148039299593ea287e665dd534bb1",
+ "typeString": "literal_string \"delegates[msg.sender][uint48(delegate)].delegate == delegate\""
+ }
+ ],
+ "id": 165,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "3647:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 179,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3647:133:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 180,
+ "nodeType": "ExpressionStatement",
+ "src": "3647:133:0"
+ },
+ {
+ "assignments": [
+ 182
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 182,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 289,
+ "src": "3790:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 181,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "3790:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 189,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 184,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "3832:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 185,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "3832:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 186,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "3844:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 187,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "3854:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 183,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "3819:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 188,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "3819:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "3790:70:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 193,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 190,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "3874:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 191,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "3874:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 192,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "3893:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "3874:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 211,
+ "nodeType": "IfStatement",
+ "src": "3870:210:0",
+ "trueBody": {
+ "id": 210,
+ "nodeType": "Block",
+ "src": "3896:184:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 198,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 194,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "3996:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 196,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "3996:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "31",
+ "id": 197,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4014:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "3996:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 199,
+ "nodeType": "ExpressionStatement",
+ "src": "3996:19:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 207,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "4063:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 200,
+ "name": "tokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47,
+ "src": "4029:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[] storage ref))"
+ }
+ },
+ "id": 204,
+ "indexExpression": {
+ "expression": {
+ "id": 201,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "4036:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 202,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "4036:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4029:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[] storage ref)"
+ }
+ },
+ "id": 205,
+ "indexExpression": {
+ "id": 203,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "4048:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4029:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage",
+ "typeString": "address[] storage ref"
+ }
+ },
+ "id": 206,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "push",
+ "nodeType": "MemberAccess",
+ "src": "4029:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$",
+ "typeString": "function (address)"
+ }
+ },
+ "id": 208,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4029:40:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 209,
+ "nodeType": "ExpressionStatement",
+ "src": "4029:40:0"
+ }
+ ]
+ }
+ },
+ {
+ "assignments": [
+ 213
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 213,
+ "mutability": "mutable",
+ "name": "currentMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 289,
+ "src": "4206:17:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 212,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "4206:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 221,
+ "initialValue": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 219,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 216,
+ "name": "block",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -4,
+ "src": "4233:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_block",
+ "typeString": "block"
+ }
+ },
+ "id": 217,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "timestamp",
+ "nodeType": "MemberAccess",
+ "src": "4233:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "/",
+ "rightExpression": {
+ "hexValue": "3630",
+ "id": 218,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4251:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_60_by_1",
+ "typeString": "int_const 60"
+ },
+ "value": "60"
+ },
+ "src": "4233:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ ],
+ "id": 215,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "4226:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint32_$",
+ "typeString": "type(uint32)"
+ },
+ "typeName": {
+ "id": 214,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "4226:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 220,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4226:28:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "4206:48:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 224,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 222,
+ "name": "resetBaseMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 152,
+ "src": "4268:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 223,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4283:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "4268:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 250,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 247,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4482:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 248,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "4482:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 249,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4508:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "4482:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 258,
+ "nodeType": "IfStatement",
+ "src": "4478:93:0",
+ "trueBody": {
+ "id": 257,
+ "nodeType": "Block",
+ "src": "4511:60:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 255,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 251,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4525:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 253,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "4525:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 254,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4550:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4525:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 256,
+ "nodeType": "ExpressionStatement",
+ "src": "4525:35:0"
+ }
+ ]
+ }
+ },
+ "id": 259,
+ "nodeType": "IfStatement",
+ "src": "4264:307:0",
+ "trueBody": {
+ "id": 246,
+ "nodeType": "Block",
+ "src": "4286:186:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 228,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 226,
+ "name": "resetBaseMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 152,
+ "src": "4308:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "id": 227,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4324:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4308:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "7265736574426173654d696e203c3d2063757272656e744d696e",
+ "id": 229,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "4336:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_1ede17760f99a36e22c97a9975aa792b767bce45958763871f51d908d7d840ba",
+ "typeString": "literal_string \"resetBaseMin <= currentMin\""
+ },
+ "value": "resetBaseMin <= currentMin"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_1ede17760f99a36e22c97a9975aa792b767bce45958763871f51d908d7d840ba",
+ "typeString": "literal_string \"resetBaseMin <= currentMin\""
+ }
+ ],
+ "id": 225,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "4300:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 230,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4300:65:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 231,
+ "nodeType": "ExpressionStatement",
+ "src": "4300:65:0"
+ },
+ {
+ "expression": {
+ "id": 244,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 232,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4379:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 234,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "4379:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 243,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 235,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4404:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 241,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 238,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 236,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 213,
+ "src": "4419:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "id": 237,
+ "name": "resetBaseMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 152,
+ "src": "4432:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4419:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 239,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "4418:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "%",
+ "rightExpression": {
+ "id": 240,
+ "name": "resetTimeMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 150,
+ "src": "4448:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "4418:42:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 242,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "4417:44:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4404:57:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "4379:82:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 245,
+ "nodeType": "ExpressionStatement",
+ "src": "4379:82:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "id": 264,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 260,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4580:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 262,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "4580:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 263,
+ "name": "resetTimeMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 150,
+ "src": "4605:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "4580:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 265,
+ "nodeType": "ExpressionStatement",
+ "src": "4580:37:0"
+ },
+ {
+ "expression": {
+ "id": 270,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 266,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4627:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 268,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "4627:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 269,
+ "name": "allowanceAmount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 148,
+ "src": "4646:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "4627:34:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 271,
+ "nodeType": "ExpressionStatement",
+ "src": "4627:34:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 273,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "4687:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 274,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "4687:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 275,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "4699:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 276,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "4709:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 277,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 182,
+ "src": "4716:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 272,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "4671:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 278,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4671:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 279,
+ "nodeType": "ExpressionStatement",
+ "src": "4671:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 281,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "4754:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 282,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "4754:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 283,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 144,
+ "src": "4766:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 284,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 146,
+ "src": "4776:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 285,
+ "name": "allowanceAmount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 148,
+ "src": "4783:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 286,
+ "name": "resetTimeMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 150,
+ "src": "4800:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 280,
+ "name": "SetAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 125,
+ "src": "4741:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_uint16_$returns$__$",
+ "typeString": "function (address,address,address,uint96,uint16)"
+ }
+ },
+ "id": 287,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "4741:72:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 288,
+ "nodeType": "EmitStatement",
+ "src": "4736:77:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 142,
+ "nodeType": "StructuredDocumentation",
+ "src": "2984:441:0",
+ "text": "@dev Allows to update the allowance for a specified token. This can only be done via a Safe transaction.\n @param delegate Delegate whose allowance should be updated.\n @param token Token contract address.\n @param allowanceAmount allowance in smallest token unit.\n @param resetTimeMin Time after which the allowance should reset\n @param resetBaseMin Time based on which the reset time should be increased"
+ },
+ "functionSelector": "beaeb388",
+ "id": 290,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "setAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 153,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 144,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3452:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 143,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "3452:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 146,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3470:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 145,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "3470:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 148,
+ "mutability": "mutable",
+ "name": "allowanceAmount",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3485:22:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 147,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "3485:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 150,
+ "mutability": "mutable",
+ "name": "resetTimeMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3509:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 149,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "3509:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 152,
+ "mutability": "mutable",
+ "name": "resetBaseMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 290,
+ "src": "3530:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 151,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "3530:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "3451:99:0"
+ },
+ "returnParameters": {
+ "id": 154,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "3570:0:0"
+ },
+ "scope": 1428,
+ "src": "3430:1390:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 359,
+ "nodeType": "Block",
+ "src": "4945:667:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 309,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 301,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "4955:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 302,
+ "name": "allowances",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 40,
+ "src": "4967:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref)))"
+ }
+ },
+ "id": 304,
+ "indexExpression": {
+ "id": 303,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 292,
+ "src": "4978:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4967:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$",
+ "typeString": "mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref))"
+ }
+ },
+ "id": 306,
+ "indexExpression": {
+ "id": 305,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 294,
+ "src": "4984:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4967:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$",
+ "typeString": "mapping(address => struct AllowanceModule.Allowance storage ref)"
+ }
+ },
+ "id": 308,
+ "indexExpression": {
+ "id": 307,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 296,
+ "src": "4994:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "4967:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage",
+ "typeString": "struct AllowanceModule.Allowance storage ref"
+ }
+ },
+ "src": "4955:45:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 310,
+ "nodeType": "ExpressionStatement",
+ "src": "4955:45:0"
+ },
+ {
+ "assignments": [
+ 312
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 312,
+ "mutability": "mutable",
+ "name": "currentMin",
+ "nodeType": "VariableDeclaration",
+ "scope": 359,
+ "src": "5072:17:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "typeName": {
+ "id": 311,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "5072:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 320,
+ "initialValue": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 318,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 315,
+ "name": "block",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -4,
+ "src": "5099:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_block",
+ "typeString": "block"
+ }
+ },
+ "id": 316,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "timestamp",
+ "nodeType": "MemberAccess",
+ "src": "5099:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "/",
+ "rightExpression": {
+ "hexValue": "3630",
+ "id": 317,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "5117:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_60_by_1",
+ "typeString": "int_const 60"
+ },
+ "value": "60"
+ },
+ "src": "5099:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ ],
+ "id": 314,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "5092:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint32_$",
+ "typeString": "type(uint32)"
+ },
+ "typeName": {
+ "id": 313,
+ "name": "uint32",
+ "nodeType": "ElementaryTypeName",
+ "src": "5092:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 319,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "5092:28:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "5072:48:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 332,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 324,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 321,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5232:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 322,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "5232:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 323,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "5257:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "5232:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 331,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 325,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5262:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 326,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "5262:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 330,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 327,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 312,
+ "src": "5288:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "expression": {
+ "id": 328,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5301:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 329,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "5301:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "5288:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5262:61:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "5232:91:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 356,
+ "nodeType": "IfStatement",
+ "src": "5228:352:0",
+ "trueBody": {
+ "id": 355,
+ "nodeType": "Block",
+ "src": "5325:255:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 337,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 333,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5339:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 335,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "5339:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 336,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "5357:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "5339:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 338,
+ "nodeType": "ExpressionStatement",
+ "src": "5339:19:0"
+ },
+ {
+ "expression": {
+ "id": 353,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 339,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5467:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 341,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "5467:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 352,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 342,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 312,
+ "src": "5492:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 350,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ },
+ "id": 346,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 343,
+ "name": "currentMin",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 312,
+ "src": "5507:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "expression": {
+ "id": 344,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5520:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 345,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "5520:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5507:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 347,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "5506:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "%",
+ "rightExpression": {
+ "expression": {
+ "id": 348,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5546:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 349,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "5546:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "5506:62:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "id": 351,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "5505:64:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5492:77:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "src": "5467:102:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 354,
+ "nodeType": "ExpressionStatement",
+ "src": "5467:102:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "id": 357,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 299,
+ "src": "5596:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "functionReturnParameters": 300,
+ "id": 358,
+ "nodeType": "Return",
+ "src": "5589:16:0"
+ }
+ ]
+ },
+ "id": 360,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 297,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 292,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4848:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 291,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "4848:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 294,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4862:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 293,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "4862:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 296,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4880:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 295,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "4880:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "4847:47:0"
+ },
+ "returnParameters": {
+ "id": 300,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 299,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 360,
+ "src": "4917:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 298,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "4917:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "4916:28:0"
+ },
+ "scope": 1428,
+ "src": "4826:786:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 381,
+ "nodeType": "Block",
+ "src": "5726:62:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 379,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 371,
+ "name": "allowances",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 40,
+ "src": "5736:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$_$",
+ "typeString": "mapping(address => mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref)))"
+ }
+ },
+ "id": 375,
+ "indexExpression": {
+ "id": 372,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 362,
+ "src": "5747:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "5736:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$_$",
+ "typeString": "mapping(address => mapping(address => struct AllowanceModule.Allowance storage ref))"
+ }
+ },
+ "id": 376,
+ "indexExpression": {
+ "id": 373,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 364,
+ "src": "5753:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "5736:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Allowance_$75_storage_$",
+ "typeString": "mapping(address => struct AllowanceModule.Allowance storage ref)"
+ }
+ },
+ "id": 377,
+ "indexExpression": {
+ "id": 374,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 366,
+ "src": "5763:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "5736:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage",
+ "typeString": "struct AllowanceModule.Allowance storage ref"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 378,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 368,
+ "src": "5772:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "src": "5736:45:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage",
+ "typeString": "struct AllowanceModule.Allowance storage ref"
+ }
+ },
+ "id": 380,
+ "nodeType": "ExpressionStatement",
+ "src": "5736:45:0"
+ }
+ ]
+ },
+ "id": 382,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "updateAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 369,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 362,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5643:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 361,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "5643:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 364,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5657:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 363,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "5657:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 366,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5675:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 365,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "5675:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 368,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 382,
+ "src": "5690:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 367,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "5690:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "5642:75:0"
+ },
+ "returnParameters": {
+ "id": 370,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "5726:0:0"
+ },
+ "scope": 1428,
+ "src": "5618:170:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 420,
+ "nodeType": "Block",
+ "src": "6049:239:0",
+ "statements": [
+ {
+ "assignments": [
+ 391
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 391,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 420,
+ "src": "6059:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 390,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "6059:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 398,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 393,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6101:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 394,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6101:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 395,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 385,
+ "src": "6113:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 396,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 387,
+ "src": "6123:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 392,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "6088:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 397,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6088:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "6059:70:0"
+ },
+ {
+ "expression": {
+ "id": 403,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 399,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 391,
+ "src": "6139:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 401,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "6139:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 402,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6157:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6139:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 404,
+ "nodeType": "ExpressionStatement",
+ "src": "6139:19:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 406,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6184:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 407,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6184:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 408,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 385,
+ "src": "6196:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 409,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 387,
+ "src": "6206:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 410,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 391,
+ "src": "6213:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 405,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "6168:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 411,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6168:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 412,
+ "nodeType": "ExpressionStatement",
+ "src": "6168:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 414,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6253:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 415,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6253:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 416,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 385,
+ "src": "6265:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 417,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 387,
+ "src": "6275:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 413,
+ "name": "ResetAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 133,
+ "src": "6238:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address,address)"
+ }
+ },
+ "id": 418,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6238:43:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 419,
+ "nodeType": "EmitStatement",
+ "src": "6233:48:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 383,
+ "nodeType": "StructuredDocumentation",
+ "src": "5794:186:0",
+ "text": "@dev Allows to reset the allowance for a specific delegate and token.\n @param delegate Delegate whose allowance should be updated.\n @param token Token contract address."
+ },
+ "functionSelector": "c19bf50e",
+ "id": 421,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "resetAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 388,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 385,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 421,
+ "src": "6009:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 384,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6009:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 387,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 421,
+ "src": "6027:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 386,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6027:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "6008:33:0"
+ },
+ "returnParameters": {
+ "id": 389,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "6049:0:0"
+ },
+ "scope": 1428,
+ "src": "5985:303:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 477,
+ "nodeType": "Block",
+ "src": "6613:342:0",
+ "statements": [
+ {
+ "assignments": [
+ 430
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 430,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 477,
+ "src": "6623:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 429,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "6623:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 437,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 432,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6665:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 433,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6665:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 434,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 424,
+ "src": "6677:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 435,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 426,
+ "src": "6687:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 431,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "6652:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 436,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6652:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "6623:70:0"
+ },
+ {
+ "expression": {
+ "id": 442,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 438,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6703:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 440,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "6703:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 441,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6722:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6703:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 443,
+ "nodeType": "ExpressionStatement",
+ "src": "6703:20:0"
+ },
+ {
+ "expression": {
+ "id": 448,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 444,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6733:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 446,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "6733:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 447,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6751:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6733:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 449,
+ "nodeType": "ExpressionStatement",
+ "src": "6733:19:0"
+ },
+ {
+ "expression": {
+ "id": 454,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 450,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6762:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 452,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "6762:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 453,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6787:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6762:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 455,
+ "nodeType": "ExpressionStatement",
+ "src": "6762:26:0"
+ },
+ {
+ "expression": {
+ "id": 460,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 456,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6798:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 458,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "6798:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 459,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "6823:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "6798:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 461,
+ "nodeType": "ExpressionStatement",
+ "src": "6798:26:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 463,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6850:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 464,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6850:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 465,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 424,
+ "src": "6862:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 466,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 426,
+ "src": "6872:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 467,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 430,
+ "src": "6879:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 462,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "6834:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 468,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6834:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 469,
+ "nodeType": "ExpressionStatement",
+ "src": "6834:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 471,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "6920:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 472,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "6920:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 473,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 424,
+ "src": "6932:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 474,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 426,
+ "src": "6942:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 470,
+ "name": "DeleteAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 141,
+ "src": "6904:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address,address)"
+ }
+ },
+ "id": 475,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "6904:44:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 476,
+ "nodeType": "EmitStatement",
+ "src": "6899:49:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 422,
+ "nodeType": "StructuredDocumentation",
+ "src": "6294:237:0",
+ "text": "@dev Allows to remove the allowance for a specific delegate and token. This will set all values except the `nonce` to 0.\n @param delegate Delegate whose allowance should be updated.\n @param token Token contract address."
+ },
+ "functionSelector": "885133e3",
+ "id": 478,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "deleteAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 427,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 424,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 478,
+ "src": "6561:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 423,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6561:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 426,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 478,
+ "src": "6579:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 425,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "6579:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "6560:33:0"
+ },
+ "returnParameters": {
+ "id": 428,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "6613:0:0"
+ },
+ "scope": 1428,
+ "src": "6536:419:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 685,
+ "nodeType": "Block",
+ "src": "7828:2095:0",
+ "statements": [
+ {
+ "assignments": [
+ 499
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 499,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 685,
+ "src": "7867:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 498,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "7867:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 508,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 503,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "7917:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 502,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "7909:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 501,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7909:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 504,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "7909:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 505,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "7924:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 506,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "7934:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 500,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "7896:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 507,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "7896:44:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "7867:73:0"
+ },
+ {
+ "assignments": [
+ 510
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 510,
+ "mutability": "mutable",
+ "name": "transferHashData",
+ "nodeType": "VariableDeclaration",
+ "scope": 685,
+ "src": "7950:29:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 509,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "7950:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 524,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 514,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "8015:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 513,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "8007:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 512,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "8007:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 515,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8007:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 516,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "8022:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 517,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 485,
+ "src": "8029:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 518,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "8033:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 519,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "8041:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 520,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "8055:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "expression": {
+ "id": 521,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8064:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 522,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "8064:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 511,
+ "name": "generateTransferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 766,
+ "src": "7982:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_address_$_t_uint96_$_t_uint16_$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function (address,address,address,uint96,address,uint96,uint16) view returns (bytes memory)"
+ }
+ },
+ "id": 523,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "7982:98:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "7950:130:0"
+ },
+ {
+ "expression": {
+ "id": 532,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 525,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8115:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 527,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "8115:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 531,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 528,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8133:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 529,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "8133:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "+",
+ "rightExpression": {
+ "hexValue": "31",
+ "id": 530,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8151:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "8133:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "src": "8115:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 533,
+ "nodeType": "ExpressionStatement",
+ "src": "8115:37:0"
+ },
+ {
+ "assignments": [
+ 535
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 535,
+ "mutability": "mutable",
+ "name": "newSpent",
+ "nodeType": "VariableDeclaration",
+ "scope": 685,
+ "src": "8162:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 534,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "8162:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 540,
+ "initialValue": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 539,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 536,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8180:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 537,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8180:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "+",
+ "rightExpression": {
+ "id": 538,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "8198:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8180:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "8162:42:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 550,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 545,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 542,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8269:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "expression": {
+ "id": 543,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8280:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 544,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8280:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8269:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 549,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 546,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8299:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "expression": {
+ "id": 547,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8311:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 548,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "8311:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8299:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "8269:58:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "6e65775370656e74203e20616c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d20616c6c6f77616e63652e616d6f756e74",
+ "id": 551,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8329:60:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_a7359a8519961096cf8fb65715f77dbc4de2755aabf21e3445e245a34ee622da",
+ "typeString": "literal_string \"newSpent > allowance.spent && newSpent <= allowance.amount\""
+ },
+ "value": "newSpent > allowance.spent && newSpent <= allowance.amount"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_a7359a8519961096cf8fb65715f77dbc4de2755aabf21e3445e245a34ee622da",
+ "typeString": "literal_string \"newSpent > allowance.spent && newSpent <= allowance.amount\""
+ }
+ ],
+ "id": 541,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "8261:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 552,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8261:129:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 553,
+ "nodeType": "ExpressionStatement",
+ "src": "8261:129:0"
+ },
+ {
+ "expression": {
+ "id": 558,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 554,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8400:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 556,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8400:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 557,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8418:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8400:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 559,
+ "nodeType": "ExpressionStatement",
+ "src": "8400:26:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 562,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 560,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "8440:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 561,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8450:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "8440:11:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 620,
+ "nodeType": "IfStatement",
+ "src": "8436:748:0",
+ "trueBody": {
+ "id": 619,
+ "nodeType": "Block",
+ "src": "8453:731:0",
+ "statements": [
+ {
+ "assignments": [
+ 564
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 564,
+ "mutability": "mutable",
+ "name": "paymentAllowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 619,
+ "src": "8543:33:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 563,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "8543:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 578,
+ "initialValue": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 567,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 565,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "8579:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 566,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "8595:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "8579:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseExpression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 572,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "8636:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 571,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "8628:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 570,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "8628:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 573,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8628:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 574,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "8643:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 575,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "8653:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 569,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "8615:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 576,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8615:51:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 577,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "Conditional",
+ "src": "8579:87:0",
+ "trueExpression": {
+ "id": 568,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "8603:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "8543:123:0"
+ },
+ {
+ "expression": {
+ "id": 584,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 579,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8680:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 583,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 580,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8691:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 581,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8691:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "+",
+ "rightExpression": {
+ "id": 582,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "8716:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8691:32:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8680:43:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 585,
+ "nodeType": "ExpressionStatement",
+ "src": "8680:43:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 595,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 590,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 587,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8796:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "expression": {
+ "id": 588,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8807:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 589,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8807:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8796:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 594,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 591,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8833:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<=",
+ "rightExpression": {
+ "expression": {
+ "id": 592,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8845:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 593,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "8845:23:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8833:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "8796:72:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "6e65775370656e74203e207061796d656e74416c6c6f77616e63652e7370656e74202626206e65775370656e74203c3d207061796d656e74416c6c6f77616e63652e616d6f756e74",
+ "id": 596,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "8870:74:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_b549d52c5706645679000944ae1bcaec935d0b8c387f4240a09789be7dc8c0d4",
+ "typeString": "literal_string \"newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount\""
+ },
+ "value": "newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_b549d52c5706645679000944ae1bcaec935d0b8c387f4240a09789be7dc8c0d4",
+ "typeString": "literal_string \"newSpent > paymentAllowance.spent && newSpent <= paymentAllowance.amount\""
+ }
+ ],
+ "id": 586,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "8788:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 597,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "8788:157:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 598,
+ "nodeType": "ExpressionStatement",
+ "src": "8788:157:0"
+ },
+ {
+ "expression": {
+ "id": 603,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 599,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "8959:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 601,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "8959:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 602,
+ "name": "newSpent",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 535,
+ "src": "8984:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "src": "8959:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 604,
+ "nodeType": "ExpressionStatement",
+ "src": "8959:33:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 607,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 605,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9078:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "id": 606,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9094:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "9078:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 618,
+ "nodeType": "IfStatement",
+ "src": "9074:99:0",
+ "trueBody": {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 611,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9125:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 610,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9117:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 609,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9117:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 612,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9117:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 613,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9132:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 614,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9142:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 615,
+ "name": "paymentAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 564,
+ "src": "9156:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 608,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "9101:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 616,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9101:72:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 617,
+ "nodeType": "ExpressionStatement",
+ "src": "9101:72:0"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 624,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9217:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 623,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9209:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 622,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9209:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 625,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9209:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 626,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9224:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 627,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9234:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 628,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "9241:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 621,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "9193:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 629,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9193:58:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 630,
+ "nodeType": "ExpressionStatement",
+ "src": "9193:58:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 632,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9345:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 633,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 495,
+ "src": "9355:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "id": 634,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 510,
+ "src": "9366:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "id": 635,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9384:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 631,
+ "name": "checkSignature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 840,
+ "src": "9330:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_contract$_GnosisSafe_$18_$returns$__$",
+ "typeString": "function (address,bytes memory,bytes memory,contract GnosisSafe) view"
+ }
+ },
+ "id": 636,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9330:59:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 637,
+ "nodeType": "ExpressionStatement",
+ "src": "9330:59:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "id": 640,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 638,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "9404:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 639,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "9414:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "9404:11:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 662,
+ "nodeType": "IfStatement",
+ "src": "9400:344:0",
+ "trueBody": {
+ "id": 661,
+ "nodeType": "Block",
+ "src": "9417:327:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 642,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9534:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ {
+ "id": 643,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9540:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "expression": {
+ "id": 644,
+ "name": "tx",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -26,
+ "src": "9554:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_transaction",
+ "typeString": "tx"
+ }
+ },
+ "id": 645,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "origin",
+ "nodeType": "MemberAccess",
+ "src": "9554:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 646,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "9565:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 641,
+ "name": "transfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1006,
+ "src": "9525:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_GnosisSafe_$18_$_t_address_$_t_address_payable_$_t_uint96_$returns$__$",
+ "typeString": "function (contract GnosisSafe,address,address payable,uint96)"
+ }
+ },
+ "id": 647,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9525:48:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 648,
+ "nodeType": "ExpressionStatement",
+ "src": "9525:48:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 652,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9683:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 651,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9675:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 650,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9675:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 653,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9675:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 654,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9690:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 655,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 489,
+ "src": "9700:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "expression": {
+ "id": 656,
+ "name": "tx",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -26,
+ "src": "9714:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_transaction",
+ "typeString": "tx"
+ }
+ },
+ "id": 657,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "origin",
+ "nodeType": "MemberAccess",
+ "src": "9714:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 658,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 491,
+ "src": "9725:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 649,
+ "name": "PayAllowanceTransfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 113,
+ "src": "9654:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_address_$_t_uint96_$returns$__$",
+ "typeString": "function (address,address,address,address,uint96)"
+ }
+ },
+ "id": 659,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9654:79:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 660,
+ "nodeType": "EmitStatement",
+ "src": "9649:84:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "id": 664,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9788:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ {
+ "id": 665,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9794:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 666,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 485,
+ "src": "9801:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 667,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "9805:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 663,
+ "name": "transfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1006,
+ "src": "9779:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_GnosisSafe_$18_$_t_address_$_t_address_payable_$_t_uint96_$returns$__$",
+ "typeString": "function (contract GnosisSafe,address,address payable,uint96)"
+ }
+ },
+ "id": 668,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9779:33:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 669,
+ "nodeType": "ExpressionStatement",
+ "src": "9779:33:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 673,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 481,
+ "src": "9860:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 672,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "9852:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 671,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "9852:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 674,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9852:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 675,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 493,
+ "src": "9867:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 676,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 483,
+ "src": "9877:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 677,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 485,
+ "src": "9884:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 678,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 487,
+ "src": "9888:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "id": 682,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 679,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 499,
+ "src": "9896:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 680,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "9896:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "hexValue": "31",
+ "id": 681,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "9914:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "9896:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 670,
+ "name": "ExecuteAllowanceTransfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 101,
+ "src": "9827:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_uint16_$returns$__$",
+ "typeString": "function (address,address,address,address,uint96,uint16)"
+ }
+ },
+ "id": 683,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "9827:89:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 684,
+ "nodeType": "EmitStatement",
+ "src": "9822:94:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 479,
+ "nodeType": "StructuredDocumentation",
+ "src": "6961:604:0",
+ "text": "@dev Allows to use the allowance to perform a transfer.\n @param safe The Safe whose funds should be used.\n @param token Token contract address.\n @param to Address that should receive the tokens.\n @param amount Amount that should be transferred.\n @param paymentToken Token that should be used to pay for the execution of the transfer.\n @param payment Amount to should be paid for executing the transfer.\n @param delegate Delegate whose allowance should be updated.\n @param signature Signature generated by the delegate to authorize the transfer."
+ },
+ "functionSelector": "4515641a",
+ "id": 686,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "executeAllowanceTransfer",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 496,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 481,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7613:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ "typeName": {
+ "id": 480,
+ "name": "GnosisSafe",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 18,
+ "src": "7613:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 483,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7638:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 482,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7638:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 485,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7661:18:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ "typeName": {
+ "id": 484,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7661:15:0",
+ "stateMutability": "payable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 487,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7689:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 486,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "7689:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 489,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7712:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 488,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7712:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 491,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7742:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 490,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "7742:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 493,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7766:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 492,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "7766:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 495,
+ "mutability": "mutable",
+ "name": "signature",
+ "nodeType": "VariableDeclaration",
+ "scope": 686,
+ "src": "7792:22:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 494,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "7792:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "7603:217:0"
+ },
+ "returnParameters": {
+ "id": 497,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "7828:0:0"
+ },
+ "scope": 1428,
+ "src": "7570:2353:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 698,
+ "nodeType": "Block",
+ "src": "10038:167:0",
+ "statements": [
+ {
+ "assignments": [
+ 693
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 693,
+ "mutability": "mutable",
+ "name": "id",
+ "nodeType": "VariableDeclaration",
+ "scope": 698,
+ "src": "10048:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 692,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "10048:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 694,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10048:10:0"
+ },
+ {
+ "AST": {
+ "nodeType": "YulBlock",
+ "src": "10141:39:0",
+ "statements": [
+ {
+ "nodeType": "YulAssignment",
+ "src": "10155:15:0",
+ "value": {
+ "arguments": [],
+ "functionName": {
+ "name": "chainid",
+ "nodeType": "YulIdentifier",
+ "src": "10161:7:0"
+ },
+ "nodeType": "YulFunctionCall",
+ "src": "10161:9:0"
+ },
+ "variableNames": [
+ {
+ "name": "id",
+ "nodeType": "YulIdentifier",
+ "src": "10155:2:0"
+ }
+ ]
+ }
+ ]
+ },
+ "evmVersion": "istanbul",
+ "externalReferences": [
+ {
+ "declaration": 693,
+ "isOffset": false,
+ "isSlot": false,
+ "src": "10155:2:0",
+ "valueSize": 1
+ }
+ ],
+ "id": 695,
+ "nodeType": "InlineAssembly",
+ "src": "10132:48:0"
+ },
+ {
+ "expression": {
+ "id": 696,
+ "name": "id",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 693,
+ "src": "10196:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "functionReturnParameters": 691,
+ "id": 697,
+ "nodeType": "Return",
+ "src": "10189:9:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 687,
+ "nodeType": "StructuredDocumentation",
+ "src": "9929:52:0",
+ "text": "@dev Returns the chain id used by this contract."
+ },
+ "functionSelector": "3408e470",
+ "id": 699,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getChainId",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 688,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "10005:2:0"
+ },
+ "returnParameters": {
+ "id": 691,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 690,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 699,
+ "src": "10029:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 689,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "10029:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "10028:9:0"
+ },
+ "scope": 1428,
+ "src": "9986:219:0",
+ "stateMutability": "pure",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 765,
+ "nodeType": "Block",
+ "src": "10528:394:0",
+ "statements": [
+ {
+ "assignments": [
+ 720
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 720,
+ "mutability": "mutable",
+ "name": "chainId",
+ "nodeType": "VariableDeclaration",
+ "scope": 765,
+ "src": "10538:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 719,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "10538:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 723,
+ "initialValue": {
+ "arguments": [],
+ "expression": {
+ "argumentTypes": [],
+ "id": 721,
+ "name": "getChainId",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 699,
+ "src": "10556:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$",
+ "typeString": "function () pure returns (uint256)"
+ }
+ },
+ "id": 722,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10556:12:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10538:30:0"
+ },
+ {
+ "assignments": [
+ 725
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 725,
+ "mutability": "mutable",
+ "name": "domainSeparator",
+ "nodeType": "VariableDeclaration",
+ "scope": 765,
+ "src": "10578:23:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 724,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "10578:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 734,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 729,
+ "name": "DOMAIN_SEPARATOR_TYPEHASH",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 29,
+ "src": "10625:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 730,
+ "name": "chainId",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 720,
+ "src": "10652:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "id": 731,
+ "name": "this",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -28,
+ "src": "10661:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_AllowanceModule_$1428",
+ "typeString": "contract AllowanceModule"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ {
+ "typeIdentifier": "t_contract$_AllowanceModule_$1428",
+ "typeString": "contract AllowanceModule"
+ }
+ ],
+ "expression": {
+ "id": 727,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "10614:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 728,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encode",
+ "nodeType": "MemberAccess",
+ "src": "10614:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 732,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10614:52:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 726,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "10604:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 733,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10604:63:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10578:89:0"
+ },
+ {
+ "assignments": [
+ 736
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 736,
+ "mutability": "mutable",
+ "name": "transferHash",
+ "nodeType": "VariableDeclaration",
+ "scope": 765,
+ "src": "10677:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 735,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "10677:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 750,
+ "initialValue": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 740,
+ "name": "ALLOWANCE_TRANSFER_TYPEHASH",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 32,
+ "src": "10734:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 741,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 702,
+ "src": "10763:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 742,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 704,
+ "src": "10769:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 743,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 706,
+ "src": "10776:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 744,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 708,
+ "src": "10780:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 745,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 710,
+ "src": "10788:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 746,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 712,
+ "src": "10802:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 747,
+ "name": "nonce",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 714,
+ "src": "10811:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "expression": {
+ "id": 738,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "10723:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 739,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encode",
+ "nodeType": "MemberAccess",
+ "src": "10723:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 748,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10723:94:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 737,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "10700:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 749,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10700:127:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "10677:150:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "hexValue": "30783139",
+ "id": 755,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "10866:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_25_by_1",
+ "typeString": "int_const 25"
+ },
+ "value": "0x19"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_25_by_1",
+ "typeString": "int_const 25"
+ }
+ ],
+ "id": 754,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "10861:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_bytes1_$",
+ "typeString": "type(bytes1)"
+ },
+ "typeName": {
+ "id": 753,
+ "name": "byte",
+ "nodeType": "ElementaryTypeName",
+ "src": "10861:4:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 756,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10861:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "hexValue": "30783031",
+ "id": 759,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "10878:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "0x01"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ }
+ ],
+ "id": 758,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "10873:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_bytes1_$",
+ "typeString": "type(bytes1)"
+ },
+ "typeName": {
+ "id": 757,
+ "name": "byte",
+ "nodeType": "ElementaryTypeName",
+ "src": "10873:4:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 760,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10873:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ }
+ },
+ {
+ "id": 761,
+ "name": "domainSeparator",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 725,
+ "src": "10885:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 762,
+ "name": "transferHash",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 736,
+ "src": "10902:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ },
+ {
+ "typeIdentifier": "t_bytes1",
+ "typeString": "bytes1"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "expression": {
+ "id": 751,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "10844:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 752,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encodePacked",
+ "nodeType": "MemberAccess",
+ "src": "10844:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 763,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "10844:71:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "functionReturnParameters": 718,
+ "id": 764,
+ "nodeType": "Return",
+ "src": "10837:78:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 700,
+ "nodeType": "StructuredDocumentation",
+ "src": "10211:72:0",
+ "text": "@dev Generates the data for the transfer hash (required for signing)"
+ },
+ "id": 766,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "generateTransferHashData",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 715,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 702,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10331:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 701,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10331:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 704,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10353:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 703,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10353:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 706,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10376:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 705,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10376:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 708,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10396:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 707,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "10396:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 710,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10419:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 709,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "10419:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 712,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10449:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 711,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "10449:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 714,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10473:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 713,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "10473:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "10321:170:0"
+ },
+ "returnParameters": {
+ "id": 718,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 717,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 766,
+ "src": "10514:12:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 716,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "10514:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "10513:14:0"
+ },
+ "scope": 1428,
+ "src": "10288:634:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 798,
+ "nodeType": "Block",
+ "src": "11245:136:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 788,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 769,
+ "src": "11310:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 789,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 771,
+ "src": "11316:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 790,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 773,
+ "src": "11323:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 791,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 775,
+ "src": "11327:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 792,
+ "name": "paymentToken",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 777,
+ "src": "11335:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 793,
+ "name": "payment",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 779,
+ "src": "11349:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "id": 794,
+ "name": "nonce",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 781,
+ "src": "11358:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 787,
+ "name": "generateTransferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 766,
+ "src": "11272:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$_t_uint96_$_t_address_$_t_uint96_$_t_uint16_$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function (address,address,address,uint96,address,uint96,uint16) view returns (bytes memory)"
+ }
+ },
+ "id": 795,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11272:101:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 786,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "11262:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 796,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11262:112:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "functionReturnParameters": 785,
+ "id": 797,
+ "nodeType": "Return",
+ "src": "11255:119:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 767,
+ "nodeType": "StructuredDocumentation",
+ "src": "10928:82:0",
+ "text": "@dev Generates the transfer hash that should be signed to authorize a transfer"
+ },
+ "functionSelector": "d626e043",
+ "id": 799,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "generateTransferHash",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 782,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 769,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11054:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 768,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11054:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 771,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11076:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 770,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11076:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 773,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11099:10:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 772,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11099:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 775,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11119:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 774,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "11119:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 777,
+ "mutability": "mutable",
+ "name": "paymentToken",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11142:20:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 776,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11142:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 779,
+ "mutability": "mutable",
+ "name": "payment",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11172:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 778,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "11172:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 781,
+ "mutability": "mutable",
+ "name": "nonce",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11196:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ },
+ "typeName": {
+ "id": 780,
+ "name": "uint16",
+ "nodeType": "ElementaryTypeName",
+ "src": "11196:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "11044:170:0"
+ },
+ "returnParameters": {
+ "id": 785,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 784,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 799,
+ "src": "11236:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 783,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "11236:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "11235:9:0"
+ },
+ "scope": 1428,
+ "src": "11015:366:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 839,
+ "nodeType": "Block",
+ "src": "11522:314:0",
+ "statements": [
+ {
+ "assignments": [
+ 811
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 811,
+ "mutability": "mutable",
+ "name": "signer",
+ "nodeType": "VariableDeclaration",
+ "scope": 839,
+ "src": "11532:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 810,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11532:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 816,
+ "initialValue": {
+ "arguments": [
+ {
+ "id": 813,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 803,
+ "src": "11566:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "id": 814,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 805,
+ "src": "11577:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 812,
+ "name": "recoverSignature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 950,
+ "src": "11549:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_address_$",
+ "typeString": "function (bytes memory,bytes memory) view returns (address)"
+ }
+ },
+ "id": 815,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11549:45:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "11532:62:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 835,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 820,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 818,
+ "name": "expectedDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 801,
+ "src": "11625:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 819,
+ "name": "signer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 811,
+ "src": "11645:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "11625:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 834,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 821,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "11655:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 826,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 824,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 807,
+ "src": "11673:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ ],
+ "id": 823,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "11665:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 822,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11665:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 825,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11665:13:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "11655:24:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 831,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 829,
+ "name": "signer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 811,
+ "src": "11687:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 828,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "11680:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 827,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "11680:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 830,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11680:14:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "11655:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 832,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "11655:49:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 833,
+ "name": "signer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 811,
+ "src": "11708:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "11655:59:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "11625:89:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "657870656374656444656c6567617465203d3d207369676e65722026262064656c6567617465735b616464726573732873616665295d5b75696e743438287369676e6572295d2e64656c6567617465203d3d207369676e6572",
+ "id": 836,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "11728:91:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_967a409fd152609403ac7b3349d7ced54d05d2ee8664844edf017668d343240b",
+ "typeString": "literal_string \"expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer\""
+ },
+ "value": "expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_967a409fd152609403ac7b3349d7ced54d05d2ee8664844edf017668d343240b",
+ "typeString": "literal_string \"expectedDelegate == signer && delegates[address(safe)][uint48(signer)].delegate == signer\""
+ }
+ ],
+ "id": 817,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "11604:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 837,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "11604:225:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 838,
+ "nodeType": "ExpressionStatement",
+ "src": "11604:225:0"
+ }
+ ]
+ },
+ "id": 840,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "checkSignature",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 808,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 801,
+ "mutability": "mutable",
+ "name": "expectedDelegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11411:24:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 800,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "11411:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 803,
+ "mutability": "mutable",
+ "name": "signature",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11437:22:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 802,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "11437:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 805,
+ "mutability": "mutable",
+ "name": "transferHashData",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11461:29:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 804,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "11461:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 807,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 840,
+ "src": "11492:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ "typeName": {
+ "id": 806,
+ "name": "GnosisSafe",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 18,
+ "src": "11492:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "11410:98:0"
+ },
+ "returnParameters": {
+ "id": 809,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "11522:0:0"
+ },
+ "scope": 1428,
+ "src": "11387:449:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 949,
+ "nodeType": "Block",
+ "src": "12097:1333:0",
+ "statements": [
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 852,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 849,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 842,
+ "src": "12178:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "id": 850,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "length",
+ "nodeType": "MemberAccess",
+ "src": "12178:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 851,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12198:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "12178:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 856,
+ "nodeType": "IfStatement",
+ "src": "12174:44:0",
+ "trueBody": {
+ "expression": {
+ "expression": {
+ "id": 853,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "12208:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 854,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "12208:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "functionReturnParameters": 848,
+ "id": 855,
+ "nodeType": "Return",
+ "src": "12201:17:0"
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 861,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 858,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 842,
+ "src": "12326:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "id": 859,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "length",
+ "nodeType": "MemberAccess",
+ "src": "12326:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "3635",
+ "id": 860,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12346:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_65_by_1",
+ "typeString": "int_const 65"
+ },
+ "value": "65"
+ },
+ "src": "12326:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "7369676e6174757265732e6c656e677468203d3d203635",
+ "id": 862,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12350:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_596a1fa41ba579d6aea221d825354132f4526efd6f16816b6df5045603592f81",
+ "typeString": "literal_string \"signatures.length == 65\""
+ },
+ "value": "signatures.length == 65"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_596a1fa41ba579d6aea221d825354132f4526efd6f16816b6df5045603592f81",
+ "typeString": "literal_string \"signatures.length == 65\""
+ }
+ ],
+ "id": 857,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "12318:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 863,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "12318:58:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 864,
+ "nodeType": "ExpressionStatement",
+ "src": "12318:58:0"
+ },
+ {
+ "assignments": [
+ 866
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 866,
+ "mutability": "mutable",
+ "name": "v",
+ "nodeType": "VariableDeclaration",
+ "scope": 949,
+ "src": "12386:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "typeName": {
+ "id": 865,
+ "name": "uint8",
+ "nodeType": "ElementaryTypeName",
+ "src": "12386:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 867,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "12386:7:0"
+ },
+ {
+ "assignments": [
+ 869
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 869,
+ "mutability": "mutable",
+ "name": "r",
+ "nodeType": "VariableDeclaration",
+ "scope": 949,
+ "src": "12403:9:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 868,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "12403:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 870,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "12403:9:0"
+ },
+ {
+ "assignments": [
+ 872
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 872,
+ "mutability": "mutable",
+ "name": "s",
+ "nodeType": "VariableDeclaration",
+ "scope": 949,
+ "src": "12422:9:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ "typeName": {
+ "id": 871,
+ "name": "bytes32",
+ "nodeType": "ElementaryTypeName",
+ "src": "12422:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 873,
+ "nodeType": "VariableDeclarationStatement",
+ "src": "12422:9:0"
+ },
+ {
+ "expression": {
+ "id": 882,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "components": [
+ {
+ "id": 874,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12442:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ {
+ "id": 875,
+ "name": "r",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 869,
+ "src": "12445:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 876,
+ "name": "s",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 872,
+ "src": "12448:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "id": 877,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "TupleExpression",
+ "src": "12441:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
+ "typeString": "tuple(uint8,bytes32,bytes32)"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "id": 879,
+ "name": "signature",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 842,
+ "src": "12468:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "hexValue": "30",
+ "id": 880,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12479:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ },
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 878,
+ "name": "signatureSplit",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1550,
+ "src": "12453:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_uint8_$_t_bytes32_$_t_bytes32_$",
+ "typeString": "function (bytes memory,uint256) pure returns (uint8,bytes32,bytes32)"
+ }
+ },
+ "id": 881,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "12453:28:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
+ "typeString": "tuple(uint8,bytes32,bytes32)"
+ }
+ },
+ "src": "12441:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 883,
+ "nodeType": "ExpressionStatement",
+ "src": "12441:40:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 886,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 884,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12548:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 885,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12553:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "12548:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 894,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 892,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12653:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "31",
+ "id": 893,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12658:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "12653:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 903,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 901,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "12832:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "hexValue": "3330",
+ "id": 902,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12836:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_30_by_1",
+ "typeString": "int_const 30"
+ },
+ "value": "30"
+ },
+ "src": "12832:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "id": 935,
+ "nodeType": "Block",
+ "src": "13143:149:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 933,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 924,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "13226:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 927,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 844,
+ "src": "13254:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 926,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "13244:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 928,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13244:27:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 929,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "13273:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ {
+ "id": 930,
+ "name": "r",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 869,
+ "src": "13276:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 931,
+ "name": "s",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 872,
+ "src": "13279:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "id": 925,
+ "name": "ecrecover",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -6,
+ "src": "13234:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
+ "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
+ }
+ },
+ "id": 932,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13234:47:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "13226:55:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 934,
+ "nodeType": "ExpressionStatement",
+ "src": "13226:55:0"
+ }
+ ]
+ },
+ "id": 936,
+ "nodeType": "IfStatement",
+ "src": "12828:464:0",
+ "trueBody": {
+ "id": 923,
+ "nodeType": "Block",
+ "src": "12840:297:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 921,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 904,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "13002:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
+ "id": 909,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13047:34:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
+ "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
+ },
+ "value": "\u0019Ethereum Signed Message:\n32"
+ },
+ {
+ "arguments": [
+ {
+ "id": 911,
+ "name": "transferHashData",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 844,
+ "src": "13093:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 910,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "13083:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 912,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13083:27:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73",
+ "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\""
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "expression": {
+ "id": 907,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "13030:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 908,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encodePacked",
+ "nodeType": "MemberAccess",
+ "src": "13030:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function () pure returns (bytes memory)"
+ }
+ },
+ "id": 913,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13030:81:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ ],
+ "id": 906,
+ "name": "keccak256",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -8,
+ "src": "13020:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
+ "typeString": "function (bytes memory) pure returns (bytes32)"
+ }
+ },
+ "id": 914,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13020:92:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 917,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 915,
+ "name": "v",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 866,
+ "src": "13114:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "-",
+ "rightExpression": {
+ "hexValue": "34",
+ "id": 916,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13118:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_4_by_1",
+ "typeString": "int_const 4"
+ },
+ "value": "4"
+ },
+ "src": "13114:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ {
+ "id": 918,
+ "name": "r",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 869,
+ "src": "13121:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ },
+ {
+ "id": 919,
+ "name": "s",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 872,
+ "src": "13124:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ },
+ {
+ "typeIdentifier": "t_bytes32",
+ "typeString": "bytes32"
+ }
+ ],
+ "id": 905,
+ "name": "ecrecover",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -6,
+ "src": "13010:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
+ "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
+ }
+ },
+ "id": 920,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13010:116:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "13002:124:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 922,
+ "nodeType": "ExpressionStatement",
+ "src": "13002:124:0"
+ }
+ ]
+ }
+ },
+ "id": 937,
+ "nodeType": "IfStatement",
+ "src": "12649:643:0",
+ "trueBody": {
+ "id": 900,
+ "nodeType": "Block",
+ "src": "12661:161:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 898,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 895,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "12793:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 896,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "12801:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 897,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "12801:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "12793:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 899,
+ "nodeType": "ExpressionStatement",
+ "src": "12793:18:0"
+ }
+ ]
+ }
+ },
+ "id": 938,
+ "nodeType": "IfStatement",
+ "src": "12544:748:0",
+ "trueBody": {
+ "id": 891,
+ "nodeType": "Block",
+ "src": "12556:87:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "hexValue": "436f6e7472616374207369676e61747572657320617265206e6f7420737570706f727465642062792074686973206d6f64756c65",
+ "id": 888,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "12577:54:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_b39fc396439fa2d21053daa8df1e6090b76cf041fa302da73b109291b14237bd",
+ "typeString": "literal_string \"Contract signatures are not supported by this module\""
+ },
+ "value": "Contract signatures are not supported by this module"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_stringliteral_b39fc396439fa2d21053daa8df1e6090b76cf041fa302da73b109291b14237bd",
+ "typeString": "literal_string \"Contract signatures are not supported by this module\""
+ }
+ ],
+ "id": 887,
+ "name": "revert",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -19,
+ -19
+ ],
+ "referencedDeclaration": -19,
+ "src": "12570:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (string memory) pure"
+ }
+ },
+ "id": 889,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "12570:62:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 890,
+ "nodeType": "ExpressionStatement",
+ "src": "12570:62:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 945,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 940,
+ "name": "owner",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 847,
+ "src": "13380:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 943,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13397:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 942,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "13389:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 941,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13389:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 944,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13389:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "13380:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "6f776e657220213d2061646472657373283029",
+ "id": 946,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13401:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_fa07c4489b96a4ba6d7948f5dd634975ac28da03dfd4c4c31f4f8e50c9c4d088",
+ "typeString": "literal_string \"owner != address(0)\""
+ },
+ "value": "owner != address(0)"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_fa07c4489b96a4ba6d7948f5dd634975ac28da03dfd4c4c31f4f8e50c9c4d088",
+ "typeString": "literal_string \"owner != address(0)\""
+ }
+ ],
+ "id": 939,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "13372:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 947,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13372:51:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 948,
+ "nodeType": "ExpressionStatement",
+ "src": "13372:51:0"
+ }
+ ]
+ },
+ "id": 950,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "recoverSignature",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 845,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 842,
+ "mutability": "mutable",
+ "name": "signature",
+ "nodeType": "VariableDeclaration",
+ "scope": 950,
+ "src": "12005:22:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 841,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "12005:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 844,
+ "mutability": "mutable",
+ "name": "transferHashData",
+ "nodeType": "VariableDeclaration",
+ "scope": 950,
+ "src": "12029:29:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 843,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "12029:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "12004:55:0"
+ },
+ "returnParameters": {
+ "id": 848,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 847,
+ "mutability": "mutable",
+ "name": "owner",
+ "nodeType": "VariableDeclaration",
+ "scope": 950,
+ "src": "12082:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 846,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "12082:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "12081:15:0"
+ },
+ "scope": 1428,
+ "src": "11979:1451:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 1005,
+ "nodeType": "Block",
+ "src": "13529:476:0",
+ "statements": [
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 966,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 961,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 954,
+ "src": "13543:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 964,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13560:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 963,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "13552:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 962,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13552:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 965,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13552:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "13543:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "id": 1003,
+ "nodeType": "Block",
+ "src": "13764:235:0",
+ "statements": [
+ {
+ "assignments": [
+ 982
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 982,
+ "mutability": "mutable",
+ "name": "data",
+ "nodeType": "VariableDeclaration",
+ "scope": 1003,
+ "src": "13778:17:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes"
+ },
+ "typeName": {
+ "id": 981,
+ "name": "bytes",
+ "nodeType": "ElementaryTypeName",
+ "src": "13778:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_storage_ptr",
+ "typeString": "bytes"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 989,
+ "initialValue": {
+ "arguments": [
+ {
+ "hexValue": "7472616e7366657228616464726573732c75696e7432353629",
+ "id": 985,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13822:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
+ "typeString": "literal_string \"transfer(address,uint256)\""
+ },
+ "value": "transfer(address,uint256)"
+ },
+ {
+ "id": 986,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 956,
+ "src": "13851:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 987,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 958,
+ "src": "13855:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
+ "typeString": "literal_string \"transfer(address,uint256)\""
+ },
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "expression": {
+ "id": 983,
+ "name": "abi",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -1,
+ "src": "13798:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_abi",
+ "typeString": "abi"
+ }
+ },
+ "id": 984,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "encodeWithSignature",
+ "nodeType": "MemberAccess",
+ "src": "13798:23:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
+ "typeString": "function (string memory) pure returns (bytes memory)"
+ }
+ },
+ "id": 988,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13798:64:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "13778:84:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 993,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 954,
+ "src": "13915:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "hexValue": "30",
+ "id": 994,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13922:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ {
+ "id": 995,
+ "name": "data",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 982,
+ "src": "13925:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bytes_memory_ptr",
+ "typeString": "bytes memory"
+ }
+ },
+ {
+ "expression": {
+ "expression": {
+ "id": 996,
+ "name": "Enum",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1435,
+ "src": "13931:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_contract$_Enum_$1435_$",
+ "typeString": "type(contract Enum)"
+ }
+ },
+ "id": 997,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "Operation",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 1434,
+ "src": "13931:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_enum$_Operation_$1434_$",
+ "typeString": "type(enum Enum.Operation)"
+ }
+ },
+ "id": 998,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "Call",
+ "nodeType": "MemberAccess",
+ "src": "13931:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "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_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ ],
+ "expression": {
+ "id": 991,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 952,
+ "src": "13884:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "id": 992,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "execTransactionFromModule",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 17,
+ "src": "13884:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1434_$returns$_t_bool_$",
+ "typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
+ }
+ },
+ "id": 999,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13884:67:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "436f756c64206e6f74206578656375746520746f6b656e207472616e73666572",
+ "id": 1000,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13953:34:0",
+ "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": 990,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "13876:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 1001,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13876:112:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1002,
+ "nodeType": "ExpressionStatement",
+ "src": "13876:112:0"
+ }
+ ]
+ },
+ "id": 1004,
+ "nodeType": "IfStatement",
+ "src": "13539:460:0",
+ "trueBody": {
+ "id": 980,
+ "nodeType": "Block",
+ "src": "13564:194:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "arguments": [
+ {
+ "id": 970,
+ "name": "to",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 956,
+ "src": "13674:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 971,
+ "name": "amount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 958,
+ "src": "13678:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ {
+ "hexValue": "",
+ "id": 972,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13686:2:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
+ "typeString": "literal_string \"\""
+ },
+ "value": ""
+ },
+ {
+ "expression": {
+ "expression": {
+ "id": 973,
+ "name": "Enum",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1435,
+ "src": "13690:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_contract$_Enum_$1435_$",
+ "typeString": "type(contract Enum)"
+ }
+ },
+ "id": 974,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "Operation",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 1434,
+ "src": "13690:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_enum$_Operation_$1434_$",
+ "typeString": "type(enum Enum.Operation)"
+ }
+ },
+ "id": 975,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "memberName": "Call",
+ "nodeType": "MemberAccess",
+ "src": "13690:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
+ "typeString": "literal_string \"\""
+ },
+ {
+ "typeIdentifier": "t_enum$_Operation_$1434",
+ "typeString": "enum Enum.Operation"
+ }
+ ],
+ "expression": {
+ "id": 968,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 952,
+ "src": "13643:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "id": 969,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "execTransactionFromModule",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 17,
+ "src": "13643:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$1434_$returns$_t_bool_$",
+ "typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
+ }
+ },
+ "id": 976,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13643:67:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "436f756c64206e6f742065786563757465206574686572207472616e73666572",
+ "id": 977,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "13712:34:0",
+ "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": 967,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "13635:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 978,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "13635:112:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 979,
+ "nodeType": "ExpressionStatement",
+ "src": "13635:112:0"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "id": 1006,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "transfer",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 959,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 952,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13454:15:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ },
+ "typeName": {
+ "id": 951,
+ "name": "GnosisSafe",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 18,
+ "src": "13454:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_GnosisSafe_$18",
+ "typeString": "contract GnosisSafe"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 954,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13471:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 953,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13471:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 956,
+ "mutability": "mutable",
+ "name": "to",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13486:18:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ "typeName": {
+ "id": 955,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "13486:15:0",
+ "stateMutability": "payable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 958,
+ "mutability": "mutable",
+ "name": "amount",
+ "nodeType": "VariableDeclaration",
+ "scope": 1006,
+ "src": "13506:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ },
+ "typeName": {
+ "id": 957,
+ "name": "uint96",
+ "nodeType": "ElementaryTypeName",
+ "src": "13506:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "13453:67:0"
+ },
+ "returnParameters": {
+ "id": 960,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "13529:0:0"
+ },
+ "scope": 1428,
+ "src": "13436:569:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "private"
+ },
+ {
+ "body": {
+ "id": 1022,
+ "nodeType": "Block",
+ "src": "14101:46:0",
+ "statements": [
+ {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1016,
+ "name": "tokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47,
+ "src": "14118:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[] storage ref))"
+ }
+ },
+ "id": 1018,
+ "indexExpression": {
+ "id": 1017,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1008,
+ "src": "14125:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14118:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[] storage ref)"
+ }
+ },
+ "id": 1020,
+ "indexExpression": {
+ "id": 1019,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1010,
+ "src": "14131:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14118:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage",
+ "typeString": "address[] storage ref"
+ }
+ },
+ "functionReturnParameters": 1015,
+ "id": 1021,
+ "nodeType": "Return",
+ "src": "14111:29:0"
+ }
+ ]
+ },
+ "functionSelector": "8d0e8e1d",
+ "id": 1023,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getTokens",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1011,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1008,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1023,
+ "src": "14030:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1007,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14030:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1010,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1023,
+ "src": "14044:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1009,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14044:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14029:32:0"
+ },
+ "returnParameters": {
+ "id": 1015,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1014,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 1023,
+ "src": "14083:16:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1012,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14083:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1013,
+ "nodeType": "ArrayTypeName",
+ "src": "14083:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14082:18:0"
+ },
+ "scope": 1428,
+ "src": "14011:136:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1071,
+ "nodeType": "Block",
+ "src": "14267:313:0",
+ "statements": [
+ {
+ "assignments": [
+ 1037
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1037,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 1071,
+ "src": "14277:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 1036,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "14277:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1043,
+ "initialValue": {
+ "arguments": [
+ {
+ "id": 1039,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1025,
+ "src": "14319:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1040,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1027,
+ "src": "14325:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1041,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1029,
+ "src": "14335:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1038,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "14306:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 1042,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14306:35:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "14277:64:0"
+ },
+ {
+ "expression": {
+ "components": [
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1046,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14380:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1047,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "14380:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 1045,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14372:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1044,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14372:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1048,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14372:25:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1051,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14419:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1052,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "14419:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ ],
+ "id": 1050,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14411:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1049,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14411:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1053,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14411:24:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1056,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14457:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1057,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "14457:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 1055,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14449:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1054,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14449:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1058,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14449:31:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1061,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14502:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1062,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "14502:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ ],
+ "id": 1060,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14494:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1059,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14494:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1063,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14494:31:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1066,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1037,
+ "src": "14547:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1067,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "nonce",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 74,
+ "src": "14547:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ ],
+ "id": 1065,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14539:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1064,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14539:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1068,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14539:24:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ }
+ ],
+ "id": 1069,
+ "isConstant": false,
+ "isInlineArray": true,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "14358:215:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr",
+ "typeString": "uint256[5] memory"
+ }
+ },
+ "functionReturnParameters": 1035,
+ "id": 1070,
+ "nodeType": "Return",
+ "src": "14351:222:0"
+ }
+ ]
+ },
+ "functionSelector": "94b31fbd",
+ "id": 1072,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getTokenAllowance",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1030,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1025,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14180:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1024,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14180:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1027,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14194:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1026,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14194:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1029,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14212:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1028,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14212:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14179:47:0"
+ },
+ "returnParameters": {
+ "id": 1035,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1034,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "scope": 1072,
+ "src": "14248:17:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_uint256_$5_memory_ptr",
+ "typeString": "uint256[5]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1031,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "14248:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "id": 1033,
+ "length": {
+ "hexValue": "35",
+ "id": 1032,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14256:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_5_by_1",
+ "typeString": "int_const 5"
+ },
+ "value": "5"
+ },
+ "nodeType": "ArrayTypeName",
+ "src": "14248:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_uint256_$5_storage_ptr",
+ "typeString": "uint256[5]"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14247:19:0"
+ },
+ "scope": 1428,
+ "src": "14153:427:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1164,
+ "nodeType": "Block",
+ "src": "14726:727:0",
+ "statements": [
+ {
+ "assignments": [
+ 1079
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1079,
+ "mutability": "mutable",
+ "name": "index",
+ "nodeType": "VariableDeclaration",
+ "scope": 1164,
+ "src": "14736:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1078,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "14736:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1084,
+ "initialValue": {
+ "arguments": [
+ {
+ "id": 1082,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "14758:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1081,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14751:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1080,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "14751:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1083,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14751:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "14736:31:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 1091,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1086,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "14785:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1089,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14799:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1088,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14794:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint256_$",
+ "typeString": "type(uint256)"
+ },
+ "typeName": {
+ "id": 1087,
+ "name": "uint",
+ "nodeType": "ElementaryTypeName",
+ "src": "14794:4:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1090,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14794:7:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "src": "14785:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "696e64657820213d2075696e74283029",
+ "id": 1092,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14803:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_4a2d9edd74f24662f88947ce284e3a1e9e02725c0905850305b1ce7e8ee456f2",
+ "typeString": "literal_string \"index != uint(0)\""
+ },
+ "value": "index != uint(0)"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_4a2d9edd74f24662f88947ce284e3a1e9e02725c0905850305b1ce7e8ee456f2",
+ "typeString": "literal_string \"index != uint(0)\""
+ }
+ ],
+ "id": 1085,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "14777:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 1093,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14777:45:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1094,
+ "nodeType": "ExpressionStatement",
+ "src": "14777:45:0"
+ },
+ {
+ "assignments": [
+ 1096
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1096,
+ "mutability": "mutable",
+ "name": "currentDelegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1164,
+ "src": "14832:23:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1095,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14832:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1104,
+ "initialValue": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1097,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "14858:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1100,
+ "indexExpression": {
+ "expression": {
+ "id": 1098,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "14868:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1099,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "14868:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14858:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1102,
+ "indexExpression": {
+ "id": 1101,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "14880:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "14858:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1103,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "14858:37:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "14832:63:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1110,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1105,
+ "name": "currentDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1096,
+ "src": "14908:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1108,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "14935:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1107,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "14927:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 1106,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14927:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1109,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "14927:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "14908:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1120,
+ "nodeType": "IfStatement",
+ "src": "14905:264:0",
+ "trueBody": {
+ "id": 1119,
+ "nodeType": "Block",
+ "src": "14939:230:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1114,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1112,
+ "name": "currentDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1096,
+ "src": "15025:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "id": 1113,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "15044:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "15025:27:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ {
+ "hexValue": "63757272656e7444656c6567617465203d3d2064656c6567617465",
+ "id": 1115,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "15054:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_015a46159767c793786ac6026f0bf920b0e1b83347241b23bbb8e98c67f949b3",
+ "typeString": "literal_string \"currentDelegate == delegate\""
+ },
+ "value": "currentDelegate == delegate"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ {
+ "typeIdentifier": "t_stringliteral_015a46159767c793786ac6026f0bf920b0e1b83347241b23bbb8e98c67f949b3",
+ "typeString": "literal_string \"currentDelegate == delegate\""
+ }
+ ],
+ "id": 1111,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [
+ -18,
+ -18
+ ],
+ "referencedDeclaration": -18,
+ "src": "15017:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
+ "typeString": "function (bool,string memory) pure"
+ }
+ },
+ "id": 1116,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15017:67:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1117,
+ "nodeType": "ExpressionStatement",
+ "src": "15017:67:0"
+ },
+ {
+ "functionReturnParameters": 1077,
+ "id": 1118,
+ "nodeType": "Return",
+ "src": "15152:7:0"
+ }
+ ]
+ }
+ },
+ {
+ "assignments": [
+ 1122
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1122,
+ "mutability": "mutable",
+ "name": "startIndex",
+ "nodeType": "VariableDeclaration",
+ "scope": 1164,
+ "src": "15178:17:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1121,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "15178:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1127,
+ "initialValue": {
+ "baseExpression": {
+ "id": 1123,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "15198:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1126,
+ "indexExpression": {
+ "expression": {
+ "id": 1124,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15213:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1125,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15213:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15198:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "15178:46:0"
+ },
+ {
+ "expression": {
+ "id": 1139,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1128,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "15234:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1132,
+ "indexExpression": {
+ "expression": {
+ "id": 1129,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15244:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1130,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15244:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15234:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1133,
+ "indexExpression": {
+ "id": 1131,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "15256:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "15234:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "id": 1135,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "15274:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "hexValue": "30",
+ "id": 1136,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "15284:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ {
+ "id": 1137,
+ "name": "startIndex",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1122,
+ "src": "15287:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ ],
+ "id": 1134,
+ "name": "Delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 64,
+ "src": "15265:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_struct$_Delegate_$64_storage_ptr_$",
+ "typeString": "type(struct AllowanceModule.Delegate storage pointer)"
+ }
+ },
+ "id": 1138,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "structConstructorCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15265:33:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "src": "15234:64:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1140,
+ "nodeType": "ExpressionStatement",
+ "src": "15234:64:0"
+ },
+ {
+ "expression": {
+ "id": 1149,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1141,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "15308:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1145,
+ "indexExpression": {
+ "expression": {
+ "id": 1142,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15318:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1143,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15318:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15308:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1146,
+ "indexExpression": {
+ "id": 1144,
+ "name": "startIndex",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1122,
+ "src": "15330:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15308:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1147,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "15308:38:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 1148,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "15349:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "15308:46:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1150,
+ "nodeType": "ExpressionStatement",
+ "src": "15308:46:0"
+ },
+ {
+ "expression": {
+ "id": 1156,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "id": 1151,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "15364:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1154,
+ "indexExpression": {
+ "expression": {
+ "id": 1152,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15379:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1153,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15379:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "15364:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "id": 1155,
+ "name": "index",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1079,
+ "src": "15393:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "15364:34:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1157,
+ "nodeType": "ExpressionStatement",
+ "src": "15364:34:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1159,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15425:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1160,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15425:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1161,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1075,
+ "src": "15437:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1158,
+ "name": "AddDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 81,
+ "src": "15413:11:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address)"
+ }
+ },
+ "id": 1162,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15413:33:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1163,
+ "nodeType": "EmitStatement",
+ "src": "15408:38:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 1073,
+ "nodeType": "StructuredDocumentation",
+ "src": "14586:89:0",
+ "text": "@dev Allows to add a delegate.\n @param delegate Delegate that should be added."
+ },
+ "functionSelector": "e71bdf41",
+ "id": 1165,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "addDelegate",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1076,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1075,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1165,
+ "src": "14701:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1074,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "14701:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "14700:18:0"
+ },
+ "returnParameters": {
+ "id": 1077,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "14726:0:0"
+ },
+ "scope": 1428,
+ "src": "14680:773:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1338,
+ "nodeType": "Block",
+ "src": "15853:1293:0",
+ "statements": [
+ {
+ "assignments": [
+ 1174
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1174,
+ "mutability": "mutable",
+ "name": "current",
+ "nodeType": "VariableDeclaration",
+ "scope": 1338,
+ "src": "15863:23:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ },
+ "typeName": {
+ "id": 1173,
+ "name": "Delegate",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 64,
+ "src": "15863:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1184,
+ "initialValue": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1175,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "15889:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1178,
+ "indexExpression": {
+ "expression": {
+ "id": 1176,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "15899:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1177,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "15899:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15889:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1183,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 1181,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "15918:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1180,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "15911:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1179,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "15911:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1182,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "15911:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "15889:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "15863:65:0"
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1191,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1185,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "15991:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1186,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "15991:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1189,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16019:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1188,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "16011:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 1187,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "16011:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1190,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16011:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "15991:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1193,
+ "nodeType": "IfStatement",
+ "src": "15988:42:0",
+ "trueBody": {
+ "functionReturnParameters": 1172,
+ "id": 1192,
+ "nodeType": "Return",
+ "src": "16023:7:0"
+ }
+ },
+ {
+ "condition": {
+ "id": 1194,
+ "name": "removeAllowances",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1170,
+ "src": "16043:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1275,
+ "nodeType": "IfStatement",
+ "src": "16039:698:0",
+ "trueBody": {
+ "id": 1274,
+ "nodeType": "Block",
+ "src": "16061:676:0",
+ "statements": [
+ {
+ "assignments": [
+ 1199
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1199,
+ "mutability": "mutable",
+ "name": "delegateTokens",
+ "nodeType": "VariableDeclaration",
+ "scope": 1274,
+ "src": "16075:32:0",
+ "stateVariable": false,
+ "storageLocation": "storage",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1197,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "16075:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1198,
+ "nodeType": "ArrayTypeName",
+ "src": "16075:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1206,
+ "initialValue": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1200,
+ "name": "tokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47,
+ "src": "16110:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$_$",
+ "typeString": "mapping(address => mapping(address => address[] storage ref))"
+ }
+ },
+ "id": 1203,
+ "indexExpression": {
+ "expression": {
+ "id": 1201,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16117:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1202,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16117:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16110:18:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
+ "typeString": "mapping(address => address[] storage ref)"
+ }
+ },
+ "id": 1205,
+ "indexExpression": {
+ "id": 1204,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16129:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16110:28:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage",
+ "typeString": "address[] storage ref"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16075:63:0"
+ },
+ {
+ "body": {
+ "id": 1272,
+ "nodeType": "Block",
+ "src": "16204:523:0",
+ "statements": [
+ {
+ "assignments": [
+ 1219
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1219,
+ "mutability": "mutable",
+ "name": "token",
+ "nodeType": "VariableDeclaration",
+ "scope": 1272,
+ "src": "16222:13:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1218,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "16222:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1223,
+ "initialValue": {
+ "baseExpression": {
+ "id": 1220,
+ "name": "delegateTokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1199,
+ "src": "16238:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[] storage pointer"
+ }
+ },
+ "id": 1222,
+ "indexExpression": {
+ "id": 1221,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1208,
+ "src": "16253:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16238:17:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16222:33:0"
+ },
+ {
+ "assignments": [
+ 1225
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1225,
+ "mutability": "mutable",
+ "name": "allowance",
+ "nodeType": "VariableDeclaration",
+ "scope": 1272,
+ "src": "16339:26:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ },
+ "typeName": {
+ "id": 1224,
+ "name": "Allowance",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 75,
+ "src": "16339:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_storage_ptr",
+ "typeString": "struct AllowanceModule.Allowance"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1232,
+ "initialValue": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1227,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16381:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1228,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16381:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1229,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16393:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1230,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1219,
+ "src": "16403:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1226,
+ "name": "getAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 360,
+ "src": "16368:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_address_$returns$_t_struct$_Allowance_$75_memory_ptr_$",
+ "typeString": "function (address,address,address) view returns (struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 1231,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16368:41:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16339:70:0"
+ },
+ {
+ "expression": {
+ "id": 1237,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1233,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16427:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1235,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "amount",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 66,
+ "src": "16427:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1236,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16446:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16427:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 1238,
+ "nodeType": "ExpressionStatement",
+ "src": "16427:20:0"
+ },
+ {
+ "expression": {
+ "id": 1243,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1239,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16465:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1241,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "spent",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 68,
+ "src": "16465:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1242,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16483:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16465:19:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint96",
+ "typeString": "uint96"
+ }
+ },
+ "id": 1244,
+ "nodeType": "ExpressionStatement",
+ "src": "16465:19:0"
+ },
+ {
+ "expression": {
+ "id": 1249,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1245,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16502:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1247,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "resetTimeMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 70,
+ "src": "16502:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1248,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16527:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16502:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint16",
+ "typeString": "uint16"
+ }
+ },
+ "id": 1250,
+ "nodeType": "ExpressionStatement",
+ "src": "16502:26:0"
+ },
+ {
+ "expression": {
+ "id": 1255,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "id": 1251,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16546:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ },
+ "id": 1253,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "lastResetMin",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 72,
+ "src": "16546:22:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "hexValue": "30",
+ "id": 1254,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16571:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16546:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint32",
+ "typeString": "uint32"
+ }
+ },
+ "id": 1256,
+ "nodeType": "ExpressionStatement",
+ "src": "16546:26:0"
+ },
+ {
+ "expression": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1258,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16606:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1259,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16606:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1260,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16618:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1261,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1219,
+ "src": "16628:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1262,
+ "name": "allowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1225,
+ "src": "16635:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_struct$_Allowance_$75_memory_ptr",
+ "typeString": "struct AllowanceModule.Allowance memory"
+ }
+ ],
+ "id": 1257,
+ "name": "updateAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 382,
+ "src": "16590:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_struct$_Allowance_$75_memory_ptr_$returns$__$",
+ "typeString": "function (address,address,address,struct AllowanceModule.Allowance memory)"
+ }
+ },
+ "id": 1263,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16590:55:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1264,
+ "nodeType": "ExpressionStatement",
+ "src": "16590:55:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1266,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16684:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1267,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16684:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1268,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "16696:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "id": 1269,
+ "name": "token",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1219,
+ "src": "16706:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1265,
+ "name": "DeleteAllowance",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 141,
+ "src": "16668:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address,address)"
+ }
+ },
+ "id": 1270,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "16668:44:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1271,
+ "nodeType": "EmitStatement",
+ "src": "16663:49:0"
+ }
+ ]
+ },
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 1214,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1211,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1208,
+ "src": "16172:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<",
+ "rightExpression": {
+ "expression": {
+ "id": 1212,
+ "name": "delegateTokens",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1199,
+ "src": "16176:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[] storage pointer"
+ }
+ },
+ "id": 1213,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "length",
+ "nodeType": "MemberAccess",
+ "src": "16176:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "src": "16172:25:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1273,
+ "initializationExpression": {
+ "assignments": [
+ 1208
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1208,
+ "mutability": "mutable",
+ "name": "i",
+ "nodeType": "VariableDeclaration",
+ "scope": 1273,
+ "src": "16157:9:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 1207,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "16157:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1210,
+ "initialValue": {
+ "hexValue": "30",
+ "id": 1209,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16169:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "16157:13:0"
+ },
+ "loopExpression": {
+ "expression": {
+ "id": 1216,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "UnaryOperation",
+ "operator": "++",
+ "prefix": false,
+ "src": "16199:3:0",
+ "subExpression": {
+ "id": 1215,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1208,
+ "src": "16199:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "id": 1217,
+ "nodeType": "ExpressionStatement",
+ "src": "16199:3:0"
+ },
+ "nodeType": "ForStatement",
+ "src": "16152:575:0"
+ }
+ ]
+ }
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "id": 1279,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1276,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16750:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1277,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "16750:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 1278,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16766:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16750:17:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": {
+ "id": 1301,
+ "nodeType": "Block",
+ "src": "16841:80:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1299,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1289,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "16855:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1294,
+ "indexExpression": {
+ "expression": {
+ "id": 1290,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16865:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1291,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16865:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16855:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1295,
+ "indexExpression": {
+ "expression": {
+ "id": 1292,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16877:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1293,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "16877:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16855:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1296,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16855:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1297,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16898:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1298,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16898:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "16855:55:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1300,
+ "nodeType": "ExpressionStatement",
+ "src": "16855:55:0"
+ }
+ ]
+ },
+ "id": 1302,
+ "nodeType": "IfStatement",
+ "src": "16746:175:0",
+ "trueBody": {
+ "id": 1288,
+ "nodeType": "Block",
+ "src": "16769:66:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1286,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "id": 1280,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "16783:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1283,
+ "indexExpression": {
+ "expression": {
+ "id": 1281,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16798:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1282,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16798:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "16783:26:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1284,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16812:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1285,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16812:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "16783:41:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1287,
+ "nodeType": "ExpressionStatement",
+ "src": "16783:41:0"
+ }
+ ]
+ }
+ },
+ {
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "id": 1306,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1303,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16934:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1304,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16934:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 1305,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "16950:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "16934:17:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1320,
+ "nodeType": "IfStatement",
+ "src": "16930:103:0",
+ "trueBody": {
+ "id": 1319,
+ "nodeType": "Block",
+ "src": "16953:80:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1317,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "expression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1307,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "16967:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1312,
+ "indexExpression": {
+ "expression": {
+ "id": 1308,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "16977:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1309,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "16977:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16967:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1313,
+ "indexExpression": {
+ "expression": {
+ "id": 1310,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "16989:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1311,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "16989:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "16967:35:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "id": 1314,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "16967:40:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1315,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1174,
+ "src": "17010:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1316,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "prev",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 61,
+ "src": "17010:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "16967:55:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1318,
+ "nodeType": "ExpressionStatement",
+ "src": "16967:55:0"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "id": 1330,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "UnaryOperation",
+ "operator": "delete",
+ "prefix": true,
+ "src": "17042:46:0",
+ "subExpression": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1321,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "17049:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1324,
+ "indexExpression": {
+ "expression": {
+ "id": 1322,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "17059:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1323,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "17059:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17049:21:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1329,
+ "indexExpression": {
+ "arguments": [
+ {
+ "id": 1327,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "17078:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1326,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "17071:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1325,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17071:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1328,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17071:16:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "17049:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1331,
+ "nodeType": "ExpressionStatement",
+ "src": "17042:46:0"
+ },
+ {
+ "eventCall": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1333,
+ "name": "msg",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -15,
+ "src": "17118:3:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_magic_message",
+ "typeString": "msg"
+ }
+ },
+ "id": 1334,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "sender",
+ "nodeType": "MemberAccess",
+ "src": "17118:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ {
+ "id": 1335,
+ "name": "delegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1168,
+ "src": "17130:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1332,
+ "name": "RemoveDelegate",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 87,
+ "src": "17103:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
+ "typeString": "function (address,address)"
+ }
+ },
+ "id": 1336,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17103:36:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 1337,
+ "nodeType": "EmitStatement",
+ "src": "17098:41:0"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 1166,
+ "nodeType": "StructuredDocumentation",
+ "src": "15459:317:0",
+ "text": "@dev Allows to remove a delegate.\n @param delegate Delegate that should be removed.\n @param removeAllowances Indicator if allowances should also be removed. This should be set to `true` unless this causes an out of gas, in this case the allowances should be \"manually\" deleted via `deleteAllowance`."
+ },
+ "functionSelector": "dd43a79f",
+ "id": 1339,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "removeDelegate",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1171,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1168,
+ "mutability": "mutable",
+ "name": "delegate",
+ "nodeType": "VariableDeclaration",
+ "scope": 1339,
+ "src": "15805:16:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1167,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "15805:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1170,
+ "mutability": "mutable",
+ "name": "removeAllowances",
+ "nodeType": "VariableDeclaration",
+ "scope": 1339,
+ "src": "15823:21:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "typeName": {
+ "id": 1169,
+ "name": "bool",
+ "nodeType": "ElementaryTypeName",
+ "src": "15823:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "15804:41:0"
+ },
+ "returnParameters": {
+ "id": 1172,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "15853:0:0"
+ },
+ "scope": 1428,
+ "src": "15781:1365:0",
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ },
+ {
+ "body": {
+ "id": 1426,
+ "nodeType": "Block",
+ "src": "17278:633:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1359,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 1353,
+ "name": "results",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1349,
+ "src": "17288:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "id": 1357,
+ "name": "pageSize",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1345,
+ "src": "17312:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ ],
+ "id": 1356,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "NewExpression",
+ "src": "17298:13:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$",
+ "typeString": "function (uint256) pure returns (address[] memory)"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1354,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17302:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1355,
+ "nodeType": "ArrayTypeName",
+ "src": "17302:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ }
+ },
+ "id": 1358,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17298:23:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "src": "17288:33:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "id": 1360,
+ "nodeType": "ExpressionStatement",
+ "src": "17288:33:0"
+ },
+ {
+ "assignments": [
+ 1362
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1362,
+ "mutability": "mutable",
+ "name": "i",
+ "nodeType": "VariableDeclaration",
+ "scope": 1426,
+ "src": "17331:7:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "typeName": {
+ "id": 1361,
+ "name": "uint8",
+ "nodeType": "ElementaryTypeName",
+ "src": "17331:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1364,
+ "initialValue": {
+ "hexValue": "30",
+ "id": 1363,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "17341:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "17331:11:0"
+ },
+ {
+ "assignments": [
+ 1366
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1366,
+ "mutability": "mutable",
+ "name": "initialIndex",
+ "nodeType": "VariableDeclaration",
+ "scope": 1426,
+ "src": "17352:19:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1365,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17352:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1376,
+ "initialValue": {
+ "condition": {
+ "components": [
+ {
+ "commonType": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "id": 1369,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1367,
+ "name": "start",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1343,
+ "src": "17375:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "hexValue": "30",
+ "id": 1368,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "17384:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "17375:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ }
+ ],
+ "id": 1370,
+ "isConstant": false,
+ "isInlineArray": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "TupleExpression",
+ "src": "17374:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseExpression": {
+ "baseExpression": {
+ "id": 1372,
+ "name": "delegatesStart",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 51,
+ "src": "17397:14:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint48_$",
+ "typeString": "mapping(address => uint48)"
+ }
+ },
+ "id": 1374,
+ "indexExpression": {
+ "id": 1373,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1341,
+ "src": "17412:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17397:20:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1375,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "Conditional",
+ "src": "17374:43:0",
+ "trueExpression": {
+ "id": 1371,
+ "name": "start",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1343,
+ "src": "17389:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "17352:65:0"
+ },
+ {
+ "assignments": [
+ 1378
+ ],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 1378,
+ "mutability": "mutable",
+ "name": "current",
+ "nodeType": "VariableDeclaration",
+ "scope": 1426,
+ "src": "17427:23:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ },
+ "typeName": {
+ "id": 1377,
+ "name": "Delegate",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 64,
+ "src": "17427:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage_ptr",
+ "typeString": "struct AllowanceModule.Delegate"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "id": 1384,
+ "initialValue": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1379,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "17453:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1381,
+ "indexExpression": {
+ "id": 1380,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1341,
+ "src": "17463:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17453:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1383,
+ "indexExpression": {
+ "id": 1382,
+ "name": "initialIndex",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1366,
+ "src": "17469:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17453:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "17427:55:0"
+ },
+ {
+ "body": {
+ "id": 1415,
+ "nodeType": "Block",
+ "src": "17546:124:0",
+ "statements": [
+ {
+ "expression": {
+ "id": 1401,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "baseExpression": {
+ "id": 1396,
+ "name": "results",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1349,
+ "src": "17560:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[] memory"
+ }
+ },
+ "id": 1398,
+ "indexExpression": {
+ "id": 1397,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1362,
+ "src": "17568:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "17560:10:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "expression": {
+ "id": 1399,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17573:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1400,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "17573:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "src": "17560:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1402,
+ "nodeType": "ExpressionStatement",
+ "src": "17560:29:0"
+ },
+ {
+ "expression": {
+ "id": 1404,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "UnaryOperation",
+ "operator": "++",
+ "prefix": false,
+ "src": "17603:3:0",
+ "subExpression": {
+ "id": 1403,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1362,
+ "src": "17603:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "id": 1405,
+ "nodeType": "ExpressionStatement",
+ "src": "17603:3:0"
+ },
+ {
+ "expression": {
+ "id": 1413,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 1406,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17620:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "baseExpression": {
+ "baseExpression": {
+ "id": 1407,
+ "name": "delegates",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 57,
+ "src": "17630:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$_$",
+ "typeString": "mapping(address => mapping(uint48 => struct AllowanceModule.Delegate storage ref))"
+ }
+ },
+ "id": 1409,
+ "indexExpression": {
+ "id": 1408,
+ "name": "safe",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1341,
+ "src": "17640:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17630:15:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_uint48_$_t_struct$_Delegate_$64_storage_$",
+ "typeString": "mapping(uint48 => struct AllowanceModule.Delegate storage ref)"
+ }
+ },
+ "id": 1412,
+ "indexExpression": {
+ "expression": {
+ "id": 1410,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17646:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1411,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "next",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 63,
+ "src": "17646:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "17630:29:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_storage",
+ "typeString": "struct AllowanceModule.Delegate storage ref"
+ }
+ },
+ "src": "17620:39:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1414,
+ "nodeType": "ExpressionStatement",
+ "src": "17620:39:0"
+ }
+ ]
+ },
+ "condition": {
+ "commonType": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "id": 1395,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "commonType": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "id": 1391,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "expression": {
+ "id": 1385,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17498:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1386,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "17498:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "!=",
+ "rightExpression": {
+ "arguments": [
+ {
+ "hexValue": "30",
+ "id": 1389,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "17526:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ }
+ ],
+ "id": 1388,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "17518:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 1387,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17518:7:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1390,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17518:10:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address_payable",
+ "typeString": "address payable"
+ }
+ },
+ "src": "17498:30:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "&&",
+ "rightExpression": {
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 1394,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "id": 1392,
+ "name": "i",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1362,
+ "src": "17532:1:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "<",
+ "rightExpression": {
+ "id": 1393,
+ "name": "pageSize",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1345,
+ "src": "17536:8:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "src": "17532:12:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "src": "17498:46:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 1416,
+ "nodeType": "WhileStatement",
+ "src": "17492:178:0"
+ },
+ {
+ "expression": {
+ "id": 1423,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "id": 1417,
+ "name": "next",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1351,
+ "src": "17679:4:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "arguments": [
+ {
+ "expression": {
+ "id": 1420,
+ "name": "current",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 1378,
+ "src": "17693:7:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_struct$_Delegate_$64_memory_ptr",
+ "typeString": "struct AllowanceModule.Delegate memory"
+ }
+ },
+ "id": 1421,
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "memberName": "delegate",
+ "nodeType": "MemberAccess",
+ "referencedDeclaration": 59,
+ "src": "17693:16:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ ],
+ "id": 1419,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "17686:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_uint48_$",
+ "typeString": "type(uint48)"
+ },
+ "typeName": {
+ "id": 1418,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17686:6:0",
+ "typeDescriptions": {}
+ }
+ },
+ "id": 1422,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "17686:24:0",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "src": "17679:31:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "id": 1424,
+ "nodeType": "ExpressionStatement",
+ "src": "17679:31:0"
+ },
+ {
+ "AST": {
+ "nodeType": "YulBlock",
+ "src": "17863:42:0",
+ "statements": [
+ {
+ "expression": {
+ "arguments": [
+ {
+ "name": "results",
+ "nodeType": "YulIdentifier",
+ "src": "17884:7:0"
+ },
+ {
+ "name": "i",
+ "nodeType": "YulIdentifier",
+ "src": "17893:1:0"
+ }
+ ],
+ "functionName": {
+ "name": "mstore",
+ "nodeType": "YulIdentifier",
+ "src": "17877:6:0"
+ },
+ "nodeType": "YulFunctionCall",
+ "src": "17877:18:0"
+ },
+ "nodeType": "YulExpressionStatement",
+ "src": "17877:18:0"
+ }
+ ]
+ },
+ "evmVersion": "istanbul",
+ "externalReferences": [
+ {
+ "declaration": 1362,
+ "isOffset": false,
+ "isSlot": false,
+ "src": "17893:1:0",
+ "valueSize": 1
+ },
+ {
+ "declaration": 1349,
+ "isOffset": false,
+ "isSlot": false,
+ "src": "17884:7:0",
+ "valueSize": 1
+ }
+ ],
+ "id": 1425,
+ "nodeType": "InlineAssembly",
+ "src": "17854:51:0"
+ }
+ ]
+ },
+ "functionSelector": "eb37abe0",
+ "id": 1427,
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "getDelegates",
+ "nodeType": "FunctionDefinition",
+ "parameters": {
+ "id": 1346,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1341,
+ "mutability": "mutable",
+ "name": "safe",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17174:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 1340,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17174:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1343,
+ "mutability": "mutable",
+ "name": "start",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17188:12:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1342,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17188:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1345,
+ "mutability": "mutable",
+ "name": "pageSize",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17202:14:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "typeName": {
+ "id": 1344,
+ "name": "uint8",
+ "nodeType": "ElementaryTypeName",
+ "src": "17202:5:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "17173:44:0"
+ },
+ "returnParameters": {
+ "id": 1352,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 1349,
+ "mutability": "mutable",
+ "name": "results",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17239:24:0",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
+ "typeString": "address[]"
+ },
+ "typeName": {
+ "baseType": {
+ "id": 1347,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "17239:7:0",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "id": 1348,
+ "nodeType": "ArrayTypeName",
+ "src": "17239:9:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
+ "typeString": "address[]"
+ }
+ },
+ "visibility": "internal"
+ },
+ {
+ "constant": false,
+ "id": 1351,
+ "mutability": "mutable",
+ "name": "next",
+ "nodeType": "VariableDeclaration",
+ "scope": 1427,
+ "src": "17265:11:0",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ },
+ "typeName": {
+ "id": 1350,
+ "name": "uint48",
+ "nodeType": "ElementaryTypeName",
+ "src": "17265:6:0",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint48",
+ "typeString": "uint48"
+ }
+ },
+ "visibility": "internal"
+ }
+ ],
+ "src": "17238:39:0"
+ },
+ "scope": 1428,
+ "src": "17152:759:0",
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "public"
+ }
+ ],
+ "scope": 1429,
+ "src": "648:17265:0"
+ }
+ ],
+ "src": "42:17871:0"
+ },
+ "compiler": {
+ "name": "solc",
+ "version": "0.7.1+commit.f4a555be.Emscripten.clang"
+ },
+ "networks": {
+ "4": {
+ "events": {
+ "0x2fd5b26f00131bd8ca0fc556207292b85a6bec241341df82724333227458e630": {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ }
+ ],
+ "name": "AddDelegate",
+ "type": "event"
+ },
+ "0xdccc2d936ded24d2153d2760581a7f0dcb23ec71190c9726b3584cdd700214d4": {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ }
+ ],
+ "name": "RemoveDelegate",
+ "type": "event"
+ },
+ "0xa11cca2c2027e28ab0046aab4d4040f59d8b06e819ccd974c1e53e86aa814c19": {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "value",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "nonce",
+ "type": "uint16"
+ }
+ ],
+ "name": "ExecuteAllowanceTransfer",
+ "type": "event"
+ },
+ "0x49caa04c5e1e168069c09df7f88c07ca87be980b0bf4570ab77fe9aae3ca7eba": {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "safe",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "allowanceAmount",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "resetTime",
+ "type": "uint16"
+ }
+ ],
+ "name": "SetAllowance",
+ "type": "event"
+ }
+ },
+ "links": {},
+ "address": "0x9e9Bf12b5a66c0f0A7435835e0365477E121B110",
+ "transactionHash": "0xc78f1aef6d837d7373fe352e70e3917f0798cee15a45dc8e74035263fd7988fb"
+ }
+ },
+ "schemaVersion": "3.2.5",
+ "updatedAt": "2020-10-27T19:21:57.366Z",
+ "devdoc": {
+ "kind": "dev",
+ "methods": {
+ "addDelegate(address)": {
+ "details": "Allows to add a delegate.",
+ "params": {
+ "delegate": "Delegate that should be added."
+ }
+ },
+ "deleteAllowance(address,address)": {
+ "details": "Allows to remove the allowance for a specific delegate and token. This will set all values except the `nonce` to 0.",
+ "params": {
+ "delegate": "Delegate whose allowance should be updated.",
+ "token": "Token contract address."
+ }
+ },
+ "executeAllowanceTransfer(address,address,address,uint96,address,uint96,address,bytes)": {
+ "details": "Allows to use the allowance to perform a transfer.",
+ "params": {
+ "amount": "Amount that should be transferred.",
+ "delegate": "Delegate whose allowance should be updated.",
+ "payment": "Amount to should be paid for executing the transfer.",
+ "paymentToken": "Token that should be used to pay for the execution of the transfer.",
+ "safe": "The Safe whose funds should be used.",
+ "signature": "Signature generated by the delegate to authorize the transfer.",
+ "to": "Address that should receive the tokens.",
+ "token": "Token contract address."
+ }
+ },
+ "generateTransferHash(address,address,address,uint96,address,uint96,uint16)": {
+ "details": "Generates the transfer hash that should be signed to authorize a transfer"
+ },
+ "getChainId()": {
+ "details": "Returns the chain id used by this contract."
+ },
+ "removeDelegate(address,bool)": {
+ "details": "Allows to remove a delegate.",
+ "params": {
+ "delegate": "Delegate that should be removed.",
+ "removeAllowances": "Indicator if allowances should also be removed. This should be set to `true` unless this causes an out of gas, in this case the allowances should be \"manually\" deleted via `deleteAllowance`."
+ }
+ },
+ "resetAllowance(address,address)": {
+ "details": "Allows to reset the allowance for a specific delegate and token.",
+ "params": {
+ "delegate": "Delegate whose allowance should be updated.",
+ "token": "Token contract address."
+ }
+ },
+ "setAllowance(address,address,uint96,uint16,uint32)": {
+ "details": "Allows to update the allowance for a specified token. This can only be done via a Safe transaction.",
+ "params": {
+ "allowanceAmount": "allowance in smallest token unit.",
+ "delegate": "Delegate whose allowance should be updated.",
+ "resetBaseMin": "Time based on which the reset time should be increased",
+ "resetTimeMin": "Time after which the allowance should reset",
+ "token": "Token contract address."
+ }
+ }
+ },
+ "version": 1
+ },
+ "userdoc": {
+ "kind": "user",
+ "methods": {},
+ "version": 1
+ }
+}
diff --git a/src/logic/contracts/generateBatchRequests.ts b/src/logic/contracts/generateBatchRequests.ts
index adf327b8..6a724f98 100644
--- a/src/logic/contracts/generateBatchRequests.ts
+++ b/src/logic/contracts/generateBatchRequests.ts
@@ -14,25 +14,33 @@ import { AbiItem } from 'web3-utils'
*/
type MethodsArgsType = Array
- interface Props {
+interface Props {
abi: AbiItem[]
address: string
batch?: BatchRequest
context?: unknown
- methods: Array
- }
+ methods: Array
+}
-const generateBatchRequests = ({ abi, address, batch, context, methods }: Props): Promise => {
+const generateBatchRequests = ({
+ abi,
+ address,
+ batch,
+ context,
+ methods,
+}: Props): Promise => {
const contractInstance = new web3.eth.Contract(abi, address)
const localBatch = new web3.BatchRequest()
const values = methods.map((methodObject) => {
- let method, type, args: MethodsArgsType = []
+ let method,
+ type,
+ args: MethodsArgsType = []
if (typeof methodObject === 'string') {
method = methodObject
} else {
- ({ method, type, args } = methodObject)
+ ;({ method, type, args } = methodObject)
}
return new Promise((resolve) => {
diff --git a/src/logic/contracts/historicProxyCode.ts b/src/logic/contracts/historicProxyCode.ts
index 90e08fdc..b2ebeee7 100644
--- a/src/logic/contracts/historicProxyCode.ts
+++ b/src/logic/contracts/historicProxyCode.ts
@@ -1,4 +1,4 @@
-//
+//
// Code of the safe v1.0.0
const proxyCodeV10 =
diff --git a/src/logic/contracts/methodIds.ts b/src/logic/contracts/methodIds.ts
index c91db228..36d72d08 100644
--- a/src/logic/contracts/methodIds.ts
+++ b/src/logic/contracts/methodIds.ts
@@ -1,78 +1,173 @@
+import {
+ DataDecoded,
+ SAFE_METHOD_ID_TO_NAME,
+ SAFE_METHODS_NAMES,
+ SPENDING_LIMIT_METHOD_ID_TO_NAME,
+ SPENDING_LIMIT_METHODS_NAMES,
+ TOKEN_TRANSFER_METHOD_ID_TO_NAME,
+ TOKEN_TRANSFER_METHODS_NAMES,
+} from 'src/logic/safe/store/models/types/transactions.d'
import { web3ReadOnly as web3 } from 'src/logic/wallets/getWeb3'
-import { DataDecoded, METHOD_TO_ID } from 'src/routes/safe/store/models/types/transactions.d'
+import { sameString } from 'src/utils/strings'
+
+type DecodeInfoProps = {
+ paramsHash: string
+ params: Record
+}
+
+const decodeInfo = ({ paramsHash, params }: DecodeInfoProps): DataDecoded['parameters'] => {
+ const decodedParameters = web3.eth.abi.decodeParameters(Object.values(params), paramsHash)
+
+ return Object.keys(params).map((name, index) => ({
+ name,
+ type: params[name],
+ value: decodedParameters[index],
+ }))
+}
export const decodeParamsFromSafeMethod = (data: string): DataDecoded | null => {
- const [methodId, params] = [data.slice(0, 10) as keyof typeof METHOD_TO_ID | string, data.slice(10)]
+ const [methodId, paramsHash] = [data.slice(0, 10), data.slice(10)]
+ const method = SAFE_METHODS_NAMES[methodId]
- switch (methodId) {
- // swapOwner
- case '0xe318b52b': {
- const decodedParameters = web3.eth.abi.decodeParameters(['uint', 'address', 'address'], params) as string[]
- return {
- method: METHOD_TO_ID[methodId],
- parameters: [
- { name: 'oldOwner', type: 'address', value: decodedParameters[1] },
- { name: 'newOwner', type: 'address', value: decodedParameters[2] },
- ],
+ switch (method) {
+ case SAFE_METHODS_NAMES.SWAP_OWNER: {
+ const params = {
+ prevOwner: 'address',
+ oldOwner: 'address',
+ newOwner: 'address',
}
+
+ // we only need to return the addresses that has been swapped, no need for the `prevOwner`
+ const [, oldOwner, newOwner] = decodeInfo({ paramsHash, params })
+
+ return { method, parameters: [oldOwner, newOwner] }
}
- // addOwnerWithThreshold
- case '0x0d582f13': {
- const decodedParameters = web3.eth.abi.decodeParameters(['address', 'uint'], params)
- return {
- method: METHOD_TO_ID[methodId],
- parameters: [
- { name: 'owner', type: 'address', value: decodedParameters[0] },
- { name: '_threshold', type: 'uint', value: decodedParameters[1] },
- ],
+ case SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD: {
+ const params = {
+ owner: 'address',
+ _threshold: 'uint',
}
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
}
- // removeOwner
- case '0xf8dc5dd9': {
- const decodedParameters = web3.eth.abi.decodeParameters(['address', 'address', 'uint'], params)
- return {
- method: METHOD_TO_ID[methodId],
- parameters: [
- { name: 'owner', type: 'address', value: decodedParameters[1] },
- { name: '_threshold', type: 'uint', value: decodedParameters[2] },
- ],
+ case SAFE_METHODS_NAMES.REMOVE_OWNER: {
+ const params = {
+ prevOwner: 'address',
+ owner: 'address',
+ _threshold: 'uint',
}
+
+ // we only need to return the removed owner and the new threshold, no need for the `prevOwner`
+ const [, oldOwner, threshold] = decodeInfo({ paramsHash, params })
+
+ return { method, parameters: [oldOwner, threshold] }
}
- // changeThreshold
- case '0x694e80c3': {
- const decodedParameters = web3.eth.abi.decodeParameters(['uint'], params)
- return {
- method: METHOD_TO_ID[methodId],
- parameters: [
- { name: '_threshold', type: 'uint', value: decodedParameters[0] },
- ],
+ case SAFE_METHODS_NAMES.CHANGE_THRESHOLD: {
+ const params = {
+ _threshold: 'uint',
}
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
}
- // enableModule
- case '0x610b5925': {
- const decodedParameters = web3.eth.abi.decodeParameters(['address'], params)
- return {
- method: METHOD_TO_ID[methodId],
- parameters: [
- { name: 'module', type: 'address', value: decodedParameters[0] },
- ],
+ case SAFE_METHODS_NAMES.ENABLE_MODULE: {
+ const params = {
+ module: 'address',
}
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
}
- // disableModule
- case '0xe009cfde': {
- const decodedParameters = web3.eth.abi.decodeParameters(['address', 'address'], params)
- return {
- method: METHOD_TO_ID[methodId],
- parameters: [
- { name: 'prevModule', type: 'address', value: decodedParameters[0] },
- { name: 'module', type: 'address', value: decodedParameters[1] },
- ],
+ case SAFE_METHODS_NAMES.DISABLE_MODULE: {
+ const params = {
+ prevModule: 'address',
+ module: 'address',
}
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
+ }
+
+ default:
+ return null
+ }
+}
+
+export const isSetAllowanceMethod = (data: string): boolean => {
+ const methodId = data.slice(0, 10)
+ return sameString(SPENDING_LIMIT_METHOD_ID_TO_NAME[methodId], SPENDING_LIMIT_METHODS_NAMES.SET_ALLOWANCE)
+}
+
+export const isDeleteAllowanceMethod = (data: string): boolean => {
+ const methodId = data.slice(0, 10)
+ return sameString(SPENDING_LIMIT_METHOD_ID_TO_NAME[methodId], SPENDING_LIMIT_METHODS_NAMES.DELETE_ALLOWANCE)
+}
+
+export const decodeParamsFromSpendingLimit = (data: string): DataDecoded | null => {
+ const [methodId, paramsHash] = [data.slice(0, 10), data.slice(10)]
+ const method = SPENDING_LIMIT_METHOD_ID_TO_NAME[methodId]
+
+ switch (method) {
+ case SPENDING_LIMIT_METHODS_NAMES.ADD_DELEGATE: {
+ const params = {
+ delegate: 'address',
+ }
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
+ }
+
+ case SPENDING_LIMIT_METHODS_NAMES.SET_ALLOWANCE: {
+ const params = {
+ delegate: 'address',
+ token: 'address',
+ allowanceAmount: 'uint96',
+ resetTimeMin: 'uint16',
+ resetBaseMin: 'uint32',
+ }
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
+ }
+
+ case SPENDING_LIMIT_METHODS_NAMES.EXECUTE_ALLOWANCE_TRANSFER: {
+ const params = {
+ safe: 'address',
+ token: 'address',
+ to: 'address',
+ amount: 'uint96',
+ paymentToken: 'address',
+ payment: 'uint96',
+ delegate: 'address',
+ signature: 'bytes',
+ }
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
+ }
+
+ case SPENDING_LIMIT_METHODS_NAMES.DELETE_ALLOWANCE: {
+ const params = {
+ delegate: 'address',
+ token: 'address',
+ }
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
}
default:
@@ -81,57 +176,53 @@ export const decodeParamsFromSafeMethod = (data: string): DataDecoded | null =>
}
const isSafeMethod = (methodId: string): boolean => {
- return !!METHOD_TO_ID[methodId]
+ return !!SAFE_METHOD_ID_TO_NAME[methodId]
}
-export const decodeMethods = (data: string): DataDecoded | null => {
- if(!data.length) {
+const isSpendingLimitMethod = (methodId: string): boolean => {
+ return !!SPENDING_LIMIT_METHOD_ID_TO_NAME[methodId]
+}
+
+export const decodeMethods = (data: string | null): DataDecoded | null => {
+ if (!data?.length) {
return null
}
- const [methodId, params] = [data.slice(0, 10), data.slice(10)]
+ const [methodId, paramsHash] = [data.slice(0, 10), data.slice(10)]
if (isSafeMethod(methodId)) {
return decodeParamsFromSafeMethod(data)
}
- switch (methodId) {
- // a9059cbb - transfer(address,uint256)
- case '0xa9059cbb': {
- const decodeParameters = web3.eth.abi.decodeParameters(['address', 'uint'], params)
- return {
- method: 'transfer',
- parameters: [
- { name: 'to', type: '', value: decodeParameters[0] },
- { name: 'value', type: '', value: decodeParameters[1] },
- ],
+ if (isSpendingLimitMethod(methodId)) {
+ return decodeParamsFromSpendingLimit(data)
+ }
+
+ const method = TOKEN_TRANSFER_METHOD_ID_TO_NAME[methodId]
+
+ switch (method) {
+ case TOKEN_TRANSFER_METHODS_NAMES.TRANSFER: {
+ const params = {
+ to: 'address',
+ value: 'uint',
}
+
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
}
- // 23b872dd - transferFrom(address,address,uint256)
- case '0x23b872dd': {
- const decodeParameters = web3.eth.abi.decodeParameters(['address', 'address', 'uint'], params)
- return {
- method: 'transferFrom',
- parameters: [
- { name: 'from', type: '', value: decodeParameters[0] },
- { name: 'to', type: '', value: decodeParameters[1] },
- { name: 'value', type: '', value: decodeParameters[2] },
- ],
+ case TOKEN_TRANSFER_METHODS_NAMES.TRANSFER_FROM:
+ case TOKEN_TRANSFER_METHODS_NAMES.SAFE_TRANSFER_FROM: {
+ const params = {
+ from: 'address',
+ to: 'address',
+ value: 'uint',
}
- }
- // 42842e0e - safeTransferFrom(address,address,uint256)
- case '0x42842e0e': {
- const decodedParameters = web3.eth.abi.decodeParameters(['address', 'address', 'uint'], params)
- return {
- method: 'safeTransferFrom',
- parameters: [
- { name: 'from', type: '', value: decodedParameters[0] },
- { name: 'to', type: '', value: decodedParameters[1] },
- { name: 'value', type: '', value: decodedParameters[2] },
- ],
- }
+ const parameters = decodeInfo({ paramsHash, params })
+
+ return { method, parameters }
}
default:
diff --git a/src/logic/contracts/safeContracts.ts b/src/logic/contracts/safeContracts.ts
index b9673cf9..25550958 100644
--- a/src/logic/contracts/safeContracts.ts
+++ b/src/logic/contracts/safeContracts.ts
@@ -1,17 +1,19 @@
import { AbiItem } from 'web3-utils'
import GnosisSafeSol from '@gnosis.pm/safe-contracts/build/contracts/GnosisSafe.json'
-import memoize from 'lodash.memoize'
import ProxyFactorySol from '@gnosis.pm/safe-contracts/build/contracts/GnosisSafeProxyFactory.json'
-import SafeProxy from '@gnosis.pm/safe-contracts/build/contracts/GnosisSafeProxy.json'
import Web3 from 'web3'
import { ETHEREUM_NETWORK } from 'src/config/networks/network.d'
-import { isProxyCode } from 'src/logic/contracts/historicProxyCode'
import { ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses'
import { calculateGasOf, calculateGasPrice } from 'src/logic/wallets/ethTransactions'
import { getWeb3, getNetworkIdFrom } from 'src/logic/wallets/getWeb3'
import { GnosisSafe } from 'src/types/contracts/GnosisSafe.d'
import { GnosisSafeProxyFactory } from 'src/types/contracts/GnosisSafeProxyFactory.d'
+import { AllowanceModule } from 'src/types/contracts/AllowanceModule.d'
+import { getSafeInfo, SafeInfo } from 'src/logic/safe/utils/safeInformation'
+import { SPENDING_LIMIT_MODULE_ADDRESS } from 'src/utils/constants'
+
+import SpendingLimitModule from './artifacts/AllowanceModule.json'
export const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001'
export const MULTI_SEND_ADDRESS = '0x8d29be29923b68abfdd21e541b9374737b49cdad'
@@ -19,7 +21,6 @@ export const SAFE_MASTER_COPY_ADDRESS = '0x34CfAC646f301356fAa8B21e94227e3583Fe3
export const DEFAULT_FALLBACK_HANDLER_ADDRESS = '0xd5D82B6aDDc9027B22dCA772Aa68D5d74cdBdF44'
export const SAFE_MASTER_COPY_ADDRESS_V10 = '0xb6029EA3B2c51D09a50B53CA8012FeEB05bDa35A'
-
let proxyFactoryMaster: GnosisSafeProxyFactory
let safeMaster: GnosisSafe
@@ -28,13 +29,13 @@ let safeMaster: GnosisSafe
* @param {Web3} web3
* @param {ETHEREUM_NETWORK} networkId
*/
-const createGnosisSafeContract = (web3: Web3, networkId: ETHEREUM_NETWORK) => {
+export const getGnosisSafeContract = (web3: Web3, networkId: ETHEREUM_NETWORK) => {
const networks = GnosisSafeSol.networks
// TODO: this may not be the most scalable approach,
// but up until v1.2.0 the address is the same for all the networks.
// So, if we can't find the network in the Contract artifact, we fallback to MAINNET.
const contractAddress = networks[networkId]?.address ?? networks[ETHEREUM_NETWORK.MAINNET].address
- return new web3.eth.Contract(GnosisSafeSol.abi as AbiItem[], contractAddress) as unknown as GnosisSafe
+ return (new web3.eth.Contract(GnosisSafeSol.abi as AbiItem[], contractAddress) as unknown) as GnosisSafe
}
/**
@@ -42,56 +43,92 @@ const createGnosisSafeContract = (web3: Web3, networkId: ETHEREUM_NETWORK) => {
* @param {Web3} web3
* @param {ETHEREUM_NETWORK} networkId
*/
-const createProxyFactoryContract = (web3: Web3, networkId: ETHEREUM_NETWORK): GnosisSafeProxyFactory => {
+const getProxyFactoryContract = (web3: Web3, networkId: ETHEREUM_NETWORK): GnosisSafeProxyFactory => {
const networks = ProxyFactorySol.networks
// TODO: this may not be the most scalable approach,
// but up until v1.2.0 the address is the same for all the networks.
// So, if we can't find the network in the Contract artifact, we fallback to MAINNET.
const contractAddress = networks[networkId]?.address ?? networks[ETHEREUM_NETWORK.MAINNET].address
- return new web3.eth.Contract(ProxyFactorySol.abi as AbiItem[], contractAddress) as unknown as GnosisSafeProxyFactory
+ return (new web3.eth.Contract(ProxyFactorySol.abi as AbiItem[], contractAddress) as unknown) as GnosisSafeProxyFactory
}
-export const getGnosisSafeContract = memoize(createGnosisSafeContract)
+/**
+ * Creates a Contract instance of the GnosisSafeProxyFactory contract
+ */
+export const getSpendingLimitContract = () => {
+ const web3 = getWeb3()
+ return (new web3.eth.Contract(
+ SpendingLimitModule.abi as AbiItem[],
+ SPENDING_LIMIT_MODULE_ADDRESS,
+ ) as unknown) as AllowanceModule
+}
-const getCreateProxyFactoryContract = memoize(createProxyFactoryContract)
+export const getMasterCopyAddressFromProxyAddress = async (proxyAddress: string): Promise => {
+ const res = await getSafeInfo(proxyAddress)
+ const masterCopyAddress = (res as SafeInfo)?.masterCopy
+ if (!masterCopyAddress) {
+ console.error(`There was not possible to get masterCopy address from proxy ${proxyAddress}.`)
+ return
+ }
+ return masterCopyAddress
+}
-const instantiateMasterCopies = async () => {
+export const instantiateSafeContracts = async () => {
const web3 = getWeb3()
const networkId = await getNetworkIdFrom(web3)
// Create ProxyFactory Master Copy
- proxyFactoryMaster = getCreateProxyFactoryContract(web3, networkId)
+ proxyFactoryMaster = getProxyFactoryContract(web3, networkId)
// Create Safe Master copy
safeMaster = getGnosisSafeContract(web3, networkId)
}
-export const initContracts = instantiateMasterCopies
-
export const getSafeMasterContract = async () => {
- await initContracts()
-
+ await instantiateSafeContracts()
return safeMaster
}
-export const getSafeDeploymentTransaction = (safeAccounts, numConfirmations) => {
+export const getSafeDeploymentTransaction = (
+ safeAccounts: string[],
+ numConfirmations: number,
+ safeCreationSalt: number,
+) => {
const gnosisSafeData = safeMaster.methods
- .setup(safeAccounts, numConfirmations, ZERO_ADDRESS, '0x', DEFAULT_FALLBACK_HANDLER_ADDRESS, ZERO_ADDRESS, 0, ZERO_ADDRESS)
+ .setup(
+ safeAccounts,
+ numConfirmations,
+ ZERO_ADDRESS,
+ '0x',
+ DEFAULT_FALLBACK_HANDLER_ADDRESS,
+ ZERO_ADDRESS,
+ 0,
+ ZERO_ADDRESS,
+ )
.encodeABI()
-
- return proxyFactoryMaster.methods.createProxy(safeMaster.options.address, gnosisSafeData)
+ return proxyFactoryMaster.methods.createProxyWithNonce(safeMaster.options.address, gnosisSafeData, safeCreationSalt)
}
export const estimateGasForDeployingSafe = async (
- safeAccounts,
- numConfirmations,
- userAccount,
+ safeAccounts: string[],
+ numConfirmations: number,
+ userAccount: string,
+ safeCreationSalt: number,
) => {
const gnosisSafeData = await safeMaster.methods
- .setup(safeAccounts, numConfirmations, ZERO_ADDRESS, '0x', DEFAULT_FALLBACK_HANDLER_ADDRESS, ZERO_ADDRESS, 0, ZERO_ADDRESS)
+ .setup(
+ safeAccounts,
+ numConfirmations,
+ ZERO_ADDRESS,
+ '0x',
+ DEFAULT_FALLBACK_HANDLER_ADDRESS,
+ ZERO_ADDRESS,
+ 0,
+ ZERO_ADDRESS,
+ )
.encodeABI()
const proxyFactoryData = proxyFactoryMaster.methods
- .createProxy(safeMaster.options.address, gnosisSafeData)
+ .createProxyWithNonce(safeMaster.options.address, gnosisSafeData, safeCreationSalt)
.encodeABI()
const gas = await calculateGasOf(proxyFactoryData, userAccount, proxyFactoryMaster.options.address)
const gasPrice = await calculateGasPrice()
@@ -101,29 +138,5 @@ export const estimateGasForDeployingSafe = async (
export const getGnosisSafeInstanceAt = (safeAddress: string): GnosisSafe => {
const web3 = getWeb3()
- return new web3.eth.Contract(GnosisSafeSol.abi as AbiItem[], safeAddress) as unknown as GnosisSafe
-}
-
-const cleanByteCodeMetadata = (bytecode: string): string => {
- const metaData = 'a165'
- return bytecode.substring(0, bytecode.lastIndexOf(metaData))
-}
-
-export const validateProxy = async (safeAddress: string): Promise => {
- // https://solidity.readthedocs.io/en/latest/metadata.html#usage-for-source-code-verification
- const web3 = getWeb3()
- const code = await web3.eth.getCode(safeAddress)
- const codeWithoutMetadata = cleanByteCodeMetadata(code)
- const supportedProxies = [SafeProxy]
- for (let i = 0; i < supportedProxies.length; i += 1) {
- const proxy = supportedProxies[i]
- const proxyCode = proxy.deployedBytecode
- const proxyCodeWithoutMetadata = cleanByteCodeMetadata(proxyCode)
- if (codeWithoutMetadata === proxyCodeWithoutMetadata) {
- return true
- }
- }
-
-
- return isProxyCode(codeWithoutMetadata)
+ return (new web3.eth.Contract(GnosisSafeSol.abi as AbiItem[], safeAddress) as unknown) as GnosisSafe
}
diff --git a/src/logic/notifications/notificationBuilder.tsx b/src/logic/notifications/notificationBuilder.tsx
index fd815385..912bbabd 100644
--- a/src/logic/notifications/notificationBuilder.tsx
+++ b/src/logic/notifications/notificationBuilder.tsx
@@ -99,6 +99,28 @@ const settingsChangeTxNotificationsQueue = {
afterExecutionError: NOTIFICATIONS.SETTINGS_CHANGE_FAILED_MSG,
}
+const newSpendingLimitTxNotificationsQueue = {
+ beforeExecution: NOTIFICATIONS.SIGN_NEW_SPENDING_LIMIT_MSG,
+ pendingExecution: NOTIFICATIONS.NEW_SPENDING_LIMIT_PENDING_MSG,
+ afterRejection: NOTIFICATIONS.NEW_SPENDING_LIMIT_REJECTED_MSG,
+ afterExecution: {
+ noMoreConfirmationsNeeded: NOTIFICATIONS.NEW_SPENDING_LIMIT_EXECUTED_MSG,
+ moreConfirmationsNeeded: NOTIFICATIONS.NEW_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG,
+ },
+ afterExecutionError: NOTIFICATIONS.NEW_SPENDING_LIMIT_FAILED_MSG,
+}
+
+const removeSpendingLimitTxNotificationsQueue = {
+ beforeExecution: NOTIFICATIONS.SIGN_REMOVE_SPENDING_LIMIT_MSG,
+ pendingExecution: NOTIFICATIONS.REMOVE_SPENDING_LIMIT_PENDING_MSG,
+ afterRejection: NOTIFICATIONS.REMOVE_SPENDING_LIMIT_REJECTED_MSG,
+ afterExecution: {
+ noMoreConfirmationsNeeded: NOTIFICATIONS.REMOVE_SPENDING_LIMIT_EXECUTED_MSG,
+ moreConfirmationsNeeded: NOTIFICATIONS.REMOVE_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG,
+ },
+ afterExecutionError: NOTIFICATIONS.REMOVE_SPENDING_LIMIT_FAILED_MSG,
+}
+
const defaultNotificationsQueue = {
beforeExecution: NOTIFICATIONS.SIGN_TX_MSG,
pendingExecution: NOTIFICATIONS.TX_PENDING_MSG,
@@ -166,6 +188,14 @@ export const getNotificationsFromTxType: any = (txType, origin) => {
notificationsQueue = settingsChangeTxNotificationsQueue
break
}
+ case TX_NOTIFICATION_TYPES.NEW_SPENDING_LIMIT_TX: {
+ notificationsQueue = newSpendingLimitTxNotificationsQueue
+ break
+ }
+ case TX_NOTIFICATION_TYPES.REMOVE_SPENDING_LIMIT_TX: {
+ notificationsQueue = removeSpendingLimitTxNotificationsQueue
+ break
+ }
case TX_NOTIFICATION_TYPES.SAFE_NAME_CHANGE_TX: {
notificationsQueue = safeNameChangeNotificationsQueue
break
diff --git a/src/logic/notifications/notificationTypes.ts b/src/logic/notifications/notificationTypes.ts
index 97650456..e70636b7 100644
--- a/src/logic/notifications/notificationTypes.ts
+++ b/src/logic/notifications/notificationTypes.ts
@@ -46,6 +46,18 @@ const NOTIFICATION_IDS = {
SETTINGS_CHANGE_EXECUTED_MORE_CONFIRMATIONS_MSG: 'SETTINGS_CHANGE_EXECUTED_MORE_CONFIRMATIONS_MSG',
SETTINGS_CHANGE_FAILED_MSG: 'SETTINGS_CHANGE_FAILED_MSG',
TESTNET_VERSION_MSG: 'TESTNET_VERSION_MSG',
+ SIGN_NEW_SPENDING_LIMIT_MSG: 'SIGN_NEW_SPENDING_LIMIT_MSG',
+ NEW_SPENDING_LIMIT_PENDING_MSG: 'NEW_SPENDING_LIMIT_PENDING_MSG',
+ NEW_SPENDING_LIMIT_REJECTED_MSG: 'NEW_SPENDING_LIMIT_REJECTED_MSG',
+ NEW_SPENDING_LIMIT_EXECUTED_MSG: 'NEW_SPENDING_LIMIT_EXECUTED_MSG',
+ NEW_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG: 'NEW_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG',
+ NEW_SPENDING_LIMIT_FAILED_MSG: 'NEW_SPENDING_LIMIT_FAILED_MSG',
+ SIGN_REMOVE_SPENDING_LIMIT_MSG: 'SIGN_REMOVE_SPENDING_LIMIT_MSG',
+ REMOVE_SPENDING_LIMIT_PENDING_MSG: 'REMOVE_SPENDING_LIMIT_PENDING_MSG',
+ REMOVE_SPENDING_LIMIT_REJECTED_MSG: 'REMOVE_SPENDING_LIMIT_REJECTED_MSG',
+ REMOVE_SPENDING_LIMIT_EXECUTED_MSG: 'REMOVE_SPENDING_LIMIT_EXECUTED_MSG',
+ REMOVE_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG: 'REMOVE_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG',
+ REMOVE_SPENDING_LIMIT_FAILED_MSG: 'REMOVE_SPENDING_LIMIT_FAILED_MSG',
WRONG_NETWORK_MSG: 'WRONG_NETWORK_MSG',
ADDRESS_BOOK_NEW_ENTRY_SUCCESS: 'ADDRESS_BOOK_NEW_ENTRY_SUCCESS',
ADDRESS_BOOK_EDIT_ENTRY_SUCCESS: 'ADDRESS_BOOK_EDIT_ENTRY_SUCCESS',
@@ -191,6 +203,56 @@ export const NOTIFICATIONS: Record = {
options: { variant: ERROR, persist: false, autoHideDuration: longDuration },
},
+ // Spending Limit
+ SIGN_NEW_SPENDING_LIMIT_MSG: {
+ message: 'Please sign the new Spending Limit',
+ options: { variant: INFO, persist: true },
+ },
+ NEW_SPENDING_LIMIT_PENDING_MSG: {
+ message: 'New Spending Limit pending',
+ options: { variant: INFO, persist: true },
+ },
+ NEW_SPENDING_LIMIT_REJECTED_MSG: {
+ message: 'New Spending Limit rejected',
+ options: { variant: ERROR, persist: false, autoHideDuration: longDuration },
+ },
+ NEW_SPENDING_LIMIT_EXECUTED_MSG: {
+ message: 'New Spending Limit successfully executed',
+ options: { variant: SUCCESS, persist: false, autoHideDuration: longDuration },
+ },
+ NEW_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG: {
+ message: 'New Spending Limit successfully created. More confirmations needed to execute',
+ options: { variant: SUCCESS, persist: false, autoHideDuration: longDuration },
+ },
+ NEW_SPENDING_LIMIT_FAILED_MSG: {
+ message: 'New Spending Limit failed',
+ options: { variant: ERROR, persist: false, autoHideDuration: longDuration },
+ },
+ SIGN_REMOVE_SPENDING_LIMIT_MSG: {
+ message: 'Please sign the remove Spending Limit',
+ options: { variant: INFO, persist: true },
+ },
+ REMOVE_SPENDING_LIMIT_PENDING_MSG: {
+ message: 'Remove Spending Limit pending',
+ options: { variant: INFO, persist: true },
+ },
+ REMOVE_SPENDING_LIMIT_REJECTED_MSG: {
+ message: 'Remove Spending Limit rejected',
+ options: { variant: ERROR, persist: false, autoHideDuration: longDuration },
+ },
+ REMOVE_SPENDING_LIMIT_EXECUTED_MSG: {
+ message: 'Remove Spending Limit successfully executed',
+ options: { variant: SUCCESS, persist: false, autoHideDuration: longDuration },
+ },
+ REMOVE_SPENDING_LIMIT_EXECUTED_MORE_CONFIRMATIONS_MSG: {
+ message: 'Remove Spending Limit successfully created. More confirmations needed to execute',
+ options: { variant: SUCCESS, persist: false, autoHideDuration: longDuration },
+ },
+ REMOVE_SPENDING_LIMIT_FAILED_MSG: {
+ message: 'Remove Spending Limit failed',
+ options: { variant: ERROR, persist: false, autoHideDuration: longDuration },
+ },
+
// Network
TESTNET_VERSION_MSG: {
message: "Testnet Version: Don't send production assets to this Safe",
diff --git a/src/logic/safe/hooks/useTokenInfo.tsx b/src/logic/safe/hooks/useTokenInfo.tsx
new file mode 100644
index 00000000..c05f161c
--- /dev/null
+++ b/src/logic/safe/hooks/useTokenInfo.tsx
@@ -0,0 +1,19 @@
+import { useSelector } from 'react-redux'
+
+import { getNetworkInfo } from 'src/config'
+import { Token } from 'src/logic/tokens/store/model/token'
+import { sameAddress, ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses'
+import { safeKnownCoins } from 'src/routes/safe/container/selector'
+
+const { nativeCoin } = getNetworkInfo()
+
+const useTokenInfo = (address: string): Token | undefined => {
+ const tokens = useSelector(safeKnownCoins)
+
+ if (tokens) {
+ const tokenAddress = sameAddress(address, ZERO_ADDRESS) ? nativeCoin.address : address
+ return tokens.find((token) => sameAddress(token.address, tokenAddress)) ?? undefined
+ }
+}
+
+export default useTokenInfo
diff --git a/src/logic/safe/store/actions/addModuleTransactions.ts b/src/logic/safe/store/actions/addModuleTransactions.ts
new file mode 100644
index 00000000..6c26cb59
--- /dev/null
+++ b/src/logic/safe/store/actions/addModuleTransactions.ts
@@ -0,0 +1,13 @@
+import { createAction } from 'redux-actions'
+import { ModuleTxServiceModel } from 'src/logic/safe/store/actions/transactions/fetchTransactions/loadModuleTransactions'
+
+export const ADD_MODULE_TRANSACTIONS = 'ADD_MODULE_TRANSACTIONS'
+
+export type AddModuleTransactionsAction = {
+ payload: {
+ safeAddress: string
+ modules: ModuleTxServiceModel[]
+ }
+}
+
+export const addModuleTransactions = createAction(ADD_MODULE_TRANSACTIONS)
diff --git a/src/logic/safe/store/actions/createTransaction.ts b/src/logic/safe/store/actions/createTransaction.ts
index 6922c0f7..23570126 100644
--- a/src/logic/safe/store/actions/createTransaction.ts
+++ b/src/logic/safe/store/actions/createTransaction.ts
@@ -41,7 +41,7 @@ import { PayableTx } from 'src/types/contracts/types.d'
import { AppReduxState } from 'src/store'
import { Dispatch, DispatchReturn } from './types'
-interface CreateTransactionArgs {
+export interface CreateTransactionArgs {
navigateToTransactionsTab?: boolean
notifiedTransaction: string
operation?: number
diff --git a/src/logic/safe/store/actions/fetchSafe.ts b/src/logic/safe/store/actions/fetchSafe.ts
index 201e75d3..71e2218f 100644
--- a/src/logic/safe/store/actions/fetchSafe.ts
+++ b/src/logic/safe/store/actions/fetchSafe.ts
@@ -18,6 +18,7 @@ import { AppReduxState } from 'src/store'
import { latestMasterContractVersionSelector } from 'src/logic/safe/store/selectors'
import { getSafeInfo } from 'src/logic/safe/utils/safeInformation'
import { getModules } from 'src/logic/safe/utils/modules'
+import { getSpendingLimits } from 'src/logic/safe/utils/spendingLimits'
const buildOwnersFrom = (safeOwners: string[], localSafe?: SafeRecordProps): List => {
const ownersList = safeOwners.map((ownerAddress) => {
@@ -71,6 +72,7 @@ export const buildSafe = async (
const needsUpdate = safeNeedsUpdate(currentVersion, latestMasterContractVersion)
const featuresEnabled = enabledFeatures(currentVersion)
const modules = await getModules(safeInfo)
+ const spendingLimits = safeInfo ? await getSpendingLimits(safeInfo.modules, safeAddress) : null
return {
address: safeAddress,
@@ -89,6 +91,7 @@ export const buildSafe = async (
blacklistedAssets: Set(),
blacklistedTokens: Set(),
modules,
+ spendingLimits,
}
}
@@ -106,6 +109,9 @@ export const checkAndUpdateSafe = (safeAdd: string) => async (dispatch: Dispatch
getLocalSafe(safeAddress),
])
+ // request SpendingLimit info
+ const spendingLimits = safeInfo ? await getSpendingLimits(safeInfo.modules, safeAddress) : null
+
// Converts from [ { address, ownerName} ] to address array
const localOwners = localSafe ? localSafe.owners.map((localOwner) => localOwner.address) : []
@@ -116,6 +122,7 @@ export const checkAndUpdateSafe = (safeAdd: string) => async (dispatch: Dispatch
address: safeAddress,
name: localSafe?.name,
modules,
+ spendingLimits,
nonce: Number(remoteNonce),
threshold: Number(remoteThreshold),
featuresEnabled: localSafe?.currentVersion
diff --git a/src/logic/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts b/src/logic/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts
index e97a6883..a1cf32df 100644
--- a/src/logic/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts
+++ b/src/logic/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts
@@ -2,19 +2,27 @@ import axios from 'axios'
import { buildTxServiceUrl } from 'src/logic/safe/transactions'
import { buildIncomingTxServiceUrl } from 'src/logic/safe/transactions/incomingTxHistory'
+import { buildModuleTxServiceUrl } from 'src/logic/safe/transactions/moduleTxHistory'
import { TxServiceModel } from 'src/logic/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions'
import { IncomingTxServiceModel } from 'src/logic/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions'
import { TransactionTypes } from 'src/logic/safe/store/models/types/transaction'
+import { ModuleTxServiceModel } from './loadModuleTransactions'
const getServiceUrl = (txType: string, safeAddress: string): string => {
return {
[TransactionTypes.INCOMING]: buildIncomingTxServiceUrl,
[TransactionTypes.OUTGOING]: buildTxServiceUrl,
+ [TransactionTypes.MODULE]: buildModuleTxServiceUrl,
}[txType](safeAddress)
}
// TODO: Remove this magic
/* eslint-disable */
+async function fetchTransactions(
+ txType: TransactionTypes.MODULE,
+ safeAddress: string,
+ eTag: string | null,
+): Promise<{ eTag: string | null; results: ModuleTxServiceModel[] }>
async function fetchTransactions(
txType: TransactionTypes.INCOMING,
safeAddress: string,
@@ -26,10 +34,10 @@ async function fetchTransactions(
eTag: string | null,
): Promise<{ eTag: string | null; results: TxServiceModel[] }>
async function fetchTransactions(
- txType: TransactionTypes.INCOMING | TransactionTypes.OUTGOING,
+ txType: TransactionTypes.MODULE | TransactionTypes.INCOMING | TransactionTypes.OUTGOING,
safeAddress: string,
eTag: string | null,
-): Promise<{ eTag: string | null; results: TxServiceModel[] | IncomingTxServiceModel[] }> {
+): Promise<{ eTag: string | null; results: ModuleTxServiceModel[] | TxServiceModel[] | IncomingTxServiceModel[] }> {
/* eslint-enable */
try {
const url = getServiceUrl(txType, safeAddress)
diff --git a/src/logic/safe/store/actions/transactions/fetchTransactions/index.ts b/src/logic/safe/store/actions/transactions/fetchTransactions/index.ts
index 09d00a05..271ee746 100644
--- a/src/logic/safe/store/actions/transactions/fetchTransactions/index.ts
+++ b/src/logic/safe/store/actions/transactions/fetchTransactions/index.ts
@@ -3,9 +3,11 @@ import { ThunkAction, ThunkDispatch } from 'redux-thunk'
import { AnyAction } from 'redux'
import { backOff } from 'exponential-backoff'
-import { addIncomingTransactions } from '../../addIncomingTransactions'
+import { addIncomingTransactions } from 'src/logic/safe/store/actions/addIncomingTransactions'
+import { addModuleTransactions } from 'src/logic/safe/store/actions/addModuleTransactions'
import { loadIncomingTransactions } from './loadIncomingTransactions'
+import { loadModuleTransactions } from './loadModuleTransactions'
import { loadOutgoingTransactions } from './loadOutgoingTransactions'
import { addOrUpdateCancellationTransactions } from 'src/logic/safe/store/actions/transactions/addOrUpdateCancellationTransactions'
@@ -44,6 +46,12 @@ export default (safeAddress: string): ThunkAction, AppReduxState,
if (safeIncomingTxs?.size) {
dispatch(addIncomingTransactions(incomingTransactions))
}
+
+ const moduleTransactions = await loadModuleTransactions(safeAddress)
+
+ if (moduleTransactions.length) {
+ dispatch(addModuleTransactions({ modules: moduleTransactions, safeAddress }))
+ }
} catch (error) {
console.log('Error fetching transactions:', error)
}
diff --git a/src/logic/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts b/src/logic/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts
index d52130a9..2a8d8bab 100644
--- a/src/logic/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts
+++ b/src/logic/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts
@@ -10,6 +10,7 @@ import { web3ReadOnly } from 'src/logic/wallets/getWeb3'
import { makeIncomingTransaction } from 'src/logic/safe/store/models/incomingTransaction'
import fetchTransactions from 'src/logic/safe/store/actions/transactions/fetchTransactions/fetchTransactions'
import { TransactionTypes } from 'src/logic/safe/store/models/types/transaction'
+import { isENSContract } from 'src/logic/collectibles/utils'
export type IncomingTxServiceModel = {
blockNumber: number
@@ -76,12 +77,18 @@ const batchIncomingTxsTokenDataRequest = (txs: IncomingTxServiceModel[]) => {
batch.execute()
return Promise.all(whenTxsValues).then((txsValues) =>
- txsValues.map(([tx, symbol, decimals, ethTx, ethTxReceipt]) => [
- tx,
- symbol ? symbol : nativeCoin.symbol,
- decimals ? decimals : nativeCoin.decimals,
- new bn(ethTx?.gasPrice ?? 0).times(ethTxReceipt?.gasUsed ?? 0),
- ]),
+ txsValues.map(([tx, symbolFetched, decimals, ethTx, ethTxReceipt]) => {
+ let symbol = symbolFetched
+ if (!symbolFetched) {
+ symbol = isENSContract(tx.tokenAddress) ? 'ENS' : nativeCoin.symbol
+ }
+ return [
+ tx,
+ symbol,
+ decimals ? decimals : nativeCoin.decimals,
+ new bn(ethTx?.gasPrice ?? 0).times(ethTxReceipt?.gasUsed ?? 0),
+ ]
+ }),
)
}
diff --git a/src/logic/safe/store/actions/transactions/fetchTransactions/loadModuleTransactions.ts b/src/logic/safe/store/actions/transactions/fetchTransactions/loadModuleTransactions.ts
new file mode 100644
index 00000000..7dd1b7b7
--- /dev/null
+++ b/src/logic/safe/store/actions/transactions/fetchTransactions/loadModuleTransactions.ts
@@ -0,0 +1,35 @@
+import fetchTransactions from 'src/logic/safe/store/actions/transactions/fetchTransactions/fetchTransactions'
+import { TransactionTypes } from 'src/logic/safe/store/models/types/transaction'
+import { DataDecoded, Operation } from 'src/logic/safe/store/models/types/transactions.d'
+
+export type ModuleTxServiceModel = {
+ created: string
+ executionDate: string
+ blockNumber: number
+ transactionHash: string
+ safe: string
+ module: string
+ to: string
+ value: string
+ data: string
+ operation: Operation
+ dataDecoded: DataDecoded
+}
+
+type ETag = string | null
+
+let previousETag: ETag = null
+export const loadModuleTransactions = async (safeAddress: string): Promise => {
+ if (!safeAddress) {
+ return []
+ }
+
+ const { eTag, results }: { eTag: ETag; results: ModuleTxServiceModel[] } = await fetchTransactions(
+ TransactionTypes.MODULE,
+ safeAddress,
+ previousETag,
+ )
+ previousETag = eTag
+
+ return results
+}
diff --git a/src/logic/safe/store/models/safe.ts b/src/logic/safe/store/models/safe.ts
index ef217e28..7d0547e0 100644
--- a/src/logic/safe/store/models/safe.ts
+++ b/src/logic/safe/store/models/safe.ts
@@ -6,7 +6,22 @@ export type SafeOwner = {
address: string
}
-export type ModulePair = [string, string]
+export type ModulePair = [
+ // previous module
+ string,
+ // module
+ string,
+]
+
+export type SpendingLimit = {
+ delegate: string
+ token: string
+ amount: string
+ spent: string
+ resetTimeMin: string
+ lastResetMin: string
+ nonce: string
+}
export type SafeRecordProps = {
name: string
@@ -15,6 +30,7 @@ export type SafeRecordProps = {
ethBalance: string
owners: List
modules?: ModulePair[] | null
+ spendingLimits?: SpendingLimit[] | null
activeTokens: Set
activeAssets: Set
blacklistedTokens: Set
@@ -35,6 +51,7 @@ const makeSafe = Record({
ethBalance: '0',
owners: List([]),
modules: [],
+ spendingLimits: [],
activeTokens: Set(),
activeAssets: Set(),
blacklistedTokens: Set(),
diff --git a/src/logic/safe/store/models/types/transaction.ts b/src/logic/safe/store/models/types/transaction.ts
index a44bcc47..d190a1e0 100644
--- a/src/logic/safe/store/models/types/transaction.ts
+++ b/src/logic/safe/store/models/types/transaction.ts
@@ -1,4 +1,7 @@
import { List, Map, RecordOf } from 'immutable'
+
+import { ModuleTxServiceModel } from 'src/logic/safe/store/actions/transactions/fetchTransactions/loadModuleTransactions'
+import { Token } from 'src/logic/tokens/store/model/token'
import { Confirmation } from './confirmation'
import { GnosisSafe } from 'src/types/contracts/GnosisSafe.d'
import { DataDecoded, Transfer } from './transactions'
@@ -14,6 +17,8 @@ export enum TransactionTypes {
UPGRADE = 'upgrade',
TOKEN = 'token',
COLLECTIBLE = 'collectible',
+ MODULE = 'module',
+ SPENDING_LIMIT = 'spendingLimit',
}
export type TransactionTypeValues = typeof TransactionTypes[keyof typeof TransactionTypes]
@@ -47,7 +52,7 @@ export type TransactionProps = {
data: string | null
dataDecoded: DataDecoded | null
decimals?: (number | string) | null
- decodedParams: DecodedParams | null
+ decodedParams: DecodedParams
executionDate?: string | null
executionTxHash?: string | null
executor: string
@@ -101,3 +106,17 @@ export type TxArgs = {
to: string
valueInWei: string
}
+
+type SafeModuleCompatibilityTypes = {
+ nonce?: string // not required for this tx: added for compatibility
+ fee?: number // not required for this tx: added for compatibility
+ executionTxHash?: string // not required for this tx: added for compatibility
+ safeTxHash: string // table uses this key as a unique row identifier, added for compatibility
+}
+
+export type SafeModuleTransaction = ModuleTxServiceModel &
+ SafeModuleCompatibilityTypes & {
+ status: TransactionStatus
+ type: TransactionTypes
+ tokenInfo?: Token
+ }
diff --git a/src/logic/safe/store/models/types/transactions.d.ts b/src/logic/safe/store/models/types/transactions.d.ts
index b606d49b..4d753d61 100644
--- a/src/logic/safe/store/models/types/transactions.d.ts
+++ b/src/logic/safe/store/models/types/transactions.d.ts
@@ -228,16 +228,30 @@ export const SAFE_METHODS_NAMES = {
SWAP_OWNER: 'swapOwner',
ENABLE_MODULE: 'enableModule',
DISABLE_MODULE: 'disableModule',
-}
+} as const
-export const METHOD_TO_ID = {
+export const SAFE_METHOD_ID_TO_NAME = {
'0xe318b52b': SAFE_METHODS_NAMES.SWAP_OWNER,
'0x0d582f13': SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD,
'0xf8dc5dd9': SAFE_METHODS_NAMES.REMOVE_OWNER,
'0x694e80c3': SAFE_METHODS_NAMES.CHANGE_THRESHOLD,
'0x610b5925': SAFE_METHODS_NAMES.ENABLE_MODULE,
'0xe009cfde': SAFE_METHODS_NAMES.DISABLE_MODULE,
-}
+} as const
+
+export const SPENDING_LIMIT_METHODS_NAMES = {
+ ADD_DELEGATE: 'addDelegate',
+ SET_ALLOWANCE: 'setAllowance',
+ EXECUTE_ALLOWANCE_TRANSFER: 'executeAllowanceTransfer',
+ DELETE_ALLOWANCE: 'deleteAllowance',
+} as const
+
+export const SPENDING_LIMIT_METHOD_ID_TO_NAME = {
+ '0xe71bdf41': SPENDING_LIMIT_METHODS_NAMES.ADD_DELEGATE,
+ '0xbeaeb388': SPENDING_LIMIT_METHODS_NAMES.SET_ALLOWANCE,
+ '0x4515641a': SPENDING_LIMIT_METHODS_NAMES.EXECUTE_ALLOWANCE_TRANSFER,
+ '0x885133e3': SPENDING_LIMIT_METHODS_NAMES.DELETE_ALLOWANCE,
+} as const
export type SafeMethods = typeof SAFE_METHODS_NAMES[keyof typeof SAFE_METHODS_NAMES]
@@ -247,13 +261,19 @@ export const TOKEN_TRANSFER_METHODS_NAMES = {
SAFE_TRANSFER_FROM: 'safeTransferFrom',
} as const
+export const TOKEN_TRANSFER_METHOD_ID_TO_NAME = {
+ '0xa9059cbb': TOKEN_TRANSFER_METHODS_NAMES.TRANSFER,
+ '0x23b872dd': TOKEN_TRANSFER_METHODS_NAMES.TRANSFER_FROM,
+ '0x42842e0e': TOKEN_TRANSFER_METHODS_NAMES.SAFE_TRANSFER_FROM,
+} as const
+
type TokenMethods = typeof TOKEN_TRANSFER_METHODS_NAMES[keyof typeof TOKEN_TRANSFER_METHODS_NAMES]
-type SafeDecodedParams = {
+export type SafeDecodedParams = {
[key in SafeMethods]?: Record
}
-type TokenDecodedParams = {
+export type TokenDecodedParams = {
[key in TokenMethods]?: Record
}
diff --git a/src/logic/safe/store/reducer/moduleTransactions.ts b/src/logic/safe/store/reducer/moduleTransactions.ts
new file mode 100644
index 00000000..27b310b2
--- /dev/null
+++ b/src/logic/safe/store/reducer/moduleTransactions.ts
@@ -0,0 +1,32 @@
+import { handleActions } from 'redux-actions'
+
+import {
+ ADD_MODULE_TRANSACTIONS,
+ AddModuleTransactionsAction,
+} from 'src/logic/safe/store/actions/addModuleTransactions'
+import { ModuleTxServiceModel } from 'src/logic/safe/store/actions/transactions/fetchTransactions/loadModuleTransactions'
+
+export const MODULE_TRANSACTIONS_REDUCER_ID = 'moduleTransactions'
+
+export interface ModuleTransactionsState {
+ [safeAddress: string]: ModuleTxServiceModel[]
+}
+
+export default handleActions(
+ {
+ [ADD_MODULE_TRANSACTIONS]: (state: ModuleTransactionsState, action: AddModuleTransactionsAction) => {
+ const { modules, safeAddress } = action.payload
+ const oldModuleTxs = state[safeAddress] ?? []
+ const oldModuleTxsHashes = oldModuleTxs.map(({ transactionHash }) => transactionHash)
+ // As backend is returning the whole list of txs on every request,
+ // to avoid duplicates, filtering happens in this level.
+ const newModuleTxs = modules.filter((moduleTx) => !oldModuleTxsHashes.includes(moduleTx.transactionHash))
+
+ return {
+ ...state,
+ [safeAddress]: [...oldModuleTxs, ...newModuleTxs],
+ }
+ },
+ },
+ {},
+)
diff --git a/src/logic/safe/store/selectors/index.ts b/src/logic/safe/store/selectors/index.ts
index df9d6de6..23959e6f 100644
--- a/src/logic/safe/store/selectors/index.ts
+++ b/src/logic/safe/store/selectors/index.ts
@@ -208,6 +208,19 @@ export const safeModulesSelector = createSelector(safeSelector, safeFieldSelecto
export const safeFeaturesEnabledSelector = createSelector(safeSelector, safeFieldSelector('featuresEnabled'))
+export const safeSpendingLimitsSelector = createSelector(safeSelector, safeFieldSelector('spendingLimits'))
+
+export const safeOwnersAddressesListSelector = createSelector(
+ safeOwnersSelector,
+ (owners): List => {
+ if (!owners) {
+ return List([])
+ }
+
+ return owners?.map(({ address }) => address)
+ },
+)
+
export const getActiveTokensAddressesForAllSafes = createSelector(safesListSelector, (safes) => {
const addresses = Set().withMutations((set) => {
safes.forEach((safe) => {
diff --git a/src/logic/safe/store/selectors/transactions.ts b/src/logic/safe/store/selectors/transactions.ts
index 123f360e..323d7be8 100644
--- a/src/logic/safe/store/selectors/transactions.ts
+++ b/src/logic/safe/store/selectors/transactions.ts
@@ -2,10 +2,13 @@ import { List } from 'immutable'
import { createSelector } from 'reselect'
import { safeIncomingTransactionsSelector, safeTransactionsSelector } from 'src/logic/safe/store/selectors'
-import { Transaction } from 'src/logic/safe/store/models/types/transaction'
+import { Transaction, SafeModuleTransaction } from 'src/logic/safe/store/models/types/transaction'
+import { safeModuleTransactionsSelector } from 'src/routes/safe/container/selector'
export const extendedTransactionsSelector = createSelector(
safeTransactionsSelector,
safeIncomingTransactionsSelector,
- (transactions, incomingTransactions): List => List([...transactions, ...incomingTransactions]),
+ safeModuleTransactionsSelector,
+ (transactions, incomingTransactions, moduleTransactions): List =>
+ List([...transactions, ...incomingTransactions, ...moduleTransactions]),
)
diff --git a/src/logic/safe/transactions/moduleTxHistory.ts b/src/logic/safe/transactions/moduleTxHistory.ts
new file mode 100644
index 00000000..656b4381
--- /dev/null
+++ b/src/logic/safe/transactions/moduleTxHistory.ts
@@ -0,0 +1,9 @@
+import { getSafeServiceBaseUrl } from 'src/config'
+import { checksumAddress } from 'src/utils/checksumAddress'
+
+export const buildModuleTxServiceUrl = (safeAddress: string): string => {
+ const address = checksumAddress(safeAddress)
+ const url = getSafeServiceBaseUrl(address)
+
+ return `${url}/module-transactions/`
+}
diff --git a/src/logic/safe/transactions/notifiedTransactions.ts b/src/logic/safe/transactions/notifiedTransactions.ts
index 83700fd9..f166bbab 100644
--- a/src/logic/safe/transactions/notifiedTransactions.ts
+++ b/src/logic/safe/transactions/notifiedTransactions.ts
@@ -1,11 +1,14 @@
-export const TX_NOTIFICATION_TYPES: any = {
+export const TX_NOTIFICATION_TYPES = {
STANDARD_TX: 'STANDARD_TX',
CONFIRMATION_TX: 'CONFIRMATION_TX',
CANCELLATION_TX: 'CANCELLATION_TX',
WAITING_TX: 'WAITING_TX',
SETTINGS_CHANGE_TX: 'SETTINGS_CHANGE_TX',
+ NEW_SPENDING_LIMIT_TX: 'NEW_SPENDING_LIMIT_TX',
+ REMOVE_SPENDING_LIMIT_TX: 'REMOVE_SPENDING_LIMIT_TX',
SAFE_NAME_CHANGE_TX: 'SAFE_NAME_CHANGE_TX',
OWNER_NAME_CHANGE_TX: 'OWNER_NAME_CHANGE_TX',
ADDRESSBOOK_NEW_ENTRY: 'ADDRESSBOOK_NEW_ENTRY',
+ ADDRESSBOOK_EDIT_ENTRY: 'ADDRESSBOOK_EDIT_ENTRY',
ADDRESSBOOK_DELETE_ENTRY: 'ADDRESSBOOK_DELETE_ENTRY',
}
diff --git a/src/logic/safe/utils/__tests__/modules.test.ts b/src/logic/safe/utils/__tests__/modules.test.ts
new file mode 100644
index 00000000..ccaf4b25
--- /dev/null
+++ b/src/logic/safe/utils/__tests__/modules.test.ts
@@ -0,0 +1,111 @@
+import { SENTINEL_ADDRESS } from 'src/logic/contracts/safeContracts'
+import { buildModulesLinkedList } from 'src/logic/safe/utils/modules'
+
+describe('modules -> buildModulesLinkedList', () => {
+ let moduleManager
+
+ beforeEach(() => {
+ moduleManager = {
+ modules: {
+ [SENTINEL_ADDRESS]: SENTINEL_ADDRESS,
+ },
+ enableModule: function (module: string) {
+ this.modules[module] = this.modules[SENTINEL_ADDRESS]
+ this.modules[SENTINEL_ADDRESS] = module
+ },
+ disableModule: function (prevModule: string, module: string) {
+ this.modules[prevModule] = this.modules[module]
+ this.modules[module] = '0x0'
+ },
+ getModules: function (): string[] {
+ const modules: string[] = []
+ let module: string = this.modules[SENTINEL_ADDRESS]
+
+ while (module !== SENTINEL_ADDRESS) {
+ modules.push(module)
+ module = this.modules[module]
+ }
+
+ return modules
+ },
+ }
+ })
+
+ it(`should build a collection of addresses pair associated to a linked list`, () => {
+ // Given
+ const listOfModules = ['0xa', '0xb', '0xc', '0xd', '0xe', '0xf']
+
+ // When
+ const modulesPairList = buildModulesLinkedList(listOfModules)
+
+ // Then
+ expect(modulesPairList).toStrictEqual([
+ [SENTINEL_ADDRESS, '0xa'],
+ ['0xa', '0xb'],
+ ['0xb', '0xc'],
+ ['0xc', '0xd'],
+ ['0xd', '0xe'],
+ ['0xe', '0xf'],
+ ])
+ })
+
+ it(`should properly provide a list of modules pair to remove an specified module`, () => {
+ // Given
+ moduleManager.enableModule('0xc')
+ moduleManager.enableModule('0xb')
+ moduleManager.enableModule('0xa') // returned list is ordered [0xa, 0xb, 0xc]
+ const modulesPairList = buildModulesLinkedList(moduleManager.getModules())
+
+ // When
+ const moduleBPair = modulesPairList?.[1] ?? []
+ moduleManager.disableModule(...moduleBPair)
+
+ // Then
+ expect(moduleManager.modules['0xb']).toBe('0x0')
+ expect(moduleManager.getModules()).toStrictEqual(['0xa', '0xc'])
+ expect(buildModulesLinkedList(moduleManager.getModules())).toStrictEqual([
+ [SENTINEL_ADDRESS, '0xa'],
+ ['0xa', '0xc'],
+ ])
+ })
+
+ it(`should properly provide a list of modules pair to remove the firstly added module`, () => {
+ // Given
+ moduleManager.enableModule('0xc')
+ moduleManager.enableModule('0xb')
+ moduleManager.enableModule('0xa') // returned list is ordered [0xa, 0xb, 0xc]
+ const modulesPairList = buildModulesLinkedList(moduleManager.getModules())
+
+ // When
+ const moduleBPair = modulesPairList?.[2] ?? []
+ moduleManager.disableModule(...moduleBPair)
+
+ // Then
+ expect(moduleManager.modules['0xc']).toBe('0x0')
+ expect(moduleManager.getModules()).toStrictEqual(['0xa', '0xb'])
+ expect(buildModulesLinkedList(moduleManager.getModules())).toStrictEqual([
+ [SENTINEL_ADDRESS, '0xa'],
+ ['0xa', '0xb'],
+ ])
+ })
+
+ it(`should properly provide a list of modules pair to remove the lastly added module`, () => {
+ // Given
+ moduleManager.enableModule('0xc')
+ moduleManager.enableModule('0xb')
+ moduleManager.enableModule('0xa') // returned list is ordered [0xa, 0xb, 0xc]
+ const modulesPairList = buildModulesLinkedList(moduleManager.getModules())
+
+ // When
+ const moduleBPair = modulesPairList?.[0] ?? []
+ moduleManager.disableModule(...moduleBPair)
+
+ // Then
+ expect(moduleManager.modules['0xa']).toBe('0x0')
+ expect(moduleManager.getModules()).toStrictEqual(['0xb', '0xc'])
+ expect(buildModulesLinkedList(moduleManager.getModules())).toStrictEqual([
+ [SENTINEL_ADDRESS, '0xb'],
+ ['0xb', '0xc'],
+ ])
+ })
+})
diff --git a/src/logic/safe/utils/modules.ts b/src/logic/safe/utils/modules.ts
index b15e2c15..c863fbe5 100644
--- a/src/logic/safe/utils/modules.ts
+++ b/src/logic/safe/utils/modules.ts
@@ -1,7 +1,9 @@
import semverLessThan from 'semver/functions/lt'
import { getGnosisSafeInstanceAt, SENTINEL_ADDRESS } from 'src/logic/contracts/safeContracts'
+import { CreateTransactionArgs } from 'src/logic/safe/store/actions/createTransaction'
import { ModulePair } from 'src/logic/safe/store/models/safe'
+import { CALL, TX_NOTIFICATION_TYPES } from 'src/logic/safe/transactions'
import { SafeInfo } from 'src/logic/safe/utils/safeInformation'
type ModulesPaginated = {
@@ -9,11 +11,32 @@ type ModulesPaginated = {
next: string
}
-const buildModulesLinkedList = (modules: string[], nextModule: string = SENTINEL_ADDRESS): Array | null => {
+/**
+ * Builds a collection of tuples with (prev, module) module addresses
+ *
+ * The `modules` param, is organized from the most recently added to the oldest.
+ *
+ * By assuming this, we are able to recreate the linked list that's defined at contract level
+ * considering `0x1` (SENTINEL_ADDRESS) address as the list's initial node.
+ *
+ * Given this scenario, we have a linked list in the form of
+ *
+ * **`0x1->modules[n]->module[n-1]->module[0]->0x1`**
+ *
+ * So,
+ * - if we want to disable `module[n]`, we need to pass `(module[n], 0x1)` as arguments,
+ * - if we want to disable `module[n-1]`, we need to pass `(module[n-1], module[n])`,
+ * - ... and so on
+ * @param {Array} modules
+ * @returns null | Array
+ */
+export const buildModulesLinkedList = (modules: string[]): Array | null => {
if (modules?.length) {
return modules.map((moduleAddress, index, modules) => {
- const prevModule = modules[index + 1]
- return [moduleAddress, prevModule !== undefined ? prevModule : nextModule]
+ if (index === 0) {
+ return [SENTINEL_ADDRESS, moduleAddress]
+ }
+ return [modules[index - 1], moduleAddress]
})
}
@@ -58,10 +81,12 @@ export const getModules = async (safeInfo: SafeInfo | void): Promise {
- const [module, previousModule] = modulePair
+ const [previousModule, module] = modulePair
const safeInstance = getGnosisSafeInstanceAt(safeAddress)
return safeInstance.methods.disableModule(previousModule, module).encodeABI()
}
+
+type EnableModuleParams = {
+ moduleAddress: string
+ safeAddress: string
+}
+export const enableModuleTx = ({ moduleAddress, safeAddress }: EnableModuleParams): CreateTransactionArgs => {
+ const safeInstance = getGnosisSafeInstanceAt(safeAddress)
+
+ return {
+ safeAddress,
+ to: safeAddress,
+ operation: CALL,
+ valueInWei: '0',
+ txData: safeInstance.methods.enableModule(moduleAddress).encodeABI(),
+ notifiedTransaction: TX_NOTIFICATION_TYPES.SETTINGS_CHANGE_TX,
+ }
+}
diff --git a/src/logic/safe/utils/safeVersion.ts b/src/logic/safe/utils/safeVersion.ts
index 00d9884d..1c085225 100644
--- a/src/logic/safe/utils/safeVersion.ts
+++ b/src/logic/safe/utils/safeVersion.ts
@@ -36,17 +36,20 @@ export const safeNeedsUpdate = (currentVersion?: string, latestVersion?: string)
export const getCurrentSafeVersion = (gnosisSafeInstance: GnosisSafe): Promise =>
gnosisSafeInstance.methods.VERSION().call()
-const checkFeatureEnabledByVersion = (featureConfig: FeatureConfigByVersion, version: string) => {
+const checkFeatureEnabledByVersion = (featureConfig: FeatureConfigByVersion, version?: string) => {
+ if (!version) {
+ return false
+ }
return featureConfig.validVersion ? semverSatisfies(version, featureConfig.validVersion) : true
}
export const enabledFeatures = (version?: string): FEATURES[] => {
- return FEATURES_BY_VERSION.reduce((acc: FEATURES[], feature: Feature) => {
- if (isFeatureEnabled(feature.name) && version && checkFeatureEnabledByVersion(feature, version)) {
+ return FEATURES_BY_VERSION.reduce((acc, feature: Feature) => {
+ if (isFeatureEnabled(feature.name) && checkFeatureEnabledByVersion(feature, version)) {
acc.push(feature.name)
}
return acc
- }, [])
+ }, [] as FEATURES[])
}
interface SafeVersionInfo {
diff --git a/src/logic/safe/utils/spendingLimits.ts b/src/logic/safe/utils/spendingLimits.ts
new file mode 100644
index 00000000..c23d639e
--- /dev/null
+++ b/src/logic/safe/utils/spendingLimits.ts
@@ -0,0 +1,294 @@
+import { BigNumber } from 'bignumber.js'
+import { getNetworkInfo } from 'src/config'
+import { AbiItem } from 'web3-utils'
+
+import { CreateTransactionArgs } from 'src/logic/safe/store/actions/createTransaction'
+import { CALL, DELEGATE_CALL, TX_NOTIFICATION_TYPES } from 'src/logic/safe/transactions'
+import { enableModuleTx } from 'src/logic/safe/utils/modules'
+import SpendingLimitModule from 'src/logic/contracts/artifacts/AllowanceModule.json'
+import generateBatchRequests from 'src/logic/contracts/generateBatchRequests'
+import { getSpendingLimitContract, MULTI_SEND_ADDRESS } from 'src/logic/contracts/safeContracts'
+import { SpendingLimit } from 'src/logic/safe/store/models/safe'
+import { sameAddress, ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses'
+import { getWeb3, web3ReadOnly } from 'src/logic/wallets/getWeb3'
+import { SPENDING_LIMIT_MODULE_ADDRESS } from 'src/utils/constants'
+import { getEncodedMultiSendCallData, MultiSendTx } from './upgradeSafe'
+import { fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
+import { getBalanceAndDecimalsFromToken, GetTokenByAddress } from 'src/logic/tokens/utils/tokenHelpers'
+import { sameString } from 'src/utils/strings'
+
+export const currentMinutes = (): number => Math.floor(Date.now() / (1000 * 60))
+
+const requestTokensByDelegate = async (
+ safeAddress: string,
+ delegates: string[],
+): Promise<[string, string[] | undefined][]> => {
+ const batch = new web3ReadOnly.BatchRequest()
+
+ const whenRequestValues = delegates.map((delegateAddress: string) =>
+ generateBatchRequests<[string, string[] | undefined]>({
+ abi: SpendingLimitModule.abi as AbiItem[],
+ address: SPENDING_LIMIT_MODULE_ADDRESS,
+ methods: [{ method: 'getTokens', args: [safeAddress, delegateAddress] }],
+ batch,
+ context: delegateAddress,
+ }),
+ )
+
+ batch.execute()
+
+ return Promise.all(whenRequestValues)
+}
+
+export type SpendingLimitRow = {
+ delegate: string
+ token: string
+ amount: string
+ spent: string
+ resetTimeMin: string
+ lastResetMin: string
+ nonce: string
+}
+
+const ZERO_VALUE = '0'
+
+/**
+ * Deleted Allowance have their `amount` and `resetTime` set to `0` (zero)
+ * @param {SpendingLimitRow} allowance
+ * @returns boolean
+ */
+const discardZeroAllowance = ({ amount, resetTimeMin }: SpendingLimitRow): boolean =>
+ !(sameString(amount, ZERO_VALUE) && sameString(resetTimeMin, ZERO_VALUE))
+
+type TokenSpendingLimit = [string, string, string, string, string]
+
+type TokenSpendingLimitContext = {
+ delegate: string
+ token: string
+}
+
+type TokenSpendingLimitRequest = [TokenSpendingLimitContext, TokenSpendingLimit | undefined]
+
+const requestAllowancesByDelegatesAndTokens = async (
+ safeAddress: string,
+ tokensByDelegate: [string, string[] | undefined][],
+): Promise => {
+ const batch = new web3ReadOnly.BatchRequest()
+
+ const whenRequestValues: Promise[] = []
+
+ for (const [delegate, tokens] of tokensByDelegate) {
+ if (tokens) {
+ for (const token of tokens) {
+ whenRequestValues.push(
+ generateBatchRequests<[TokenSpendingLimitContext, TokenSpendingLimit]>({
+ abi: SpendingLimitModule.abi as AbiItem[],
+ address: SPENDING_LIMIT_MODULE_ADDRESS,
+ methods: [{ method: 'getTokenAllowance', args: [safeAddress, delegate, token] }],
+ batch,
+ context: { delegate, token },
+ }),
+ )
+ }
+ }
+ }
+
+ batch.execute()
+
+ return Promise.all(whenRequestValues).then((allowances) =>
+ allowances
+ // first, we filter out those records whose tokenSpendingLimit is undefined
+ .filter(([, tokenSpendingLimit]) => tokenSpendingLimit)
+ // then, we build the SpendingLimitRow object
+ .map(([{ delegate, token }, tokenSpendingLimit]) => {
+ const [amount, spent, resetTimeMin, lastResetMin, nonce] = tokenSpendingLimit as TokenSpendingLimit
+
+ return {
+ delegate,
+ token,
+ amount,
+ spent,
+ resetTimeMin,
+ lastResetMin,
+ nonce,
+ }
+ })
+ .filter(discardZeroAllowance),
+ )
+}
+
+export const getSpendingLimits = async (
+ modules: string[] | undefined,
+ safeAddress: string,
+): Promise => {
+ const isSpendingLimitEnabled = modules?.some((module) => sameAddress(module, SPENDING_LIMIT_MODULE_ADDRESS)) ?? false
+
+ if (isSpendingLimitEnabled) {
+ const delegates = await getSpendingLimitContract().methods.getDelegates(safeAddress, 0, 100).call()
+ const tokensByDelegate = await requestTokensByDelegate(safeAddress, delegates.results)
+ return requestAllowancesByDelegatesAndTokens(safeAddress, tokensByDelegate)
+ }
+
+ return null
+}
+
+type DeleteAllowanceParams = {
+ beneficiary: string
+ tokenAddress: string
+}
+
+export const getDeleteAllowanceTxData = ({ beneficiary, tokenAddress }: DeleteAllowanceParams): string => {
+ const { nativeCoin } = getNetworkInfo()
+ const token = sameAddress(tokenAddress, nativeCoin.address) ? ZERO_ADDRESS : tokenAddress
+
+ const web3 = getWeb3()
+ const spendingLimitContract = new web3.eth.Contract(
+ SpendingLimitModule.abi as AbiItem[],
+ SPENDING_LIMIT_MODULE_ADDRESS,
+ )
+
+ return spendingLimitContract.methods.deleteAllowance(beneficiary, token).encodeABI()
+}
+
+export const enableSpendingLimitModuleMultiSendTx = (safeAddress: string): MultiSendTx => {
+ const multiSendTx = enableModuleTx({ moduleAddress: SPENDING_LIMIT_MODULE_ADDRESS, safeAddress })
+
+ return {
+ to: multiSendTx.to,
+ value: Number(multiSendTx.valueInWei),
+ data: multiSendTx.txData as string,
+ operation: DELEGATE_CALL,
+ }
+}
+
+export const addSpendingLimitBeneficiaryMultiSendTx = (beneficiary: string): MultiSendTx => {
+ const spendingLimitContract = getSpendingLimitContract()
+
+ return {
+ to: SPENDING_LIMIT_MODULE_ADDRESS,
+ value: 0,
+ data: spendingLimitContract.methods.addDelegate(beneficiary).encodeABI(),
+ operation: DELEGATE_CALL,
+ }
+}
+
+type SpendingLimitTxParams = {
+ spendingLimitArgs: {
+ beneficiary: string
+ token: string
+ spendingLimitInWei: string
+ resetTimeMin: number
+ resetBaseMin: number
+ }
+ safeAddress
+}
+
+export const setSpendingLimitTx = ({
+ spendingLimitArgs: { beneficiary, token, spendingLimitInWei, resetTimeMin, resetBaseMin },
+ safeAddress,
+}: SpendingLimitTxParams): CreateTransactionArgs => {
+ const spendingLimitContract = getSpendingLimitContract()
+ const { nativeCoin } = getNetworkInfo()
+
+ return {
+ safeAddress,
+ to: SPENDING_LIMIT_MODULE_ADDRESS,
+ valueInWei: ZERO_VALUE,
+ txData: spendingLimitContract.methods
+ .setAllowance(
+ beneficiary,
+ token === nativeCoin.address ? ZERO_ADDRESS : token,
+ spendingLimitInWei,
+ resetTimeMin,
+ resetBaseMin,
+ )
+ .encodeABI(),
+ operation: CALL,
+ notifiedTransaction: TX_NOTIFICATION_TYPES.NEW_SPENDING_LIMIT_TX,
+ }
+}
+
+export const setSpendingLimitMultiSendTx = (args: SpendingLimitTxParams): MultiSendTx => {
+ const tx = setSpendingLimitTx(args)
+
+ return {
+ to: tx.to,
+ value: Number(tx.valueInWei),
+ data: tx.txData as string,
+ operation: DELEGATE_CALL,
+ }
+}
+
+type SpendingLimitMultiSendTx = {
+ transactions: Array
+ safeAddress: string
+}
+export const spendingLimitMultiSendTx = ({
+ transactions,
+ safeAddress,
+}: SpendingLimitMultiSendTx): CreateTransactionArgs => ({
+ safeAddress,
+ to: MULTI_SEND_ADDRESS,
+ valueInWei: ZERO_VALUE,
+ txData: getEncodedMultiSendCallData(transactions, getWeb3()),
+ notifiedTransaction: TX_NOTIFICATION_TYPES.NEW_SPENDING_LIMIT_TX,
+ operation: DELEGATE_CALL,
+})
+
+type SpendingLimitAllowedBalance = GetTokenByAddress & {
+ tokenSpendingLimit: SpendingLimit
+}
+
+/**
+ * Calculates the remaining amount available for a particular SpendingLimit
+ * @param {string} tokenAddress
+ * @param {SpendingLimit} tokenSpendingLimit
+ * @param {List} tokens
+ * returns string
+ */
+export const spendingLimitAllowedBalance = ({
+ tokenAddress,
+ tokenSpendingLimit,
+ tokens,
+}: SpendingLimitAllowedBalance): string | number => {
+ const token = getBalanceAndDecimalsFromToken({ tokenAddress, tokens })
+
+ if (!token) {
+ return 0
+ }
+
+ const { balance, decimals } = token
+ const diff = new BigNumber(tokenSpendingLimit.amount).minus(tokenSpendingLimit.spent).toString()
+ const diffInFPNotation = fromTokenUnit(diff, decimals)
+
+ return new BigNumber(balance).gt(diffInFPNotation) ? diffInFPNotation : balance
+}
+
+type GetSpendingLimitByTokenAddress = {
+ spendingLimits?: SpendingLimit[] | null
+ tokenAddress?: string
+}
+
+/**
+ * Returns the SpendingLimit info for the specified tokenAddress
+ * @param {SpendingLimit[] | undefined | null} spendingLimits
+ * @param {string | undefined} tokenAddress
+ * @returns SpendingLimit | undefined
+ */
+export const getSpendingLimitByTokenAddress = ({
+ spendingLimits,
+ tokenAddress,
+}: GetSpendingLimitByTokenAddress): SpendingLimit | undefined => {
+ if (!tokenAddress || !spendingLimits) {
+ return
+ }
+
+ const { nativeCoin } = getNetworkInfo()
+
+ return spendingLimits.find(({ token: spendingLimitTokenAddress }) => {
+ spendingLimitTokenAddress = sameAddress(spendingLimitTokenAddress, ZERO_ADDRESS)
+ ? nativeCoin.address
+ : spendingLimitTokenAddress
+ return sameAddress(spendingLimitTokenAddress, tokenAddress)
+ })
+}
diff --git a/src/logic/safe/utils/upgradeSafe.ts b/src/logic/safe/utils/upgradeSafe.ts
index 3cd86610..4f3dea18 100644
--- a/src/logic/safe/utils/upgradeSafe.ts
+++ b/src/logic/safe/utils/upgradeSafe.ts
@@ -10,7 +10,7 @@ import { DELEGATE_CALL } from 'src/logic/safe/transactions'
import { getWeb3 } from 'src/logic/wallets/getWeb3'
import { MultiSend } from 'src/types/contracts/MultiSend.d'
-interface MultiSendTx {
+export interface MultiSendTx {
operation: number
to: string
value: number
diff --git a/src/logic/tokens/store/model/token.ts b/src/logic/tokens/store/model/token.ts
index 933059aa..1657359c 100644
--- a/src/logic/tokens/store/model/token.ts
+++ b/src/logic/tokens/store/model/token.ts
@@ -6,7 +6,7 @@ export type TokenProps = {
symbol: string
decimals: number | string
logoUri: string
- balance?: number | string
+ balance: number | string
}
export const makeToken = Record({
@@ -15,7 +15,7 @@ export const makeToken = Record({
symbol: '',
decimals: 0,
logoUri: '',
- balance: undefined,
+ balance: 0,
})
// balance is only set in extendedSafeTokensSelector when we display user's token balances
diff --git a/src/logic/tokens/utils/tokenHelpers.ts b/src/logic/tokens/utils/tokenHelpers.ts
index fbf6dfe1..b1361467 100644
--- a/src/logic/tokens/utils/tokenHelpers.ts
+++ b/src/logic/tokens/utils/tokenHelpers.ts
@@ -1,3 +1,4 @@
+import { List } from 'immutable'
import { AbiItem } from 'web3-utils'
import { getNetworkInfo } from 'src/config'
@@ -9,6 +10,8 @@ import { ALTERNATIVE_TOKEN_ABI } from 'src/logic/tokens/utils/alternativeAbi'
import { web3ReadOnly as web3 } from 'src/logic/wallets/getWeb3'
import { isEmptyData } from 'src/logic/safe/store/actions/transactions/utils/transactionHelpers'
import { TxServiceModel } from 'src/logic/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions'
+import { CALL } from 'src/logic/safe/transactions'
+import { sameAddress } from 'src/logic/wallets/ethAddresses'
export const getEthAsToken = (balance: string | number): Token => {
const { nativeCoin } = getNetworkInfo()
@@ -33,7 +36,13 @@ export const isAddressAToken = async (tokenAddress: string): Promise =>
}
export const isTokenTransfer = (tx: TxServiceModel): boolean => {
- return !isEmptyData(tx.data) && tx.data?.substring(0, 10) === '0xa9059cbb' && Number(tx.value) === 0
+ return (
+ !isEmptyData(tx.data) &&
+ // Check if contains 'transfer' method code
+ tx.data?.substring(0, 10) === '0xa9059cbb' &&
+ Number(tx.value) === 0 &&
+ tx.operation === CALL
+ )
}
export const getERC20DecimalsAndSymbol = async (
@@ -75,3 +84,32 @@ export const isSendERC20Transaction = async (tx: TxServiceModel): Promise
+}
+
+export type TokenFound = {
+ balance: string | number
+ decimals: string | number
+}
+
+/**
+ * Finds and returns a Token object by the provided address
+ * @param {string} tokenAddress
+ * @param {List} tokens
+ * @returns Token | undefined
+ */
+export const getBalanceAndDecimalsFromToken = ({ tokenAddress, tokens }: GetTokenByAddress): TokenFound | undefined => {
+ const token = tokens?.find(({ address }) => sameAddress(address, tokenAddress))
+
+ if (!token) {
+ return
+ }
+
+ return {
+ balance: token.balance ?? 0,
+ decimals: token.decimals ?? 0,
+ }
+}
diff --git a/src/logic/wallets/ethAddresses.ts b/src/logic/wallets/ethAddresses.ts
index d45d0fea..834e6654 100644
--- a/src/logic/wallets/ethAddresses.ts
+++ b/src/logic/wallets/ethAddresses.ts
@@ -40,4 +40,4 @@ export const isUserAnOwner = (safe: SafeRecord, userAccount: string): boolean =>
export const isUserAnOwnerOfAnySafe = (safes: List | SafeRecord[], userAccount: string): boolean =>
safes.some((safe: SafeRecord) => isUserAnOwner(safe, userAccount))
-export const isValidEnsName = (name: string): boolean => /^([\w-]+\.)+(eth|test|xyz|luxe)$/.test(name)
+export const isValidEnsName = (name: string): boolean => /^([\w-]+\.)+(eth|test|xyz|luxe|ewc)$/.test(name)
diff --git a/src/routes/load/components/DetailsForm/index.tsx b/src/routes/load/components/DetailsForm/index.tsx
index 1524f9e1..799d1c95 100644
--- a/src/routes/load/components/DetailsForm/index.tsx
+++ b/src/routes/load/components/DetailsForm/index.tsx
@@ -20,10 +20,9 @@ import {
import Block from 'src/components/layout/Block'
import Col from 'src/components/layout/Col'
import Paragraph from 'src/components/layout/Paragraph'
-import { SAFE_MASTER_COPY_ADDRESS_V10, getSafeMasterContract, validateProxy } from 'src/logic/contracts/safeContracts'
-import { getWeb3 } from 'src/logic/wallets/getWeb3'
import { FIELD_LOAD_ADDRESS, FIELD_LOAD_NAME } from 'src/routes/load/components/fields'
import { secondary } from 'src/theme/variables'
+import { getSafeInfo } from 'src/logic/safe/utils/safeInformation'
const useStyles = makeStyles({
root: {
@@ -42,42 +41,23 @@ const useStyles = makeStyles({
},
})
-export const SAFE_INSTANCE_ERROR = 'Address given is not a Safe instance'
-export const SAFE_MASTERCOPY_ERROR = 'Address is not a Safe or mastercopy is not supported'
+export const SAFE_ADDRESS_NOT_VALID = 'Address given is not a valid Safe address'
// In case of an error here, it will be swallowed by final-form
// So if you're experiencing any strang behaviours like freeze or hanging
// Don't mind to check if everything is OK inside this function :)
export const safeFieldsValidation = async (values): Promise> => {
const errors = {}
- const web3 = getWeb3()
- const safeAddress = values[FIELD_LOAD_ADDRESS]
+ const address = values[FIELD_LOAD_ADDRESS]
- if (!safeAddress || mustBeEthereumAddress(safeAddress) !== undefined) {
+ if (!address || mustBeEthereumAddress(address) !== undefined) {
return errors
}
- const isValidProxy = await validateProxy(safeAddress)
- if (!isValidProxy) {
- errors[FIELD_LOAD_ADDRESS] = SAFE_INSTANCE_ERROR
- return errors
- }
-
- // check mastercopy
- const proxyAddressFromStorage = await web3.eth.getStorageAt(safeAddress, 0)
- // https://www.reddit.com/r/ethereum/comments/6l3da1/how_long_are_ethereum_addresses/
- // ganache returns plain address
- // rinkeby returns 0x0000000000000+{40 address charachers}
- // address comes last so we just get last 40 charachers (1byte = 2hex chars)
- const checksummedProxyAddress = web3.utils.toChecksumAddress(
- `0x${proxyAddressFromStorage.substr(proxyAddressFromStorage.length - 40)}`,
- )
- const safeMaster = await getSafeMasterContract()
- const masterCopy = safeMaster.options.address
- const sameMasterCopy =
- checksummedProxyAddress === masterCopy || checksummedProxyAddress === SAFE_MASTER_COPY_ADDRESS_V10
- if (!sameMasterCopy) {
- errors[FIELD_LOAD_ADDRESS] = SAFE_MASTERCOPY_ERROR
+ // if getSafeInfo does not provide data, it's not a valid safe.
+ const safeInfo = await getSafeInfo(address)
+ if (!safeInfo) {
+ errors[FIELD_LOAD_ADDRESS] = SAFE_ADDRESS_NOT_VALID
}
return errors
diff --git a/src/routes/open/components/Layout.tsx b/src/routes/open/components/Layout.tsx
index 0aef861f..78e5a43f 100644
--- a/src/routes/open/components/Layout.tsx
+++ b/src/routes/open/components/Layout.tsx
@@ -6,12 +6,13 @@ import Stepper, { StepperPage } from 'src/components/Stepper'
import Block from 'src/components/layout/Block'
import Heading from 'src/components/layout/Heading'
import Row from 'src/components/layout/Row'
-import { initContracts } from 'src/logic/contracts/safeContracts'
-import Review from 'src/routes/open/components/ReviewInformation'
+import { instantiateSafeContracts } from 'src/logic/contracts/safeContracts'
+import { Review } from 'src/routes/open/components/ReviewInformation'
import SafeNameField from 'src/routes/open/components/SafeNameForm'
-import SafeOwnersFields from 'src/routes/open/components/SafeOwnersConfirmationsForm'
+import { SafeOwnersPage } from 'src/routes/open/components/SafeOwnersConfirmationsForm'
import {
FIELD_CONFIRMATIONS,
+ FIELD_CREATION_PROXY_SALT,
FIELD_SAFE_NAME,
getOwnerAddressBy,
getOwnerNameBy,
@@ -40,6 +41,7 @@ type InitialValuesForm = {
owner0Name?: string
confirmations: string
safeName?: string
+ safeCreationSalt: number
}
const useInitialValuesFrom = (userAccount: string, safeProps?: SafeProps): InitialValuesForm => {
@@ -51,6 +53,7 @@ const useInitialValuesFrom = (userAccount: string, safeProps?: SafeProps): Initi
[getOwnerNameBy(0)]: ownerName || 'My Wallet',
[getOwnerAddressBy(0)]: userAccount,
[FIELD_CONFIRMATIONS]: '1',
+ [FIELD_CREATION_PROXY_SALT]: Date.now(),
}
}
let obj = {}
@@ -68,6 +71,7 @@ const useInitialValuesFrom = (userAccount: string, safeProps?: SafeProps): Initi
...obj,
[FIELD_CONFIRMATIONS]: threshold || '1',
[FIELD_SAFE_NAME]: name,
+ [FIELD_CREATION_PROXY_SALT]: Date.now(),
}
}
@@ -92,7 +96,7 @@ type LayoutProps = {
safeProps?: SafeProps
}
-const Layout = (props: LayoutProps): React.ReactElement => {
+export const Layout = (props: LayoutProps): React.ReactElement => {
const { onCallSafeContractSubmit, safeProps } = props
const provider = useSelector(providerNameSelector)
@@ -101,7 +105,7 @@ const Layout = (props: LayoutProps): React.ReactElement => {
useEffect(() => {
if (provider) {
- initContracts()
+ instantiateSafeContracts()
}
}, [provider])
@@ -129,7 +133,7 @@ const Layout = (props: LayoutProps): React.ReactElement => {
testId="create-safe-form"
>
-
+
@@ -139,5 +143,3 @@ const Layout = (props: LayoutProps): React.ReactElement => {
>
)
}
-
-export default Layout
diff --git a/src/routes/open/components/ReviewInformation/index.tsx b/src/routes/open/components/ReviewInformation/index.tsx
index 1efc0057..4f08ff61 100644
--- a/src/routes/open/components/ReviewInformation/index.tsx
+++ b/src/routes/open/components/ReviewInformation/index.tsx
@@ -13,7 +13,7 @@ import Row from 'src/components/layout/Row'
import OpenPaper from 'src/components/Stepper/OpenPaper'
import { estimateGasForDeployingSafe } from 'src/logic/contracts/safeContracts'
import { formatAmount } from 'src/logic/tokens/utils/formatAmount'
-import { getAccountsFrom, getNamesFrom } from 'src/routes/open/utils/safeDataExtractor'
+import { getAccountsFrom, getNamesFrom, getSafeCreationSaltFrom } from 'src/routes/open/utils/safeDataExtractor'
import { FIELD_CONFIRMATIONS, FIELD_NAME, getNumOwnersFrom } from '../fields'
import { useStyles } from './styles'
@@ -33,20 +33,23 @@ const ReviewComponent = ({ userAccount, values }: ReviewComponentProps) => {
const names = getNamesFrom(values)
const addresses = getAccountsFrom(values)
const numOwners = getNumOwnersFrom(values)
+ const safeCreationSalt = getSafeCreationSaltFrom(values)
useEffect(() => {
const estimateGas = async () => {
if (!addresses.length || !numOwners || !userAccount) {
return
}
- const estimatedGasCosts = (await estimateGasForDeployingSafe(addresses, numOwners, userAccount)).toString()
+ const estimatedGasCosts = (
+ await estimateGasForDeployingSafe(addresses, numOwners, userAccount, safeCreationSalt)
+ ).toString()
const gasCosts = fromTokenUnit(estimatedGasCosts, nativeCoin.decimals)
const formattedGasCosts = formatAmount(gasCosts)
setGasCosts(formattedGasCosts)
}
estimateGas()
- }, [addresses, numOwners, userAccount])
+ }, [addresses, numOwners, safeCreationSalt, userAccount])
return (
<>
@@ -140,7 +143,7 @@ const ReviewComponent = ({ userAccount, values }: ReviewComponentProps) => {
)
}
-const Review = () =>
+export const Review = () =>
function ReviewPage(controls, props): React.ReactElement {
return (
<>
@@ -150,5 +153,3 @@ const Review = () =>
>
)
}
-
-export default Review
diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/index.tsx b/src/routes/open/components/SafeOwnersConfirmationsForm/index.tsx
index 6951f19a..76494f54 100644
--- a/src/routes/open/components/SafeOwnersConfirmationsForm/index.tsx
+++ b/src/routes/open/components/SafeOwnersConfirmationsForm/index.tsx
@@ -8,7 +8,7 @@ import { getAddressValidator } from './validators'
import QRIcon from 'src/assets/icons/qrcode.svg'
import trash from 'src/assets/icons/trash.svg'
-import ScanQRModal from 'src/components/ScanQRModal'
+import { ScanQRModal } from 'src/components/ScanQRModal'
import OpenPaper from 'src/components/Stepper/OpenPaper'
import AddressInput from 'src/components/forms/AddressInput'
import Field from 'src/components/forms/Field'
@@ -97,10 +97,10 @@ const SafeOwnersForm = (props): React.ReactElement => {
setNumOwners(numOwners + 1)
}
- const handleScan = (value) => {
+ const handleScan = (value: string | null) => {
let scannedAddress = value
- if (scannedAddress.startsWith('ethereum:')) {
+ if (scannedAddress?.startsWith('ethereum:')) {
scannedAddress = scannedAddress.replace('ethereum:', '')
}
@@ -236,21 +236,13 @@ const SafeOwnersForm = (props): React.ReactElement => {
)
}
-const SafeOwnersPage = ({ updateInitialProps }) =>
+export const SafeOwnersPage = () =>
function OpenSafeOwnersPage(controls, { errors, form, values }) {
return (
<>
-
+
>
)
}
-
-export default SafeOwnersPage
diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/validators.ts b/src/routes/open/components/SafeOwnersConfirmationsForm/validators.ts
index f37cb4b3..b528a0f5 100644
--- a/src/routes/open/components/SafeOwnersConfirmationsForm/validators.ts
+++ b/src/routes/open/components/SafeOwnersConfirmationsForm/validators.ts
@@ -1,6 +1,6 @@
-import { uniqueAddress } from 'src/components/forms/validator'
+import { GenericValidatorType, uniqueAddress } from 'src/components/forms/validator'
-export const getAddressValidator = (addresses, position) => {
+export const getAddressValidator = (addresses: string[], position: number): GenericValidatorType => {
// thanks Rich Harris
// https://twitter.com/Rich_Harris/status/1125850391155965952
const copy = addresses.slice()
diff --git a/src/routes/open/components/fields.ts b/src/routes/open/components/fields.ts
index 38162977..4df7b36e 100644
--- a/src/routes/open/components/fields.ts
+++ b/src/routes/open/components/fields.ts
@@ -2,6 +2,7 @@ export const FIELD_NAME = 'name'
export const FIELD_CONFIRMATIONS = 'confirmations'
export const FIELD_OWNERS = 'owners'
export const FIELD_SAFE_NAME = 'safeName'
+export const FIELD_CREATION_PROXY_SALT = 'safeCreationSalt'
export const getOwnerNameBy = (index) => `owner${index}Name`
export const getOwnerAddressBy = (index) => `owner${index}Address`
diff --git a/src/routes/open/container/Open.tsx b/src/routes/open/container/Open.tsx
index d6f043a3..1af17613 100644
--- a/src/routes/open/container/Open.tsx
+++ b/src/routes/open/container/Open.tsx
@@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react'
import ReactGA from 'react-ga'
import { useDispatch, useSelector } from 'react-redux'
import Opening from 'src/routes/opening'
-import Layout from 'src/routes/open/components/Layout'
+import { Layout } from 'src/routes/open/components/Layout'
import Page from 'src/components/layout/Page'
import { getSafeDeploymentTransaction } from 'src/logic/contracts/safeContracts'
import { checkReceiptStatus } from 'src/logic/wallets/ethTransactions'
@@ -12,6 +12,7 @@ import {
getAccountsFrom,
getNamesFrom,
getOwnersFrom,
+ getSafeCreationSaltFrom,
getSafeNameFrom,
getThresholdFrom,
} from 'src/routes/open/utils/safeDataExtractor'
@@ -58,9 +59,9 @@ export const createSafe = (values, userAccount) => {
const name = getSafeNameFrom(values)
const ownersNames = getNamesFrom(values)
const ownerAddresses = getAccountsFrom(values)
+ const safeCreationSalt = getSafeCreationSaltFrom(values)
- const deploymentTx = getSafeDeploymentTransaction(ownerAddresses, confirmations)
-
+ const deploymentTx = getSafeDeploymentTransaction(ownerAddresses, confirmations, safeCreationSalt)
const promiEvent = deploymentTx.send({ from: userAccount })
promiEvent
diff --git a/src/routes/open/utils/safeDataExtractor.ts b/src/routes/open/utils/safeDataExtractor.ts
index f7a85b04..fd380228 100644
--- a/src/routes/open/utils/safeDataExtractor.ts
+++ b/src/routes/open/utils/safeDataExtractor.ts
@@ -1,7 +1,7 @@
import { List } from 'immutable'
import { makeOwner } from 'src/logic/safe/store/models/owner'
-import { SafeOwner } from '../../../logic/safe/store/models/safe'
+import { SafeOwner } from 'src/logic/safe/store/models/safe'
export const getAccountsFrom = (values) => {
const accounts = Object.keys(values)
@@ -28,3 +28,5 @@ export const getOwnersFrom = (names, addresses): List => {
export const getThresholdFrom = (values) => Number(values.confirmations)
export const getSafeNameFrom = (values) => values.name
+
+export const getSafeCreationSaltFrom = (values) => values.safeCreationSalt
diff --git a/src/routes/opening/index.tsx b/src/routes/opening/index.tsx
index d9762846..28fd8f81 100644
--- a/src/routes/opening/index.tsx
+++ b/src/routes/opening/index.tsx
@@ -9,7 +9,7 @@ import Button from 'src/components/layout/Button'
import Heading from 'src/components/layout/Heading'
import Img from 'src/components/layout/Img'
import Paragraph from 'src/components/layout/Paragraph'
-import { initContracts } from 'src/logic/contracts/safeContracts'
+import { instantiateSafeContracts } from 'src/logic/contracts/safeContracts'
import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions'
import { getWeb3 } from 'src/logic/wallets/getWeb3'
import { background, connected } from 'src/theme/variables'
@@ -152,7 +152,7 @@ const SafeDeployment = ({ creationTxHash, onCancel, onRetry, onSuccess, submitte
useEffect(() => {
const loadContracts = async () => {
- await initContracts()
+ await instantiateSafeContracts()
setLoading(false)
}
diff --git a/src/routes/safe/components/AddressBook/CreateEditEntryModal/index.tsx b/src/routes/safe/components/AddressBook/CreateEditEntryModal/index.tsx
index c8c5073a..d77d11e0 100644
--- a/src/routes/safe/components/AddressBook/CreateEditEntryModal/index.tsx
+++ b/src/routes/safe/components/AddressBook/CreateEditEntryModal/index.tsx
@@ -19,8 +19,7 @@ import Col from 'src/components/layout/Col'
import Hairline from 'src/components/layout/Hairline'
import Paragraph from 'src/components/layout/Paragraph'
import Row from 'src/components/layout/Row'
-import { addressBookSelector } from 'src/logic/addressBook/store/selectors'
-import { getAddressesListFromAddressBook } from 'src/logic/addressBook/utils'
+import { addressBookAddressesListSelector } from 'src/logic/addressBook/store/selectors'
export const CREATE_ENTRY_INPUT_NAME_ID = 'create-entry-input-name'
export const CREATE_ENTRY_INPUT_ADDRESS_ID = 'create-entry-input-address'
@@ -42,8 +41,7 @@ const CreateEditEntryModalComponent = ({
}
}
- const addressBook = useSelector(addressBookSelector)
- const addressBookAddressesList = getAddressesListFromAddressBook(addressBook)
+ const addressBookAddressesList = useSelector(addressBookAddressesListSelector)
const entryDoesntExist = uniqueAddress(addressBookAddressesList)
const formMutators = {
diff --git a/src/routes/safe/components/AddressBook/EllipsisTransactionDetails/index.tsx b/src/routes/safe/components/AddressBook/EllipsisTransactionDetails/index.tsx
index 783b0f52..0e3889e1 100644
--- a/src/routes/safe/components/AddressBook/EllipsisTransactionDetails/index.tsx
+++ b/src/routes/safe/components/AddressBook/EllipsisTransactionDetails/index.tsx
@@ -63,12 +63,14 @@ export const EllipsisTransactionDetails = ({