diff --git a/package-lock.json b/package-lock.json index 01c3656..4e1eb53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "eth-india-project", "version": "0.1.0", "dependencies": { + "@ant-design/icons": "^5.2.6", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@heroicons/react": "^1.0.6", @@ -22,6 +23,7 @@ "@rainbow-me/rainbowkit": "^0.12.14", "@react-icons/all-files": "^4.1.0", "@tremor/react": "^3.11.1", + "antd": "^5.12.1", "autoprefixer": "^10.0.1", "dayjs": "^1.11.10", "dotenv": "^16.3.1", @@ -93,6 +95,86 @@ "tape": "^5.5.3" } }, + "node_modules/@ant-design/colors": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-7.0.0.tgz", + "integrity": "sha512-iVm/9PfGCbC0dSMBrz7oiEXZaaGH7ceU40OJEfKmyuzR9R5CRimJYPlRiFtMQGQcbNMea/ePcoIebi4ASGYXtg==", + "dependencies": { + "@ctrl/tinycolor": "^3.4.0" + } + }, + "node_modules/@ant-design/cssinjs": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.18.1.tgz", + "integrity": "sha512-1JURAPrsjK1GwpqByTq3bJ7nF7lbMKDZpehqeR2n8/IR5O58/W1U4VcOeaw5ZyTHri3tEMcom7dyP2tvxpW54g==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "@emotion/hash": "^0.8.0", + "@emotion/unitless": "^0.7.5", + "classnames": "^2.3.1", + "csstype": "3.1.2", + "rc-util": "^5.35.0", + "stylis": "^4.0.13" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@ant-design/cssinjs/node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" + }, + "node_modules/@ant-design/cssinjs/node_modules/@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, + "node_modules/@ant-design/cssinjs/node_modules/csstype": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" + }, + "node_modules/@ant-design/icons": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-5.2.6.tgz", + "integrity": "sha512-4wn0WShF43TrggskBJPRqCD0fcHbzTYjnaoskdiJrVHg86yxoZ8ZUqsXvyn4WUqehRiFKnaclOhqk9w4Ui2KVw==", + "dependencies": { + "@ant-design/colors": "^7.0.0", + "@ant-design/icons-svg": "^4.3.0", + "@babel/runtime": "^7.11.2", + "classnames": "^2.2.6", + "rc-util": "^5.31.1" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@ant-design/icons-svg": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.3.1.tgz", + "integrity": "sha512-4QBZg8ccyC6LPIRii7A0bZUk3+lEDCLnhB+FVsflGdcWPPmV+j3fire4AwwoqHV/BibgvBmR9ZIo4s867smv+g==" + }, + "node_modules/@ant-design/react-slick": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-1.0.2.tgz", + "integrity": "sha512-Wj8onxL/T8KQLFFiCA4t8eIRGpRR+UPgOdac2sYzonv+i0n3kXHmvHLLiOYL655DQx2Umii9Y9nNgL7ssu5haQ==", + "dependencies": { + "@babel/runtime": "^7.10.4", + "classnames": "^2.2.5", + "json2mq": "^0.2.0", + "resize-observer-polyfill": "^1.5.1", + "throttle-debounce": "^5.0.0" + }, + "peerDependencies": { + "react": ">=16.9.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", @@ -1011,6 +1093,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@ctrl/tinycolor": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz", + "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==", + "engines": { + "node": ">=10" + } + }, "node_modules/@effect-ts/core": { "version": "0.60.5", "resolved": "https://registry.npmjs.org/@effect-ts/core/-/core-0.60.5.tgz", @@ -5605,6 +5695,118 @@ } } }, + "node_modules/@rc-component/color-picker": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@rc-component/color-picker/-/color-picker-1.4.1.tgz", + "integrity": "sha512-vh5EWqnsayZa/JwUznqDaPJz39jznx/YDbyBuVJntv735tKXKwEUZZb2jYEldOg+NKWZwtALjGMrNeGBmqFoEw==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@ctrl/tinycolor": "^3.6.0", + "classnames": "^2.2.6", + "rc-util": "^5.30.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/context": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@rc-component/context/-/context-1.4.0.tgz", + "integrity": "sha512-kFcNxg9oLRMoL3qki0OMxK+7g5mypjgaaJp/pkOis/6rVxma9nJBF/8kCIuTYHUQNr0ii7MxqE33wirPZLJQ2w==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/mini-decimal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rc-component/mini-decimal/-/mini-decimal-1.1.0.tgz", + "integrity": "sha512-jS4E7T9Li2GuYwI6PyiVXmxTiM6b07rlD9Ge8uGZSCz3WlzcG5ZK7g5bbuKNeZ9pgUuPK/5guV781ujdVpm4HQ==", + "dependencies": { + "@babel/runtime": "^7.18.0" + }, + "engines": { + "node": ">=8.x" + } + }, + "node_modules/@rc-component/mutate-observer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rc-component/mutate-observer/-/mutate-observer-1.1.0.tgz", + "integrity": "sha512-QjrOsDXQusNwGZPf4/qRQasg7UFEj06XiCJ8iuiq/Io7CrHrgVi6Uuetw60WAMG1799v+aM8kyc+1L/GBbHSlw==", + "dependencies": { + "@babel/runtime": "^7.18.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/portal": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rc-component/portal/-/portal-1.1.2.tgz", + "integrity": "sha512-6f813C0IsasTZms08kfA8kPAGxbbkYToa8ALaiDIGGECU4i9hj8Plgbx0sNJDrey3EtHO30hmdaxtT0138xZcg==", + "dependencies": { + "@babel/runtime": "^7.18.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/tour": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@rc-component/tour/-/tour-1.11.1.tgz", + "integrity": "sha512-c9Lw3/oVinj5D64Rsp8aDLOXcgdViE+hq7bj0Qoo8fTuQEh9sSpUw5OZcum943JkjeIE4hLcc5FD4a5ANtMJ4w==", + "dependencies": { + "@babel/runtime": "^7.18.0", + "@rc-component/portal": "^1.0.0-9", + "@rc-component/trigger": "^1.3.6", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/trigger": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-1.18.2.tgz", + "integrity": "sha512-jRLYgFgjLEPq3MvS87fIhcfuywFSRDaDrYw1FLku7Cm4esszvzTbA0JBsyacAyLrK9rF3TiHFcvoEDMzoD3CTA==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@rc-component/portal": "^1.1.0", + "classnames": "^2.3.2", + "rc-motion": "^2.0.0", + "rc-resize-observer": "^1.3.1", + "rc-util": "^5.38.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/@react-hook/latest": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@react-hook/latest/-/latest-1.0.3.tgz", @@ -9517,6 +9719,69 @@ "node": ">=0.10.0" } }, + "node_modules/antd": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.12.1.tgz", + "integrity": "sha512-lDTg4U/4MxDD4OK0sLM3D0ge+5nHKj27dUj4ufF1FhQKPcRkVnkCWJ43gb1Cn+S3ybvz7yfsiEv0v+QqWJgPlA==", + "dependencies": { + "@ant-design/colors": "^7.0.0", + "@ant-design/cssinjs": "^1.18.0", + "@ant-design/icons": "^5.2.6", + "@ant-design/react-slick": "~1.0.2", + "@babel/runtime": "^7.23.4", + "@ctrl/tinycolor": "^3.6.1", + "@rc-component/color-picker": "~1.4.1", + "@rc-component/mutate-observer": "^1.1.0", + "@rc-component/tour": "~1.11.0", + "@rc-component/trigger": "^1.18.2", + "classnames": "^2.3.2", + "copy-to-clipboard": "^3.3.3", + "dayjs": "^1.11.1", + "qrcode.react": "^3.1.0", + "rc-cascader": "~3.20.0", + "rc-checkbox": "~3.1.0", + "rc-collapse": "~3.7.2", + "rc-dialog": "~9.3.4", + "rc-drawer": "~6.5.2", + "rc-dropdown": "~4.1.0", + "rc-field-form": "~1.41.0", + "rc-image": "~7.5.1", + "rc-input": "~1.3.6", + "rc-input-number": "~8.4.0", + "rc-mentions": "~2.9.1", + "rc-menu": "~9.12.2", + "rc-motion": "^2.9.0", + "rc-notification": "~5.3.0", + "rc-pagination": "~4.0.1", + "rc-picker": "~3.14.6", + "rc-progress": "~3.5.1", + "rc-rate": "~2.12.0", + "rc-resize-observer": "^1.4.0", + "rc-segmented": "~2.2.2", + "rc-select": "~14.10.0", + "rc-slider": "~10.5.0", + "rc-steps": "~6.0.1", + "rc-switch": "~4.1.0", + "rc-table": "~7.36.0", + "rc-tabs": "~12.14.1", + "rc-textarea": "~1.5.3", + "rc-tooltip": "~6.1.2", + "rc-tree": "~5.8.2", + "rc-tree-select": "~5.15.0", + "rc-upload": "~4.3.5", + "rc-util": "^5.38.1", + "scroll-into-view-if-needed": "^3.1.0", + "throttle-debounce": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ant-design" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", @@ -9621,6 +9886,11 @@ "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==" }, + "node_modules/array-tree-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-2.1.0.tgz", + "integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==" + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -9768,6 +10038,11 @@ "tslib": "^2.0.0" } }, + "node_modules/async-validator": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", + "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" + }, "node_modules/asynciterator.prototype": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", @@ -10609,6 +10884,11 @@ "node": ">= 6" } }, + "node_modules/compute-scroll-into-view": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", + "integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -15399,6 +15679,14 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, + "node_modules/json2mq": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", + "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", + "dependencies": { + "string-convert": "^0.2.0" + } + }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -19130,6 +19418,14 @@ "qrcode-terminal": "bin/qrcode-terminal.js" } }, + "node_modules/qrcode.react": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-3.1.0.tgz", + "integrity": "sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/qrcode/node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -19352,6 +19648,581 @@ "rc": "cli.js" } }, + "node_modules/rc-cascader": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.20.0.tgz", + "integrity": "sha512-lkT9EEwOcYdjZ/jvhLoXGzprK1sijT3/Tp4BLxQQcHDZkkOzzwYQC9HgmKoJz0K7CukMfgvO9KqHeBdgE+pELw==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "array-tree-filter": "^2.1.0", + "classnames": "^2.3.1", + "rc-select": "~14.10.0", + "rc-tree": "~5.8.1", + "rc-util": "^5.37.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-checkbox": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-3.1.0.tgz", + "integrity": "sha512-PAwpJFnBa3Ei+5pyqMMXdcKYKNBMS+TvSDiLdDnARnMJHC8ESxwPfm4Ao1gJiKtWLdmGfigascnCpwrHFgoOBQ==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.3.2", + "rc-util": "^5.25.2" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-collapse": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.7.2.tgz", + "integrity": "sha512-ZRw6ipDyOnfLFySxAiCMdbHtb5ePAsB9mT17PA6y1mRD/W6KHRaZeb5qK/X9xDV1CqgyxMpzw0VdS74PCcUk4A==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "rc-motion": "^2.3.4", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-dialog": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-9.3.4.tgz", + "integrity": "sha512-975X3018GhR+EjZFbxA2Z57SX5rnu0G0/OxFgMMvZK4/hQWEm3MHaNvP4wXpxYDoJsp+xUvVW+GB9CMMCm81jA==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/portal": "^1.0.0-8", + "classnames": "^2.2.6", + "rc-motion": "^2.3.0", + "rc-util": "^5.21.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-drawer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-6.5.2.tgz", + "integrity": "sha512-QckxAnQNdhh4vtmKN0ZwDf3iakO83W9eZcSKWYYTDv4qcD2fHhRAZJJ/OE6v2ZlQ2kSqCJX5gYssF4HJFvsEPQ==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/portal": "^1.1.1", + "classnames": "^2.2.6", + "rc-motion": "^2.6.1", + "rc-util": "^5.36.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-dropdown": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-4.1.0.tgz", + "integrity": "sha512-VZjMunpBdlVzYpEdJSaV7WM7O0jf8uyDjirxXLZRNZ+tAC+NzD3PXPEtliFwGzVwBBdCmGuSqiS9DWcOLxQ9tw==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@rc-component/trigger": "^1.7.0", + "classnames": "^2.2.6", + "rc-util": "^5.17.0" + }, + "peerDependencies": { + "react": ">=16.11.0", + "react-dom": ">=16.11.0" + } + }, + "node_modules/rc-field-form": { + "version": "1.41.0", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.41.0.tgz", + "integrity": "sha512-k9AS0wmxfJfusWDP/YXWTpteDNaQ4isJx9UKxx4/e8Dub4spFeZ54/EuN2sYrMRID/+hUznPgVZeg+Gf7XSYCw==", + "dependencies": { + "@babel/runtime": "^7.18.0", + "async-validator": "^4.1.0", + "rc-util": "^5.32.2" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-image": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/rc-image/-/rc-image-7.5.1.tgz", + "integrity": "sha512-Z9loECh92SQp0nSipc0MBuf5+yVC05H/pzC+Nf8xw1BKDFUJzUeehYBjaWlxly8VGBZJcTHYri61Fz9ng1G3Ag==", + "dependencies": { + "@babel/runtime": "^7.11.2", + "@rc-component/portal": "^1.0.2", + "classnames": "^2.2.6", + "rc-dialog": "~9.3.4", + "rc-motion": "^2.6.2", + "rc-util": "^5.34.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-input": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-1.3.6.tgz", + "integrity": "sha512-/HjTaKi8/Ts4zNbYaB5oWCquxFyFQO4Co1MnMgoCeGJlpe7k8Eir2HN0a0F9IHDmmo+GYiGgPpz7w/d/krzsJA==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-util": "^5.18.1" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/rc-input-number": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-8.4.0.tgz", + "integrity": "sha512-B6rziPOLRmeP7kcS5qbdC5hXvvDHYKV4vUxmahevYx2E6crS2bRi0xLDjhJ0E1HtOWo8rTmaE2EBJAkTCZOLdA==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/mini-decimal": "^1.0.1", + "classnames": "^2.2.5", + "rc-input": "~1.3.5", + "rc-util": "^5.28.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-mentions": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-2.9.1.tgz", + "integrity": "sha512-cZuElWr/5Ws0PXx1uxobxfYh4mqUw2FitfabR62YnWgm+WAfDyXZXqZg5DxXW+M1cgVvntrQgDDd9LrihrXzew==", + "dependencies": { + "@babel/runtime": "^7.22.5", + "@rc-component/trigger": "^1.5.0", + "classnames": "^2.2.6", + "rc-input": "~1.3.5", + "rc-menu": "~9.12.0", + "rc-textarea": "~1.5.0", + "rc-util": "^5.34.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-menu": { + "version": "9.12.4", + "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.12.4.tgz", + "integrity": "sha512-t2NcvPLV1mFJzw4F21ojOoRVofK2rWhpKPx69q2raUsiHPDP6DDevsBILEYdsIegqBeSXoWs2bf6CueBKg3BFg==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^1.17.0", + "classnames": "2.x", + "rc-motion": "^2.4.3", + "rc-overflow": "^1.3.1", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-motion": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.9.0.tgz", + "integrity": "sha512-XIU2+xLkdIr1/h6ohPZXyPBMvOmuyFZQ/T0xnawz+Rh+gh4FINcnZmMT5UTIj6hgI0VLDjTaPeRd+smJeSPqiQ==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-util": "^5.21.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-notification": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-5.3.0.tgz", + "integrity": "sha512-WCf0uCOkZ3HGfF0p1H4Sgt7aWfipxORWTPp7o6prA3vxwtWhtug3GfpYls1pnBp4WA+j8vGIi5c2/hQRpGzPcQ==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "rc-motion": "^2.9.0", + "rc-util": "^5.20.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-overflow": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/rc-overflow/-/rc-overflow-1.3.2.tgz", + "integrity": "sha512-nsUm78jkYAoPygDAcGZeC2VwIg/IBGSodtOY3pMof4W3M9qRJgqaDYm03ZayHlde3I6ipliAxbN0RUcGf5KOzw==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.37.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-pagination": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-4.0.2.tgz", + "integrity": "sha512-AvQJb881vH/Re5fm3ZYmrlKp0iQe673l2VeOtWUB27/j9yag+LUOh1poAOEOMvX6jXG9x5Mp2Xpf1qOmNHiYzA==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.3.2", + "rc-util": "^5.38.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-picker": { + "version": "3.14.6", + "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-3.14.6.tgz", + "integrity": "sha512-AdKKW0AqMwZsKvIpwUWDUnpuGKZVrbxVTZTNjcO+pViGkjC1EBcjMgxVe8tomOEaIHJL5Gd13vS8Rr3zzxWmag==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^1.5.0", + "classnames": "^2.2.1", + "rc-util": "^5.30.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "date-fns": ">= 2.x", + "dayjs": ">= 1.x", + "luxon": ">= 3.x", + "moment": ">= 2.x", + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + }, + "peerDependenciesMeta": { + "date-fns": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + } + } + }, + "node_modules/rc-progress": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-3.5.1.tgz", + "integrity": "sha512-V6Amx6SbLRwPin/oD+k1vbPrO8+9Qf8zW1T8A7o83HdNafEVvAxPV5YsgtKFP+Ud5HghLj33zKOcEHrcrUGkfw==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.6", + "rc-util": "^5.16.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-rate": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.12.0.tgz", + "integrity": "sha512-g092v5iZCdVzbjdn28FzvWebK2IutoVoiTeqoLTj9WM7SjA/gOJIw5/JFZMRyJYYVe1jLAU2UhAfstIpCNRozg==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.5", + "rc-util": "^5.0.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-resize-observer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.4.0.tgz", + "integrity": "sha512-PnMVyRid9JLxFavTjeDXEXo65HCRqbmLBw9xX9gfC4BZiSzbLXKzW3jPz+J0P71pLbD5tBMTT+mkstV5gD0c9Q==", + "dependencies": { + "@babel/runtime": "^7.20.7", + "classnames": "^2.2.1", + "rc-util": "^5.38.0", + "resize-observer-polyfill": "^1.5.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-segmented": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.2.2.tgz", + "integrity": "sha512-Mq52M96QdHMsNdE/042ibT5vkcGcD5jxKp7HgPC2SRofpia99P5fkfHy1pEaajLMF/kj0+2Lkq1UZRvqzo9mSA==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-motion": "^2.4.4", + "rc-util": "^5.17.0" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/rc-select": { + "version": "14.10.0", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.10.0.tgz", + "integrity": "sha512-TsIJTYafTTapCA32LLNpx/AD6ntepR1TG8jEVx35NiAAWCPymhUfuca8kRcUNd3WIGVMDcMKn9kkphoxEz+6Ag==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^1.5.0", + "classnames": "2.x", + "rc-motion": "^2.0.1", + "rc-overflow": "^1.3.1", + "rc-util": "^5.16.1", + "rc-virtual-list": "^3.5.2" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/rc-slider": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.5.0.tgz", + "integrity": "sha512-xiYght50cvoODZYI43v3Ylsqiw14+D7ELsgzR40boDZaya1HFa1Etnv9MDkQE8X/UrXAffwv2AcNAhslgYuDTw==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.5", + "rc-util": "^5.27.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-steps": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-6.0.1.tgz", + "integrity": "sha512-lKHL+Sny0SeHkQKKDJlAjV5oZ8DwCdS2hFhAkIjuQt1/pB81M0cA0ErVFdHq9+jmPmFw1vJB2F5NBzFXLJxV+g==", + "dependencies": { + "@babel/runtime": "^7.16.7", + "classnames": "^2.2.3", + "rc-util": "^5.16.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-switch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-4.1.0.tgz", + "integrity": "sha512-TI8ufP2Az9oEbvyCeVE4+90PDSljGyuwix3fV58p7HV2o4wBnVToEyomJRVyTaZeqNPAp+vqeo4Wnj5u0ZZQBg==", + "dependencies": { + "@babel/runtime": "^7.21.0", + "classnames": "^2.2.1", + "rc-util": "^5.30.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-table": { + "version": "7.36.0", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.36.0.tgz", + "integrity": "sha512-3xVcdCC5OLeOOhaCg+5Lps2oPreM/GWXmUXWTSX4p6vF7F76ABM4dfPpMJ9Dnf5yGRyh+8pe7FRyhRVnWw2H/w==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/context": "^1.4.0", + "classnames": "^2.2.5", + "rc-resize-observer": "^1.1.0", + "rc-util": "^5.37.0", + "rc-virtual-list": "^3.11.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-tabs": { + "version": "12.14.1", + "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-12.14.1.tgz", + "integrity": "sha512-1xlE7JQNYxD5RwBsM7jf2xSdUrkmTSDFLFEm2gqAgnsRlOGydEzXXNAVTOT6QcgM1G/gCm+AgG+FYPUGb4Hs4g==", + "dependencies": { + "@babel/runtime": "^7.11.2", + "classnames": "2.x", + "rc-dropdown": "~4.1.0", + "rc-menu": "~9.12.0", + "rc-motion": "^2.6.2", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.34.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-textarea": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.5.3.tgz", + "integrity": "sha512-oH682ghHx++stFNYrosPRBfwsypywrTXpaD0/5Z8MPkUOnyOQUaY9ueL9tMu6BP1LfsuYQ1VLpg5OtshViLNgA==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.1", + "rc-input": "~1.3.5", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-tooltip": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-6.1.2.tgz", + "integrity": "sha512-89zwvybvCxGJu3+gGF8w5AXd4HHk6hIN7K0vZbkzjilVaEAIWPqc1fcyeUeP71n3VCcw7pTL9LyFupFbrx8gHw==", + "dependencies": { + "@babel/runtime": "^7.11.2", + "@rc-component/trigger": "^1.18.0", + "classnames": "^2.3.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-tree": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.8.2.tgz", + "integrity": "sha512-xH/fcgLHWTLmrSuNphU8XAqV7CdaOQgm4KywlLGNoTMhDAcNR3GVNP6cZzb0GrKmIZ9yae+QLot/cAgUdPRMzg==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "rc-motion": "^2.0.1", + "rc-util": "^5.16.1", + "rc-virtual-list": "^3.5.1" + }, + "engines": { + "node": ">=10.x" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/rc-tree-select": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-5.15.0.tgz", + "integrity": "sha512-YJHfdO6azFnR0/JuNBZLDptGE4/RGfVeHAafUIYcm2T3RBkL1O8aVqiHvwIyLzdK59ry0NLrByd+3TkfpRM+9Q==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "rc-select": "~14.10.0", + "rc-tree": "~5.8.1", + "rc-util": "^5.16.1" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/rc-upload": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.3.5.tgz", + "integrity": "sha512-EHlKJbhkgFSQHliTj9v/2K5aEuFwfUQgZARzD7AmAPOneZEPiCNF3n6PEWIuqz9h7oq6FuXgdR67sC5BWFxJbA==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "classnames": "^2.2.5", + "rc-util": "^5.2.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-util": { + "version": "5.38.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.38.1.tgz", + "integrity": "sha512-e4ZMs7q9XqwTuhIK7zBIVFltUtMSjphuPPQXHoHlzRzNdOwUxDejo0Zls5HYaJfRKNURcsS/ceKVULlhjBrxng==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "react-is": "^18.2.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-util/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/rc-virtual-list": { + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.11.3.tgz", + "integrity": "sha512-tu5UtrMk/AXonHwHxUogdXAWynaXsrx1i6dsgg+lOo/KJSF8oBAcprh1z5J3xgnPJD5hXxTL58F8s8onokdt0Q==", + "dependencies": { + "@babel/runtime": "^7.20.0", + "classnames": "^2.2.6", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.36.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -20875,6 +21746,14 @@ "resolved": "https://registry.npmjs.org/scriptjs/-/scriptjs-2.5.9.tgz", "integrity": "sha512-qGVDoreyYiP1pkQnbnFAUIS5AjenNwwQBdl7zeos9etl+hYKWahjRTfzAZZYBv5xNHx7vNKCmaLDQZ6Fr2AEXg==" }, + "node_modules/scroll-into-view-if-needed": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz", + "integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==", + "dependencies": { + "compute-scroll-into-view": "^3.0.2" + } + }, "node_modules/scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", @@ -21369,6 +22248,11 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/string-convert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", + "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==" + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -22061,6 +22945,14 @@ "real-require": "^0.1.0" } }, + "node_modules/throttle-debounce": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-5.0.0.tgz", + "integrity": "sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==", + "engines": { + "node": ">=12.22" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", diff --git a/package.json b/package.json index 5f7a03b..e9722ea 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@ant-design/icons": "^5.2.6", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@heroicons/react": "^1.0.6", @@ -23,6 +24,7 @@ "@rainbow-me/rainbowkit": "^0.12.14", "@react-icons/all-files": "^4.1.0", "@tremor/react": "^3.11.1", + "antd": "^5.12.1", "autoprefixer": "^10.0.1", "dayjs": "^1.11.10", "dotenv": "^16.3.1", diff --git a/src/components/chat.tsx b/src/components/chat.tsx index 8166611..03d4e77 100644 --- a/src/components/chat.tsx +++ b/src/components/chat.tsx @@ -5,43 +5,44 @@ import { PushAPI } from '@pushprotocol/restapi' export default function Chat() { // const userA = await PushAPI.initialize(signer); + return (
- Hey, there! It's been a while! + Hey, there!
- Wanted to know if you wanted to get lunch sometime this week? + What's the update on the SDK we were working on?
-
+ {/*
Or next week. I'm also free during the evenings next week.
-
+
*/}
- Oops! Sorry for the late response! + We are running late of deadline
- I'd love to get lunch sometime next week! + It would take atleast a week more to execute it
- Do you have any places in mind where you'd want to meet? + We have to meet the production rules and techniques.
diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index 91e9dcc..f412c02 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -41,6 +41,8 @@ export default function Navbar() {
{/* FEATURES */} DASHBOARD + SWAP TOKENS + {/* CONTACT */}
@@ -65,10 +67,9 @@ export default function Navbar() { flex flex-col justify-start items-end rounded-md blue-glassmorphism text-white animate-slide-in'>
  • setToggleMenu(false)}/>
  • - FEATURES - WHITEPAPER - CONTACT - App Coming Soon + SWAP TOKENS + DASHBOARD + diff --git a/src/components/partners.tsx b/src/components/partners.tsx index 203b171..216b873 100644 --- a/src/components/partners.tsx +++ b/src/components/partners.tsx @@ -1,20 +1,14 @@ import React from 'react' import Image from 'next/image' -import Arbitrum from '../images/arbitrum.svg' -import Arcana from '../images/arcana.svg' -import Aurora from '../images/aurora.svg' -import Biconomy from '../images/biconomy.svg' -import Bsc from '../images/bsc.svg' -import Ef from '../images/ef.svg' -import Polybase from '../images/polybase.svg' -import Polygontech from '../images/polygontech.svg' -import Router from '../images/router.svg' -import Transak from '../images/transak.svg' +import Push from '../images/pushProtocol.png' +import Inch from '../images/1inch.png' +import Metamask from '../images/metamask.webp' +import Scroll from '../images/scroll.png' import Ethereum from '../images/Ethereum.svg' export default function partners() { const images = [ - Arbitrum, Arcana, Aurora, Biconomy, Bsc, Ethereum, Polybase, Polygontech, Router, Transak + Ethereum, Push, Inch, Metamask, Scroll ].map((image) => ({ id: crypto.randomUUID(), image diff --git a/src/components/swap.tsx b/src/components/swap.tsx new file mode 100644 index 0000000..1dbd9d2 --- /dev/null +++ b/src/components/swap.tsx @@ -0,0 +1,367 @@ +import React, { useState, useEffect } from "react"; +const ethers = require("ethers") +import { Input, Popover, Modal, message } from "antd"; +import { + ArrowDownOutlined, + DownOutlined, + SettingOutlined, + PlusOutlined, + RedoOutlined, +} from "@ant-design/icons"; +import tokensList from "../utils/tokensList.json"; +import { useAccount, useSendTransaction, useWaitForTransaction } from "wagmi"; +import axios from "axios"; +import { parseEther } from "viem"; +// import { BrowserProvider, ethers } from "ethers"; +import inchAbi from "../utils/1inchAbi.json"; + +function Swap() { + const { address, isConnected } = useAccount(); + const [tokenOne, setTokenOne] = useState(tokensList[0]); + const [tokenTwo, setTokenTwo] = useState(tokensList[1]); + const [isOpen, setIsOpen] = useState(false); + const [tokenNumber, setTokenNumber] = useState(1); + const [messageApi, contextHolder] = message.useMessage(); // for showing successful messages + const [tokenOneAmount, setTokenOneAmount] = useState(""); + const [tokenTwoAmount, setTokenTwoAmount] = useState(""); + const [prices, setPrices] = useState({ + tokenOne: 0, + tokenTwo: 0, + ratio: 0, + }); + const [txDetails, setTxDetails] = useState({ + to: "", + data: "", + value: "", + }); + + //Handles falicitation of transaction for approvals + const { data, sendTransaction } = useSendTransaction({ + account: address, + to: String(txDetails.to), + data: txDetails.data as `0x${string}`, + value: parseEther(txDetails.value), + }); + + //Handles fetching of transaction hash + const { isLoading, isSuccess } = useWaitForTransaction({ + hash: data?.hash, + }); + + // Handles changing data + function changeAmount(e: any) { + setTokenOneAmount(e.target.value); + if (e.target.value && prices) { + setTokenTwoAmount((Number(e.target.value) * prices.ratio).toFixed(6)); + } else { + setTokenTwoAmount(""); + } + } + + // Handles changing the two token inputs + function modifyToken(i: number) { + setPrices({ + tokenOne: 0, + tokenTwo: 0, + ratio: 0, + }); + setTokenOneAmount(""); + setTokenTwoAmount(""); + if (tokenNumber === 1) { + setTokenOne(tokensList[i]); + fetchPrices(tokensList[i].address, tokenTwo.address); + } else { + setTokenTwo(tokensList[i]); + fetchPrices(tokenOne.address, tokensList[i].address); + } + setIsOpen(false); + } + + // Handles open tokens modal + function openModal(toOpen: number) { + setTokenNumber(toOpen); + setIsOpen(true); + } + + // handles swapping tokens from input + function changeTokenSet() { + setPrices({ + tokenOne: 0, + tokenTwo: 0, + ratio: 0, + }); + setTokenOneAmount(""); + setTokenTwoAmount(""); + const one = tokenOne; + const two = tokenTwo; + setTokenOne(two); + setTokenTwo(one); + fetchPrices(two.address, one.address); + } + + // Handles Fetching of prices using moralis api + // Note:- We can use quote api of 1inch or use other coingecko api as well + async function fetchPrices(one: any, two: any) { + console.log("yes printed"); + const res = await axios.get(`http://localhost:3001/api/tokenPrice`, { + params: { addressOne: one, addressTwo: two }, + }); + setPrices(res.data); + } + + // Handles falicitation of swaping function from 1inch contract + const initiateContract = async (data: any) => { + try { + const providerr = new ethers.BrowserProvider((window as any).ethereum); + const signer = await providerr.getSigner(); + const contractAddress = "0x1111111254EEB25477B68fb85Ed929f73A960582"; + + // instance of contract + const inchContract = new ethers.Contract( + contractAddress, + inchAbi.abi, + signer + ); + + const tx = await inchContract.swap(data); + + console.log(tx); + } catch (e) { + console.log(e); + } + }; + + // Handles fetching of Approve, Allowance and Swap API + async function fetchDexSwap() { + const allowanceBody = { + params: { + tokenAddress: tokenOne.address, + walletAddress: address, + }, + }; + const apiUrl = "http://localhost:3001/api/swap/allowance"; + + const allowance = await axios.get(apiUrl, allowanceBody); + + if (allowance.data.allowance === "0") { + // to avoid 429 error -- multiple requests + await new Promise((resolve) => setTimeout(resolve, 2000)); + const approveBody = { + params: { tokenAddress: tokenOne.address }, + }; + const apiUrl = "http://localhost:3001/api/swap/approve"; + + const approve = await axios.get(apiUrl, approveBody); + + setTxDetails(approve.data); + + return; + } + + const swapBody = { + params: { + fromTokenAddress: tokenOne.address, + toTokenAddress: tokenTwo.address, + amount: tokenOneAmount.padEnd( + tokenOne.decimals + tokenOneAmount.length, + "0" + ), + fromAddress: address, + }, + }; + + const swapUrl = "http://localhost:3001/api/swap/"; + + const tx = await axios.get(swapUrl, swapBody); + + console.log(tx); + + let decimals = Number(`1E${tokenTwo.decimals}`); + setTokenTwoAmount((Number(tx.data.toTokenAmount) / decimals).toFixed(2)); + + // Swap function from 1inch API + await initiateContract(tx.data.tx); + } + + useEffect(() => { + fetchPrices(tokensList[0].address, tokensList[1].address); + }, []); + + useEffect(() => { + if (txDetails.to && isConnected) { + sendTransaction(); + } + }, [txDetails]); + + //Handles fetching of prices every 15sec. + // Note:- We can use react query to handle this gracefully + useEffect(() => { + const timer = setInterval( + () => fetchPrices(tokenOne.address, tokenTwo.address), + 15000 + ); // 15 seconds in milliseconds + + return () => { + clearInterval(timer); + }; + }, []); + + useEffect(() => { + console.log(prices.ratio); + setTokenTwoAmount((Number(tokenOneAmount) * prices.ratio).toFixed(6)); + }, [prices]); + + // ----Handles successful and loading messages---- + + // useEffect(() => { + // messageApi.destroy(); + + // if (isLoading) { + // messageApi.open({ + // type: "loading", + // content: "Transaction is Pending...", + // duration: 0, + // }); + // } + // }, [isLoading]); + + // useEffect(() => { + // messageApi.destroy(); + // if (isSuccess) { + // messageApi.open({ + // type: "success", + // content: "Transaction Successful", + // duration: 1.5, + // }); + // } else if (txDetails.to) { + // messageApi.open({ + // type: "error", + // content: "Transaction Failed", + // duration: 1.5, + // }); + // } + // }, [isSuccess]); + + return ( +
    +
    + setIsOpen(false)} + title="Select a token" + > +
    + {tokensList?.map((e, i) => { + return ( +
    modifyToken(i)} + > + {e.ticker} +
    +
    + {e.name} +
    +
    + {e.ticker} +
    +
    +
    + ); + })} +
    +
    +
    +
    +

    Swap

    +
    + + + + + +
    +
    +
    +
    +
    + You Sell +
    +
    +
    openModal(1)} + > + assetOne + {tokenOne.ticker} + +
    + +
    +
    + +
    +
    + You Buy +
    + +
    +
    openModal(2)} + > + assetLogo + {tokenTwo.ticker} + +
    + +
    +
    + +
    + +
    +
    +
    + Swap +
    +
    +
    +
    + ); +} + +export default Swap; \ No newline at end of file diff --git a/src/images/1inch.png b/src/images/1inch.png new file mode 100644 index 0000000..83840f8 Binary files /dev/null and b/src/images/1inch.png differ diff --git a/src/images/metamask.webp b/src/images/metamask.webp new file mode 100644 index 0000000..a66ea2d Binary files /dev/null and b/src/images/metamask.webp differ diff --git a/src/images/scroll.png b/src/images/scroll.png new file mode 100644 index 0000000..d574d37 Binary files /dev/null and b/src/images/scroll.png differ diff --git a/src/pages/dashboard/call.tsx b/src/pages/dashboard/call.tsx index fe4611a..56656a5 100644 --- a/src/pages/dashboard/call.tsx +++ b/src/pages/dashboard/call.tsx @@ -277,6 +277,7 @@ export default function Home() { PushAPI.VideoCallStatus.UNINITIALIZED } onClick={setRequestVideoCall} + className="text-black" > Ring Client diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 0154242..e85c086 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -8,6 +8,7 @@ import Features from "../components/features"; import Difference from "../components/difference"; import FAQs from "../components/faqs"; import Footer from "../components/footer"; +import Swap from "@/components/swap"; const inter = Inter({ subsets: ["latin"] }); @@ -17,7 +18,7 @@ export default function Home() {
    - {/* */} +
    diff --git a/src/pages/swap-tokens.tsx b/src/pages/swap-tokens.tsx new file mode 100644 index 0000000..e24b056 --- /dev/null +++ b/src/pages/swap-tokens.tsx @@ -0,0 +1,13 @@ +import Swap from "@/components/swap" +import Navbar from "../components/navbar" + +export default function SwapTokens() { + return ( +
    +
    + + +
    +
    + ) +} diff --git a/src/utils/1inchAbi.json b/src/utils/1inchAbi.json new file mode 100644 index 0000000..21a72a4 --- /dev/null +++ b/src/utils/1inchAbi.json @@ -0,0 +1,1317 @@ +{ + "abi": [ + { + "inputs": [ + { "internalType": "contract IWETH", "name": "weth", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { "inputs": [], "name": "AccessDenied", "type": "error" }, + { "inputs": [], "name": "AdvanceNonceFailed", "type": "error" }, + { "inputs": [], "name": "AlreadyFilled", "type": "error" }, + { "inputs": [], "name": "ArbitraryStaticCallFailed", "type": "error" }, + { "inputs": [], "name": "BadPool", "type": "error" }, + { "inputs": [], "name": "BadSignature", "type": "error" }, + { "inputs": [], "name": "ETHTransferFailed", "type": "error" }, + { "inputs": [], "name": "ETHTransferFailed", "type": "error" }, + { "inputs": [], "name": "EmptyPools", "type": "error" }, + { "inputs": [], "name": "EthDepositRejected", "type": "error" }, + { "inputs": [], "name": "GetAmountCallFailed", "type": "error" }, + { "inputs": [], "name": "IncorrectDataLength", "type": "error" }, + { "inputs": [], "name": "InsufficientBalance", "type": "error" }, + { "inputs": [], "name": "InvalidMsgValue", "type": "error" }, + { "inputs": [], "name": "InvalidMsgValue", "type": "error" }, + { "inputs": [], "name": "InvalidatedOrder", "type": "error" }, + { "inputs": [], "name": "MakingAmountExceeded", "type": "error" }, + { "inputs": [], "name": "MakingAmountTooLow", "type": "error" }, + { "inputs": [], "name": "OnlyOneAmountShouldBeZero", "type": "error" }, + { "inputs": [], "name": "OrderExpired", "type": "error" }, + { "inputs": [], "name": "PermitLengthTooLow", "type": "error" }, + { "inputs": [], "name": "PredicateIsNotTrue", "type": "error" }, + { "inputs": [], "name": "PrivateOrder", "type": "error" }, + { "inputs": [], "name": "RFQBadSignature", "type": "error" }, + { "inputs": [], "name": "RFQPrivateOrder", "type": "error" }, + { "inputs": [], "name": "RFQSwapWithZeroAmount", "type": "error" }, + { "inputs": [], "name": "RFQZeroTargetIsForbidden", "type": "error" }, + { "inputs": [], "name": "ReentrancyDetected", "type": "error" }, + { "inputs": [], "name": "RemainingAmountIsZero", "type": "error" }, + { "inputs": [], "name": "ReservesCallFailed", "type": "error" }, + { "inputs": [], "name": "ReturnAmountIsNotEnough", "type": "error" }, + { "inputs": [], "name": "SafePermitBadLength", "type": "error" }, + { "inputs": [], "name": "SafeTransferFailed", "type": "error" }, + { "inputs": [], "name": "SafeTransferFromFailed", "type": "error" }, + { + "inputs": [ + { "internalType": "bool", "name": "success", "type": "bool" }, + { "internalType": "bytes", "name": "res", "type": "bytes" } + ], + "name": "SimulationResults", + "type": "error" + }, + { "inputs": [], "name": "SwapAmountTooLarge", "type": "error" }, + { "inputs": [], "name": "SwapWithZeroAmount", "type": "error" }, + { "inputs": [], "name": "TakingAmountExceeded", "type": "error" }, + { "inputs": [], "name": "TakingAmountIncreased", "type": "error" }, + { "inputs": [], "name": "TakingAmountTooHigh", "type": "error" }, + { "inputs": [], "name": "TransferFromMakerToTakerFailed", "type": "error" }, + { "inputs": [], "name": "TransferFromTakerToMakerFailed", "type": "error" }, + { "inputs": [], "name": "UnknownOrder", "type": "error" }, + { "inputs": [], "name": "WrongAmount", "type": "error" }, + { "inputs": [], "name": "WrongGetter", "type": "error" }, + { "inputs": [], "name": "ZeroAddress", "type": "error" }, + { "inputs": [], "name": "ZeroMinReturn", "type": "error" }, + { "inputs": [], "name": "ZeroReturnAmount", "type": "error" }, + { "inputs": [], "name": "ZeroTargetIsForbidden", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newNonce", + "type": "uint256" + } + ], + "name": "NonceIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "remainingRaw", + "type": "uint256" + } + ], + "name": "OrderCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "remaining", + "type": "uint256" + } + ], + "name": "OrderFilled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "orderHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + } + ], + "name": "OrderFilledRFQ", + "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" + }, + { + "inputs": [ + { "internalType": "uint8", "name": "amount", "type": "uint8" } + ], + "name": "advanceNonce", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "and", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "arbitraryStaticCall", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "interactions", "type": "bytes" } + ], + "internalType": "struct OrderLib.Order", + "name": "order", + "type": "tuple" + } + ], + "name": "cancelOrder", + "outputs": [ + { + "internalType": "uint256", + "name": "orderRemaining", + "type": "uint256" + }, + { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "orderInfo", "type": "uint256" } + ], + "name": "cancelOrderRFQ", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "orderInfo", "type": "uint256" }, + { + "internalType": "uint256", + "name": "additionalMask", + "type": "uint256" + } + ], + "name": "cancelOrderRFQ", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "interactions", "type": "bytes" } + ], + "internalType": "struct OrderLib.Order", + "name": "order", + "type": "tuple" + } + ], + "name": "checkPredicate", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IClipperExchangeInterface", + "name": "clipperExchange", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { "internalType": "uint256", "name": "inputAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "goodUntil", "type": "uint256" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "vs", "type": "bytes32" } + ], + "name": "clipperSwap", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IClipperExchangeInterface", + "name": "clipperExchange", + "type": "address" + }, + { + "internalType": "address payable", + "name": "recipient", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { "internalType": "uint256", "name": "inputAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "goodUntil", "type": "uint256" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "vs", "type": "bytes32" } + ], + "name": "clipperSwapTo", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IClipperExchangeInterface", + "name": "clipperExchange", + "type": "address" + }, + { + "internalType": "address payable", + "name": "recipient", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { "internalType": "uint256", "name": "inputAmount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "goodUntil", "type": "uint256" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "vs", "type": "bytes32" }, + { "internalType": "bytes", "name": "permit", "type": "bytes" } + ], + "name": "clipperSwapToWithPermit", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "destroy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "eq", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "interactions", "type": "bytes" } + ], + "internalType": "struct OrderLib.Order", + "name": "order", + "type": "tuple" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { "internalType": "bytes", "name": "interaction", "type": "bytes" }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "skipPermitAndThresholdAmount", + "type": "uint256" + } + ], + "name": "fillOrder", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "info", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + } + ], + "internalType": "struct OrderRFQLib.OrderRFQ", + "name": "order", + "type": "tuple" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { + "internalType": "uint256", + "name": "flagsAndAmount", + "type": "uint256" + } + ], + "name": "fillOrderRFQ", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "info", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + } + ], + "internalType": "struct OrderRFQLib.OrderRFQ", + "name": "order", + "type": "tuple" + }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "vs", "type": "bytes32" }, + { + "internalType": "uint256", + "name": "flagsAndAmount", + "type": "uint256" + } + ], + "name": "fillOrderRFQCompact", + "outputs": [ + { + "internalType": "uint256", + "name": "filledMakingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "filledTakingAmount", + "type": "uint256" + }, + { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "info", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + } + ], + "internalType": "struct OrderRFQLib.OrderRFQ", + "name": "order", + "type": "tuple" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { + "internalType": "uint256", + "name": "flagsAndAmount", + "type": "uint256" + }, + { "internalType": "address", "name": "target", "type": "address" } + ], + "name": "fillOrderRFQTo", + "outputs": [ + { + "internalType": "uint256", + "name": "filledMakingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "filledTakingAmount", + "type": "uint256" + }, + { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "info", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + } + ], + "internalType": "struct OrderRFQLib.OrderRFQ", + "name": "order", + "type": "tuple" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { + "internalType": "uint256", + "name": "flagsAndAmount", + "type": "uint256" + }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bytes", "name": "permit", "type": "bytes" } + ], + "name": "fillOrderRFQToWithPermit", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "interactions", "type": "bytes" } + ], + "internalType": "struct OrderLib.Order", + "name": "order_", + "type": "tuple" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { "internalType": "bytes", "name": "interaction", "type": "bytes" }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "skipPermitAndThresholdAmount", + "type": "uint256" + }, + { "internalType": "address", "name": "target", "type": "address" } + ], + "name": "fillOrderTo", + "outputs": [ + { + "internalType": "uint256", + "name": "actualMakingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actualTakingAmount", + "type": "uint256" + }, + { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "interactions", "type": "bytes" } + ], + "internalType": "struct OrderLib.Order", + "name": "order", + "type": "tuple" + }, + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { "internalType": "bytes", "name": "interaction", "type": "bytes" }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "skipPermitAndThresholdAmount", + "type": "uint256" + }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bytes", "name": "permit", "type": "bytes" } + ], + "name": "fillOrderToWithPermit", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "gt", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { + "internalType": "address", + "name": "makerAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "takerAsset", + "type": "address" + }, + { "internalType": "address", "name": "maker", "type": "address" }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "allowedSender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "interactions", "type": "bytes" } + ], + "internalType": "struct OrderLib.Order", + "name": "order", + "type": "tuple" + } + ], + "name": "hashOrder", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "increaseNonce", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "maker", "type": "address" }, + { "internalType": "uint256", "name": "slot", "type": "uint256" } + ], + "name": "invalidatorForOrderRFQ", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "lt", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "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": "makerAddress", + "type": "address" + }, + { "internalType": "uint256", "name": "makerNonce", "type": "uint256" } + ], + "name": "nonceEquals", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "offsets", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "or", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } + ], + "name": "remaining", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } + ], + "name": "remainingRaw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "orderHashes", + "type": "bytes32[]" + } + ], + "name": "remainingsRaw", + "outputs": [ + { "internalType": "uint256[]", "name": "", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IAggregationExecutor", + "name": "executor", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { + "internalType": "address payable", + "name": "srcReceiver", + "type": "address" + }, + { + "internalType": "address payable", + "name": "dstReceiver", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "minReturnAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "flags", "type": "uint256" } + ], + "internalType": "struct GenericRouter.SwapDescription", + "name": "desc", + "type": "tuple" + }, + { "internalType": "bytes", "name": "permit", "type": "bytes" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "swap", + "outputs": [ + { + "internalType": "uint256", + "name": "returnAmount", + "type": "uint256" + }, + { "internalType": "uint256", "name": "spentAmount", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "time", "type": "uint256" } + ], + "name": "timestampBelow", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timeNonceAccount", + "type": "uint256" + } + ], + "name": "timestampBelowAndNonceEquals", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "minReturn", "type": "uint256" }, + { "internalType": "uint256[]", "name": "pools", "type": "uint256[]" } + ], + "name": "uniswapV3Swap", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "int256", "name": "amount0Delta", "type": "int256" }, + { "internalType": "int256", "name": "amount1Delta", "type": "int256" }, + { "internalType": "bytes", "name": "", "type": "bytes" } + ], + "name": "uniswapV3SwapCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "recipient", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "minReturn", "type": "uint256" }, + { "internalType": "uint256[]", "name": "pools", "type": "uint256[]" } + ], + "name": "uniswapV3SwapTo", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "recipient", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "minReturn", "type": "uint256" }, + { "internalType": "uint256[]", "name": "pools", "type": "uint256[]" }, + { "internalType": "bytes", "name": "permit", "type": "bytes" } + ], + "name": "uniswapV3SwapToWithPermit", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "minReturn", "type": "uint256" }, + { "internalType": "uint256[]", "name": "pools", "type": "uint256[]" } + ], + "name": "unoswap", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "recipient", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "minReturn", "type": "uint256" }, + { "internalType": "uint256[]", "name": "pools", "type": "uint256[]" } + ], + "name": "unoswapTo", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "recipient", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "minReturn", "type": "uint256" }, + { "internalType": "uint256[]", "name": "pools", "type": "uint256[]" }, + { "internalType": "bytes", "name": "permit", "type": "bytes" } + ], + "name": "unoswapToWithPermit", + "outputs": [ + { "internalType": "uint256", "name": "returnAmount", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { "stateMutability": "payable", "type": "receive" } + ] + } \ No newline at end of file diff --git a/src/utils/tokensList.json b/src/utils/tokensList.json new file mode 100644 index 0000000..6c2a04b --- /dev/null +++ b/src/utils/tokensList.json @@ -0,0 +1,93 @@ +[ + { + "ticker": "USDC", + "img": "https://cdn.moralis.io/eth/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png", + "name": "USD Coin", + "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "decimals": 6 + }, + { + "ticker": "LINK", + "img": "https://cdn.moralis.io/eth/0x514910771af9ca656af840dff83e8264ecf986ca.png", + "name": "Chainlink", + "address": "0x514910771af9ca656af840dff83e8264ecf986ca", + "decimals": 18 + }, + { + "ticker": "USDT", + "img": "https://cdn.moralis.io/eth/0xdac17f958d2ee523a2206206994597c13d831ec7.png", + "name": "Tether USD", + "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", + "decimals": 6 + }, + { + "ticker": "GUSD", + "img": "https://cdn.moralis.io/eth/0x056fd409e1d7a124bd7017459dfea2f387b6d5cd.png", + "name": "Gemini USD", + "address": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd", + "decimals": 2 + }, + { + "ticker": "DAI", + "img": "https://cdn.moralis.io/eth/0x6b175474e89094c44da98b954eedeac495271d0f.png", + "name": "Dai Stablecoin", + "address": "0x6b175474e89094c44da98b954eedeac495271d0f", + "decimals": 18 + }, + { + "ticker": "WETH", + "img": "https://cdn.moralis.io/eth/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png", + "name": "Wrapped Ethereum", + "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "decimals": 18 + }, + { + "ticker": "WBTC", + "img": "https://cdn.moralis.io/eth/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.png", + "name": "Wrapped Bitcoin", + "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599", + "decimals": 8 + }, + { + "ticker": "MATIC", + "img": "https://cdn.moralis.io/eth/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png", + "name": "Matic Token", + "address": "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", + "decimals": 18 + }, + { + "ticker": "UNI", + "img": "https://cdn.moralis.io/eth/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984.png", + "name": "Uniswap", + "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", + "decimals": 18 + }, + { + "ticker": "CRV", + "img": "https://cdn.moralis.io/eth/0xd533a949740bb3306d119cc777fa900ba034cd52.png", + "name": "Curve DAO Token", + "address": "0xd533a949740bb3306d119cc777fa900ba034cd52", + "decimals": 18 + }, + { + "ticker": "MKR", + "img": "https://cdn.moralis.io/eth/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2.png", + "name": "Maker", + "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "decimals": 18 + }, + { + "ticker": "SHIB", + "img": "https://cdn.moralis.io/eth/0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce.png", + "name": "Shiba Inu", + "address": "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce", + "decimals": 18 + }, + { + "ticker": "AAVE", + "img": "https://cdn.moralis.io/eth/0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9.png", + "name": "AAVE", + "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", + "decimals": 18 + } + ] \ No newline at end of file