Merge branch 'release/v2021.10.01-otterscan'
This commit is contained in:
commit
faaf55234f
|
@ -2,5 +2,6 @@
|
||||||
node_modules
|
node_modules
|
||||||
4bytes
|
4bytes
|
||||||
!4bytes/signatures
|
!4bytes/signatures
|
||||||
|
!4bytes/with_parameter_names
|
||||||
trustwallet
|
trustwallet
|
||||||
!trustwallet/blockchains/ethereum/assets
|
!trustwallet/blockchains/ethereum/assets
|
||||||
|
|
|
@ -14,9 +14,14 @@ WORKDIR /assets
|
||||||
COPY trustwallet/blockchains/ethereum/assets /assets/
|
COPY trustwallet/blockchains/ethereum/assets /assets/
|
||||||
RUN find . -name logo.png | parallel magick convert {} -filter Lanczos -resize 32x32 {}
|
RUN find . -name logo.png | parallel magick convert {} -filter Lanczos -resize 32x32 {}
|
||||||
|
|
||||||
|
FROM alpine:3.14.0 AS fourbytesbuilder
|
||||||
|
WORKDIR /signatures
|
||||||
|
COPY 4bytes/signatures /signatures/
|
||||||
|
COPY 4bytes/with_parameter_names /signatures/
|
||||||
|
|
||||||
FROM nginx:1.21.1-alpine
|
FROM nginx:1.21.1-alpine
|
||||||
RUN apk add jq
|
RUN apk add jq
|
||||||
COPY 4bytes/signatures /usr/share/nginx/html/signatures/
|
COPY --from=fourbytesbuilder /signatures /usr/share/nginx/html/signatures/
|
||||||
COPY --from=logobuilder /assets /usr/share/nginx/html/assets/
|
COPY --from=logobuilder /assets /usr/share/nginx/html/assets/
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY --from=builder /otterscan-build/build /usr/share/nginx/html/
|
COPY --from=builder /otterscan-build/build /usr/share/nginx/html/
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blackbox-vision/react-qr-reader": "^5.0.0",
|
"@blackbox-vision/react-qr-reader": "^5.0.0",
|
||||||
"@chainlink/contracts": "^0.2.1",
|
"@chainlink/contracts": "^0.2.2",
|
||||||
"@craco/craco": "^6.3.0",
|
"@craco/craco": "^6.3.0",
|
||||||
"@fontsource/fira-code": "^4.5.1",
|
"@fontsource/fira-code": "^4.5.1",
|
||||||
"@fontsource/roboto": "^4.5.0",
|
"@fontsource/roboto": "^4.5.1",
|
||||||
"@fontsource/roboto-mono": "^4.5.0",
|
"@fontsource/roboto-mono": "^4.5.0",
|
||||||
"@fontsource/space-grotesk": "^4.5.0",
|
"@fontsource/space-grotesk": "^4.5.0",
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
||||||
|
@ -27,19 +27,19 @@
|
||||||
"@testing-library/user-event": "^12.1.10",
|
"@testing-library/user-event": "^12.1.10",
|
||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^26.0.24",
|
||||||
"@types/node": "^14.17.5",
|
"@types/node": "^14.17.5",
|
||||||
"@types/react": "^17.0.20",
|
"@types/react": "^17.0.26",
|
||||||
"@types/react-blockies": "^1.4.1",
|
"@types/react-blockies": "^1.4.1",
|
||||||
"@types/react-dom": "^17.0.9",
|
"@types/react-dom": "^17.0.9",
|
||||||
"@types/react-highlight": "^0.12.3",
|
"@types/react-highlight": "^0.12.4",
|
||||||
"@types/react-router-dom": "^5.1.8",
|
"@types/react-router-dom": "^5.3.0",
|
||||||
"@types/react-syntax-highlighter": "^13.5.2",
|
"@types/react-syntax-highlighter": "^13.5.2",
|
||||||
"chart.js": "^3.5.1",
|
"chart.js": "^3.5.1",
|
||||||
"ethers": "^5.4.6",
|
"ethers": "^5.4.7",
|
||||||
"highlightjs-solidity": "^1.2.0",
|
"highlightjs-solidity": "^2.0.1",
|
||||||
"query-string": "^7.0.1",
|
"query-string": "^7.0.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-blockies": "^1.4.1",
|
"react-blockies": "^1.4.1",
|
||||||
"react-chartjs-2": "^3.0.4",
|
"react-chartjs-2": "^3.0.5",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-error-boundary": "^3.1.3",
|
"react-error-boundary": "^3.1.3",
|
||||||
"react-image": "^4.0.3",
|
"react-image": "^4.0.3",
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
"web-vitals": "^1.0.1"
|
"web-vitals": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^9.8.6",
|
"autoprefixer": "^9.8.7",
|
||||||
"postcss": "^7.0.36",
|
"postcss": "^7.0.38",
|
||||||
"source-map-explorer": "^2.5.2",
|
"source-map-explorer": "^2.5.2",
|
||||||
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.6"
|
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.6"
|
||||||
}
|
}
|
||||||
|
@ -1228,9 +1228,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@chainlink/contracts": {
|
"node_modules/@chainlink/contracts": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.2.2.tgz",
|
||||||
"integrity": "sha512-mAQgPQKiqW3tLMlp31NgcnXpwG3lttgKU0izAqKiirJ9LH7rQ+O0oHIVR5Qp2yuqgmfbLsgfdLo4GcVC8IFz3Q=="
|
"integrity": "sha512-wxXPbt7O3aZaUSG34ufFASC5amRSL6eeYCqsa+2gpqbB8Hk7B7FydEDCI5dqvAC444TlFskPHcVbizCZkRHPpw=="
|
||||||
},
|
},
|
||||||
"node_modules/@cnakazawa/watch": {
|
"node_modules/@cnakazawa/watch": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
|
@ -1455,9 +1455,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ethersproject/bignumber": {
|
"node_modules/@ethersproject/bignumber": {
|
||||||
"version": "5.4.1",
|
"version": "5.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.2.tgz",
|
||||||
"integrity": "sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==",
|
"integrity": "sha512-oIBDhsKy5bs7j36JlaTzFgNPaZjiNDOXsdSgSpXRucUl+UA6L/1YLlFeI3cPAoodcenzF4nxNPV13pcy7XbWjA==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "individual",
|
"type": "individual",
|
||||||
|
@ -2017,9 +2017,9 @@
|
||||||
"integrity": "sha512-8KTCsfs5m3UgICpHLglIKAS7vc2FFOu7/vvpWcE/42SWbh+9X8EJbEyJp6W96kU5iDVlAlUv4Cqc36Z9XUpLmA=="
|
"integrity": "sha512-8KTCsfs5m3UgICpHLglIKAS7vc2FFOu7/vvpWcE/42SWbh+9X8EJbEyJp6W96kU5iDVlAlUv4Cqc36Z9XUpLmA=="
|
||||||
},
|
},
|
||||||
"node_modules/@fontsource/roboto": {
|
"node_modules/@fontsource/roboto": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.1.tgz",
|
||||||
"integrity": "sha512-ja4XYw/9kNRFM5Ndk9vwzHWsdBMXczyBazFkTXJQ74QQBnT0BbSsHn0pF60AU0Iznig1Wt9x3rADfG8LANvMpw=="
|
"integrity": "sha512-3mhfL+eNPG/woMNqwD/OHaW5qMpeGEBsDwzmhFmjB1yUV+M+M9P0NhP/AyHvnGz3DrqkvZ7CPzNMa+UkVLeELg=="
|
||||||
},
|
},
|
||||||
"node_modules/@fontsource/roboto-mono": {
|
"node_modules/@fontsource/roboto-mono": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.0",
|
||||||
|
@ -3090,9 +3090,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/react": {
|
"node_modules/@types/react": {
|
||||||
"version": "17.0.20",
|
"version": "17.0.26",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.20.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.26.tgz",
|
||||||
"integrity": "sha512-wWZrPlihslrPpcKyCSlmIlruakxr57/buQN1RjlIeaaTWDLtJkTtRW429MoQJergvVKc4IWBpRhWw7YNh/7GVA==",
|
"integrity": "sha512-MXxuXrH2xOcv5cp/su4oz69dNQnSA90JjFw5HBd5wifw6Ihi94j7dRJm7qNsB30tnruXSCPc9qmlhGop4nh9Hw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/prop-types": "*",
|
"@types/prop-types": "*",
|
||||||
"@types/scheduler": "*",
|
"@types/scheduler": "*",
|
||||||
|
@ -3116,9 +3116,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/react-highlight": {
|
"node_modules/@types/react-highlight": {
|
||||||
"version": "0.12.3",
|
"version": "0.12.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-highlight/-/react-highlight-0.12.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-highlight/-/react-highlight-0.12.4.tgz",
|
||||||
"integrity": "sha512-mfhuHdE3dUjvRv1lvZIvda2B+VW7rkG1ufnFLKbDcRUp/L73bGUmEuEfpnjgdLgeWYho88ahQZRcMSh9GsZA0g==",
|
"integrity": "sha512-eq+1LUJYDTpZMx31KD3e8K0OJcfUlgWaxYGldKfD7uMkmg04x6O2+h6kG7Rm0SY1+XkeBWYhg2lyIFv8WpGrLQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
}
|
}
|
||||||
|
@ -3133,9 +3133,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/react-router-dom": {
|
"node_modules/@types/react-router-dom": {
|
||||||
"version": "5.1.8",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.0.tgz",
|
||||||
"integrity": "sha512-03xHyncBzG0PmDmf8pf3rehtjY0NpUj7TIN46FrT5n1ZWHPZvXz32gUyNboJ+xsL8cpg8bQVLcllptcQHvocrw==",
|
"integrity": "sha512-svUzpEpKDwK8nmfV2vpZNSsiijFNKY8+gUqGqvGGOVrXvX58k1JIJubZa5igkwacbq/0umphO5SsQn/BQsnKpw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/history": "*",
|
"@types/history": "*",
|
||||||
"@types/react": "*",
|
"@types/react": "*",
|
||||||
|
@ -4163,12 +4163,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/autoprefixer": {
|
"node_modules/autoprefixer": {
|
||||||
"version": "9.8.6",
|
"version": "9.8.7",
|
||||||
"license": "MIT",
|
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.7.tgz",
|
||||||
|
"integrity": "sha512-7Hg99B1eTH5+LgmUBUSmov1Z3bsggQJS7v3IMGo6wcScnbRuvtMc871J9J+4bSbIqa9LSX/zypFXJ8sXHpMJeQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"browserslist": "^4.12.0",
|
"browserslist": "^4.12.0",
|
||||||
"caniuse-lite": "^1.0.30001109",
|
"caniuse-lite": "^1.0.30001109",
|
||||||
"colorette": "^1.2.1",
|
"nanocolors": "^0.2.8",
|
||||||
"normalize-range": "^0.1.2",
|
"normalize-range": "^0.1.2",
|
||||||
"num2fraction": "^1.2.2",
|
"num2fraction": "^1.2.2",
|
||||||
"postcss": "^7.0.32",
|
"postcss": "^7.0.32",
|
||||||
|
@ -5562,8 +5563,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001191",
|
"version": "1.0.30001263",
|
||||||
"license": "CC-BY-4.0"
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz",
|
||||||
|
"integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw==",
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/browserslist"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/capture-exit": {
|
"node_modules/capture-exit": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
@ -8119,9 +8125,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ethers": {
|
"node_modules/ethers": {
|
||||||
"version": "5.4.6",
|
"version": "5.4.7",
|
||||||
"resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.6.tgz",
|
"resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.7.tgz",
|
||||||
"integrity": "sha512-F7LXARyB/Px3AQC6/QKedWZ8eqCkgOLORqL4B/F0Mag/K+qJSFGqsR36EaOZ6fKg3ZonI+pdbhb4A8Knt/43jQ==",
|
"integrity": "sha512-iZc5p2nqfWK1sj8RabwsPM28cr37Bpq7ehTQ5rWExBr2Y09Sn1lDKZOED26n+TsZMye7Y6mIgQ/1cwpSD8XZew==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "individual",
|
"type": "individual",
|
||||||
|
@ -8139,7 +8145,7 @@
|
||||||
"@ethersproject/address": "5.4.0",
|
"@ethersproject/address": "5.4.0",
|
||||||
"@ethersproject/base64": "5.4.0",
|
"@ethersproject/base64": "5.4.0",
|
||||||
"@ethersproject/basex": "5.4.0",
|
"@ethersproject/basex": "5.4.0",
|
||||||
"@ethersproject/bignumber": "5.4.1",
|
"@ethersproject/bignumber": "5.4.2",
|
||||||
"@ethersproject/bytes": "5.4.0",
|
"@ethersproject/bytes": "5.4.0",
|
||||||
"@ethersproject/constants": "5.4.0",
|
"@ethersproject/constants": "5.4.0",
|
||||||
"@ethersproject/contracts": "5.4.1",
|
"@ethersproject/contracts": "5.4.1",
|
||||||
|
@ -9288,9 +9294,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/highlightjs-solidity": {
|
"node_modules/highlightjs-solidity": {
|
||||||
"version": "1.2.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.1.tgz",
|
||||||
"integrity": "sha512-KXYcVzBRof3CBWHsxGffsSEAJF0YsPaOk1jgIYv2xSzrBSxkfNUJFXrlE2oZEWvYQKbPqLe4qprJyNbSDV+LZA=="
|
"integrity": "sha512-9YY+HQpXMTrF8HgRByjeQhd21GXAz2ktMPTcs6oWSj5HJR52fgsNoelMOmgigwcpt9j4tu4IVSaWaJB2n2TbvQ=="
|
||||||
},
|
},
|
||||||
"node_modules/history": {
|
"node_modules/history": {
|
||||||
"version": "4.10.1",
|
"version": "4.10.1",
|
||||||
|
@ -11877,6 +11883,11 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"node_modules/nanocolors": {
|
||||||
|
"version": "0.2.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.10.tgz",
|
||||||
|
"integrity": "sha512-i+EDWGsJClQwR/bhLIG/CObZZwaYaS5qt+yjxZbfV+77QiNHNzE9nj4d9Ut1TGZ0R0eSwPcQWzReASzXuw/7oA=="
|
||||||
|
},
|
||||||
"node_modules/nanoid": {
|
"node_modules/nanoid": {
|
||||||
"version": "3.1.23",
|
"version": "3.1.23",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz",
|
||||||
|
@ -12885,13 +12896,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss": {
|
"node_modules/postcss": {
|
||||||
"version": "7.0.36",
|
"version": "7.0.38",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.38.tgz",
|
||||||
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
|
"integrity": "sha512-wNrSHWjHDQJR/IZL5IKGxRtFgrYNaAA/UrkW2WqbtZO6uxSLMxMN+s2iqUMwnAWm3fMROlDYZB41dr0Mt7vBwQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^2.4.2",
|
"nanocolors": "^0.2.2",
|
||||||
"source-map": "^0.6.1",
|
"source-map": "^0.6.1"
|
||||||
"supports-color": "^6.1.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
|
@ -13950,55 +13960,6 @@
|
||||||
"node": ">=6.14.4"
|
"node": ">=6.14.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss/node_modules/ansi-styles": {
|
|
||||||
"version": "3.2.1",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"color-convert": "^1.9.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/postcss/node_modules/chalk": {
|
|
||||||
"version": "2.4.2",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^3.2.1",
|
|
||||||
"escape-string-regexp": "^1.0.5",
|
|
||||||
"supports-color": "^5.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/postcss/node_modules/chalk/node_modules/supports-color": {
|
|
||||||
"version": "5.5.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"has-flag": "^3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/postcss/node_modules/escape-string-regexp": {
|
|
||||||
"version": "1.0.5",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.8.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/postcss/node_modules/supports-color": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"has-flag": "^3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/prelude-ls": {
|
"node_modules/prelude-ls": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -14425,14 +14386,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-chartjs-2": {
|
"node_modules/react-chartjs-2": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.0.5.tgz",
|
||||||
"integrity": "sha512-pcbFNpkPMTkGXXJ7k7hnukbRD0ZV01qB6JQY1ontITc2IYvhGlK6BBDy28VeydYs1Dl/c5ZpRgRVEtT5GUnxcQ==",
|
"integrity": "sha512-fYr4E82agaZi9IFMe5GtOZ6WE/HWdxy/KywLNOzXsqgPkD2oo1IlrQLKMLUki/2UXko3p95TR2L8Q2rEss/opQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lodash": "^4.17.19"
|
"lodash": "^4.17.19"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"chart.js": "^3.1.0",
|
"chart.js": "^3.5.0",
|
||||||
"react": "^16.8.0 || ^17.0.0"
|
"react": "^16.8.0 || ^17.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -20513,9 +20474,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@chainlink/contracts": {
|
"@chainlink/contracts": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.2.2.tgz",
|
||||||
"integrity": "sha512-mAQgPQKiqW3tLMlp31NgcnXpwG3lttgKU0izAqKiirJ9LH7rQ+O0oHIVR5Qp2yuqgmfbLsgfdLo4GcVC8IFz3Q=="
|
"integrity": "sha512-wxXPbt7O3aZaUSG34ufFASC5amRSL6eeYCqsa+2gpqbB8Hk7B7FydEDCI5dqvAC444TlFskPHcVbizCZkRHPpw=="
|
||||||
},
|
},
|
||||||
"@cnakazawa/watch": {
|
"@cnakazawa/watch": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
|
@ -20646,9 +20607,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ethersproject/bignumber": {
|
"@ethersproject/bignumber": {
|
||||||
"version": "5.4.1",
|
"version": "5.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.2.tgz",
|
||||||
"integrity": "sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==",
|
"integrity": "sha512-oIBDhsKy5bs7j36JlaTzFgNPaZjiNDOXsdSgSpXRucUl+UA6L/1YLlFeI3cPAoodcenzF4nxNPV13pcy7XbWjA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ethersproject/bytes": "^5.4.0",
|
"@ethersproject/bytes": "^5.4.0",
|
||||||
"@ethersproject/logger": "^5.4.0",
|
"@ethersproject/logger": "^5.4.0",
|
||||||
|
@ -20956,9 +20917,9 @@
|
||||||
"integrity": "sha512-8KTCsfs5m3UgICpHLglIKAS7vc2FFOu7/vvpWcE/42SWbh+9X8EJbEyJp6W96kU5iDVlAlUv4Cqc36Z9XUpLmA=="
|
"integrity": "sha512-8KTCsfs5m3UgICpHLglIKAS7vc2FFOu7/vvpWcE/42SWbh+9X8EJbEyJp6W96kU5iDVlAlUv4Cqc36Z9XUpLmA=="
|
||||||
},
|
},
|
||||||
"@fontsource/roboto": {
|
"@fontsource/roboto": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.1.tgz",
|
||||||
"integrity": "sha512-ja4XYw/9kNRFM5Ndk9vwzHWsdBMXczyBazFkTXJQ74QQBnT0BbSsHn0pF60AU0Iznig1Wt9x3rADfG8LANvMpw=="
|
"integrity": "sha512-3mhfL+eNPG/woMNqwD/OHaW5qMpeGEBsDwzmhFmjB1yUV+M+M9P0NhP/AyHvnGz3DrqkvZ7CPzNMa+UkVLeELg=="
|
||||||
},
|
},
|
||||||
"@fontsource/roboto-mono": {
|
"@fontsource/roboto-mono": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.0",
|
||||||
|
@ -21658,9 +21619,9 @@
|
||||||
"version": "1.5.4"
|
"version": "1.5.4"
|
||||||
},
|
},
|
||||||
"@types/react": {
|
"@types/react": {
|
||||||
"version": "17.0.20",
|
"version": "17.0.26",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.20.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.26.tgz",
|
||||||
"integrity": "sha512-wWZrPlihslrPpcKyCSlmIlruakxr57/buQN1RjlIeaaTWDLtJkTtRW429MoQJergvVKc4IWBpRhWw7YNh/7GVA==",
|
"integrity": "sha512-MXxuXrH2xOcv5cp/su4oz69dNQnSA90JjFw5HBd5wifw6Ihi94j7dRJm7qNsB30tnruXSCPc9qmlhGop4nh9Hw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/prop-types": "*",
|
"@types/prop-types": "*",
|
||||||
"@types/scheduler": "*",
|
"@types/scheduler": "*",
|
||||||
|
@ -21684,9 +21645,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react-highlight": {
|
"@types/react-highlight": {
|
||||||
"version": "0.12.3",
|
"version": "0.12.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-highlight/-/react-highlight-0.12.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-highlight/-/react-highlight-0.12.4.tgz",
|
||||||
"integrity": "sha512-mfhuHdE3dUjvRv1lvZIvda2B+VW7rkG1ufnFLKbDcRUp/L73bGUmEuEfpnjgdLgeWYho88ahQZRcMSh9GsZA0g==",
|
"integrity": "sha512-eq+1LUJYDTpZMx31KD3e8K0OJcfUlgWaxYGldKfD7uMkmg04x6O2+h6kG7Rm0SY1+XkeBWYhg2lyIFv8WpGrLQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
}
|
}
|
||||||
|
@ -21701,9 +21662,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react-router-dom": {
|
"@types/react-router-dom": {
|
||||||
"version": "5.1.8",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.0.tgz",
|
||||||
"integrity": "sha512-03xHyncBzG0PmDmf8pf3rehtjY0NpUj7TIN46FrT5n1ZWHPZvXz32gUyNboJ+xsL8cpg8bQVLcllptcQHvocrw==",
|
"integrity": "sha512-svUzpEpKDwK8nmfV2vpZNSsiijFNKY8+gUqGqvGGOVrXvX58k1JIJubZa5igkwacbq/0umphO5SsQn/BQsnKpw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/history": "*",
|
"@types/history": "*",
|
||||||
"@types/react": "*",
|
"@types/react": "*",
|
||||||
|
@ -22381,11 +22342,13 @@
|
||||||
"version": "2.1.2"
|
"version": "2.1.2"
|
||||||
},
|
},
|
||||||
"autoprefixer": {
|
"autoprefixer": {
|
||||||
"version": "9.8.6",
|
"version": "9.8.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.7.tgz",
|
||||||
|
"integrity": "sha512-7Hg99B1eTH5+LgmUBUSmov1Z3bsggQJS7v3IMGo6wcScnbRuvtMc871J9J+4bSbIqa9LSX/zypFXJ8sXHpMJeQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"browserslist": "^4.12.0",
|
"browserslist": "^4.12.0",
|
||||||
"caniuse-lite": "^1.0.30001109",
|
"caniuse-lite": "^1.0.30001109",
|
||||||
"colorette": "^1.2.1",
|
"nanocolors": "^0.2.8",
|
||||||
"normalize-range": "^0.1.2",
|
"normalize-range": "^0.1.2",
|
||||||
"num2fraction": "^1.2.2",
|
"num2fraction": "^1.2.2",
|
||||||
"postcss": "^7.0.32",
|
"postcss": "^7.0.32",
|
||||||
|
@ -23399,7 +23362,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30001191"
|
"version": "1.0.30001263",
|
||||||
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001263.tgz",
|
||||||
|
"integrity": "sha512-doiV5dft6yzWO1WwU19kt8Qz8R0/8DgEziz6/9n2FxUasteZNwNNYSmJO3GLBH8lCVE73AB1RPDPAeYbcO5Cvw=="
|
||||||
},
|
},
|
||||||
"capture-exit": {
|
"capture-exit": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
@ -25078,9 +25043,9 @@
|
||||||
"version": "1.8.1"
|
"version": "1.8.1"
|
||||||
},
|
},
|
||||||
"ethers": {
|
"ethers": {
|
||||||
"version": "5.4.6",
|
"version": "5.4.7",
|
||||||
"resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.6.tgz",
|
"resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.7.tgz",
|
||||||
"integrity": "sha512-F7LXARyB/Px3AQC6/QKedWZ8eqCkgOLORqL4B/F0Mag/K+qJSFGqsR36EaOZ6fKg3ZonI+pdbhb4A8Knt/43jQ==",
|
"integrity": "sha512-iZc5p2nqfWK1sj8RabwsPM28cr37Bpq7ehTQ5rWExBr2Y09Sn1lDKZOED26n+TsZMye7Y6mIgQ/1cwpSD8XZew==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ethersproject/abi": "5.4.1",
|
"@ethersproject/abi": "5.4.1",
|
||||||
"@ethersproject/abstract-provider": "5.4.1",
|
"@ethersproject/abstract-provider": "5.4.1",
|
||||||
|
@ -25088,7 +25053,7 @@
|
||||||
"@ethersproject/address": "5.4.0",
|
"@ethersproject/address": "5.4.0",
|
||||||
"@ethersproject/base64": "5.4.0",
|
"@ethersproject/base64": "5.4.0",
|
||||||
"@ethersproject/basex": "5.4.0",
|
"@ethersproject/basex": "5.4.0",
|
||||||
"@ethersproject/bignumber": "5.4.1",
|
"@ethersproject/bignumber": "5.4.2",
|
||||||
"@ethersproject/bytes": "5.4.0",
|
"@ethersproject/bytes": "5.4.0",
|
||||||
"@ethersproject/constants": "5.4.0",
|
"@ethersproject/constants": "5.4.0",
|
||||||
"@ethersproject/contracts": "5.4.1",
|
"@ethersproject/contracts": "5.4.1",
|
||||||
|
@ -25876,9 +25841,9 @@
|
||||||
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="
|
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="
|
||||||
},
|
},
|
||||||
"highlightjs-solidity": {
|
"highlightjs-solidity": {
|
||||||
"version": "1.2.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.1.tgz",
|
||||||
"integrity": "sha512-KXYcVzBRof3CBWHsxGffsSEAJF0YsPaOk1jgIYv2xSzrBSxkfNUJFXrlE2oZEWvYQKbPqLe4qprJyNbSDV+LZA=="
|
"integrity": "sha512-9YY+HQpXMTrF8HgRByjeQhd21GXAz2ktMPTcs6oWSj5HJR52fgsNoelMOmgigwcpt9j4tu4IVSaWaJB2n2TbvQ=="
|
||||||
},
|
},
|
||||||
"history": {
|
"history": {
|
||||||
"version": "4.10.1",
|
"version": "4.10.1",
|
||||||
|
@ -27562,6 +27527,11 @@
|
||||||
"version": "2.14.2",
|
"version": "2.14.2",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"nanocolors": {
|
||||||
|
"version": "0.2.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.10.tgz",
|
||||||
|
"integrity": "sha512-i+EDWGsJClQwR/bhLIG/CObZZwaYaS5qt+yjxZbfV+77QiNHNzE9nj4d9Ut1TGZ0R0eSwPcQWzReASzXuw/7oA=="
|
||||||
|
},
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "3.1.23",
|
"version": "3.1.23",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz",
|
||||||
|
@ -28212,46 +28182,12 @@
|
||||||
"version": "0.1.1"
|
"version": "0.1.1"
|
||||||
},
|
},
|
||||||
"postcss": {
|
"postcss": {
|
||||||
"version": "7.0.36",
|
"version": "7.0.38",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.38.tgz",
|
||||||
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
|
"integrity": "sha512-wNrSHWjHDQJR/IZL5IKGxRtFgrYNaAA/UrkW2WqbtZO6uxSLMxMN+s2iqUMwnAWm3fMROlDYZB41dr0Mt7vBwQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^2.4.2",
|
"nanocolors": "^0.2.2",
|
||||||
"source-map": "^0.6.1",
|
"source-map": "^0.6.1"
|
||||||
"supports-color": "^6.1.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": {
|
|
||||||
"version": "3.2.1",
|
|
||||||
"requires": {
|
|
||||||
"color-convert": "^1.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chalk": {
|
|
||||||
"version": "2.4.2",
|
|
||||||
"requires": {
|
|
||||||
"ansi-styles": "^3.2.1",
|
|
||||||
"escape-string-regexp": "^1.0.5",
|
|
||||||
"supports-color": "^5.3.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"supports-color": {
|
|
||||||
"version": "5.5.0",
|
|
||||||
"requires": {
|
|
||||||
"has-flag": "^3.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"escape-string-regexp": {
|
|
||||||
"version": "1.0.5"
|
|
||||||
},
|
|
||||||
"supports-color": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"requires": {
|
|
||||||
"has-flag": "^3.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postcss-attribute-case-insensitive": {
|
"postcss-attribute-case-insensitive": {
|
||||||
|
@ -29288,9 +29224,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-chartjs-2": {
|
"react-chartjs-2": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-3.0.5.tgz",
|
||||||
"integrity": "sha512-pcbFNpkPMTkGXXJ7k7hnukbRD0ZV01qB6JQY1ontITc2IYvhGlK6BBDy28VeydYs1Dl/c5ZpRgRVEtT5GUnxcQ==",
|
"integrity": "sha512-fYr4E82agaZi9IFMe5GtOZ6WE/HWdxy/KywLNOzXsqgPkD2oo1IlrQLKMLUki/2UXko3p95TR2L8Q2rEss/opQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"lodash": "^4.17.19"
|
"lodash": "^4.17.19"
|
||||||
}
|
}
|
||||||
|
|
21
package.json
21
package.json
|
@ -5,10 +5,10 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blackbox-vision/react-qr-reader": "^5.0.0",
|
"@blackbox-vision/react-qr-reader": "^5.0.0",
|
||||||
"@chainlink/contracts": "^0.2.1",
|
"@chainlink/contracts": "^0.2.2",
|
||||||
"@craco/craco": "^6.3.0",
|
"@craco/craco": "^6.3.0",
|
||||||
"@fontsource/fira-code": "^4.5.1",
|
"@fontsource/fira-code": "^4.5.1",
|
||||||
"@fontsource/roboto": "^4.5.0",
|
"@fontsource/roboto": "^4.5.1",
|
||||||
"@fontsource/roboto-mono": "^4.5.0",
|
"@fontsource/roboto-mono": "^4.5.0",
|
||||||
"@fontsource/space-grotesk": "^4.5.0",
|
"@fontsource/space-grotesk": "^4.5.0",
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
||||||
|
@ -22,19 +22,19 @@
|
||||||
"@testing-library/user-event": "^12.1.10",
|
"@testing-library/user-event": "^12.1.10",
|
||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^26.0.24",
|
||||||
"@types/node": "^14.17.5",
|
"@types/node": "^14.17.5",
|
||||||
"@types/react": "^17.0.20",
|
"@types/react": "^17.0.26",
|
||||||
"@types/react-blockies": "^1.4.1",
|
"@types/react-blockies": "^1.4.1",
|
||||||
"@types/react-dom": "^17.0.9",
|
"@types/react-dom": "^17.0.9",
|
||||||
"@types/react-highlight": "^0.12.3",
|
"@types/react-highlight": "^0.12.4",
|
||||||
"@types/react-router-dom": "^5.1.8",
|
"@types/react-router-dom": "^5.3.0",
|
||||||
"@types/react-syntax-highlighter": "^13.5.2",
|
"@types/react-syntax-highlighter": "^13.5.2",
|
||||||
"chart.js": "^3.5.1",
|
"chart.js": "^3.5.1",
|
||||||
"ethers": "^5.4.6",
|
"ethers": "^5.4.7",
|
||||||
"highlightjs-solidity": "^1.2.0",
|
"highlightjs-solidity": "^2.0.1",
|
||||||
"query-string": "^7.0.1",
|
"query-string": "^7.0.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-blockies": "^1.4.1",
|
"react-blockies": "^1.4.1",
|
||||||
"react-chartjs-2": "^3.0.4",
|
"react-chartjs-2": "^3.0.5",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-error-boundary": "^3.1.3",
|
"react-error-boundary": "^3.1.3",
|
||||||
"react-image": "^4.0.3",
|
"react-image": "^4.0.3",
|
||||||
|
@ -53,6 +53,7 @@
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"source-map-explorer": "source-map-explorer build/static/js/*.js",
|
"source-map-explorer": "source-map-explorer build/static/js/*.js",
|
||||||
"assets-start": "docker run --rm -p 3001:80 --name otterscan-assets -d -v$(pwd)/4bytes/signatures:/usr/share/nginx/html/signatures/ -v$(pwd)/trustwallet/blockchains/ethereum/assets:/usr/share/nginx/html/assets -v$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf nginx:1.21.1-alpine",
|
"assets-start": "docker run --rm -p 3001:80 --name otterscan-assets -d -v$(pwd)/4bytes/signatures:/usr/share/nginx/html/signatures/ -v$(pwd)/trustwallet/blockchains/ethereum/assets:/usr/share/nginx/html/assets -v$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf nginx:1.21.1-alpine",
|
||||||
|
"assets-start-with-param-names": "docker run --rm -p 3001:80 --name otterscan-assets -d -v$(pwd)/4bytes/with_parameter_names:/usr/share/nginx/html/signatures/ -v$(pwd)/trustwallet/blockchains/ethereum/assets:/usr/share/nginx/html/assets -v$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf nginx:1.21.1-alpine",
|
||||||
"assets-stop": "docker stop otterscan-assets",
|
"assets-stop": "docker stop otterscan-assets",
|
||||||
"docker-build": "DOCKER_BUILDKIT=1 docker build -t otterscan -f Dockerfile .",
|
"docker-build": "DOCKER_BUILDKIT=1 docker build -t otterscan -f Dockerfile .",
|
||||||
"docker-start": "docker run --rm -p 5000:80 --name otterscan -d otterscan",
|
"docker-start": "docker run --rm -p 5000:80 --name otterscan -d otterscan",
|
||||||
|
@ -77,8 +78,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^9.8.6",
|
"autoprefixer": "^9.8.7",
|
||||||
"postcss": "^7.0.36",
|
"postcss": "^7.0.38",
|
||||||
"source-map-explorer": "^2.5.2",
|
"source-map-explorer": "^2.5.2",
|
||||||
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.6"
|
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.6"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import DecoratedAddressLink from "./components/DecoratedAddressLink";
|
||||||
import FormattedBalance from "./components/FormattedBalance";
|
import FormattedBalance from "./components/FormattedBalance";
|
||||||
import {
|
import {
|
||||||
AddressContext,
|
AddressContext,
|
||||||
TokenMetas,
|
TokenMeta,
|
||||||
TokenTransfer,
|
TokenTransfer,
|
||||||
TransactionData,
|
TransactionData,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
@ -15,14 +15,14 @@ import {
|
||||||
type TokenTransferItemProps = {
|
type TokenTransferItemProps = {
|
||||||
t: TokenTransfer;
|
t: TokenTransfer;
|
||||||
txData: TransactionData;
|
txData: TransactionData;
|
||||||
tokenMetas: TokenMetas;
|
tokenMeta?: TokenMeta | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: handle partial
|
// TODO: handle partial
|
||||||
const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
||||||
t,
|
t,
|
||||||
txData,
|
txData,
|
||||||
tokenMetas,
|
tokenMeta,
|
||||||
}) => (
|
}) => (
|
||||||
<div className="flex items-baseline space-x-2 px-2 py-1 truncate hover:bg-gray-100">
|
<div className="flex items-baseline space-x-2 px-2 py-1 truncate hover:bg-gray-100">
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
|
@ -57,7 +57,7 @@ const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
||||||
<ValueHighlighter value={t.value}>
|
<ValueHighlighter value={t.value}>
|
||||||
<FormattedBalance
|
<FormattedBalance
|
||||||
value={t.value}
|
value={t.value}
|
||||||
decimals={tokenMetas[t.token].decimals}
|
decimals={tokenMeta?.decimals ?? 0}
|
||||||
/>
|
/>
|
||||||
</ValueHighlighter>
|
</ValueHighlighter>
|
||||||
</span>
|
</span>
|
||||||
|
@ -65,11 +65,9 @@ const TokenTransferItem: React.FC<TokenTransferItemProps> = ({
|
||||||
<DecoratedAddressLink
|
<DecoratedAddressLink
|
||||||
address={t.token}
|
address={t.token}
|
||||||
text={
|
text={
|
||||||
tokenMetas[t.token]
|
tokenMeta ? `${tokenMeta.name} (${tokenMeta.symbol})` : undefined
|
||||||
? `${tokenMetas[t.token].name} (${tokenMetas[t.token].symbol})`
|
|
||||||
: ""
|
|
||||||
}
|
}
|
||||||
tokenMeta={tokenMetas[t.token]}
|
tokenMeta={tokenMeta}
|
||||||
/>
|
/>
|
||||||
</AddressHighlighter>
|
</AddressHighlighter>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -82,6 +82,8 @@ const Transaction: React.FC = () => {
|
||||||
<Details
|
<Details
|
||||||
txData={txData}
|
txData={txData}
|
||||||
txDesc={txDesc}
|
txDesc={txDesc}
|
||||||
|
userDoc={metadata?.output.userdoc}
|
||||||
|
devDoc={metadata?.output.devdoc}
|
||||||
internalOps={internalOps}
|
internalOps={internalOps}
|
||||||
sendsEthToMiner={sendsEthToMiner}
|
sendsEthToMiner={sendsEthToMiner}
|
||||||
ethUSDPrice={blockETHUSDPrice}
|
ethUSDPrice={blockETHUSDPrice}
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { use4Bytes } from "../use4Bytes";
|
import { rawInputTo4Bytes, use4Bytes } from "../use4Bytes";
|
||||||
|
|
||||||
type MethodNameProps = {
|
type MethodNameProps = {
|
||||||
data: string;
|
data: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const MethodName: React.FC<MethodNameProps> = ({ data }) => {
|
const MethodName: React.FC<MethodNameProps> = ({ data }) => {
|
||||||
const rawFourBytes = data.slice(0, 10);
|
const rawFourBytes = rawInputTo4Bytes(data);
|
||||||
const methodName = use4Bytes(rawFourBytes);
|
const fourBytesEntry = use4Bytes(rawFourBytes);
|
||||||
const isSimpleTransfer = data === "0x";
|
const methodName = fourBytesEntry?.name ?? rawFourBytes;
|
||||||
|
const isSimpleTransfer = rawFourBytes === "0x";
|
||||||
const methodTitle = isSimpleTransfer
|
const methodTitle = isSimpleTransfer
|
||||||
? "ETH Transfer"
|
? "ETH Transfer"
|
||||||
: methodName === rawFourBytes
|
: methodName === rawFourBytes
|
||||||
|
|
|
@ -6,13 +6,16 @@ type NavTabProps = {
|
||||||
href: string;
|
href: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: migrate activeClassName because of: https://github.com/remix-run/react-router/releases/tag/v5.3.0
|
|
||||||
// TODO: @types/react-router-dom still doesn't support function in className
|
|
||||||
const NavTab: React.FC<NavTabProps> = ({ href, children }) => (
|
const NavTab: React.FC<NavTabProps> = ({ href, children }) => (
|
||||||
<Tab as={Fragment}>
|
<Tab as={Fragment}>
|
||||||
<NavLink
|
<NavLink
|
||||||
className="text-gray-500 border-transparent hover:text-link-blue text-sm font-bold px-3 py-3 border-b-2"
|
className={(isActive) =>
|
||||||
activeClassName="text-link-blue border-link-blue"
|
`${
|
||||||
|
isActive
|
||||||
|
? "text-link-blue border-link-blue"
|
||||||
|
: "text-gray-500 border-transparent"
|
||||||
|
} hover:text-link-blue text-sm font-bold px-3 py-3 border-b-2`
|
||||||
|
}
|
||||||
to={href}
|
to={href}
|
||||||
exact
|
exact
|
||||||
replace
|
replace
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import AddressHighlighter from "../components/AddressHighlighter";
|
|
||||||
import DecoratedAddressLink from "../components/DecoratedAddressLink";
|
|
||||||
import Copy from "../components/Copy";
|
|
||||||
import { ParamType } from "@ethersproject/abi";
|
|
||||||
import { TransactionData } from "../types";
|
|
||||||
|
|
||||||
type DecodedParamRowProps = {
|
|
||||||
prefix?: string;
|
|
||||||
i?: number | undefined;
|
|
||||||
r: any;
|
|
||||||
paramType: ParamType;
|
|
||||||
txData: TransactionData;
|
|
||||||
};
|
|
||||||
|
|
||||||
const DecodedParamRow: React.FC<DecodedParamRowProps> = ({
|
|
||||||
prefix,
|
|
||||||
i,
|
|
||||||
r,
|
|
||||||
paramType,
|
|
||||||
txData,
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<tr className="grid grid-cols-12 gap-x-2 py-2 hover:bg-gray-100">
|
|
||||||
<td className="col-span-3 pl-1">
|
|
||||||
{prefix && <span className="text-gray-300">{prefix}</span>}
|
|
||||||
{paramType.name}{" "}
|
|
||||||
{i !== undefined && (
|
|
||||||
<span className="text-gray-400 text-xs">({i})</span>
|
|
||||||
)}
|
|
||||||
</td>
|
|
||||||
<td className="col-span-1 text-gray-500">{paramType.type}</td>
|
|
||||||
<td className="col-span-8 pr-1 font-code break-all">
|
|
||||||
{paramType.baseType === "address" ? (
|
|
||||||
<div className="flex items-baseline space-x-2 -ml-1 mr-3">
|
|
||||||
<AddressHighlighter address={r.toString()}>
|
|
||||||
<DecoratedAddressLink
|
|
||||||
address={r.toString()}
|
|
||||||
miner={r.toString() === txData.confirmedData?.miner}
|
|
||||||
txFrom={r.toString() === txData.from}
|
|
||||||
txTo={r.toString() === txData.to}
|
|
||||||
/>
|
|
||||||
</AddressHighlighter>
|
|
||||||
<Copy value={r.toString()} />
|
|
||||||
</div>
|
|
||||||
) : paramType.baseType === "bool" ? (
|
|
||||||
<span className={`${r ? "text-green-700" : "text-red-700"}`}>
|
|
||||||
{r.toString()}
|
|
||||||
</span>
|
|
||||||
) : paramType.baseType === "bytes" ? (
|
|
||||||
<span>
|
|
||||||
{r.toString()}{" "}
|
|
||||||
<span className="font-sans text-xs text-gray-400">
|
|
||||||
{r.toString().length / 2 - 1}{" "}
|
|
||||||
{r.toString().length / 2 - 1 === 1 ? "byte" : "bytes"}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
) : paramType.baseType === "tuple" ? (
|
|
||||||
<></>
|
|
||||||
) : (
|
|
||||||
r.toString()
|
|
||||||
)}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{paramType.baseType === "tuple" &&
|
|
||||||
r.map((e: any, idx: number) => (
|
|
||||||
<DecodedParamRow key={idx}
|
|
||||||
prefix={paramType.name + "."}
|
|
||||||
r={e}
|
|
||||||
paramType={paramType.components[idx]}
|
|
||||||
txData={txData}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default React.memo(DecodedParamRow);
|
|
|
@ -1,5 +1,9 @@
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { TransactionDescription } from "@ethersproject/abi";
|
import {
|
||||||
|
TransactionDescription,
|
||||||
|
Fragment,
|
||||||
|
Interface,
|
||||||
|
} from "@ethersproject/abi";
|
||||||
import { BigNumber } from "@ethersproject/bignumber";
|
import { BigNumber } from "@ethersproject/bignumber";
|
||||||
import { toUtf8String } from "@ethersproject/strings";
|
import { toUtf8String } from "@ethersproject/strings";
|
||||||
import { Tab } from "@headlessui/react";
|
import { Tab } from "@headlessui/react";
|
||||||
|
@ -31,11 +35,15 @@ import ExternalLink from "../components/ExternalLink";
|
||||||
import RelativePosition from "../components/RelativePosition";
|
import RelativePosition from "../components/RelativePosition";
|
||||||
import PercentagePosition from "../components/PercentagePosition";
|
import PercentagePosition from "../components/PercentagePosition";
|
||||||
import ModeTab from "../components/ModeTab";
|
import ModeTab from "../components/ModeTab";
|
||||||
import DecodedParamsTable from "./DecodedParamsTable";
|
import DecodedParamsTable from "./decoder/DecodedParamsTable";
|
||||||
|
import { rawInputTo4Bytes, use4Bytes } from "../use4Bytes";
|
||||||
|
import { DevDoc, UserDoc } from "../useSourcify";
|
||||||
|
|
||||||
type DetailsProps = {
|
type DetailsProps = {
|
||||||
txData: TransactionData;
|
txData: TransactionData;
|
||||||
txDesc: TransactionDescription | null | undefined;
|
txDesc: TransactionDescription | null | undefined;
|
||||||
|
userDoc?: UserDoc | undefined;
|
||||||
|
devDoc?: DevDoc | undefined;
|
||||||
internalOps?: InternalOperation[];
|
internalOps?: InternalOperation[];
|
||||||
sendsEthToMiner: boolean;
|
sendsEthToMiner: boolean;
|
||||||
ethUSDPrice: BigNumber | undefined;
|
ethUSDPrice: BigNumber | undefined;
|
||||||
|
@ -44,6 +52,8 @@ type DetailsProps = {
|
||||||
const Details: React.FC<DetailsProps> = ({
|
const Details: React.FC<DetailsProps> = ({
|
||||||
txData,
|
txData,
|
||||||
txDesc,
|
txDesc,
|
||||||
|
userDoc,
|
||||||
|
devDoc,
|
||||||
internalOps,
|
internalOps,
|
||||||
sendsEthToMiner,
|
sendsEthToMiner,
|
||||||
ethUSDPrice,
|
ethUSDPrice,
|
||||||
|
@ -56,12 +66,28 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
try {
|
try {
|
||||||
return txData && toUtf8String(txData.data);
|
return txData && toUtf8String(txData.data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error while converting input data to string");
|
console.warn("Error while converting input data to string");
|
||||||
console.error(err);
|
console.warn(err);
|
||||||
return "<can't decode>";
|
return "<can't decode>";
|
||||||
}
|
}
|
||||||
}, [txData]);
|
}, [txData]);
|
||||||
|
|
||||||
|
const fourBytes = rawInputTo4Bytes(txData.data);
|
||||||
|
const fourBytesEntry = use4Bytes(fourBytes);
|
||||||
|
const fourBytesTxDesc = useMemo(() => {
|
||||||
|
if (!txData || !fourBytesEntry?.signature) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const sig = fourBytesEntry?.signature;
|
||||||
|
const functionFragment = Fragment.fromString(`function ${sig}`);
|
||||||
|
const intf = new Interface([functionFragment]);
|
||||||
|
return intf.parseTransaction({ data: txData.data, value: txData.value });
|
||||||
|
}, [txData, fourBytesEntry]);
|
||||||
|
|
||||||
|
const resolvedTxDesc = txDesc ?? fourBytesTxDesc;
|
||||||
|
const userMethod = txDesc ? userDoc?.methods[txDesc.signature] : undefined;
|
||||||
|
const devMethod = txDesc ? devDoc?.methods[txDesc.signature] : undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ContentFrame tabs>
|
<ContentFrame tabs>
|
||||||
<InfoRow title="Transaction Hash">
|
<InfoRow title="Transaction Hash">
|
||||||
|
@ -187,7 +213,7 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
key={i}
|
key={i}
|
||||||
t={t}
|
t={t}
|
||||||
txData={txData}
|
txData={txData}
|
||||||
tokenMetas={txData.tokenMetas}
|
tokenMeta={txData.tokenMetas[t.token]}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
@ -322,15 +348,20 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
</Tab.List>
|
</Tab.List>
|
||||||
<Tab.Panels>
|
<Tab.Panels>
|
||||||
<Tab.Panel>
|
<Tab.Panel>
|
||||||
{txDesc === undefined ? (
|
{fourBytes === "0x" ? (
|
||||||
|
<>No parameters</>
|
||||||
|
) : resolvedTxDesc === undefined ? (
|
||||||
<>Waiting for data...</>
|
<>Waiting for data...</>
|
||||||
) : txDesc === null ? (
|
) : resolvedTxDesc === null ? (
|
||||||
<>No decoded data</>
|
<>No decoded data</>
|
||||||
) : (
|
) : (
|
||||||
<DecodedParamsTable
|
<DecodedParamsTable
|
||||||
args={txDesc.args}
|
args={resolvedTxDesc.args}
|
||||||
paramTypes={txDesc.functionFragment.inputs}
|
paramTypes={resolvedTxDesc.functionFragment.inputs}
|
||||||
txData={txData}
|
txData={txData}
|
||||||
|
hasParamNames={resolvedTxDesc === txDesc}
|
||||||
|
userMethod={userMethod}
|
||||||
|
devMethod={devMethod}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Tab.Panel>
|
</Tab.Panel>
|
||||||
|
|
|
@ -6,8 +6,8 @@ import AddressHighlighter from "../components/AddressHighlighter";
|
||||||
import DecoratedAddressLink from "../components/DecoratedAddressLink";
|
import DecoratedAddressLink from "../components/DecoratedAddressLink";
|
||||||
import Copy from "../components/Copy";
|
import Copy from "../components/Copy";
|
||||||
import ModeTab from "../components/ModeTab";
|
import ModeTab from "../components/ModeTab";
|
||||||
import DecodedParamsTable from "./DecodedParamsTable";
|
import DecodedParamsTable from "./decoder/DecodedParamsTable";
|
||||||
import DecodedLogSignature from "./DecodedLogSignature";
|
import DecodedLogSignature from "./decoder/DecodedLogSignature";
|
||||||
import { TransactionData } from "../types";
|
import { TransactionData } from "../types";
|
||||||
|
|
||||||
type LogEntryProps = {
|
type LogEntryProps = {
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
import React from "react";
|
||||||
|
import AddressHighlighter from "../../components/AddressHighlighter";
|
||||||
|
import DecoratedAddressLink from "../../components/DecoratedAddressLink";
|
||||||
|
import Copy from "../../components/Copy";
|
||||||
|
import { TransactionData } from "../../types";
|
||||||
|
|
||||||
|
type AddressDecoderProps = {
|
||||||
|
r: any;
|
||||||
|
txData: TransactionData;
|
||||||
|
};
|
||||||
|
|
||||||
|
const AddressDecoder: React.FC<AddressDecoderProps> = ({ r, txData }) => (
|
||||||
|
<div className="flex items-baseline space-x-2 -ml-1 mr-3">
|
||||||
|
<AddressHighlighter address={r.toString()}>
|
||||||
|
<DecoratedAddressLink
|
||||||
|
address={r.toString()}
|
||||||
|
miner={r.toString() === txData.confirmedData?.miner}
|
||||||
|
txFrom={r.toString() === txData.from}
|
||||||
|
txTo={r.toString() === txData.to}
|
||||||
|
/>
|
||||||
|
</AddressHighlighter>
|
||||||
|
<Copy value={r.toString()} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default React.memo(AddressDecoder);
|
|
@ -0,0 +1,13 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
type BooleanDecoderProps = {
|
||||||
|
r: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
const BooleanDecoder: React.FC<BooleanDecoderProps> = ({ r }) => (
|
||||||
|
<span className={`${r ? "text-green-700" : "text-red-700"}`}>
|
||||||
|
{r.toString()}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default React.memo(BooleanDecoder);
|
|
@ -0,0 +1,17 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
type BytesDecoderProps = {
|
||||||
|
r: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
const BytesDecoder: React.FC<BytesDecoderProps> = ({ r }) => (
|
||||||
|
<span>
|
||||||
|
{r.toString()}{" "}
|
||||||
|
<span className="font-sans text-xs text-gray-400">
|
||||||
|
{r.toString().length / 2 - 1}{" "}
|
||||||
|
{r.toString().length / 2 - 1 === 1 ? "byte" : "bytes"}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default React.memo(BytesDecoder);
|
|
@ -0,0 +1,120 @@
|
||||||
|
import React, { ReactNode, useState } from "react";
|
||||||
|
import { ParamType } from "@ethersproject/abi";
|
||||||
|
import { Switch } from "@headlessui/react";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { faQuestionCircle } from "@fortawesome/free-regular-svg-icons/faQuestionCircle";
|
||||||
|
import { faQuestionCircle as faQuestionCircleSolid } from "@fortawesome/free-solid-svg-icons/faQuestionCircle";
|
||||||
|
import Uint256Decoder from "./Uint256Decoder";
|
||||||
|
import AddressDecoder from "./AddressDecoder";
|
||||||
|
import BooleanDecoder from "./BooleanDecoder";
|
||||||
|
import BytesDecoder from "./BytesDecoder";
|
||||||
|
import { TransactionData } from "../../types";
|
||||||
|
|
||||||
|
type DecodedParamRowProps = {
|
||||||
|
prefix?: ReactNode;
|
||||||
|
i?: number | undefined;
|
||||||
|
r: any;
|
||||||
|
paramType: ParamType;
|
||||||
|
txData: TransactionData;
|
||||||
|
arrayElem?: number | undefined;
|
||||||
|
help?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
const DecodedParamRow: React.FC<DecodedParamRowProps> = ({
|
||||||
|
prefix,
|
||||||
|
i,
|
||||||
|
r,
|
||||||
|
paramType,
|
||||||
|
txData,
|
||||||
|
arrayElem,
|
||||||
|
help,
|
||||||
|
}) => {
|
||||||
|
const [showHelp, setShowHelp] = useState<boolean>(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<tr className="grid grid-cols-12 gap-x-2 py-2 hover:bg-gray-100">
|
||||||
|
<td className="col-span-3 pl-1">
|
||||||
|
<div className="flex space-x-2 items-baseline">
|
||||||
|
<span>
|
||||||
|
{prefix && <span className="text-gray-300">{prefix}</span>}
|
||||||
|
{arrayElem !== undefined ? (
|
||||||
|
<span className="text-gray-400">
|
||||||
|
{" "}
|
||||||
|
[<span className="text-black">{arrayElem}</span>]
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
{paramType.name ?? <span className="italic">param_{i}</span>}{" "}
|
||||||
|
{i !== undefined && (
|
||||||
|
<span className="text-gray-400 text-xs">({i})</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
{help && (
|
||||||
|
<Switch
|
||||||
|
checked={showHelp}
|
||||||
|
onChange={setShowHelp}
|
||||||
|
className="text-gray-500 self-center"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon
|
||||||
|
icon={showHelp ? faQuestionCircleSolid : faQuestionCircle}
|
||||||
|
size="1x"
|
||||||
|
/>
|
||||||
|
</Switch>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{help && showHelp && <div className="mt-2 text-gray-400">{help}</div>}
|
||||||
|
</td>
|
||||||
|
<td className="col-span-1 text-gray-500">{paramType.type}</td>
|
||||||
|
<td className="col-span-8 pr-1 font-code break-all">
|
||||||
|
{paramType.baseType === "uint256" ? (
|
||||||
|
<Uint256Decoder r={r} />
|
||||||
|
) : paramType.baseType === "address" ? (
|
||||||
|
<AddressDecoder r={r} txData={txData} />
|
||||||
|
) : paramType.baseType === "bool" ? (
|
||||||
|
<BooleanDecoder r={r} />
|
||||||
|
) : paramType.baseType === "bytes" ? (
|
||||||
|
<BytesDecoder r={r} />
|
||||||
|
) : paramType.baseType === "tuple" ||
|
||||||
|
paramType.baseType === "array" ? (
|
||||||
|
<></>
|
||||||
|
) : (
|
||||||
|
r.toString()
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{paramType.baseType === "tuple" &&
|
||||||
|
r.map((e: any, idx: number) => (
|
||||||
|
<DecodedParamRow
|
||||||
|
key={idx}
|
||||||
|
prefix={
|
||||||
|
paramType.name ? (
|
||||||
|
paramType.name + "."
|
||||||
|
) : (
|
||||||
|
<span className="italic">param_{i}.</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
i={idx}
|
||||||
|
r={e}
|
||||||
|
paramType={paramType.components[idx]}
|
||||||
|
txData={txData}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
{paramType.baseType === "array" &&
|
||||||
|
r.map((e: any, idx: number) => (
|
||||||
|
<DecodedParamRow
|
||||||
|
key={idx}
|
||||||
|
prefix={paramType.name ?? <span className="italic">param_{i}</span>}
|
||||||
|
r={e}
|
||||||
|
paramType={paramType.arrayChildren}
|
||||||
|
txData={txData}
|
||||||
|
arrayElem={idx}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default React.memo(DecodedParamRow);
|
|
@ -1,20 +1,26 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { ParamType, Result } from "@ethersproject/abi";
|
import { ParamType, Result } from "@ethersproject/abi";
|
||||||
import DecodedParamRow from "./DecodedParamRow";
|
import DecodedParamRow from "./DecodedParamRow";
|
||||||
import { TransactionData } from "../types";
|
import { TransactionData } from "../../types";
|
||||||
|
import { DevMethod, UserMethod } from "../../useSourcify";
|
||||||
|
|
||||||
type DecodedParamsTableProps = {
|
type DecodedParamsTableProps = {
|
||||||
args: Result;
|
args: Result;
|
||||||
paramTypes: ParamType[];
|
paramTypes: ParamType[];
|
||||||
txData: TransactionData;
|
txData: TransactionData;
|
||||||
|
hasParamNames?: boolean;
|
||||||
|
userMethod?: UserMethod | undefined;
|
||||||
|
devMethod?: DevMethod | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
||||||
args,
|
args,
|
||||||
paramTypes,
|
paramTypes,
|
||||||
txData,
|
txData,
|
||||||
|
hasParamNames = true,
|
||||||
|
devMethod,
|
||||||
}) => (
|
}) => (
|
||||||
<table className="border rounded w-full">
|
<table className="border w-full">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="grid grid-cols-12 text-left gap-x-2 py-2 bg-gray-100">
|
<tr className="grid grid-cols-12 text-left gap-x-2 py-2 bg-gray-100">
|
||||||
<th className="col-span-3 pl-1">
|
<th className="col-span-3 pl-1">
|
||||||
|
@ -23,6 +29,15 @@ const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
||||||
<th className="col-span-1">type</th>
|
<th className="col-span-1">type</th>
|
||||||
<th className="col-span-8 pr-1">value</th>
|
<th className="col-span-8 pr-1">value</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
{!hasParamNames && (
|
||||||
|
<tr className="grid grid-cols-12 text-left gap-x-2 py-2 bg-yellow-100 text-red-700">
|
||||||
|
<th className="col-span-12 px-1">
|
||||||
|
{paramTypes.length > 0 && paramTypes[0].name !== null
|
||||||
|
? "Parameter names are estimated."
|
||||||
|
: "Parameter names are not available."}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="divide-y">
|
<tbody className="divide-y">
|
||||||
{args.map((r, i) => (
|
{args.map((r, i) => (
|
||||||
|
@ -32,6 +47,7 @@ const DecodedParamsTable: React.FC<DecodedParamsTableProps> = ({
|
||||||
r={r}
|
r={r}
|
||||||
paramType={paramTypes[i]}
|
paramType={paramTypes[i]}
|
||||||
txData={txData}
|
txData={txData}
|
||||||
|
help={devMethod?.params?.[paramTypes[i].name]}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
|
@ -0,0 +1,69 @@
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { BigNumber } from "@ethersproject/bignumber";
|
||||||
|
import { hexlify, hexZeroPad } from "@ethersproject/bytes";
|
||||||
|
import { commify, formatEther } from "@ethersproject/units";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { faSync } from "@fortawesome/free-solid-svg-icons/faSync";
|
||||||
|
|
||||||
|
type Uint256DecoderProps = {
|
||||||
|
r: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DisplayMode {
|
||||||
|
RAW,
|
||||||
|
EIGHTEEN_DECIMALS,
|
||||||
|
HEX,
|
||||||
|
_LAST,
|
||||||
|
}
|
||||||
|
|
||||||
|
const VERY_BIG_NUMBER = BigNumber.from(10).pow(BigNumber.from(36));
|
||||||
|
|
||||||
|
const initDisplayMode = (r: any): DisplayMode => {
|
||||||
|
const n = BigNumber.from(r);
|
||||||
|
if (n.gte(VERY_BIG_NUMBER)) {
|
||||||
|
return DisplayMode.HEX;
|
||||||
|
}
|
||||||
|
return DisplayMode.RAW;
|
||||||
|
};
|
||||||
|
|
||||||
|
const Uint256Decoder: React.FC<Uint256DecoderProps> = ({ r }) => {
|
||||||
|
const [displayMode, setDisplayMode] = useState<DisplayMode>(
|
||||||
|
initDisplayMode(r)
|
||||||
|
);
|
||||||
|
|
||||||
|
const toggleModes = () => {
|
||||||
|
const next = displayMode + 1;
|
||||||
|
setDisplayMode(next === DisplayMode._LAST ? 0 : next);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex items-baseline space-x-2">
|
||||||
|
<button
|
||||||
|
className="flex items-baseline space-x-2 rounded-lg bg-gray-50 text-gray-300 hover:text-gray-500 font-sans text-xs px-3 py-1 min-w-max"
|
||||||
|
onClick={toggleModes}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<FontAwesomeIcon icon={faSync} size="1x" />
|
||||||
|
</div>
|
||||||
|
<span>
|
||||||
|
{displayMode === DisplayMode.RAW
|
||||||
|
? "Raw"
|
||||||
|
: displayMode === DisplayMode.HEX
|
||||||
|
? "Hex"
|
||||||
|
: "18 dec"}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<span>
|
||||||
|
{displayMode === DisplayMode.RAW ? (
|
||||||
|
<>{commify(r.toString())}</>
|
||||||
|
) : displayMode === DisplayMode.HEX ? (
|
||||||
|
<>{hexZeroPad(hexlify(r), 32)}</>
|
||||||
|
) : (
|
||||||
|
<>{commify(formatEther(r))}</>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default React.memo(Uint256Decoder);
|
|
@ -108,6 +108,4 @@ export type TokenMeta = {
|
||||||
decimals: number;
|
decimals: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TokenMetas = {
|
export type TokenMetas = Record<string, TokenMeta>;
|
||||||
[tokenAddress: string]: TokenMeta;
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,16 +2,48 @@ import { useState, useEffect, useContext } from "react";
|
||||||
import { RuntimeContext } from "./useRuntime";
|
import { RuntimeContext } from "./useRuntime";
|
||||||
import { fourBytesURL } from "./url";
|
import { fourBytesURL } from "./url";
|
||||||
|
|
||||||
const cache = new Map<string, string | null>();
|
export type FourBytesEntry = {
|
||||||
|
name: string;
|
||||||
|
signature: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
const simpleTransfer: FourBytesEntry = {
|
||||||
|
name: "Transfer",
|
||||||
|
signature: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
|
const fullCache = new Map<string, FourBytesEntry | null>();
|
||||||
|
|
||||||
|
export const rawInputTo4Bytes = (rawInput: string) => rawInput.slice(0, 10);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract 4bytes DB info
|
||||||
|
*
|
||||||
|
* @param rawFourBytes an hex string containing the 4bytes signature in the "0xXXXXXXXX" format.
|
||||||
|
*/
|
||||||
|
export const use4Bytes = (
|
||||||
|
rawFourBytes: string
|
||||||
|
): FourBytesEntry | null | undefined => {
|
||||||
|
if (rawFourBytes !== "0x") {
|
||||||
|
if (rawFourBytes.length !== 10 || !rawFourBytes.startsWith("0x")) {
|
||||||
|
throw new Error(
|
||||||
|
`rawFourBytes must contain a 4 bytes hex method signature starting with 0x; received value: "${rawFourBytes}"`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const use4Bytes = (rawFourBytes: string) => {
|
|
||||||
const runtime = useContext(RuntimeContext);
|
const runtime = useContext(RuntimeContext);
|
||||||
const assetsURLPrefix = runtime.config?.assetsURLPrefix;
|
const assetsURLPrefix = runtime.config?.assetsURLPrefix;
|
||||||
|
|
||||||
const [name, setName] = useState<string>();
|
const fourBytes = rawFourBytes.slice(2);
|
||||||
const [fourBytes, setFourBytes] = useState<string>();
|
const [entry, setEntry] = useState<FourBytesEntry | null | undefined>(
|
||||||
|
fullCache.get(fourBytes)
|
||||||
|
);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (assetsURLPrefix === undefined || fourBytes === undefined) {
|
if (assetsURLPrefix === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (fourBytes === "") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,51 +52,47 @@ export const use4Bytes = (rawFourBytes: string) => {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
console.error(`Signature does not exist in 4bytes DB: ${fourBytes}`);
|
console.error(`Signature does not exist in 4bytes DB: ${fourBytes}`);
|
||||||
|
fullCache.set(fourBytes, null);
|
||||||
// Use the default 4 bytes as name
|
setEntry(null);
|
||||||
setName(rawFourBytes);
|
|
||||||
cache.set(fourBytes, null);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sig = await res.text();
|
// Get only the first occurrence, for now ignore alternative param names
|
||||||
|
const sigs = await res.text();
|
||||||
|
const sig = sigs.split(";")[0];
|
||||||
const cut = sig.indexOf("(");
|
const cut = sig.indexOf("(");
|
||||||
let method = sig.slice(0, cut);
|
let method = sig.slice(0, cut);
|
||||||
method = method.charAt(0).toUpperCase() + method.slice(1);
|
method = method.charAt(0).toUpperCase() + method.slice(1);
|
||||||
setName(method);
|
|
||||||
cache.set(fourBytes, method);
|
const entry: FourBytesEntry = {
|
||||||
return;
|
name: method,
|
||||||
|
signature: sig,
|
||||||
|
};
|
||||||
|
setEntry(entry);
|
||||||
|
fullCache.set(fourBytes, entry);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error(`Couldn't fetch signature URL ${signatureURL}`, err);
|
console.error(`Couldn't fetch signature URL ${signatureURL}`, err);
|
||||||
|
setEntry(null);
|
||||||
// Use the default 4 bytes as name
|
fullCache.set(fourBytes, null);
|
||||||
setName(rawFourBytes);
|
|
||||||
});
|
});
|
||||||
}, [rawFourBytes, assetsURLPrefix, fourBytes]);
|
}, [fourBytes, assetsURLPrefix]);
|
||||||
|
|
||||||
if (rawFourBytes === "0x") {
|
if (rawFourBytes === "0x") {
|
||||||
return "Transfer";
|
return simpleTransfer;
|
||||||
}
|
}
|
||||||
if (assetsURLPrefix === undefined) {
|
if (assetsURLPrefix === undefined) {
|
||||||
return rawFourBytes;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to resolve 4bytes name
|
// Try to resolve 4bytes name
|
||||||
const entry = cache.get(rawFourBytes.slice(2));
|
if (entry === null || entry === undefined) {
|
||||||
if (entry === null) {
|
|
||||||
return rawFourBytes;
|
|
||||||
}
|
|
||||||
if (entry !== undefined) {
|
|
||||||
// Simulates LRU
|
|
||||||
cache.delete(entry);
|
|
||||||
cache.set(rawFourBytes.slice(2), entry);
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
if (name === undefined && fourBytes === undefined) {
|
|
||||||
setFourBytes(rawFourBytes.slice(2));
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return name;
|
// Simulates LRU
|
||||||
|
// TODO: implement LRU purging
|
||||||
|
fullCache.delete(fourBytes);
|
||||||
|
fullCache.set(fourBytes, entry);
|
||||||
|
return entry;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,33 @@ import { Interface } from "@ethersproject/abi";
|
||||||
import { TransactionData } from "./types";
|
import { TransactionData } from "./types";
|
||||||
import { sourcifyMetadata, SourcifySource, sourcifySourceFile } from "./url";
|
import { sourcifyMetadata, SourcifySource, sourcifySourceFile } from "./url";
|
||||||
|
|
||||||
|
export type UserMethod = {
|
||||||
|
notice?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UserEvent = {
|
||||||
|
notice?: string | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UserDoc = {
|
||||||
|
kind: "user";
|
||||||
|
version?: number | undefined;
|
||||||
|
notice?: string | undefined;
|
||||||
|
methods: Record<string, UserMethod>;
|
||||||
|
events: Record<string, UserEvent>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DevMethod = {
|
||||||
|
params?: Record<string, string>;
|
||||||
|
returns?: Record<string, string>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DevDoc = {
|
||||||
|
kind: "dev";
|
||||||
|
version?: number | undefined;
|
||||||
|
methods: Record<string, DevMethod>;
|
||||||
|
};
|
||||||
|
|
||||||
export type Metadata = {
|
export type Metadata = {
|
||||||
version: string;
|
version: string;
|
||||||
language: string;
|
language: string;
|
||||||
|
@ -33,8 +60,8 @@ export type Metadata = {
|
||||||
};
|
};
|
||||||
output: {
|
output: {
|
||||||
abi: any[];
|
abi: any[];
|
||||||
userdocs: any[];
|
userdoc?: UserDoc | undefined;
|
||||||
devdoc: any[];
|
devdoc?: DevDoc | undefined;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7bfa06acc125a4874d86bc1fa8e4547a46846e31
|
Subproject commit d612796060acaa8a621b1dd25c1a41a24452953e
|
Loading…
Reference in New Issue