diff --git a/package-lock.json b/package-lock.json index aa713d14c..e5862f09b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2753,20 +2753,6 @@ "csstype": "^3.0.2" } }, - "node_modules/@emotion/serialize/node_modules/@emotion/hash": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz", - "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@emotion/serialize/node_modules/@emotion/memoize": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz", - "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==", - "dev": true, - "license": "MIT" - }, "node_modules/@emotion/serialize/node_modules/@emotion/unitless": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", @@ -5144,12 +5130,6 @@ "web3-utils": "^1.8.1" } }, - "node_modules/@safe-global/protocol-kit/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT" - }, "node_modules/@safe-global/protocol-kit/node_modules/ethereumjs-util": { "version": "7.1.5", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", @@ -5166,173 +5146,6 @@ "node": ">=10.0.0" } }, - "node_modules/@safe-global/protocol-kit/node_modules/eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "license": "MIT" - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-core": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.9.0.tgz", - "integrity": "sha512-DZ+TPmq/ZLlx4LSVzFgrHCP/QFpKDbGWO4HoquZSdu24cjk5SZ+FEU1SZB2OaK3/bgBh+25mRbmv8y56ysUu1w==", - "license": "LGPL-3.0", - "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.9.0", - "web3-core-method": "1.9.0", - "web3-core-requestmanager": "1.9.0", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-core-helpers": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.9.0.tgz", - "integrity": "sha512-NeJzylAp9Yj9xAt2uTT+kyug3X0DLnfBdnAcGZuY6HhoNPDIfQRA9CkJjLngVRlGTLZGjNp9x9eR+RyZQgUlXg==", - "license": "LGPL-3.0", - "dependencies": { - "web3-eth-iban": "1.9.0", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-core-method": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.9.0.tgz", - "integrity": "sha512-sswbNsY2xRBBhGeaLt9c/eDc+0yDDhi6keUBAkgIRa9ueSx/VKzUY9HMqiV6bXDcGT2fJyejq74FfEB4lc/+/w==", - "license": "LGPL-3.0", - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.9.0", - "web3-core-promievent": "1.9.0", - "web3-core-subscriptions": "1.9.0", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-core-promievent": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.9.0.tgz", - "integrity": "sha512-PHG1Mn23IGwMZhnPDN8dETKypqsFbHfiyRqP+XsVMPmTHkVfzDQTCBU/c2r6hUktBDoGKut5xZQpGfhFk71KbQ==", - "license": "LGPL-3.0", - "dependencies": { - "eventemitter3": "4.0.4" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-core-requestmanager": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.9.0.tgz", - "integrity": "sha512-hcJ5PCtTIJpj+8qWxoseqlCovDo94JJjTX7dZOLXgwp8ah7E3WRYozhGyZocerx+KebKyg1mCQIhkDpMwjfo9Q==", - "license": "LGPL-3.0", - "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.9.0", - "web3-providers-http": "1.9.0", - "web3-providers-ipc": "1.9.0", - "web3-providers-ws": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-core-subscriptions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.9.0.tgz", - "integrity": "sha512-MaIo29yz7hTV8X8bioclPDbHFOVuHmnbMv+D3PDH12ceJFJAXGyW8GL5KU1DYyWIj4TD1HM4WknyVA/YWBiiLA==", - "license": "LGPL-3.0", - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-eth-iban": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.9.0.tgz", - "integrity": "sha512-jPAm77PuEs1kE/UrrBFJdPD2PN42pwfXA0gFuuw35bZezhskYML9W4QCxcqnUtceyEA4FUn7K2qTMuCk+23fog==", - "license": "LGPL-3.0", - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-providers-http": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.9.0.tgz", - "integrity": "sha512-5+dMNDAE0rRFz6SJpfnBqlVi2J5bB/Ivr2SanMt2YUrkxW5t8betZbzVwRkTbwtUvkqgj3xeUQzqpOttiv+IqQ==", - "license": "LGPL-3.0", - "dependencies": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-providers-ipc": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.9.0.tgz", - "integrity": "sha512-cPXU93Du40HCylvjaa5x62DbnGqH+86HpK/+kMcFIzF6sDUBhKpag2tSbYhGbj7GMpfkmDTUiiMLdWnFV6+uBA==", - "license": "LGPL-3.0", - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-providers-ws": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.9.0.tgz", - "integrity": "sha512-JRVsnQZ7j2k1a2yzBNHe39xqk1ijOv01dfIBFw52VeEkSRzvrOcsPIM/ttSyBuJqt70ntMxXY0ekCrqfleKH/w==", - "license": "LGPL-3.0", - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.9.0", - "websocket": "^1.0.32" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/protocol-kit/node_modules/web3-utils": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.9.0.tgz", - "integrity": "sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ==", - "license": "LGPL-3.0", - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@safe-global/safe-apps-provider": { "version": "0.15.2", "resolved": "https://registry.npmjs.org/@safe-global/safe-apps-provider/-/safe-apps-provider-0.15.2.tgz", @@ -5379,195 +5192,6 @@ "web3-utils": "^1.8.1" } }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "license": "MIT" - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/ethereumjs-util": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", - "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", - "license": "MPL-2.0", - "dependencies": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "license": "MIT" - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-core": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.9.0.tgz", - "integrity": "sha512-DZ+TPmq/ZLlx4LSVzFgrHCP/QFpKDbGWO4HoquZSdu24cjk5SZ+FEU1SZB2OaK3/bgBh+25mRbmv8y56ysUu1w==", - "license": "LGPL-3.0", - "dependencies": { - "@types/bn.js": "^5.1.1", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.9.0", - "web3-core-method": "1.9.0", - "web3-core-requestmanager": "1.9.0", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-core-helpers": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.9.0.tgz", - "integrity": "sha512-NeJzylAp9Yj9xAt2uTT+kyug3X0DLnfBdnAcGZuY6HhoNPDIfQRA9CkJjLngVRlGTLZGjNp9x9eR+RyZQgUlXg==", - "license": "LGPL-3.0", - "dependencies": { - "web3-eth-iban": "1.9.0", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-core-method": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.9.0.tgz", - "integrity": "sha512-sswbNsY2xRBBhGeaLt9c/eDc+0yDDhi6keUBAkgIRa9ueSx/VKzUY9HMqiV6bXDcGT2fJyejq74FfEB4lc/+/w==", - "license": "LGPL-3.0", - "dependencies": { - "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.9.0", - "web3-core-promievent": "1.9.0", - "web3-core-subscriptions": "1.9.0", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-core-promievent": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.9.0.tgz", - "integrity": "sha512-PHG1Mn23IGwMZhnPDN8dETKypqsFbHfiyRqP+XsVMPmTHkVfzDQTCBU/c2r6hUktBDoGKut5xZQpGfhFk71KbQ==", - "license": "LGPL-3.0", - "dependencies": { - "eventemitter3": "4.0.4" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-core-requestmanager": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.9.0.tgz", - "integrity": "sha512-hcJ5PCtTIJpj+8qWxoseqlCovDo94JJjTX7dZOLXgwp8ah7E3WRYozhGyZocerx+KebKyg1mCQIhkDpMwjfo9Q==", - "license": "LGPL-3.0", - "dependencies": { - "util": "^0.12.5", - "web3-core-helpers": "1.9.0", - "web3-providers-http": "1.9.0", - "web3-providers-ipc": "1.9.0", - "web3-providers-ws": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-core-subscriptions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.9.0.tgz", - "integrity": "sha512-MaIo29yz7hTV8X8bioclPDbHFOVuHmnbMv+D3PDH12ceJFJAXGyW8GL5KU1DYyWIj4TD1HM4WknyVA/YWBiiLA==", - "license": "LGPL-3.0", - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-eth-iban": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.9.0.tgz", - "integrity": "sha512-jPAm77PuEs1kE/UrrBFJdPD2PN42pwfXA0gFuuw35bZezhskYML9W4QCxcqnUtceyEA4FUn7K2qTMuCk+23fog==", - "license": "LGPL-3.0", - "dependencies": { - "bn.js": "^5.2.1", - "web3-utils": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-providers-http": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.9.0.tgz", - "integrity": "sha512-5+dMNDAE0rRFz6SJpfnBqlVi2J5bB/Ivr2SanMt2YUrkxW5t8betZbzVwRkTbwtUvkqgj3xeUQzqpOttiv+IqQ==", - "license": "LGPL-3.0", - "dependencies": { - "abortcontroller-polyfill": "^1.7.3", - "cross-fetch": "^3.1.4", - "es6-promise": "^4.2.8", - "web3-core-helpers": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-providers-ipc": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.9.0.tgz", - "integrity": "sha512-cPXU93Du40HCylvjaa5x62DbnGqH+86HpK/+kMcFIzF6sDUBhKpag2tSbYhGbj7GMpfkmDTUiiMLdWnFV6+uBA==", - "license": "LGPL-3.0", - "dependencies": { - "oboe": "2.1.5", - "web3-core-helpers": "1.9.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-providers-ws": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.9.0.tgz", - "integrity": "sha512-JRVsnQZ7j2k1a2yzBNHe39xqk1ijOv01dfIBFw52VeEkSRzvrOcsPIM/ttSyBuJqt70ntMxXY0ekCrqfleKH/w==", - "license": "LGPL-3.0", - "dependencies": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.9.0", - "websocket": "^1.0.32" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@safe-global/safe-core-sdk-types/node_modules/web3-utils": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.9.0.tgz", - "integrity": "sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ==", - "license": "LGPL-3.0", - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@safe-global/safe-deployments": { "version": "1.25.0", "resolved": "https://registry.npmjs.org/@safe-global/safe-deployments/-/safe-deployments-1.25.0.tgz", @@ -7552,9 +7176,9 @@ } }, "node_modules/@wagmi/chains": { - "version": "1.3.0-cjs", - "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-1.3.0-cjs.tgz", - "integrity": "sha512-AKcam25XMmh72FIl5p2CYpwZv6rFSJKUF59loXqYTeoPZe+Vgtl+zlU/sIc+gWPayghWVd/ZqY6JJfSQ6xEaFw==", + "version": "1.8.0-cjs", + "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-1.8.0-cjs.tgz", + "integrity": "sha512-wUacqLRYmjvXjGMREhcXWAvN2rhnps3Lg67vpgoDTY6RB8d0z8LRm3X0/nDGuyuyrbxx2M7eLNgbODLxXV1WJg==", "funding": [ { "type": "gitcoin", @@ -7565,7 +7189,6 @@ "url": "https://github.com/sponsors/wagmi-dev" } ], - "license": "MIT", "peerDependencies": { "typescript": ">=5.0.4" }, @@ -8824,20 +8447,6 @@ "styled-components": ">=5" } }, - "node_modules/@wherever/react-notification-feed/node_modules/@tanstack/query-sync-storage-persister": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@tanstack/query-sync-storage-persister/-/query-sync-storage-persister-4.24.4.tgz", - "integrity": "sha512-0wffVqoOydMc1TDjOiATv/TM8wJfMpRcM82Cr19TuepListopTsuZ3RzSzLKBCo8WRl/0zCR1Ti9t1zn+Oai/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tanstack/query-persist-client-core": "4.24.4" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, "node_modules/@wherever/react-notification-feed/node_modules/@tanstack/react-query-persist-client": { "version": "4.24.4", "resolved": "https://registry.npmjs.org/@tanstack/react-query-persist-client/-/react-query-persist-client-4.24.4.tgz", @@ -10534,13 +10143,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -15440,11 +15048,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -17748,7 +17355,6 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -20644,42 +20250,6 @@ "node": ">= 7.6.0" } }, - "node_modules/merkletreejs/node_modules/ethereumjs-util": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", - "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/merkletreejs/node_modules/web3-utils": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.8.2.tgz", - "integrity": "sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA==", - "dev": true, - "license": "LGPL-3.0", - "dependencies": { - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/mersenne-twister": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mersenne-twister/-/mersenne-twister-1.1.0.tgz", @@ -25333,13 +24903,6 @@ "react-dom": "^16.8.0 || ^17 || ^18" } }, - "node_modules/react-popper/node_modules/react-fast-compare": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", - "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==", - "dev": true, - "license": "MIT" - }, "node_modules/react-redux": { "version": "8.0.5", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.5.tgz", @@ -28947,7 +28510,6 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -29298,17 +28860,17 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "devOptional": true, - "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uint8arrays": { @@ -31889,12 +31451,12 @@ }, "packages/shared": { "name": "@hats.finance/shared", - "version": "1.1.93", + "version": "1.1.103", "license": "ISC", "dependencies": { "@safe-global/protocol-kit": "^1.0.1", "@safe-global/safe-core-sdk-types": "^2.0.0", - "@wagmi/chains": "1.3.0-cjs", + "@wagmi/chains": "1.8.0-cjs", "ethers": "^5.7.2", "uuid": "^9.0.0" }, @@ -31910,6 +31472,19 @@ "dev": true, "license": "MIT" }, + "packages/shared/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "packages/shared/node_modules/uuid": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", @@ -32057,6 +31632,19 @@ } } }, + "packages/web/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "packages/web/node_modules/uuid": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", @@ -32068,4 +31656,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/shared/package.json b/packages/shared/package.json index 794e204df..4a3b9c008 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@hats.finance/shared", - "version": "1.1.103", + "version": "1.1.122", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/shared/src/abis/HATAirdropFactory_abi.ts b/packages/shared/src/abis/HATAirdropFactory_abi.ts index ec3e7dfd7..ba7e8c9e6 100644 --- a/packages/shared/src/abis/HATAirdropFactory_abi.ts +++ b/packages/shared/src/abis/HATAirdropFactory_abi.ts @@ -1,314 +1,134 @@ export const HATAirdropFactory_abi = [ { - "inputs": [ - { - "internalType": "contract IHATToken", - "name": "_HAT", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ContractIsNotHATAirdrop", - "type": "error" - }, - { - "inputs": [], - "name": "HATAirdropInitializationFailed", - "type": "error" - }, - { - "inputs": [], - "name": "RedeemDataArraysLengthMismatch", - "type": "error" + inputs: [{ internalType: "contract IHATToken", name: "_HAT", type: "address" }], + stateMutability: "nonpayable", + type: "constructor", }, + { inputs: [], name: "ContractIsNotHATAirdrop", type: "error" }, + { inputs: [], name: "HATAirdropInitializationFailed", type: "error" }, + { inputs: [], name: "RedeemDataArraysLengthMismatch", type: "error" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_hatAirdrop", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_initData", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_totalAmount", - "type": "uint256" - } + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "_hatAirdrop", type: "address" }, + { indexed: false, internalType: "bytes", name: "_initData", type: "bytes" }, + { indexed: false, internalType: "contract IERC20", name: "_token", type: "address" }, + { indexed: false, internalType: "uint256", name: "_totalAmount", type: "uint256" }, ], - "name": "HATAirdropCreated", - "type": "event" + name: "HATAirdropCreated", + type: "event", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" }, ], - "name": "OwnershipTransferred", - "type": "event" + name: "OwnershipTransferred", + type: "event", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "_owner", type: "address" }, + { indexed: false, internalType: "uint256", name: "_amount", type: "uint256" }, ], - "name": "TokensWithdrawn", - "type": "event" + name: "TokensWithdrawn", + type: "event", }, { - "inputs": [], - "name": "HAT", - "outputs": [ - { - "internalType": "contract IHATToken", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "HAT", + outputs: [{ internalType: "contract IHATToken", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_initData", - "type": "bytes" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_totalAmount", - "type": "uint256" - } + inputs: [ + { internalType: "address", name: "_implementation", type: "address" }, + { internalType: "bytes", name: "_initData", type: "bytes" }, + { internalType: "contract IERC20", name: "_token", type: "address" }, + { internalType: "uint256", name: "_totalAmount", type: "uint256" }, ], - "name": "createHATAirdrop", - "outputs": [ - { - "internalType": "address", - "name": "result", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" + name: "createHATAirdrop", + outputs: [{ internalType: "address", name: "result", type: "address" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isAirdrop", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "isAirdrop", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_initData", - "type": "bytes" - } + inputs: [ + { internalType: "address", name: "_implementation", type: "address" }, + { internalType: "bytes", name: "_initData", type: "bytes" }, ], - "name": "predictHATAirdropAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + name: "predictHATAirdropAddress", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "contract IHATAirdrop[]", - "name": "_airdrops", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes32[][]", - "name": "_proofs", - "type": "bytes32[][]" - }, - { - "internalType": "address", - "name": "_delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "_v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "_r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_s", - "type": "bytes32" - } + inputs: [ + { internalType: "contract IHATAirdrop[]", name: "_airdrops", type: "address[]" }, + { internalType: "uint256[]", name: "_amounts", type: "uint256[]" }, + { internalType: "bytes32[][]", name: "_proofs", type: "bytes32[][]" }, + { internalType: "contract IHATVault[]", name: "_depositIntoVaults", type: "address[]" }, + { internalType: "uint256[]", name: "_amountsToDeposit", type: "uint256[]" }, + { internalType: "uint256[]", name: "_minShares", type: "uint256[]" }, + { internalType: "address", name: "_delegatee", type: "address" }, + { internalType: "uint256", name: "_nonce", type: "uint256" }, + { internalType: "uint256", name: "_expiry", type: "uint256" }, + { internalType: "uint8", name: "_v", type: "uint8" }, + { internalType: "bytes32", name: "_r", type: "bytes32" }, + { internalType: "bytes32", name: "_s", type: "bytes32" }, ], - "name": "redeemAndDelegateMultipleAirdrops", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "redeemAndDelegateMultipleAirdrops", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "contract IHATAirdrop[]", - "name": "_airdrops", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes32[][]", - "name": "_proofs", - "type": "bytes32[][]" - } + inputs: [ + { internalType: "contract IHATAirdrop[]", name: "_airdrops", type: "address[]" }, + { internalType: "uint256[]", name: "_amounts", type: "uint256[]" }, + { internalType: "bytes32[][]", name: "_proofs", type: "bytes32[][]" }, + { internalType: "contract IHATVault[]", name: "_depositIntoVaults", type: "address[]" }, + { internalType: "uint256[]", name: "_amountsToDeposit", type: "uint256[]" }, + { internalType: "uint256[]", name: "_minShares", type: "uint256[]" }, ], - "name": "redeemMultipleAirdrops", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "redeemMultipleAirdrops", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } + inputs: [ + { internalType: "contract IERC20", name: "_token", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "withdrawTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "withdrawTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } ] as const; diff --git a/packages/shared/src/abis/HATAirdrop_abi.ts b/packages/shared/src/abis/HATAirdrop_abi.ts new file mode 100644 index 000000000..4155a40fe --- /dev/null +++ b/packages/shared/src/abis/HATAirdrop_abi.ts @@ -0,0 +1,126 @@ +export const HATAirdrop_abi = [ + { inputs: [], stateMutability: "nonpayable", type: "constructor" }, + { inputs: [], name: "CannotRecoverBeforeDeadline", type: "error" }, + { inputs: [], name: "CannotRedeemAfterDeadline", type: "error" }, + { inputs: [], name: "CannotRedeemBeforeStartTime", type: "error" }, + { inputs: [], name: "InvalidMerkleProof", type: "error" }, + { inputs: [], name: "LeafAlreadyRedeemed", type: "error" }, + { inputs: [], name: "RedeemerMustBeBeneficiary", type: "error" }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: "uint8", name: "version", type: "uint8" }], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: "string", name: "_merkleTreeIPFSRef", type: "string" }, + { indexed: false, internalType: "bytes32", name: "_root", type: "bytes32" }, + { indexed: false, internalType: "uint256", name: "_startTime", type: "uint256" }, + { indexed: false, internalType: "uint256", name: "_deadline", type: "uint256" }, + ], + name: "MerkleTreeSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "_account", type: "address" }, + { indexed: true, internalType: "address", name: "_tokenLock", type: "address" }, + { indexed: false, internalType: "uint256", name: "_amount", type: "uint256" }, + ], + name: "TokensRedeemed", + type: "event", + }, + { + inputs: [], + name: "deadline", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "string", name: "_merkleTreeIPFSRef", type: "string" }, + { internalType: "bytes32", name: "_root", type: "bytes32" }, + { internalType: "uint256", name: "_startTime", type: "uint256" }, + { internalType: "uint256", name: "_deadline", type: "uint256" }, + { internalType: "uint256", name: "_lockEndTime", type: "uint256" }, + { internalType: "uint256", name: "_periods", type: "uint256" }, + { internalType: "contract IERC20Upgradeable", name: "_token", type: "address" }, + { internalType: "contract ITokenLockFactory", name: "_tokenLockFactory", type: "address" }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + name: "leafRedeemed", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lockEndTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "periods", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_account", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { internalType: "bytes32[]", name: "_proof", type: "bytes32[]" }, + ], + name: "redeem", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "root", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "startTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20Upgradeable", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tokenLockFactory", + outputs: [{ internalType: "contract ITokenLockFactory", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/packages/shared/src/abis/HATPaymentSplitterFactory_abi.ts b/packages/shared/src/abis/HATPaymentSplitterFactory_abi.ts index 3d7969c16..9ea2181c4 100644 --- a/packages/shared/src/abis/HATPaymentSplitterFactory_abi.ts +++ b/packages/shared/src/abis/HATPaymentSplitterFactory_abi.ts @@ -4,6 +4,11 @@ export const HATPaymentSplitterFactory_abi = [ stateMutability: "nonpayable", type: "constructor", }, + { inputs: [], name: "ArrayLengthMismatch", type: "error" }, + { inputs: [], name: "DuplicatedPayee", type: "error" }, + { inputs: [], name: "NoPayees", type: "error" }, + { inputs: [], name: "ZeroAddress", type: "error" }, + { inputs: [], name: "ZeroShares", type: "error" }, { anonymous: false, inputs: [{ indexed: true, internalType: "address", name: "_hatPaymentSplitter", type: "address" }], @@ -27,24 +32,10 @@ export const HATPaymentSplitterFactory_abi = [ stateMutability: "view", type: "function", }, - { - inputs: [{ internalType: "address", name: "", type: "address" }], - name: "nonce", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "_deployer", type: "address" }], - name: "predictNextSplitterAddress", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, { inputs: [ - { internalType: "uint256", name: "_nonce", type: "uint256" }, - { internalType: "address", name: "_deployer", type: "address" }, + { internalType: "address[]", name: "_payees", type: "address[]" }, + { internalType: "uint256[]", name: "_shares", type: "uint256[]" }, ], name: "predictSplitterAddress", outputs: [{ internalType: "address", name: "", type: "address" }], diff --git a/packages/shared/src/abis/HATTokenLockFactory_abi.ts b/packages/shared/src/abis/HATTokenLockFactory_abi.ts new file mode 100644 index 000000000..5b607729c --- /dev/null +++ b/packages/shared/src/abis/HATTokenLockFactory_abi.ts @@ -0,0 +1,100 @@ +export const HATTokenLockFactory_abi = [ + { + inputs: [ + { internalType: "address", name: "_masterCopy", type: "address" }, + { internalType: "address", name: "_governance", type: "address" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "MasterCopyCannotBeZero", type: "error" }, + { + anonymous: false, + inputs: [{ indexed: true, internalType: "address", name: "masterCopy", type: "address" }], + name: "MasterCopyUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "contractAddress", type: "address" }, + { indexed: true, internalType: "bytes32", name: "initHash", type: "bytes32" }, + { indexed: true, internalType: "address", name: "beneficiary", type: "address" }, + { indexed: false, internalType: "address", name: "token", type: "address" }, + { indexed: false, internalType: "uint256", name: "managedAmount", type: "uint256" }, + { indexed: false, internalType: "uint256", name: "startTime", type: "uint256" }, + { indexed: false, internalType: "uint256", name: "endTime", type: "uint256" }, + { indexed: false, internalType: "uint256", name: "periods", type: "uint256" }, + { indexed: false, internalType: "uint256", name: "releaseStartTime", type: "uint256" }, + { indexed: false, internalType: "uint256", name: "vestingCliffTime", type: "uint256" }, + { indexed: false, internalType: "bool", name: "revocable", type: "bool" }, + { indexed: false, internalType: "bool", name: "canDelegate", type: "bool" }, + ], + name: "TokenLockCreated", + type: "event", + }, + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_owner", type: "address" }, + { internalType: "address", name: "_beneficiary", type: "address" }, + { internalType: "uint256", name: "_managedAmount", type: "uint256" }, + { internalType: "uint256", name: "_startTime", type: "uint256" }, + { internalType: "uint256", name: "_endTime", type: "uint256" }, + { internalType: "uint256", name: "_periods", type: "uint256" }, + { internalType: "uint256", name: "_releaseStartTime", type: "uint256" }, + { internalType: "uint256", name: "_vestingCliffTime", type: "uint256" }, + { internalType: "bool", name: "_revocable", type: "bool" }, + { internalType: "bool", name: "_canDelegate", type: "bool" }, + ], + name: "createTokenLock", + outputs: [{ internalType: "address", name: "contractAddress", type: "address" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "masterCopy", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "nonce", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [{ internalType: "address", name: "_masterCopy", type: "address" }], + name: "setMasterCopy", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/packages/shared/src/abis/HATTokenLock_abi.ts b/packages/shared/src/abis/HATTokenLock_abi.ts new file mode 100644 index 000000000..8c83b38e5 --- /dev/null +++ b/packages/shared/src/abis/HATTokenLock_abi.ts @@ -0,0 +1,321 @@ +export const HATTokenLock_abi = [ + { inputs: [], name: "AlreadyInitialized", type: "error" }, + { inputs: [], name: "AmountCannotBeZero", type: "error" }, + { inputs: [], name: "AmountRequestedBiggerThanSurplus", type: "error" }, + { inputs: [], name: "BeneficiaryCannotBeZero", type: "error" }, + { inputs: [], name: "CannotCancelAfterLockIsAccepted", type: "error" }, + { inputs: [], name: "CannotSweepVestedToken", type: "error" }, + { inputs: [], name: "CliffTimeMustBeBeforeEndTime", type: "error" }, + { inputs: [], name: "DelegateDisabled", type: "error" }, + { inputs: [], name: "LockIsAlreadyRevoked", type: "error" }, + { inputs: [], name: "LockIsNonRevocable", type: "error" }, + { inputs: [], name: "ManagedAmountCannotBeZero", type: "error" }, + { inputs: [], name: "NoAmountAvailableToRelease", type: "error" }, + { inputs: [], name: "NoAvailableUnvestedAmount", type: "error" }, + { inputs: [], name: "OnlyBeneficiary", type: "error" }, + { inputs: [], name: "OnlySweeper", type: "error" }, + { inputs: [], name: "PeriodsCannotBeBelowMinimum", type: "error" }, + { inputs: [], name: "ReleaseStartTimeMustBeBeforeEndTime", type: "error" }, + { inputs: [], name: "StartTimeCannotBeZero", type: "error" }, + { inputs: [], name: "StartTimeMustBeBeforeEndTime", type: "error" }, + { inputs: [], name: "TokenCannotBeZero", type: "error" }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: "address", name: "newBeneficiary", type: "address" }], + name: "BeneficiaryChanged", + type: "event", + }, + { anonymous: false, inputs: [], name: "LockAccepted", type: "event" }, + { anonymous: false, inputs: [], name: "LockCanceled", type: "event" }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "beneficiary", type: "address" }, + { indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "TokensReleased", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "beneficiary", type: "address" }, + { indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "TokensRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "beneficiary", type: "address" }, + { indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "TokensWithdrawn", + type: "event", + }, + { inputs: [], name: "acceptLock", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [], + name: "amountPerPeriod", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "availableAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "beneficiary", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "canDelegate", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { inputs: [], name: "cancelLock", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [{ internalType: "address", name: "_newBeneficiary", type: "address" }], + name: "changeBeneficiary", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "currentBalance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "currentPeriod", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "currentTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_delegatee", type: "address" }], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "duration", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "endTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_tokenLockOwner", type: "address" }, + { internalType: "address", name: "_beneficiary", type: "address" }, + { internalType: "contract HATToken", name: "_token", type: "address" }, + { internalType: "uint256", name: "_managedAmount", type: "uint256" }, + { internalType: "uint256", name: "_startTime", type: "uint256" }, + { internalType: "uint256", name: "_endTime", type: "uint256" }, + { internalType: "uint256", name: "_periods", type: "uint256" }, + { internalType: "uint256", name: "_releaseStartTime", type: "uint256" }, + { internalType: "uint256", name: "_vestingCliffTime", type: "uint256" }, + { internalType: "bool", name: "_revocable", type: "bool" }, + { internalType: "bool", name: "_canDelegate", type: "bool" }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isAccepted", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isRevoked", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "managedAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "passedPeriods", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "periodDuration", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "periods", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "releasableAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { inputs: [], name: "release", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [], + name: "releaseStartTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "releasedAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [], + name: "revocable", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { inputs: [], name: "revoke", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [], + name: "sinceStartTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "startTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "surplusAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "contract IERC20", name: "_token", type: "address" }], + name: "sweepToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalOutstandingAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "vestedAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vestingCliffTime", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "withdrawSurplus", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/packages/shared/src/abis/HATToken_abi.ts b/packages/shared/src/abis/HATToken_abi.ts new file mode 100644 index 000000000..665b6684d --- /dev/null +++ b/packages/shared/src/abis/HATToken_abi.ts @@ -0,0 +1,336 @@ +export const HATToken_abi = [ + { + inputs: [{ internalType: "address", name: "_governance", type: "address" }], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "TransfersDisabled", type: "error" }, + { inputs: [], name: "ZeroAmount", type: "error" }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "owner", type: "address" }, + { indexed: true, internalType: "address", name: "spender", type: "address" }, + { indexed: false, internalType: "uint256", name: "value", type: "uint256" }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "delegator", type: "address" }, + { indexed: true, internalType: "address", name: "fromDelegate", type: "address" }, + { indexed: true, internalType: "address", name: "toDelegate", type: "address" }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "delegate", type: "address" }, + { indexed: false, internalType: "uint256", name: "previousBalance", type: "uint256" }, + { indexed: false, internalType: "uint256", name: "newBalance", type: "uint256" }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "minter", type: "address" }, + { indexed: false, internalType: "uint256", name: "seedAmount", type: "uint256" }, + ], + name: "MinterSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { indexed: false, internalType: "uint256", name: "value", type: "uint256" }, + ], + name: "Transfer", + type: "event", + }, + { anonymous: false, inputs: [], name: "TransferableSet", type: "event" }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "cap", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "account", type: "address" }, + { internalType: "uint32", name: "pos", type: "uint32" }, + ], + name: "checkpoints", + outputs: [ + { + components: [ + { internalType: "uint32", name: "fromBlock", type: "uint32" }, + { internalType: "uint224", name: "votes", type: "uint224" }, + ], + internalType: "struct ERC20Votes.Checkpoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "delegatee", type: "address" }], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "delegatee", type: "address" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "uint256", name: "expiry", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "delegates", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "blockNumber", type: "uint256" }], + name: "getPastTotalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "account", type: "address" }, + { internalType: "uint256", name: "blockNumber", type: "uint256" }, + ], + name: "getPastVotes", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "getVotes", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_account", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "minters", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "owner", type: "address" }], + name: "nonces", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "numCheckpoints", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" }, + { internalType: "uint256", name: "deadline", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [ + { internalType: "address", name: "_minter", type: "address" }, + { internalType: "uint256", name: "_seedAmount", type: "uint256" }, + ], + name: "setMinter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { inputs: [], name: "setTransferable", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "from", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "transferable", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/packages/shared/src/abis/HatsToken_abi.ts b/packages/shared/src/abis/HatsToken_abi.ts deleted file mode 100644 index 6920ce0b1..000000000 --- a/packages/shared/src/abis/HatsToken_abi.ts +++ /dev/null @@ -1,878 +0,0 @@ -export const HatsToken_abi = [ - { - inputs: [ - { - internalType: "address", - name: "_governance", - type: "address", - }, - { - internalType: "uint256", - name: "_timeLockDelay", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "oldGovernance", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newGovernance", - type: "address", - }, - ], - name: "GovernanceChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "oldGovernance", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newGovernance", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "at", - type: "uint256", - }, - ], - name: "GovernancePending", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "minter", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "seedAmount", - type: "uint256", - }, - ], - name: "MinterChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "minter", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "seedAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "at", - type: "uint256", - }, - ], - name: "MinterPending", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "CAP", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "DELEGATION_TYPEHASH", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "DOMAIN_TYPEHASH", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PERMIT_TYPEHASH", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "rawAmount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - name: "checkpoints", - outputs: [ - { - internalType: "uint32", - name: "fromBlock", - type: "uint32", - }, - { - internalType: "uint96", - name: "votes", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "confirmGovernance", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_minter", - type: "address", - }, - ], - name: "confirmMinter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getCurrentVotes", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "blockNumber", - type: "uint256", - }, - ], - name: "getPriorVotes", - outputs: [ - { - internalType: "uint96", - name: "", - type: "uint96", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governance", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "governancePending", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "minters", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "numCheckpoints", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "pendingMinters", - outputs: [ - { - internalType: "uint256", - name: "seedAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "setMinterPendingAt", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "rawAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "setGovernancePendingAt", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_governance", - type: "address", - }, - ], - name: "setPendingGovernance", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_minter", - type: "address", - }, - { - internalType: "uint256", - name: "_cap", - type: "uint256", - }, - ], - name: "setPendingMinter", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "timeLockDelay", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "dst", - type: "address", - }, - { - internalType: "uint256", - name: "rawAmount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "src", - type: "address", - }, - { - internalType: "address", - name: "dst", - type: "address", - }, - { - internalType: "uint256", - name: "rawAmount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/shared/src/abis/index.ts b/packages/shared/src/abis/index.ts index cc061ab04..c7f3af34a 100644 --- a/packages/shared/src/abis/index.ts +++ b/packages/shared/src/abis/index.ts @@ -1,5 +1,5 @@ export { GoodDollar_abi } from "./GoodDollar_abi"; -export { HatsToken_abi } from "./HatsToken_abi"; +export { HATToken_abi } from "./HATToken_abi"; export { InsureDao_abi } from "./InsureDao_abi"; export { HATSVaultV1_abi } from "./HATSVaultV1_abi"; export { HATSVaultV2_abi } from "./HATSVaultV2_abi"; @@ -12,5 +12,8 @@ export { HATVaultsNFT_abi } from "./HATVaultsNFT_abi"; export { RewardController_abi } from "./RewardController_abi"; export { HATTimelockController_abi } from "./HATTimelockController_abi"; export { HATPaymentSplitter_abi } from "./HATPaymentSplitter_abi"; +export { HATAirdrop_abi } from "./HATAirdrop_abi"; export { HATAirdropFactory_abi } from "./HATAirdropFactory_abi"; +export { HATTokenLock_abi } from "./HATTokenLock_abi"; +export { HATTokenLockFactory_abi } from "./HATTokenLockFactory_abi"; export { erc20_abi } from "./erc20_abi"; diff --git a/packages/shared/src/config/chains.ts b/packages/shared/src/config/chains.ts index 253d8dba6..532ae906b 100644 --- a/packages/shared/src/config/chains.ts +++ b/packages/shared/src/config/chains.ts @@ -26,7 +26,8 @@ export interface IChainConfiguration { arbitratorContract: string; paymentSplitterFactory: string; rewardController?: string; - govMultisig?: string; + govMultisig: string; + growthMultisig: string; whitelistedReviewers?: string[]; chain: wagmiChains.Chain; subgraph: string; @@ -53,9 +54,10 @@ export const ChainsConfig: { [index: number]: IChainConfiguration } = { "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/2cbCwzhBbKkdpXtuNYkG5ch5dJDNAnTmeRhePDpkR4JV", coingeckoId: "ethereum", govMultisig: "0xBA5Ddb6Af728F01E91D77D12073548D823f6D1ef", + growthMultisig: "0x53E9152417EcD338E7e85cCFBc1F5eDA053C910c", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], uniswapSubgraph: "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3", - paymentSplitterFactory: "0x0aA1464dB005857Db8FC3E0470d306FB9E54b908", + paymentSplitterFactory: "0x8633212777Da1394bb379Df9520f098B014fB77b", infuraKey: "mainnet", provider: "https://eth-mainnet.g.alchemy.com/v2/gRQ81Lr6Vnbm5WgD4Et6csRjnEv3V83Z", }, @@ -67,12 +69,14 @@ export const ChainsConfig: { [index: number]: IChainConfiguration } = { vaultsNFTContract: "0x96E93876eB2314901ee9967488C650D77A50c705", hackersNFTContract: "0x2Ff0509D0e9a78Bf58815D768f4487f0645824F0", chain: wagmiChains.sepolia, - subgraph: "https://api.thegraph.com/subgraphs/name/hats-finance/hats_sepolia", + subgraph: + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/6q8vE8znoVRd2AqdGcgaF7j99Gtrrki4HwYDVMK8qaCf", coingeckoId: undefined, govMultisig: "0xFA6579F3Bb1793eFaB541de06763b872E11bfCBe", + growthMultisig: "0xA5BA173Cf84D532FE368690D37eff843678E0bFF", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], uniswapSubgraph: undefined, - paymentSplitterFactory: "0x09959581544511916A80185FFe3De3Df11D623D7", + paymentSplitterFactory: "0x8343D06cDFDe42cA0864029D5fE6138433A68a24", infuraKey: "sepolia", provider: "https://eth-goerli.g.alchemy.com/v2/HMtXCk0FyIfbiNAVm4Xcgr8Eqlc5_DKd", }, @@ -84,14 +88,16 @@ export const ChainsConfig: { [index: number]: IChainConfiguration } = { vaultsNFTContract: "0xD978eb90eB1b11213e320f4e6e910eB98D8DF1E4", hackersNFTContract: "0xC570c434ba30a2fa5C07E590833246E18aa6B0a3", chain: wagmiChains.optimism, - subgraph: "https://api.thegraph.com/subgraphs/name/hats-finance/hats_optimism", + subgraph: + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/vMkoKYXdwa5dww7FD6ra9EdLgA2E3hmz2Q3BxF8DEAW", coingeckoId: "optimistic-ethereum", govMultisig: "0x5A6910528b047d3371970dF764ba4046b7DfAd6a", + growthMultisig: "0x862966C9e09a3058DF47a29d30a429565E176D8B", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], uniswapSubgraph: "https://api.thegraph.com/subgraphs/name/ianlapham/optimism-post-regenesis", - paymentSplitterFactory: "0x028A7C6873dFA8357c9dcF9C9d76EF2abb66256E", + paymentSplitterFactory: "0x0aA1464dB005857Db8FC3E0470d306FB9E54b908", infuraKey: "optimism-mainnet", - provider: "https://winter-alien-reel.optimism.quiknode.pro/3b8fcb9fa592b6025c5ec16de15be9e85ed0e051", + provider: "", }, [wagmiChains.arbitrum.id]: { // vaultsCreatorContract: "0xa80d0a371f4d37AFCc55188233BB4Ad463aF9E48", v2 @@ -101,14 +107,16 @@ export const ChainsConfig: { [index: number]: IChainConfiguration } = { vaultsNFTContract: "0xD978eb90eB1b11213e320f4e6e910eB98D8DF1E4", hackersNFTContract: "0xC570c434ba30a2fa5C07E590833246E18aa6B0a3", chain: wagmiChains.arbitrum, - subgraph: "https://api.thegraph.com/subgraphs/name/hats-finance/hats_arbitrum", + subgraph: + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/GXUgxLXF1Ad2dmmxF5J24JUGKj6ko22t6esPkdLhKAz4", coingeckoId: "arbitrum-one", govMultisig: "0x022B95b4c02bbA85604506E6114485615b0aD09A", + growthMultisig: "0xBCa8856B5995092Df3f100436b0Ee8056A2E065a", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], uniswapSubgraph: "https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-minimal", - paymentSplitterFactory: "0x028A7C6873dFA8357c9dcF9C9d76EF2abb66256E", + paymentSplitterFactory: "0x83E0dfc2c1891Ada906D8F266029F2a416BC8b3f", infuraKey: "arbitrum-mainnet", - provider: "https://few-maximum-voice.arbitrum-mainnet.quiknode.pro/5abae8858e1e7248437717c16d14ff7193d6aae6", + provider: "", }, [wagmiChains.polygon.id]: { // vaultsCreatorContract: "0xa80d0a371f4d37AFCc55188233BB4Ad463aF9E48", v2 @@ -118,14 +126,16 @@ export const ChainsConfig: { [index: number]: IChainConfiguration } = { vaultsNFTContract: "0x878Cab06E6f4a85D90E5f236d326a41Ef6f44F9f", hackersNFTContract: "0x312917812e76d78C5B1139C28d5C1D3A272d171d", chain: wagmiChains.polygon, - subgraph: "https://api.thegraph.com/subgraphs/name/hats-finance/hats_polygon", + subgraph: + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/GH7Cv6XKuWYTMUrXcAfcqRmJRERPxFThyHtz1AeNCZQa", coingeckoId: "polygon-pos", govMultisig: "0xa5c6d757ca69c92eea05b22924d9774658e10c62", + growthMultisig: "0xa5c6d757ca69c92eea05b22924d9774658e10c62", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], uniswapSubgraph: "https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v3-polygon", - paymentSplitterFactory: "0xadd155731473A9501881234A865FF79668F1B6cF", + paymentSplitterFactory: "0x10C483158B8aF7e91CE7068bA45eb5446789851D", infuraKey: "polygon-mainnet", - provider: "https://frequent-billowing-smoke.matic.quiknode.pro/518ec9b749b64717da7d8495bdac26d1d27933d1", + provider: "", }, [wagmiChains.gnosis.id]: { // vaultsCreatorContract: "0x304A70840D8D43B288A6e4e4e718081BBcF160be", v2 @@ -135,27 +145,32 @@ export const ChainsConfig: { [index: number]: IChainConfiguration } = { vaultsNFTContract: "0x07368F6a959Ef3096230a258dd0af692699c3a4c", hackersNFTContract: "0xe198CBb727758b9Ad38a12E1ad475a843e5e730F", chain: wagmiChains.gnosis, - subgraph: "https://api.thegraph.com/subgraphs/name/hats-finance/hats_gnosis", + subgraph: + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/HPwWDxud8fSarSK8XfwSxcTkyKMQf7RwFmS7kPmTX9dD", coingeckoId: "xdai", govMultisig: "0xE650ba24115AE0260d8f723F89603DaF63b496cA", + growthMultisig: "0xE650ba24115AE0260d8f723F89603DaF63b496cA", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], - paymentSplitterFactory: "0x878Cab06E6f4a85D90E5f236d326a41Ef6f44F9f", + paymentSplitterFactory: "0x1065A9e3AC47f2624293727F4b8319A0a10F6015", // infuraKey: "polygon-mainnet", - provider: "https://frosty-convincing-choice.xdai.quiknode.pro/db844278bdba30f1567a37c679660797fbbea869", + provider: "", }, [wagmiChains.bsc.id]: { // vaultsCreatorContract: "0xD978eb90eB1b11213e320f4e6e910eB98D8DF1E4", v2 - vaultsCreatorContract: "0x58958226fb12DDfC407a7766d51baB2a88d08BF1", + vaultsCreatorContract: "0xABB34AB93589b0d026a192b6aaCAF8149db05c99", arbitratorContract: "0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF", rewardController: "0x0000000000000000000000000000000000000000", vaultsNFTContract: "0xcBe0b90bfe99f827B8BCB5C5Ac4b17107caEA814", hackersNFTContract: "0x028A7C6873dFA8357c9dcF9C9d76EF2abb66256E", chain: wagmiChains.bsc, - subgraph: "https://api.thegraph.com/subgraphs/name/hats-finance/hats_bsc", + subgraph: + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/4TWs2Y9gCpUPh1vMSogFuRbBqsUzE4FXgYFAoJmcx9Fc", coingeckoId: "binance-smart-chain", govMultisig: "0xbFBC2Ab80bD0A12258db952739238e403Be01ece", + growthMultisig: "0x6C4654Fe6Efe491D601ca2ff1842e179A5612c38", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], paymentSplitterFactory: "0xadd155731473A9501881234A865FF79668F1B6cF", + infuraKey: "bsc-mainnet", provider: "https://damp-dawn-scion.bsc.quiknode.pro/fa80c7f866eee193fef38c879e941fcb02e98dfb", }, [oasis.id]: { @@ -168,8 +183,27 @@ export const ChainsConfig: { [index: number]: IChainConfiguration } = { subgraph: "https://api.goldsky.com/api/public/project_clx0j1z1v44iz01wb4qol83tv/subgraphs/hats_oasis/0.0.1/gn", coingeckoId: "oasis-sapphire", govMultisig: "0xf2935671015c896D5E1fE4c97caF111F5eEe2b3c", + growthMultisig: "0xf2935671015c896D5E1fE4c97caF111F5eEe2b3c", whitelistedReviewers: ["0x5b7B59862447Cf3dE479C8166cc2784cbf8e53D6"], paymentSplitterFactory: "0xe198CBb727758b9Ad38a12E1ad475a843e5e730F", - provider: "", + provider: "https://sapphire2.oasis.io", + }, +}; + +export type AirdropFactoryConfig = { chain: wagmiChains.Chain; address: string }; +export const AirdropFactoriesChainConfig: { + test: { airdrop: AirdropFactoryConfig[]; pointdrop: AirdropFactoryConfig[] }; + prod: { airdrop: AirdropFactoryConfig[]; pointdrop: AirdropFactoryConfig[] }; +} = { + test: { + airdrop: [{ address: "0xcBd1763C9CD705DDf0b7aEbB7f36A7b00E890729", chain: wagmiChains.sepolia }], + pointdrop: [{ address: "0xCE94b023259E6a49EB37339aCaA3F8e711b88e04", chain: wagmiChains.sepolia }], + }, + prod: { + airdrop: [ + { address: "0xf4153be482582e4cD542E2214745a5D3cE5db128", chain: wagmiChains.arbitrum }, + { address: "0xF419C60ac4d9a9d7ea46Deb24c6346bDA41C2a9d", chain: wagmiChains.mainnet }, + ], + pointdrop: [], }, }; diff --git a/packages/shared/src/config/index.ts b/packages/shared/src/config/index.ts index b4a7d3567..b26475c8a 100644 --- a/packages/shared/src/config/index.ts +++ b/packages/shared/src/config/index.ts @@ -1,2 +1,3 @@ export * from "./chains"; +export * from "./token"; export * from "./custom_chains"; diff --git a/packages/shared/src/config/token.ts b/packages/shared/src/config/token.ts new file mode 100644 index 000000000..24ec59179 --- /dev/null +++ b/packages/shared/src/config/token.ts @@ -0,0 +1,45 @@ +import * as wagmiChains from "@wagmi/chains"; + +export const HATTokensConfig: { + test: { [chainId: number]: { address: string; decimals: number; symbol: string } }; + prod: { [chainId: number]: { address: string; decimals: number; symbol: string } }; +} = { + test: { + [wagmiChains.sepolia.id]: { + address: "0xbdb34bb8665510d331facaaaa0eeae994a5b6612", + decimals: 18, + symbol: "HAT", + }, + }, + prod: { + [wagmiChains.arbitrum.id]: { + address: "0x4D22e37Eb4d71D1acc5f4889a65936D2a44A2f15", + decimals: 18, + symbol: "HAT", + }, + [wagmiChains.mainnet.id]: { + address: "0x76c4ec0068923Da13Ee11527d6cF9b7521000049", + decimals: 18, + symbol: "HAT", + }, + }, +}; + +export const HATTokenLockFactoriesConfig: { + test: { [chainId: number]: { address: string } }; + prod: { [chainId: number]: { address: string } }; +} = { + test: { + [wagmiChains.sepolia.id]: { + address: "0x0153A75550E32CDf9a4458301bb89b600e745EAf", + }, + }, + prod: { + [wagmiChains.arbitrum.id]: { + address: "0x67aCdEb1a2b6cC7C77F9550a034aAd1f1e5A6C3C", + }, + [wagmiChains.mainnet.id]: { + address: "0x22262FB93e56D6109Fd6d630a31faaBF6A1a5987", + }, + }, +}; diff --git a/packages/shared/src/constants/severitiesOrder.ts b/packages/shared/src/constants/severitiesOrder.ts index 40900c2e0..ba24fb277 100644 --- a/packages/shared/src/constants/severitiesOrder.ts +++ b/packages/shared/src/constants/severitiesOrder.ts @@ -1 +1,11 @@ -export const severitiesOrder = ["formal verification", "gas saving", "low", "medium", "high", "critical"]; +export const severitiesOrder = [ + "formal verification", + "gas saving", + "base-fee", + "lead-auditor", + "minor", + "low", + "medium", + "high", + "critical", +]; diff --git a/packages/shared/src/types/editor.ts b/packages/shared/src/types/editor.ts index b1984656d..052ee0a4e 100644 --- a/packages/shared/src/types/editor.ts +++ b/packages/shared/src/types/editor.ts @@ -1,4 +1,5 @@ import { BigNumber } from "ethers"; +import { CuratorRole } from "./profile"; import { ICommitteeMember, IProtocolSetupInstructions, @@ -78,12 +79,18 @@ export interface IBaseEditedVaultDescription { type?: IVaultType; isPrivateAudit?: boolean; isContinuousAudit?: boolean; + requireMessageSignature?: boolean; + messageToSign?: string; whitelist: { address: string }[]; endtime?: number; starttime?: number; emails: IEditedCommunicationEmail[]; oneLiner?: string; intendedCompetitionAmount?: number; + curator?: { + username: string; + role: CuratorRole; + }; }; committee: { chainId?: string; @@ -176,7 +183,7 @@ export interface ICreateVaultOnChainCall { isTokenLockRevocable: boolean; // New in v3 } -export type IAddressRoleInVault = "gov" | "committee" | "committee-multisig" | "reviewer" | "none"; +export type IAddressRoleInVault = "gov" | "growth" | "committee" | "committee-multisig" | "reviewer" | "none"; export interface IVaultStatusData { descriptionHash: string; diff --git a/packages/shared/src/types/payout.ts b/packages/shared/src/types/payout.ts index 4ffaf702e..ac9407c7a 100644 --- a/packages/shared/src/types/payout.ts +++ b/packages/shared/src/types/payout.ts @@ -42,6 +42,18 @@ export interface IPayoutResponse { updatedAt?: Date; } +export type GithubIssue = { + id: number; + number: number; + title: string; + createdBy: number; + labels: string[]; + validLabels: string[]; + createdAt: string; + body: string; + txHash?: string; +}; + export type IPayoutData = ISinglePayoutData | ISplitPayoutData; interface IPayoutDataBase { @@ -53,6 +65,7 @@ interface IPayoutDataBase { vault?: IVault; stopAutocalculation?: boolean; depositors?: { address: string; shares: number; ownership: number }[]; + curator?: { username: string; address: string; role: string; percentage: number }; } export interface ISinglePayoutData extends IPayoutDataBase { @@ -63,6 +76,7 @@ export interface ISinglePayoutData extends IPayoutDataBase { nftUrl: string; submissionData?: { id: string; subId: string; idx: number }; decryptedSubmission?: Omit; // Omit: workaround to avoid circular dependency; + ghIssue?: GithubIssue; } // Only for v2 vaults @@ -83,11 +97,12 @@ export interface ISplitPayoutData extends IPayoutDataBase { export interface ISplitPayoutBeneficiary { beneficiary: string; - severity: string | "depositor" | "governance"; // Severity name + severity: string | "depositor" | "governance" | "curator"; // Severity name percentageOfPayout: string; // Number between 0 and 100 nftUrl: string; submissionData?: { id: string; subId: string; idx: number }; decryptedSubmission?: Omit; // Omit: workaround to avoid circular dependency; + ghIssue?: GithubIssue; } export interface IPayoutSignature { diff --git a/packages/shared/src/types/profile.ts b/packages/shared/src/types/profile.ts index a1ee0a3da..83b8b2cc4 100644 --- a/packages/shared/src/types/profile.ts +++ b/packages/shared/src/types/profile.ts @@ -13,4 +13,18 @@ export interface IHackerProfile { twitter?: { id: string; name: string; username: string }; github?: { id: string; name: string; username: string }; }; + curatorApplication?: { + roles: CuratorRole[]; + services: string[]; + whyInterested: string; + workedWithweb3Security: boolean; + workedWithweb3SecurityDescription?: string; + shortBio: string; + termsAndConditions: boolean; + telegramHandle: string; + discordHandle: string; + status: "pending" | "approved" | "rejected"; + }; } + +export type CuratorRole = "growthSeeker" | "growthGenius" | "growthWizard"; diff --git a/packages/shared/src/types/types.ts b/packages/shared/src/types/types.ts index 97f1f2963..f216c5355 100644 --- a/packages/shared/src/types/types.ts +++ b/packages/shared/src/types/types.ts @@ -1,3 +1,4 @@ +import { CuratorRole } from "./profile"; import { ISubmissionMessageObject } from "./submissions"; export interface IVaultInfo { @@ -139,11 +140,17 @@ interface IBaseVaultDescription { type?: IVaultType; isPrivateAudit?: boolean; isContinuousAudit?: boolean; + requireMessageSignature?: boolean; + messageToSign?: string; whitelist: { address: string }[]; endtime?: number; starttime?: number; oneLiner?: string; intendedCompetitionAmount?: number; + curator?: { + username: string; + role: CuratorRole; + }; }; "communication-channel": { "pgp-pk": string | string[]; diff --git a/packages/shared/src/utils/gnosis.utils.ts b/packages/shared/src/utils/gnosis.utils.ts index eac8dd183..e18deea6f 100644 --- a/packages/shared/src/utils/gnosis.utils.ts +++ b/packages/shared/src/utils/gnosis.utils.ts @@ -26,6 +26,8 @@ export const getGnosisChainNameByChainId = (chainId: number): string => { return "gnosis-chain"; case sepolia.id: return "sepolia"; + case oasis.id: + return "oasis"; default: throw new Error(`Gnosis doesn't support chainId:${chainId} yet`); } @@ -53,17 +55,23 @@ export const getGnosisChainPrefixByChainId = (chainId: number): string => { return "gno"; case sepolia.id: return "sep"; + case oasis.id: + return "sapphire"; default: throw new Error(`Gnosis doesn't support chainId:${chainId} yet`); } }; export const getGnosisSafeTxServiceBaseUrl = (chainId: number): string => { - if (chainId === meter.id) return `https://safe-gateway.meter.io/txs`; - if (chainId === oasis.id) return `https://transaction.safe.oasis.io/`; + if (chainId === oasis.id) return `https://transaction.safe.oasis.io`; return `https://safe-transaction-${getGnosisChainNameByChainId(chainId)}.safe.global`; }; +export const getBaseSafeAppUrl = (chainId: number): string => { + if (chainId === oasis.id) return `https://safe.oasis.io`; + return `https://app.safe.global`; +}; + export const getSafeWalletConnectLink = (address: string, chainId: number): string | undefined => { const safeDashboardLink = getSafeDashboardLink(address, chainId); if (!safeDashboardLink) return undefined; @@ -75,6 +83,9 @@ export const getSafeDashboardLink = (address: string, chainId: number): string | try { if (!chainId) return ""; const checksummedSafeAddress = utils.getAddress(address); + + if (chainId === oasis.id) + return `https://safe.oasis.io/apps/open?safe=${getGnosisChainPrefixByChainId(chainId)}:${checksummedSafeAddress}`; return `https://app.safe.global/apps/open?safe=${getGnosisChainPrefixByChainId(chainId)}:${checksummedSafeAddress}`; } catch (error) { return undefined; @@ -85,6 +96,9 @@ export const getSafeHomeLink = (address: string, chainId: number): string | unde try { if (!chainId) return ""; const checksummedSafeAddress = utils.getAddress(address); + + if (chainId === oasis.id) + return `https://safe.oasis.io/home?safe=${getGnosisChainPrefixByChainId(chainId)}:${checksummedSafeAddress}`; return `https://app.safe.global/home?safe=${getGnosisChainPrefixByChainId(chainId)}:${checksummedSafeAddress}`; } catch (error) { return undefined; diff --git a/packages/shared/src/utils/hattoken.utils.ts b/packages/shared/src/utils/hattoken.utils.ts new file mode 100644 index 000000000..f112a66aa --- /dev/null +++ b/packages/shared/src/utils/hattoken.utils.ts @@ -0,0 +1,71 @@ +import axios from "axios"; +import { ChainsConfig } from "../config"; + +export const getHATTokenTotalSupply = async (chainId: number): Promise => { + if (!chainId) return 0; + + try { + const GET_HAT_TOKEN_TOTAL_SUPPLY = ` + query getHATTokenTotalSupply { + hattokens { + totalSupply + } + } + `; + + const subgraphResponse = axios.post( + ChainsConfig[chainId].subgraph, + JSON.stringify({ + query: GET_HAT_TOKEN_TOTAL_SUPPLY, + }), + { + headers: { + "Content-Type": "application/json", + }, + } + ); + const subgraphData = (await subgraphResponse).data; + + if (!subgraphData.data || !subgraphData.data?.hattokens) return 0; + + return subgraphData.data.hattokens[0].totalSupply; + + } catch (error) { + return 0; + } +}; + +export const getHATTokenBalanceOf = async (hatHolder: string, chainId: number): Promise => { + if (!hatHolder || !chainId) return 0; + + try { + const GET_HAT_TOKEN_BALANCE_OF = ` + query getHATTokenBalanceOf($hatHolder: String) { + hatholder(id: $hatHolder) { + balance + } + } + `; + + const subgraphResponse = axios.post( + ChainsConfig[chainId].subgraph, + JSON.stringify({ + query: GET_HAT_TOKEN_BALANCE_OF, + variables: { hatHolder: hatHolder.toLowerCase() }, + }), + { + headers: { + "Content-Type": "application/json", + }, + } + ); + const subgraphData = (await subgraphResponse).data; + + if (!subgraphData.data || !subgraphData.data?.hatholder) return 0; + + return subgraphData.data.hatholder.balance; + + } catch (error) { + return 0; + } +}; diff --git a/packages/shared/src/utils/index.ts b/packages/shared/src/utils/index.ts index 9268a09cf..d04ec5221 100644 --- a/packages/shared/src/utils/index.ts +++ b/packages/shared/src/utils/index.ts @@ -8,3 +8,5 @@ export * from "./statistics.utils"; export * from "./ipfs.utils"; export * from "./getOldTokenPrice"; export * from "./severityName"; +export * from "./tokenlocks.utils"; +export * from "./hattoken.utils"; diff --git a/packages/shared/src/utils/payouts.utils.ts b/packages/shared/src/utils/payouts.utils.ts index 1c039036f..e3ee9a197 100644 --- a/packages/shared/src/utils/payouts.utils.ts +++ b/packages/shared/src/utils/payouts.utils.ts @@ -165,17 +165,35 @@ export const getExecutePayoutSafeTransaction = async ( ); } - // Add governance as beneficiary + // Add governance ans curator as beneficiary // We are doing this because in v3 the govFees on-chain is 0%. We need to calculate it manually if (governancePercentage > 0) { const govWallet = ChainsConfig[Number(vaultInfo.chainId)].govMultisig; if (!govWallet) throw new Error(`Gov wallet not found on ChainsConfig for payout id: ${payout._id}`); + // Add curator as beneficiary + let remainingGovPoints = governancePoints; + if (payout.payoutData.curator) { + const curatorPercentage = payout.payoutData.curator.percentage / 100; + if (curatorPercentage < 0 || curatorPercentage > 50) { + throw new Error(`Invalid curator percentage for payout id: ${payout._id} and percentage ${curatorPercentage}`); + } + const curatorFees = curatorPercentage * remainingGovPoints; + remainingGovPoints = remainingGovPoints - curatorFees; + + beneficiariesToIterate.push({ + beneficiary: payout.payoutData.curator.address, + severity: "curator", + nftUrl: "", + percentageOfPayout: truncate(curatorFees, 4), + } as ISplitPayoutBeneficiary); + } + beneficiariesToIterate.push({ beneficiary: govWallet, severity: "governance", nftUrl: "", - percentageOfPayout: truncate(governancePoints, 4), + percentageOfPayout: truncate(remainingGovPoints, 4), } as ISplitPayoutBeneficiary); } } diff --git a/packages/shared/src/utils/tokenlocks.utils.ts b/packages/shared/src/utils/tokenlocks.utils.ts new file mode 100644 index 000000000..0d9b2e960 --- /dev/null +++ b/packages/shared/src/utils/tokenlocks.utils.ts @@ -0,0 +1,207 @@ +import axios, { AxiosResponse } from "axios"; +import { ChainsConfig } from "../config"; + +export type IHATTokenLock = { + id: string; + chainId: number; + factory: string; + owner: string; + beneficiary: string; + token: string; + managedAmount: number; + startTime: number; + endTime: number; + periods: number; + releaseStartTime: number; + vestingCliffTime: number; + revocable: boolean; + canDelegate: boolean; + isAccepted: boolean; + isCanceled: boolean; + isRevoked: boolean; + releasedAmount: number; + hatBalance: number; +}; + +export const getAllTokenLocks = async (): Promise => { + const tokenLocks: IHATTokenLock[] = []; + let i = 0; + + do { + try { + const GET_ALL_TOKEN_LOCKS = ` + query getTokenLocks { + hattokenLocks(first: 1000, skip: ${i * 1000}) { + id + factory { + id + } + owner + beneficiary + token + managedAmount + startTime + endTime + periods + releaseStartTime + vestingCliffTime + revocable + canDelegate + isAccepted + isCanceled + isRevoked + releasedAmount + hatData { + balance + } + } + } + `; + + const subgraphsRequests = Object.values(ChainsConfig).map(async (chain) => { + return { + chainId: chain.chain.id, + request: await axios.post( + chain.subgraph, + JSON.stringify({ + query: GET_ALL_TOKEN_LOCKS, + }), + { + headers: { + "Content-Type": "application/json", + }, + } + ), + }; + }); + + const subgraphsResponses = await Promise.allSettled(subgraphsRequests); + const fulfilledResponses = subgraphsResponses.filter((response) => response.status === "fulfilled"); + const subgraphsData = fulfilledResponses.map( + (res) => (res as PromiseFulfilledResult<{ chainId: number; request: AxiosResponse }>).value + ); + + for (let i = 0; i < subgraphsData.length; i++) { + const chainId = subgraphsData[i].chainId; + + if (!subgraphsData[i].request.data || !subgraphsData[i].request.data?.data?.hattokenLocks) continue; + + for (const tokneLock of subgraphsData[i].request.data.data.hattokenLocks) { + tokenLocks.push({ + chainId, + id: tokneLock.id, + factory: tokneLock.factory.id, + owner: tokneLock.owner, + beneficiary: tokneLock.beneficiary, + token: tokneLock.token, + managedAmount: tokneLock.managedAmount, + startTime: tokneLock.startTime, + endTime: tokneLock.endTime, + periods: tokneLock.periods, + releaseStartTime: tokneLock.releaseStartTime, + vestingCliffTime: tokneLock.vestingCliffTime, + revocable: tokneLock.revocable, + canDelegate: tokneLock.canDelegate, + isAccepted: tokneLock.isAccepted, + isCanceled: tokneLock.isCanceled, + isRevoked: tokneLock.isRevoked, + releasedAmount: tokneLock.releasedAmount, + hatBalance: tokneLock.hatData?.balance ?? 0 + }); + } + } + + i++; + } catch (error) { + return []; + } + } while (tokenLocks.length != 0 && tokenLocks.length % 1000 == 0); + + return tokenLocks; +}; + +export const getTokenLocksForToken = async (tokenAddress: string, chainId: number): Promise => { + if (!tokenAddress || !chainId) return []; + + const tokenLocks: IHATTokenLock[] = []; + let i = 0; + + do { + try { + const GET_TOKEN_LOCKS_FOR_TOKEN = ` + query getTokenLocks($tokenAddress: Bytes) { + hattokenLocks(where: {token: $tokenAddress}, first: 1000, skip: ${i * 1000}) { + id + factory { + id + } + owner + beneficiary + token + managedAmount + startTime + endTime + periods + releaseStartTime + vestingCliffTime + revocable + canDelegate + isAccepted + isCanceled + isRevoked + releasedAmount + hatData { + balance + } + } + } + `; + + const subgraphResponse = axios.post( + ChainsConfig[chainId].subgraph, + JSON.stringify({ + query: GET_TOKEN_LOCKS_FOR_TOKEN, + variables: { tokenAddress }, + }), + { + headers: { + "Content-Type": "application/json", + }, + } + ); + const subgraphData = (await subgraphResponse).data; + + if (!subgraphData.data || !subgraphData.data?.hattokenLocks) return []; + + for (const tokneLock of subgraphData.data.hattokenLocks) { + tokenLocks.push({ + chainId, + id: tokneLock.id, + factory: tokneLock.factory.id, + owner: tokneLock.owner, + beneficiary: tokneLock.beneficiary, + token: tokneLock.token, + managedAmount: tokneLock.managedAmount, + startTime: tokneLock.startTime, + endTime: tokneLock.endTime, + periods: tokneLock.periods, + releaseStartTime: tokneLock.releaseStartTime, + vestingCliffTime: tokneLock.vestingCliffTime, + revocable: tokneLock.revocable, + canDelegate: tokneLock.canDelegate, + isAccepted: tokneLock.isAccepted, + isCanceled: tokneLock.isCanceled, + isRevoked: tokneLock.isRevoked, + releasedAmount: tokneLock.releasedAmount, + hatBalance: tokneLock.hatData?.balance ?? 0 + }); + } + + i++; + } catch (error) { + return []; + } + } while (tokenLocks.length != 0 && tokenLocks.length % 1000 == 0); + + return tokenLocks; +}; diff --git a/packages/shared/src/utils/vaultEditor.utils.ts b/packages/shared/src/utils/vaultEditor.utils.ts index b553b0c20..7ab474adc 100644 --- a/packages/shared/src/utils/vaultEditor.utils.ts +++ b/packages/shared/src/utils/vaultEditor.utils.ts @@ -447,9 +447,9 @@ export function editedFormToCreateVaultOnChainCall( descriptionHash, bountyGovernanceHAT: formatPercentage(getHatsFee()), bountyHackerHATVested: formatPercentage(editedVaultDescription.parameters.fixedHatsRewardPercetange ?? 0), - arbitratorCanChangeBeneficiary: true, - arbitratorCanChangeBounty: true, - arbitratorCanSubmitClaims: true, + arbitratorCanChangeBeneficiary: false, + arbitratorCanChangeBounty: false, + arbitratorCanSubmitClaims: false, isTokenLockRevocable: false, arbitrator: ChainsConfig[+(editedVaultDescription.committee.chainId ?? "1")].arbitratorContract, } as ICreateVaultOnChainCall; diff --git a/packages/shared/src/utils/vaults.utils.ts b/packages/shared/src/utils/vaults.utils.ts index 196d01d37..e5e9d0471 100644 --- a/packages/shared/src/utils/vaults.utils.ts +++ b/packages/shared/src/utils/vaults.utils.ts @@ -9,8 +9,11 @@ import { fixObject } from "./vaultEditor.utils"; export type IVaultInfoWithCommittee = IVaultInfo & { committee: string; registered: boolean }; type IVaultInfoWithCommitteeNoHatsGovFee = Omit; +export type IVaultInfoWithCommitteeAndRewardControllers = IVaultInfoWithCommitteeNoHatsGovFee & { + rewardControllers: { id: string; token: string; tokenSymbol: string; tokenDecimals: string }[]; +}; -export const getAllVaultsInfoWithCommittee = async (): Promise => { +export const getAllVaultsInfoWithCommittee = async (): Promise => { try { const GET_ALL_VAULTS = ` query getVaults { @@ -25,6 +28,12 @@ export const getAllVaultsInfoWithCommittee = async (): Promise (res as PromiseFulfilledResult<{ chainId: number; request: AxiosResponse }>).value ); - const vaults: IVaultInfoWithCommitteeNoHatsGovFee[] = []; + const vaults: IVaultInfoWithCommitteeAndRewardControllers[] = []; for (let i = 0; i < subgraphsData.length; i++) { const chainId = subgraphsData[i].chainId; @@ -69,6 +78,7 @@ export const getAllVaultsInfoWithCommittee = async (): Promise reviewer.toLowerCase()); const isWhiteListedEditor = whitelistedReviewersLowerCase.includes(address.toLowerCase()); @@ -258,6 +270,7 @@ export const getAddressRoleOnVault = async ( if (isCommitteeMultisigMember) return "committee"; if (isCommitteeMultisig) return "committee-multisig"; if (isGovMember) return "gov"; + if (isGrowthMember) return "growth"; if (isWhiteListedEditor) return "reviewer"; return "none"; }; @@ -282,6 +295,7 @@ export const getAllVaultsWithDescription = async (onlyMainnet = true): Promise + + + + Hats Euler CTF Terms final + + + +

CAPTURE THE FLAG TERMS AND CONDITIONS

+


+

+ Please read these Capture the Flag Terms and Conditions (these “Terms and Conditions”) carefully. These Terms and + Conditions are by and between you and Hats Finance. By clicking accept, agree, clicking a check box or agreeing to a similar + term indicating consent to these terms or otherwise participating in the Program, you herby agree to the terms of these + Terms and Conditions. +

+

+ By participating in the Program, you affirm that you are of legal age to enter into these Terms and Conditions. +

+


+

+ IF YOU ARE AN INDIVIDUAL PARTICIPATING IN THE PROGRAM ON BEHALF OF, + OR FOR THE BENEFIT OF, ANY CORPORATION, + PARTNERSHIP OR OTHER ENTITY WITH WHICH YOU ARE ASSOCIATED (AN ORGANIZATION”), THEN YOU ARE AGREEING TO THESE TERMS AND CONDITIONS ON BEHALF OF YOURSELF AND SUCH ORGANIZATION, + AND YOU REPRESENT AND WARRANT THAT YOU HAVE THE LEGAL AUTHORITY TO BIND SUCH ORGANIZATION TO THESE TERMS AND CONDITIONS. IN SUCH CASE, + REFERENCES TO PARTICIPANT” “YOU” + AND YOURIN THESE TERMS AND CONDITIONS WILL REFER TO THE ORGANIZATION. +

+


+
    +
  1. +

    + Definitions. +

    +

    + Unless otherwise defined in the body of these Terms and Conditions, defined terms have the + following meanings: +

    +
      +
    1. +

      + Affiliated Entities” means a party and their respective shareholders, + directors, officers, employees, affiliates, agents, representatives, licensors, suppliers and service providers. +

      +
    2. +
    3. +

      + Applicable Laws” means all laws, statutes, ordinances, regulations, and rules + of any governmental authority, regulatory body, or agency having jurisdiction over the parties or the subject matter + of these Terms and Conditions. This specifically includes the United States Department of the Treasury’s Office of + Foreign Assets Control (OFAC), the United Nations Security Council, the European Union, and other laws and + regulations relating to economic sanctions, restrictions, trade embargoes, and export controls imposed by any + government or international organization, including those imposed by the United Kingdom and the Cayman Islands. +

      +
    4. +
    5. +

      + Euler” means The Euler Foundation, the entity sponsoring the Program. +

      +
    6. +
    7. +

      + Euler Protocol” means Euler’s or its applicable affiliates’ protocol, + software, products, applications, systems, platform, hardware, equipment, or services, including Euler’s live + contracts. +

      +
    8. +
    9. +

      + Participant Data” means information, data, and other content, in any form or + medium, that is submitted, posted, or otherwise transmitted or made available by or on behalf of Participant in + connection with the Program. +

      +
    10. +
    11. +

      + Participant” means the person or entity participating in the Program. +

      +
    12. +
    13. +

      + Program” means the security initiative called Euler CTF Challenge; a “capture + the flag” security event aimed at motivating participants to rigorously test Euler’s smart contracts in exchange for + a Reward to a successful Submission. During the Program Period, Participant will seek to exploit the USDC/ETH and + WETH/USDC pools within Euler’s live contracts to claim the Reward. +

      +
    14. +
    15. +

      + Reward(s)” means the financial reward that may be awarded to a Participant + that meets the applicable requirements set forth in these Terms and Conditions. +

      +
    16. +
    17. +

      + Sanctioned Jurisdictions” means the following jurisdictions: (a) Russia; (b) + Iran; (c) Cuba; (d) North Korea; (e) Syria; (f) Myanmar (Burma); and (g) Crimea, Donetsk, and (f) Luhansk regions in + Ukraine. +

      +
    18. +
    19. +

      + Submission” means documents and related materials evidencing Participant’s + activities related to a Program, including Vulnerability Reports. +

      +
    20. +
    21. +

      + Vulnerability Report” means bug reports or other vulnerability information, + in text, graphics, image, software, works of authorship of any kind, and information or other material that a + Participant may provide or otherwise make available through the Program to Hats and Euler resulting from + participation in a Program. +

      +
    22. +
    +
  2. +
  3. +

    + Changes. We may change these Terms and Conditions from time to time by notifying you of such changes, including by posting a + revised Agreement through the Program. Any such changes will not apply to any dispute between you and us arising prior + to the date on which we posted the revised Agreement incorporating such changes, or otherwise notified you of such + changes. +

    +

    + Your participation in the Program following any changes to these Terms and Conditions will constitute your acceptance of + such changes. The “Last Updated” legend above indicates when these Terms and Conditions was last changed. We may, + at any time and without liability, modify or discontinue all or part of the Program (including access to the Program via + any third-party links); or offer opportunities to some or all Participants. +

    +
  4. +
  5. +

    + Program Terms. +

    +
      +
    1. +

      + Objective. Euler aims to reward those who are able to exploit the USDC/ETH and + WETH/USDC pools within Euler’s live contracts. To be eligible for a Reward, a Participant must meet all of the + applicable requirements set forth in these Term and Conditions and not violate any Applicable Laws. +

      +
    2. +
    3. +

      + Program Duration. The Program commences on at noon ET on August 21, 2024, and + ends at noon ET on September 2, 2024. (the “Program Period”). +

      +
    4. +
    +
  6. +
  7. +

    + Participant Eligibility. +

    +
      +
    1. +

      + KYC. Prior to receiving a Reward and within forty eight (48) hours of providing notification that it Accessed the + Funds in accordance with Section § 6.2(a)(ii), Participant must successfully start a (a) KYC process conducted in accordance with Applicable Laws; + and (b) screening to ensure regulatory compliance and sanctions screening under Applicable Law, including against + the U.S. Office of Foreign Assets Control (OFAC) sanctions list. +

      +
    2. +
    3. +

      + Sanctioned  Jurisdictions. In order to claim a Reward, Participants must + not be from any Sanctioned Jurisdiction. +

      +
    4. +
    5. +

      + Failure to Complete KYC. Participant will comply with all KYC requests and + agrees that any failure to complete the KYC process and sanctions screening in accordance with these Terms and + Conditions may result in legal actions and forfeiture of any Funds (defined below) Accessed (defined below) in + connection with the Program. +

      +
    6. +
    +
  8. +
  9. +

    + Scope of Program. +

    +
      +
    1. +

      + Wallet. You must participate in the Program with the same wallet address used + to sign these Terms and Conditions. +

      +
    2. +
    3. +

      + Program Scope. To be eligible for a Reward, the situation must involve: +

      +
        +
      1. +

        + Funds in the following smart contracts, limited to 575 ETH and $2 million USDC + in: Vault eWETH-2, Vault eUSDC-2. The specific smart contract addresses will be provided upon acceptance of + these Terms and Conditions. +

        +


        +
      2. +
      +
    4. +
    5. +

      + Program Out of Scope. Explicitly out of scope scenarios: +

      +
        +
          +
            +
              +
            1. +

              + You acknowledge and agree that certain pricing-related issues or bugs and + defects are outside the scope of this Program and therefore ineligible for Rewards. Specifically, the + following are considered ineligible: +

              +
                +
              1. +

                + Third-Party Pricing Discrepancies. + Any inaccuracies or other issues related to price data provided by third-party platforms, including + Chainlink or Lido, will not be considered valid for claiming a Reward. +

                +
              2. +
              3. +

                + Underlying Token Bugs or Defects. Any bugs or other defects + inherent to the underlying tokens utilized in the competition, including but not limited to USDC and + WETH, are ineligible for claiming Rewards. +

                +
              4. +
              +
            2. +
            3. +

              + Other programs or contests, including separate bug bounty programs, offered + by Euler. +

              +
            4. +
            5. +

              + Any information or other findings or discoveries that do not lead to Funds + Access. +

              +
            6. +
            +
          +
        +
      +
    6. +
    +
  10. +
  11. +

    + Submissions and Reward Terms. +

    +
      +
    1. +

      + Submissions. Prior to awarding a Reward, a Participant must submit a + Submission in accordance with the following requirements: +

      +
        +
      1. +

        + Detailed description as to how Participant Accessed the Funds, including + providing detailed Vulnerability Reports related thereto. +

        +
      2. +
      +
    2. +
    3. +

      + Rewards. +

      +
        +
          +
            +
              +
            1. +

              + For the avoidance of doubt, as the sole and exclusive Reward, Participants + may retain amounts they exploit from the USDC/ETH and WETH/USDC pools within Euler’s live contracts during + the Program Period subject to meeting the applicable requirements herein. In no event will Hats, Euler, or + any other person or entity be required to pay, provide, or award any amount to any Participant other than + the Funds (defined below) Accessed (defined below) pursuant to Section 6.2(a)(ii) below. +

              +
            2. +
            3. +

              + Upon exploiting, withdrawing, transferring, accessing or otherwise + obtaining (each an “Access” or “Accessed”) any USDC/ETH or WETH/USDC pools within Euler’s + live contracts (collectively “Funds”) during the Program Period, Participant will immediately, but + in no event less than twenty four (24) hours following such Access, notify Hats of such Access via the + communication established by Hats on its website (namely, the Euler CTF +

              +

              + vault on Hats dapp) and promptly provide all information requested by Hats + or Euler, including the amount of Funds Accessed. Upon determination by Hats and Euler that Participant + has met all requirements set forth herein, including those in Sections 4 - 6, Hats will provide written + notice to Participant that it may claim the Reward. Such determination will be made at Hats and Euler’s + sole and exclusive discretion. +

              +
            4. +
            5. +

              + If Hats or Euler notifies Participant that Participant is not eligible for + or cannot otherwise claim the Reward, Participant will immediately following such notification, but in no + less than two (2) business days thereafter, return any Funds it Accessed to an account and via the + transfer mechanism directed by Euler. +

              +
            6. +
            +
          +
        +
      +
    4. +
    +
  12. +
  13. +

    + Payment Terms. +

    +
      +
    1. +

      + Hats Fee. Participant will pay Hats a fee equal to five percent (5%) of the + Reward awarded to that Participant (“Hats Fee”) within thirty (30) days of the date that the Reward is + awarded. Participant will pay Hats the Hats Fee via the payment mechanism directed by Hats- namely, the Hats gov + wallet address. +

      +
    2. +
    3. +

      + Taxes. + Participant is responsible for any duties, customs, fees, or taxes due on any Reward, excluding any taxes imposed + on Hats’ income. +

      +
    4. +
    +
  14. +
  15. +

    + Information Submitted Through the Program. Participant’s submission of information or content in connection with the Program is governed by Hat’s Privacy + Policy, located at https://docs.hats.finance/ miscellaneous/privacy-policy (the “Privacy Policy”). Participant represents and warrants that any information it provides in connection with the Program is and will + remain accurate and complete, and that it will maintain and update such information as needed. +

    +
  16. +
  17. +

    + Jurisdictional Issues. Any participation in the Program is at Participant’s own risk, and Participant must comply with all Applicable Laws + in doing so. No person from any of the Sanctioned Jurisdictions may participate in the Program. We may limit the + Program’s availability at any time, in whole or in part, to any person, geographic area or jurisdiction that we + choose. Legal actions will be taken if any Participants from the Sanctioned Jurisdictions participate in the Program + or withdraw any Funds. +

    +
  18. +
  19. +

    + Rules of Conduct. In connection with the Program, Participant must not: +

    +
      +
    1. +

      + Use the Euler Protocol for any commercial purpose, or for any purpose that is + fraudulent or otherwise tortious or unlawful. +

      +
    2. +
    3. +

      + Harvest or collect information about other Participants. +

      +
    4. +
    5. +

      + Reverse engineer, decompile or disassemble any portion of the Euler Protocol, except + where such restriction is expressly prohibited by Applicable Law, including after the Program Period. +

      +
    6. +
    7. +

      + Download and store information or content collected or accessed from the Euler + Protocol. +

      +
    8. +
    9. +

      + Interfere or attempt to interfere with the proper working of the Euler Protocol. +

      +
    10. +
    11. +

      + Participate in the Program for the benefit of a third party. +

      +
    12. +
    13. +

      + Restrict or inhibit any other person or entity from participating in the Program. +

      +
    14. +
    15. +

      + Use the Euler Protocol or Program to build an application or product that is + competitive with any Hats or Euler product or services. +

      +
    16. +
    +
  20. +
  21. +

    + Monitoring. We may (but have no obligation to) monitor, evaluate, or alter Submissions, or analyze Participant’s participation + in the Program. We may disclose information regarding your access to and participation in the Program, and the + circumstances surrounding such access and participation, to anyone for any reason or purpose. +

    +
  22. +
  23. +

    + Ownership and Licenses. +

    +
      +
    1. +

      + Ownership Property Rights. You agree that we may collect statistical and other + information about Participant Data and use that information for Hats’ or Euler’s benefit. Unless otherwise agreed in + writing, except for Participant Data, Euler and its licensors exclusively own all right, title, and interest in and + to the Euler Protocol and content contained on the Euler Protocol, including all intellectual property rights. You + may not use Hats or Euler’s trade names, trademarks, service marks or logos in connection with any product or + service that is not theirs, or in any manner that is likely to cause confusion. All trade names, trademarks, service + marks and logos on the Program not owned by Euler or Hats are the property of their respective owners. Nothing + contained on the Program should be construed as granting any right to use any trade names, trademarks, service marks + or logos without the express prior written consent of the owner. The Program, Euler Protocol and related content are + protected by copyright, trademark, and other laws of the United States and foreign countries. +

      +
    2. +
    3. +

      + Participant Data. By making any of Participant Data available through the + Program, you hereby grant to Hats a perpetual, irrevocable, non-exclusive, transferable, sublicensable, worldwide, + royalty- free license to use, copy, reproduce, display, modify, adapt, transmit, and distribute copies of + Participant Data, for the purposes of providing and improving the Program. +

      +
    4. +
    5. +

      + Feedback. By submitting any suggestions, comments, or other feedback, you + grant to Hats and Euler a worldwide, perpetual, irrevocable, non-exclusive, transferable, sublicensable, fully-paid, + and royalty-free license under any and all intellectual property rights that you may own or control to use, copy, + modify, create derivative works based upon, and otherwise exploit such feedback for any purpose. +

      +
    6. +
    +
  24. +
  25. +

    + Confidential Information. In connection with your participation in the Program, you may be exposed to or otherwise access information about + Hats’, Euler’s, or their Affiliated Entities’ (each a “Disclosing Party”) business affairs, Euler Protocol, products, confidential intellectual property, trade secrets, third- party + confidential information, and other sensitive or proprietary information, whether orally or in written, electronic, or + other form or media/in written or electronic form or media, and whether or not marked, designated, or otherwise + identified as “confidential” (collectively, “Confidential Information”). Confidential Information does not include information that, at the time of disclosure is: +

    +

    + (a) in the public domain; (b) known to Participant at the time of disclosure; (c) rightfully obtained by Participant on + a non-confidential basis from a third party; or (d) independently developed by Participant without reference to the + Confidential Information. Participant will not disclose the Disclosing Party’s Confidential Information to any person or + entity, except to Participant's employees who have a need to know the Confidential Information for Participant to + exercise its rights or perform its obligations hereunder. On the expiration or termination of the Agreement, Participant + will promptly return to the Disclosing Party all copies, whether in written, electronic, or other form or media, of the + Disclosing Party’s Confidential Information, or destroy all such copies and certify in writing to the Disclosing Party + that such Confidential Information has been destroyed. Participant’s obligations of non-disclosure with +

    +

    + regard to Confidential Information will survive the termination or expiration of these Terms and Conditions. +

    +
  26. +
  27. +

    + Non-Disparagement. Participant agrees and covenants that neither it, nor its employees, directors, owners, contractors, or other + personnel, will make, publish, or communicate defamatory or disparaging remarks, comments, or statements concerning + Euler, its Affiliated Entities, or the Euler Protocol. Participant agrees and covenants that neither it nor its + employees, directors, owners, contractors, or other personnel will make, publish, or communicate to any person or + entity or in any public forum any maliciously false, defamatory, or disparaging remarks, comments, or statements + concerning Euler, its Affiliated Entities their businesses or the Euler Protocol, or any of the their employees, + officers, directors, existing and prospective customers, suppliers, investors, and other associated third parties, now + or at any time in the future. +

    +
  28. +
  29. +

    + Indemnity. To the fullest extent permitted under Applicable Law, you agree to defend, indemnify and hold harmless Hats, Euler, + their Affiliated Entities, and their respective successors and assigns, from and against all claims, liabilities, + damages, judgments, awards, losses, costs, expenses and fees (including attorneys’ fees) arising out of or relating to + (a) your participation in the Program; and (b) any violation or alleged violation of these Terms and Conditions by + you, including any violations of Applicable Laws. +

    +
  30. +
  31. +

    + DISCLAIMER OF WARRANTIES. + TO THE FULLEST EXTENT PERMITTED UNDER APPLICABLE LAW: (A) THE PROGRAM, + AND YOUR PARTICIPATION THEREIN, IS MADE AVAILABLE TO YOU ON AN “AS IS,” “WHERE IS” + AND “WHERE AVAILABLE” + BASIS, WITHOUT ANY WARRANTIES OF ANY KIND, + WHETHER EXPRESS, IMPLIED OR STATUTORY; + AND (B) HATS, EULER, + AND THEIR AFFILIATED ENTITIES DISCLAIM ALL WARRANTIES WITH RESPECT TO THE PROGRAM, INCLUDING THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT AND TITLE. FOR THE AVOIDANCE OF DOUBT, ALL DISCLAIMERS OF ANY KIND (INCLUDING IN THIS SECTION AND ELSEWHERE IN THESE TERMS AND CONDITIONS) + ARE MADE FOR THE BENEFIT OF BOTH HATS AND ITS AFFILIATES AND THEIR “AFFILIATED ENTITIES, + AND THEIR RESPECTIVE SUCCESSORS AND ASSIGNS. +

    +


    +
  32. +
  33. +

    + LIMITATION OF LIABILITY. + TO THE FULLEST EXTENT PERMITTED UNDER APPLICABLE LAW: +

    +

    + (a) ​ Hats, Euler, and their affiliated entities will not be liable for any indirect, incidental, consequential, + special, exemplary or punitive damages of any kind, under any contract, tort (including negligence), strict liability or + other theory, including damages for loss of profits, service interruption, computer damage or system failure, use or + data, loss of other intangibles, loss of security of the reward (including unauthorized interception by third parties of + any reward), even if advised in advance of the possibility of such damages or losses; +

    +

    + (b) ​ without limiting the foregoing, Hats and Euler will not be liable for damages of any kind resulting from your use + of or inability to participate in the Program; (c) your sole and exclusive remedy for dissatisfaction with the +

    +

    + Program or Reward (including any failure to receive part of a Reward or the +

    +

    + entirety of the reward) is to cease participating in the Program; and (d) the maximum aggregate liability of Hats, + Euler, and their affiliated entities for all damages, losses and causes of action, whether in contract, tort (including + negligence) or otherwise, will be one hundred U.S. Dollars ($100). All limitations of liability of any kind (including + in this section and elsewhere in these Terms and Conditions) are made for the benefit of both Hats, Euler, their + Affiliated Entities, and their respective successors and assigns. +

    +
  34. +
  35. +

    + Third Party Beneficiary. Participant acknowledges and agrees that Euler is a third-party beneficiary of these Terms as if it were Hats, + including to the disclaimers, limitations of liabilities herein, and that Euler is entitled to enforce the terms + hereof as if it were an original party hereto. +

    +
  36. +
  37. +

    + Termination. These Terms and Conditions are effective until terminated. Hats may terminate or suspend your participation in the + Program at any time and without prior notice, for any or no reason, including if Hats believes that you have violated + or acted inconsistently with the letter or spirit of these Terms and Conditions. Upon any such termination or + suspension, your right to participate in the Program will immediately cease. Sections 1, 7, 8, 9, 10, 12, 13- 21 will + survive any expiration or termination of these Terms and Conditions. +

    +
  38. +
  39. +

    + Governing Law; Jurisdiction. These Terms and Conditions are governed by and construed in accordance with the laws of the Cayman Islands without + giving effect to any choice or conflict of law provision or rule that would require or permit the application of the + laws of any jurisdiction other than those of the Cayman Islands. Any legal suit, action, or proceeding arising out of + or related to these Terms and Conditions or the licenses granted hereunder will be instituted exclusively in the + courts of the Cayman Islands, and you irrevocably submit to the exclusive jurisdiction of such courts in any such + suit, action, or proceeding. +

    +
  40. +
  41. +

    + Miscellaneous. These Terms and Conditions does not, and will not be construed to, create any partnership, joint venture, + employer-employee, agency or franchisor-franchisee relationship between you and Hats or Euler. If any provision of + these Terms and Conditions are found to be unlawful, void or for any reason unenforceable, that provision will be + deemed severable from these Terms and Conditions and will not affect the validity and enforceability of any remaining + provision. You may not assign, transfer or sublicense any or all of your rights or obligations under these Terms and + Conditions without our express prior written consent. Any assignment, transfer or sublicense in violation of this + Section will be null and void. We may assign, transfer or sublicense any or all of our rights or obligations under + these Terms and Conditions without restriction. No waiver by either party of any breach or default under these Terms + and Conditions will be deemed to be a waiver of any preceding or subsequent breach or default. Any heading, caption or + section title contained herein is for convenience only, and in no way defines or explains any section or provision. + All terms defined in the singular will have the same meanings when used in the plural, where appropriate and unless + otherwise specified. Any use of the term “including” or variations thereof in these Terms and Conditions will be + construed as if followed by the phrase “without limitation.” These Terms and Conditions, including any terms and + conditions incorporated herein, is the entire agreement between you and Hats relating to the subject matter hereof, + and supersedes any and all prior or contemporaneous written or oral agreements or understandings between you and Hats + relating to such subject matter. Notices to you (including notices of changes to these Terms and Conditions) may be + made via posting to the Program or by e-mail (including in each case via links), or by regular mail. Without + limitation, a printed version of these Terms and Conditions and of any notice given in electronic form will be + admissible in judicial or administrative proceedings based upon or relating to these Terms and Conditions to the same + extent and subject to the same conditions as other business documents and records originally generated and maintained + in printed form. Hats will not be responsible for any failure to fulfill any obligation due to any cause beyond its + control. +

    +
  42. +
+

+ If you have any questions or concerns, please contact us at security@hats.finance + and security@euler.foundation. +

+ + diff --git a/packages/web/public/_headers b/packages/web/public/_headers index 7374fb50a..2ef63e3f0 100644 --- a/packages/web/public/_headers +++ b/packages/web/public/_headers @@ -1,6 +1,6 @@ # This is a comment /* - X-Frame-Options: DENY + X-Frame-Options: SAMEORIGIN Strict-Transport-Security: max-age=63072000; includeSubDomains; preload X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff \ No newline at end of file diff --git a/packages/web/sitemap-builder.js b/packages/web/sitemap-builder.js index 5089d3e67..4e9130884 100644 --- a/packages/web/sitemap-builder.js +++ b/packages/web/sitemap-builder.js @@ -19,12 +19,11 @@ query { } `; const subgraphs = [ - "https://api.thegraph.com/subgraphs/name/hats-finance/hats", - "https://api.thegraph.com/subgraphs/name/hats-finance/hats_optimism", - // "https://api.thegraph.com/subgraphs/name/hats-finance/hats_goerli", - // "https://api.thegraph.com/subgraphs/name/hats-finance/hats_optimism_goerli", - "https://api.thegraph.com/subgraphs/name/hats-finance/hats_arbitrum", - "https://api.thegraph.com/subgraphs/name/hats-finance/hats_polygon", + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/2cbCwzhBbKkdpXtuNYkG5ch5dJDNAnTmeRhePDpkR4JV", // Mainnet + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/vMkoKYXdwa5dww7FD6ra9EdLgA2E3hmz2Q3BxF8DEAW", // Optimism + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/GXUgxLXF1Ad2dmmxF5J24JUGKj6ko22t6esPkdLhKAz4", // Arbitrum + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/GH7Cv6XKuWYTMUrXcAfcqRmJRERPxFThyHtz1AeNCZQa", // Polygon + "https://gateway-arbitrum.network.thegraph.com/api/0ed4473ee53352068095380ea517339c/subgraphs/id/4TWs2Y9gCpUPh1vMSogFuRbBqsUzE4FXgYFAoJmcx9Fc", // BSC ]; const buildPath = "./build/sitemap.xml"; const publicUrl = "https://app.hats.finance"; @@ -55,7 +54,7 @@ const buildSitemap = async () => { }) ) .filter((res) => res != null) - .map((res) => res.data.vaults) + .map((res) => res.data?.vaults ?? []) .flat() .filter((vault) => vault.registered); const descriptionHashes = subgraphResults.map((vault) => vault.descriptionHash); diff --git a/packages/web/src/assets/icons/back-arrow.js b/packages/web/src/assets/icons/back-arrow.js new file mode 100644 index 000000000..cf984afe5 --- /dev/null +++ b/packages/web/src/assets/icons/back-arrow.js @@ -0,0 +1,7 @@ +export const BackArrowIcon = () => { + return ( + + + + ); +}; diff --git a/packages/web/src/assets/icons/chains/23294.png b/packages/web/src/assets/icons/chains/23294.png new file mode 100644 index 000000000..07ce94c99 Binary files /dev/null and b/packages/web/src/assets/icons/chains/23294.png differ diff --git a/packages/web/src/assets/icons/hats-token.svg b/packages/web/src/assets/icons/hats-token.svg new file mode 100644 index 000000000..d5a2cbff9 --- /dev/null +++ b/packages/web/src/assets/icons/hats-token.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/web/src/assets/icons/next-arrow.js b/packages/web/src/assets/icons/next-arrow.js new file mode 100644 index 000000000..0b49f3bec --- /dev/null +++ b/packages/web/src/assets/icons/next-arrow.js @@ -0,0 +1,7 @@ +export const NextArrowIcon = (props) => { + return ( + + + + ); +}; diff --git a/packages/web/src/assets/icons/social/twitter.icon.js b/packages/web/src/assets/icons/social/twitter.icon.js index f46921c59..05a5264cc 100644 --- a/packages/web/src/assets/icons/social/twitter.icon.js +++ b/packages/web/src/assets/icons/social/twitter.icon.js @@ -1,5 +1,23 @@ export default function TwitterIcon(props) { - return - - + return ( + + + + + + ); } diff --git a/packages/web/src/assets/images/hats_claim.png b/packages/web/src/assets/images/hats_claim.png new file mode 100644 index 000000000..2c9c78edc Binary files /dev/null and b/packages/web/src/assets/images/hats_claim.png differ diff --git a/packages/web/src/assets/images/hats_delegatee.png b/packages/web/src/assets/images/hats_delegatee.png new file mode 100644 index 000000000..c7167b429 Binary files /dev/null and b/packages/web/src/assets/images/hats_delegatee.png differ diff --git a/packages/web/src/assets/images/hats_vault.png b/packages/web/src/assets/images/hats_vault.png new file mode 100644 index 000000000..90bdcd35b Binary files /dev/null and b/packages/web/src/assets/images/hats_vault.png differ diff --git a/packages/web/src/assets/images/hats_vault_open.png b/packages/web/src/assets/images/hats_vault_open.png new file mode 100644 index 000000000..015b02fea Binary files /dev/null and b/packages/web/src/assets/images/hats_vault_open.png differ diff --git a/packages/web/src/assets/images/success_check.png b/packages/web/src/assets/images/success_check.png new file mode 100644 index 000000000..02881650a Binary files /dev/null and b/packages/web/src/assets/images/success_check.png differ diff --git a/packages/web/src/assets/images/vault-opening.gif b/packages/web/src/assets/images/vault-opening.gif new file mode 100644 index 000000000..1c298519e Binary files /dev/null and b/packages/web/src/assets/images/vault-opening.gif differ diff --git a/packages/web/src/assets/videos/airdrop-v2-mobile.mp4 b/packages/web/src/assets/videos/airdrop-v2-mobile.mp4 new file mode 100644 index 000000000..48a42ac62 Binary files /dev/null and b/packages/web/src/assets/videos/airdrop-v2-mobile.mp4 differ diff --git a/packages/web/src/assets/videos/airdrop-v2.mp4 b/packages/web/src/assets/videos/airdrop-v2.mp4 new file mode 100644 index 000000000..770450410 Binary files /dev/null and b/packages/web/src/assets/videos/airdrop-v2.mp4 differ diff --git a/packages/web/src/components/AirdropModalAlert/AirdropModalAlert.tsx b/packages/web/src/components/AirdropModalAlert/AirdropModalAlert.tsx new file mode 100644 index 000000000..1f78dd973 --- /dev/null +++ b/packages/web/src/components/AirdropModalAlert/AirdropModalAlert.tsx @@ -0,0 +1,32 @@ +import { Button } from "components"; +import { RoutePaths } from "navigation"; +import { useTranslation } from "react-i18next"; +import { useNavigate } from "react-router-dom"; +import { StyledAirdropModalAlert } from "./styles"; + +type AirdropModalAlertProps = { + onRedirect: () => void; +}; + +export const AirdropModalAlert = ({ onRedirect }: AirdropModalAlertProps) => { + const { t } = useTranslation(); + const navigate = useNavigate(); + + const goToAirdrop = () => { + onRedirect(); + navigate(`${RoutePaths.airdrop}`); + }; + + return ( + +
+ vault opening +
+

{t("Airdrop.hatsAirdropIsLive")}

+

{t("Airdrop.checkEligibilityNow")}

+

{t("Airdrop.checkEligibilityNowDescription")}

+ + +
+ ); +}; diff --git a/packages/web/src/components/AirdropModalAlert/styles.ts b/packages/web/src/components/AirdropModalAlert/styles.ts new file mode 100644 index 000000000..0de83b9e0 --- /dev/null +++ b/packages/web/src/components/AirdropModalAlert/styles.ts @@ -0,0 +1,37 @@ +import styled from "styled-components"; +import { getSpacing } from "styles"; + +export const StyledAirdropModalAlert = styled.div` + width: 420px; + max-width: 100%; + display: flex; + flex-direction: column; + align-items: center; + + .image { + border-radius: 500px; + overflow: hidden; + border: 1px solid var(--primary); + width: 70%; + margin-bottom: ${getSpacing(4)}; + margin-top: ${getSpacing(4)}; + + img { + width: 100%; + } + } + + h3 { + font-size: var(--moderate-big); + margin-bottom: ${getSpacing(1)}; + } + + h4 { + font-size: var(--moderate); + margin-bottom: ${getSpacing(2)}; + } + + p { + margin-bottom: ${getSpacing(6)}; + } +`; diff --git a/packages/web/src/components/CollapsableTextContent/CollapsableTextContent.tsx b/packages/web/src/components/CollapsableTextContent/CollapsableTextContent.tsx index 408dfe047..edc168214 100644 --- a/packages/web/src/components/CollapsableTextContent/CollapsableTextContent.tsx +++ b/packages/web/src/components/CollapsableTextContent/CollapsableTextContent.tsx @@ -1,18 +1,34 @@ +import ArrowIcon from "@mui/icons-material/KeyboardArrowDownOutlined"; import { useState } from "react"; import { StyledCollapsableTextContent } from "./styles"; -import ArrowIcon from "@mui/icons-material/KeyboardArrowDownOutlined"; export type CollapsableTextContentProps = { title: string; children: JSX.Element; noContentPadding?: boolean; + inverseArrow?: boolean; + titleBold?: boolean; + color?: string; }; -export const CollapsableTextContent = ({ title, children, noContentPadding = false }: CollapsableTextContentProps) => { +export const CollapsableTextContent = ({ + title, + children, + noContentPadding = false, + inverseArrow = false, + titleBold = false, + color, +}: CollapsableTextContentProps) => { const [isOpen, setIsOpen] = useState(false); return ( - +
setIsOpen((prev) => !prev)}>

{title}

diff --git a/packages/web/src/components/CollapsableTextContent/styles.ts b/packages/web/src/components/CollapsableTextContent/styles.ts index 574c63584..ff0d8b5ed 100644 --- a/packages/web/src/components/CollapsableTextContent/styles.ts +++ b/packages/web/src/components/CollapsableTextContent/styles.ts @@ -1,13 +1,26 @@ import styled, { css } from "styled-components"; import { getSpacing } from "styles"; -export const StyledCollapsableTextContent = styled.div<{ isOpen: boolean; noContentPadding: boolean }>( - ({ isOpen, noContentPadding }) => css` +export const StyledCollapsableTextContent = styled.div<{ + isOpen: boolean; + noContentPadding: boolean; + inverseArrow: boolean; + titleBold: boolean; + color: string | undefined; +}>( + ({ isOpen, noContentPadding, inverseArrow, color = "var(--secondary-light", titleBold }) => css` .title-container { display: flex; + flex-direction: ${inverseArrow ? "row-reverse" : "row"}; gap: ${getSpacing(1)}; - color: var(--secondary-light); + color: ${color}; cursor: pointer; + width: fit-content; + + ${titleBold && + css` + font-weight: 700; + `} &:hover { color: var(--secondary); @@ -27,11 +40,13 @@ export const StyledCollapsableTextContent = styled.div<{ isOpen: boolean; noCont margin-left: ${noContentPadding ? 0 : getSpacing(3.5)}; overflow: hidden; display: none; + color: var(--grey-400); ${isOpen && css` display: block; - margin-top: ${getSpacing(1.5)}; + margin-top: ${getSpacing(0.5)}; + margin-bottom: ${getSpacing(2)}; `} } ` diff --git a/packages/web/src/components/ConfirmDialog/ConfirmDialog.tsx b/packages/web/src/components/ConfirmDialog/ConfirmDialog.tsx index 62a142723..3e880d1a6 100644 --- a/packages/web/src/components/ConfirmDialog/ConfirmDialog.tsx +++ b/packages/web/src/components/ConfirmDialog/ConfirmDialog.tsx @@ -14,6 +14,7 @@ type ConfirmDialogProps = { description?: string; titleIcon?: string | React.ReactElement; bodyComponent?: React.ReactElement; + noCancel?: boolean; confirmTextInput?: { label: string; placeholder: string; @@ -32,6 +33,7 @@ function ConfirmDialog({ titleIcon, bodyComponent, confirmTextInput, + noCancel = false, }: ConfirmDialogProps) { const { t } = useTranslation(); @@ -74,9 +76,11 @@ function ConfirmDialog({
- + {!noCancel && ( + + )} +
+ )} +
{isSafeAddress !== undefined && !isSafeAddress && account && !isLoadingProfile && ( <> {!!createdProfile ? ( @@ -88,6 +106,12 @@ const Header = () => { )}
+ {isAirdropEnabled && account && ( + + )} + diff --git a/packages/web/src/components/Header/styles.ts b/packages/web/src/components/Header/styles.ts index 8df11fb62..f5f550af7 100644 --- a/packages/web/src/components/Header/styles.ts +++ b/packages/web/src/components/Header/styles.ts @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { getSpacing } from "styles"; +import { getPrimaryGradientVariant, getSpacing } from "styles"; import { breakpointsDefinition } from "styles/breakpoints.styles"; export const StyledHeader = styled.header` @@ -71,6 +71,13 @@ export const StyledHeader = styled.header` } } } + + .airdrop-button { + button { + background: ${getPrimaryGradientVariant()}; + font-family: "IBM Plex Mono", monospace; + } + } } } `; diff --git a/packages/web/src/components/Modal/Modal.tsx b/packages/web/src/components/Modal/Modal.tsx index d0f04785d..775b940d4 100644 --- a/packages/web/src/components/Modal/Modal.tsx +++ b/packages/web/src/components/Modal/Modal.tsx @@ -15,6 +15,7 @@ interface ModalProps { removeHorizontalPadding?: boolean; capitalizeTitle?: boolean; disableClose?: boolean; + hideCloseIcon?: boolean; disableOnOverlayClose?: boolean; overflowVisible?: boolean; removeAnimation?: boolean; @@ -35,6 +36,7 @@ export function Modal({ capitalizeTitle = false, overflowVisible = false, removeAnimation = false, + hideCloseIcon = false, }: ModalProps) { const [localShowModal, setLocalShowModal] = useState(isShowing); // const inTransaction = useTransactions().transactions.some((tx) => !tx.receipt); @@ -80,6 +82,7 @@ export function Modal({ removeHorizontalPadding={removeHorizontalPadding} overflowVisible={overflowVisible} capitalizeTitle={capitalizeTitle} + hideCloseIcon={hideCloseIcon} >
@@ -91,7 +94,7 @@ export function Modal({ {titleIcon && typeof titleIcon === "string" ? icon : titleIcon} {title && {title}}
- {!disableClose && ( + {!disableClose && !hideCloseIcon && ( diff --git a/packages/web/src/components/Modal/styles.ts b/packages/web/src/components/Modal/styles.ts index a3e653275..c8bb7cc51 100644 --- a/packages/web/src/components/Modal/styles.ts +++ b/packages/web/src/components/Modal/styles.ts @@ -43,6 +43,7 @@ export const ModalContainer = styled.div<{ withIcon: boolean; disableClose: boolean; overflowVisible: boolean; + hideCloseIcon: boolean; }>( ({ withTitleDivider, @@ -52,6 +53,7 @@ export const ModalContainer = styled.div<{ disableClose, removeTopPadding, overflowVisible, + hideCloseIcon, }) => css` position: relative; max-width: calc(100vw - ${getSpacing(6)}); @@ -72,6 +74,11 @@ export const ModalContainer = styled.div<{ align-items: center; padding: ${getSpacing(1)} ${getSpacing(4)}; + ${hideCloseIcon && + css` + padding: ${getSpacing(3)} ${getSpacing(4)}; + `} + ${withIcon && css` padding: ${getSpacing(2)} ${getSpacing(4)} ${getSpacing(1)}; diff --git a/packages/web/src/components/Sidebar/NavLinks/NavLinks.tsx b/packages/web/src/components/Sidebar/NavLinks/NavLinks.tsx index b4d505b4b..6554f2081 100644 --- a/packages/web/src/components/Sidebar/NavLinks/NavLinks.tsx +++ b/packages/web/src/components/Sidebar/NavLinks/NavLinks.tsx @@ -12,6 +12,7 @@ import { ReactComponent as VaultEditorIcon } from "assets/icons/custom/vault_edi import { utils } from "ethers"; import { useVaults } from "hooks/subgraph/vaults/useVaults"; import { useIsGovMember } from "hooks/useIsGovMember"; +import { useIsGrowthMember } from "hooks/useIsGrowthMember"; import { useIsReviewer } from "hooks/useIsReviewer"; import useOnClickOutside from "hooks/useOnClickOutside"; import { RoutePaths } from "navigation"; @@ -33,6 +34,7 @@ export default function NavLinks() { const isGovMember = useIsGovMember(); const isReviewer = useIsReviewer(); + const isGrowthMember = useIsGrowthMember(); const [isInvitedToPrivateAudits, setIsInvitedToPrivateAudits] = useState(false); const [isCommitteeAddress, setIsCommitteeAddress] = useState(false); const [showCommitteeToolsSubroutes, setshowCommitteeToolsSubroutes] = useState(false); @@ -105,7 +107,7 @@ export default function NavLinks() {

{t("competitions")}