From 7ee335f8ed0a2228b39769a7daefedf445ff51cf Mon Sep 17 00:00:00 2001 From: avalkov Date: Thu, 7 Jul 2022 11:15:43 +0300 Subject: [PATCH 1/2] Integrate smart contracts execution tab --- .env-dev | 11 +- .env.sample | 5 + docker-compose.yaml | 17 + package-lock.json | 909 +++++++++++++++++- package.json | 3 + public/locales/en/accounts.json | 4 +- .../account_details/components/index.ts | 2 + .../components/smart_contract/index.tsx | 190 ++++ src/screens/account_details/hooks.ts | 5 + src/screens/account_details/index.tsx | 87 +- src/screens/account_details/types.ts | 1 + src/screens/account_details/utils.ts | 34 + src/utils/smart_contract_interaction.ts | 48 + 13 files changed, 1261 insertions(+), 55 deletions(-) create mode 100644 docker-compose.yaml create mode 100644 src/screens/account_details/components/smart_contract/index.tsx create mode 100644 src/utils/smart_contract_interaction.ts diff --git a/.env-dev b/.env-dev index 219aa72d14..414ff83713 100644 --- a/.env-dev +++ b/.env-dev @@ -1,7 +1,12 @@ -NEXT_PUBLIC_GRAPHQL_URL=http://localhost:8080/v1/graphql -NEXT_PUBLIC_GRAPHQL_WS=ws://localhost:8080/v1/graphql +NEXT_PUBLIC_GRAPHQL_URL=http://34.122.182.3:8080/v1/graphql +NEXT_PUBLIC_GRAPHQL_WS=ws://34.122.182.3:8080/v1/graphql NODE_ENV=development PORT=3000 NEXT_PUBLIC_URL=http://localhost:3000 -NEXT_PUBLIC_WS_CHAIN_URL=ws://localhost:26657/websocket +NEXT_PUBLIC_WS_CHAIN_URL=ws://34.123.153.6:26657/websocket NEXT_PUBLIC_CHAIN_STATUS=testnet +NEXT_PUBLIC_CONTRACTS_URL=http://localhost:3333 +NEXT_PUBLIC_RPC_URL=http://34.123.153.6:26657 +# TODO: This can be fetched direclty from hasura +NEXT_PUBLIC_CHAIN_ID=cudos-testnet-private-3 +NEXT_PUBLIC_GAS_PRICE=5000000000000acudos diff --git a/.env.sample b/.env.sample index dbb987ca30..513bb713e8 100644 --- a/.env.sample +++ b/.env.sample @@ -13,3 +13,8 @@ PORT=3000 NEXT_PUBLIC_URL=http://localhost:3000 NEXT_PUBLIC_RPC_WEBSOCKET=http://localhost:26657/websocket NEXT_PUBLIC_CHAIN_TYPE=testnet +NEXT_PUBLIC_CONTRACTS_URL=http://localhost:3333 +NEXT_PUBLIC_RPC_URL=http://localhost:26657 +# TODO: This can be fetched direclty from hasura +NEXT_PUBLIC_CHAIN_ID=cudos-testnet-private-3 +NEXT_PUBLIC_GAS_PRICE=5000000000000acudos diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000..b6b43c8054 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,17 @@ +version: '3.6' +services: + big-dipper-2: + build: + context: . + dockerfile: Dockerfile-dev + args: + NEXT_PUBLIC_GRAPHQL_URL: ${NEXT_PUBLIC_GRAPHQL_URL} + NEXT_PUBLIC_GRAPHQL_WS: ${NEXT_PUBLIC_GRAPHQL_WS} + NEXT_PUBLIC_URL: ${NEXT_PUBLIC_URL} + NEXT_PUBLIC_WS_CHAIN_URL: ${NEXT_PUBLIC_WS_CHAIN_URL} + NEXT_PUBLIC_CHAIN_STATUS: ${NEXT_PUBLIC_CHAIN_STATUS} + NODE_ENV: ${NODE_ENV} + PORT: ${PORT} + restart: always + ports: + - "3000:3000" diff --git a/package-lock.json b/package-lock.json index 3e2993b92c..b6654447a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@apollo/client": "^3.1.5", + "@cosmjs/stargate": "^0.28.10", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@material-ui/core": "^4.11.3", @@ -25,6 +26,7 @@ "color": "^3.1.3", "copy-to-clipboard": "^3.3.1", "cors": "^2.8.5", + "cudosjs": "^0.1.0", "dayjs": "^1.10.4", "dompurify": "^2.3.1", "dotenv": "^8.2.0", @@ -45,6 +47,7 @@ "react-cookie-consent": "^7.2.1", "react-dom": "^17.0.2", "react-json-pretty": "^2.2.0", + "react-jsonschema-form": "^1.8.1", "react-share": "^4.4.0", "react-toastify": "^7.0.3", "react-virtualized-auto-sizer": "^1.0.4", @@ -1608,6 +1611,18 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/runtime-corejs2": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.18.6.tgz", + "integrity": "sha512-bTfcOSG6AHGVCd37zqoBax2e6r4Gy+q3sW2BgLo3h63NdU30C2AKXW0swyQsX/Ik+Zd6eVKQ9TTBKJ9tZQgWig==", + "dependencies": { + "core-js": "^2.6.12", + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/runtime-corejs3": { "version": "7.13.10", "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.10.tgz", @@ -1718,6 +1733,164 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@confio/ics23": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz", + "integrity": "sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==", + "dependencies": { + "@noble/hashes": "^1.0.0", + "protobufjs": "^6.8.8" + } + }, + "node_modules/@cosmjs/amino": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.10.tgz", + "integrity": "sha512-z6o0ygmO5mlpeT65MhLlnfIbZqP/1xPeMUOfJcibfk32dM+aK3JbqJuwQcE8Og95vPcNlYNNrzqokIwUpO6/xw==", + "dependencies": { + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/utils": "0.28.10" + } + }, + "node_modules/@cosmjs/cosmwasm-stargate": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.28.10.tgz", + "integrity": "sha512-1f25MO2YLXzbEnFlm/f7gXJYgT6oE/gkmQ+eNaYcQH7Hs1qwXPd5C9Bso40wbZz67iR3wa8q85e/03+TFJsvGg==", + "dependencies": { + "@cosmjs/amino": "0.28.10", + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/proto-signing": "0.28.10", + "@cosmjs/stargate": "0.28.10", + "@cosmjs/tendermint-rpc": "0.28.10", + "@cosmjs/utils": "0.28.10", + "cosmjs-types": "^0.4.0", + "long": "^4.0.0", + "pako": "^2.0.2" + } + }, + "node_modules/@cosmjs/crypto": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.10.tgz", + "integrity": "sha512-wkupCdyOazEN+zMBR0TZoeLG1u93gZdqXNvYU8D2qiavZq0sDHSVdOYikmQXPkjp46UZaqErsbkxJ8pC0K8e1g==", + "dependencies": { + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/utils": "0.28.10", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.3", + "libsodium-wrappers": "^0.7.6" + } + }, + "node_modules/@cosmjs/encoding": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.10.tgz", + "integrity": "sha512-jxb5V40jS1F+sGjtGbNybyruEjZ+/ILkhx63g3ZRHzeo0SQilpepg6hRzmGT3+OFNBBjr92wIEZMVRV+qbm5wQ==", + "dependencies": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + } + }, + "node_modules/@cosmjs/encoding/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "node_modules/@cosmjs/json-rpc": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.28.10.tgz", + "integrity": "sha512-tnMzEYnHsNM27CK+mGTnMNKGQFET8msfQugTd9RSYCo5FzTK+rUlJ78waQKQV5juhjs9xrY49oxkkWR34iQeCw==", + "dependencies": { + "@cosmjs/stream": "0.28.10", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/math": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.10.tgz", + "integrity": "sha512-XSpoPy+rf4ddX9xP+0EpVQHqApLIm7M2IqYl/EDPaSKJAd1r3PNVsj/Yl0Eb57TuGyEfN5SyswSHpSCJxF15zw==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cosmjs/proto-signing": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.10.tgz", + "integrity": "sha512-IsE1zQPiEbGpYqPHulFWEOyDySLcicDNTZ+RUoxjyhwyONwpX0vYq4rLNGNuXDjul0rTd0N8kB0Uy+IIHBHy2g==", + "dependencies": { + "@cosmjs/amino": "0.28.10", + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/utils": "0.28.10", + "cosmjs-types": "^0.4.0", + "long": "^4.0.0" + } + }, + "node_modules/@cosmjs/socket": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.28.10.tgz", + "integrity": "sha512-H7wv0k1QOENoUcqHopB6I8dG9+HxS+ixDlxHUyVe3XoaxDKwUiRjELfl66TMqVJvprbbFKlcjlHY9gztbYhjww==", + "dependencies": { + "@cosmjs/stream": "0.28.10", + "isomorphic-ws": "^4.0.1", + "ws": "^7", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/stargate": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.28.10.tgz", + "integrity": "sha512-KFDcc/LeTBnipGUKbtre9d0mBy2gNvqf82AZ+j9q7QXOKuPmvraVfZGfombGWq4AImtZZdytEFO196epKq9CtQ==", + "dependencies": { + "@confio/ics23": "^0.6.8", + "@cosmjs/amino": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/proto-signing": "0.28.10", + "@cosmjs/stream": "0.28.10", + "@cosmjs/tendermint-rpc": "0.28.10", + "@cosmjs/utils": "0.28.10", + "cosmjs-types": "^0.4.0", + "long": "^4.0.0", + "protobufjs": "~6.11.3", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/stream": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.28.10.tgz", + "integrity": "sha512-rKdlKPBSYqoDqqNfDbT0diUVacr0/PSja50AASwPVBJNUqBa3QOm1xFn0qbE9l9LgskIH66UmUNwgNRAUJIRQQ==", + "dependencies": { + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/tendermint-rpc": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.28.10.tgz", + "integrity": "sha512-FcsRkGmaYrGLLx16xWZfauG9E6PBKMG4cnP5aDTBnvDgfbAWzYiOj1BLjCswWzfDq90kvRUxjXs6rZkQauD7cA==", + "dependencies": { + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/json-rpc": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/socket": "0.28.10", + "@cosmjs/stream": "0.28.10", + "@cosmjs/utils": "0.28.10", + "axios": "^0.21.2", + "readonly-date": "^1.0.0", + "xstream": "^11.14.0" + } + }, + "node_modules/@cosmjs/utils": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.10.tgz", + "integrity": "sha512-S0t2kFRiAo1MvIrbXlfrGdsn2D3PApyO1d+GCze14Cg4QOOGWDcTsd6VhHcxKhETO1Z9ofEhE4soJ8ZldBlnpg==" + }, "node_modules/@cspotcode/source-map-consumer": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", @@ -5633,6 +5806,17 @@ "node": ">= 10" } }, + "node_modules/@noble/hashes": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -5677,6 +5861,60 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@samverschueren/stream-to-observable": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz", @@ -6420,6 +6658,11 @@ "@types/node": "*" } }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, "node_modules/@types/node": { "version": "14.14.37", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", @@ -7003,7 +7246,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -7624,7 +7866,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -7657,6 +7898,14 @@ "url": "https://opencollective.com/bigjs" } }, + "node_modules/bignumber.js": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", + "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -7683,6 +7932,11 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -7847,6 +8101,11 @@ "node": ">=8" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, "node_modules/browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", @@ -8512,6 +8771,13 @@ "toggle-selection": "^1.0.6" } }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, "node_modules/core-js-compat": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.0.tgz", @@ -8618,6 +8884,15 @@ "@iarna/toml": "^2.2.5" } }, + "node_modules/cosmjs-types": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz", + "integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==", + "dependencies": { + "long": "^4.0.0", + "protobufjs": "~6.11.2" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -8879,6 +9154,19 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.16.tgz", "integrity": "sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q==" }, + "node_modules/cudosjs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cudosjs/-/cudosjs-0.1.0.tgz", + "integrity": "sha512-JInJP6z8e7fwXYEf2NLpjvAUaoA+UYuvKJw8JfwbiMLGuKlsAukatvB0RRyzFU4yQ2N/rlWAS2OZ85qFu72q2Q==", + "dependencies": { + "@cosmjs/cosmwasm-stargate": "^0.28.4", + "@cosmjs/crypto": "^0.28.4", + "@cosmjs/proto-signing": "^0.28.4", + "@cosmjs/stargate": "^0.28.4", + "@cosmjs/tendermint-rpc": "^0.28.4", + "bignumber.js": "^9.0.2" + } + }, "node_modules/d3-array": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", @@ -9119,7 +9407,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, "dependencies": { "object-keys": "^1.0.12" }, @@ -9376,6 +9663,30 @@ "node": ">=0.10.0" } }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/elliptic/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "node_modules/emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -10721,8 +11032,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-equals": { "version": "2.0.0", @@ -11114,6 +11424,20 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -11381,6 +11705,15 @@ "node": ">=8" } }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/header-case": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", @@ -11405,6 +11738,16 @@ "node": ">=10.0.0" } }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -16491,8 +16834,7 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify": { "version": "1.0.1", @@ -16777,6 +17119,19 @@ "node": ">= 0.8.0" } }, + "node_modules/libsodium": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.10.tgz", + "integrity": "sha512-eY+z7hDrDKxkAK+QKZVNv92A5KYkxfvIshtBJkmg5TSiCnYqZP3i9OO9whE79Pwgm4jGaoHgkM4ao/b9Cyu4zQ==" + }, + "node_modules/libsodium-wrappers": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz", + "integrity": "sha512-pO3F1Q9NPLB/MWIhehim42b/Fwb30JNScCNh8TcQ/kIc+qGLQch8ag8wb0keK3EP5kbGakk1H8Wwo7v+36rNQg==", + "dependencies": { + "libsodium": "^0.7.0" + } + }, "node_modules/lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -17338,6 +17693,11 @@ "node": ">=4" } }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -17593,6 +17953,16 @@ "node": ">=4" } }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -18025,7 +18395,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -18363,6 +18732,11 @@ "node": ">=8" } }, + "node_modules/pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -18728,6 +19102,31 @@ "react-is": "^16.8.1" } }, + "node_modules/protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", @@ -18766,7 +19165,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, "engines": { "node": ">=6" } @@ -18943,6 +19341,28 @@ "react-dom": ">=15.0" } }, + "node_modules/react-jsonschema-form": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/react-jsonschema-form/-/react-jsonschema-form-1.8.1.tgz", + "integrity": "sha512-aaDloxNAcGXOOOcdKOxxqEEn5oDlPUZgWcs8unXXB9vjBRgCF8rCm/wVSv1u2G5ih0j/BX6Ewd/WjI2g00lPdg==", + "dependencies": { + "@babel/runtime-corejs2": "^7.4.5", + "ajv": "^6.7.0", + "core-js": "^2.5.7", + "lodash": "^4.17.15", + "prop-types": "^15.5.8", + "react-is": "^16.8.4", + "react-lifecycles-compat": "^3.0.4", + "shortid": "^2.2.14" + }, + "engines": { + "node": ">=6", + "npm": ">=2.14.7" + }, + "peerDependencies": { + "react": ">=15" + } + }, "node_modules/react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -19248,6 +19668,11 @@ "node": ">= 6" } }, + "node_modules/readonly-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readonly-date/-/readonly-date-1.0.0.tgz", + "integrity": "sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==" + }, "node_modules/recharts": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.0.9.tgz", @@ -19983,6 +20408,19 @@ "node": ">=8" } }, + "node_modules/shortid": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", + "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", + "dependencies": { + "nanoid": "^2.1.0" + } + }, + "node_modules/shortid/node_modules/nanoid": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -21570,7 +22008,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -21930,6 +22367,15 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, + "node_modules/xstream": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", + "integrity": "sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==", + "dependencies": { + "globalthis": "^1.0.1", + "symbol-observable": "^2.0.3" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -23219,6 +23665,15 @@ "regenerator-runtime": "^0.13.4" } }, + "@babel/runtime-corejs2": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.18.6.tgz", + "integrity": "sha512-bTfcOSG6AHGVCd37zqoBax2e6r4Gy+q3sW2BgLo3h63NdU30C2AKXW0swyQsX/Ik+Zd6eVKQ9TTBKJ9tZQgWig==", + "requires": { + "core-js": "^2.6.12", + "regenerator-runtime": "^0.13.4" + } + }, "@babel/runtime-corejs3": { "version": "7.13.10", "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.10.tgz", @@ -23310,6 +23765,166 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@confio/ics23": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz", + "integrity": "sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==", + "requires": { + "@noble/hashes": "^1.0.0", + "protobufjs": "^6.8.8" + } + }, + "@cosmjs/amino": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.10.tgz", + "integrity": "sha512-z6o0ygmO5mlpeT65MhLlnfIbZqP/1xPeMUOfJcibfk32dM+aK3JbqJuwQcE8Og95vPcNlYNNrzqokIwUpO6/xw==", + "requires": { + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/utils": "0.28.10" + } + }, + "@cosmjs/cosmwasm-stargate": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.28.10.tgz", + "integrity": "sha512-1f25MO2YLXzbEnFlm/f7gXJYgT6oE/gkmQ+eNaYcQH7Hs1qwXPd5C9Bso40wbZz67iR3wa8q85e/03+TFJsvGg==", + "requires": { + "@cosmjs/amino": "0.28.10", + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/proto-signing": "0.28.10", + "@cosmjs/stargate": "0.28.10", + "@cosmjs/tendermint-rpc": "0.28.10", + "@cosmjs/utils": "0.28.10", + "cosmjs-types": "^0.4.0", + "long": "^4.0.0", + "pako": "^2.0.2" + } + }, + "@cosmjs/crypto": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.10.tgz", + "integrity": "sha512-wkupCdyOazEN+zMBR0TZoeLG1u93gZdqXNvYU8D2qiavZq0sDHSVdOYikmQXPkjp46UZaqErsbkxJ8pC0K8e1g==", + "requires": { + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/utils": "0.28.10", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.3", + "libsodium-wrappers": "^0.7.6" + } + }, + "@cosmjs/encoding": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.10.tgz", + "integrity": "sha512-jxb5V40jS1F+sGjtGbNybyruEjZ+/ILkhx63g3ZRHzeo0SQilpepg6hRzmGT3+OFNBBjr92wIEZMVRV+qbm5wQ==", + "requires": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + }, + "dependencies": { + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + } + } + }, + "@cosmjs/json-rpc": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.28.10.tgz", + "integrity": "sha512-tnMzEYnHsNM27CK+mGTnMNKGQFET8msfQugTd9RSYCo5FzTK+rUlJ78waQKQV5juhjs9xrY49oxkkWR34iQeCw==", + "requires": { + "@cosmjs/stream": "0.28.10", + "xstream": "^11.14.0" + } + }, + "@cosmjs/math": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.10.tgz", + "integrity": "sha512-XSpoPy+rf4ddX9xP+0EpVQHqApLIm7M2IqYl/EDPaSKJAd1r3PNVsj/Yl0Eb57TuGyEfN5SyswSHpSCJxF15zw==", + "requires": { + "bn.js": "^5.2.0" + } + }, + "@cosmjs/proto-signing": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.10.tgz", + "integrity": "sha512-IsE1zQPiEbGpYqPHulFWEOyDySLcicDNTZ+RUoxjyhwyONwpX0vYq4rLNGNuXDjul0rTd0N8kB0Uy+IIHBHy2g==", + "requires": { + "@cosmjs/amino": "0.28.10", + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/utils": "0.28.10", + "cosmjs-types": "^0.4.0", + "long": "^4.0.0" + } + }, + "@cosmjs/socket": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.28.10.tgz", + "integrity": "sha512-H7wv0k1QOENoUcqHopB6I8dG9+HxS+ixDlxHUyVe3XoaxDKwUiRjELfl66TMqVJvprbbFKlcjlHY9gztbYhjww==", + "requires": { + "@cosmjs/stream": "0.28.10", + "isomorphic-ws": "^4.0.1", + "ws": "^7", + "xstream": "^11.14.0" + } + }, + "@cosmjs/stargate": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.28.10.tgz", + "integrity": "sha512-KFDcc/LeTBnipGUKbtre9d0mBy2gNvqf82AZ+j9q7QXOKuPmvraVfZGfombGWq4AImtZZdytEFO196epKq9CtQ==", + "requires": { + "@confio/ics23": "^0.6.8", + "@cosmjs/amino": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/proto-signing": "0.28.10", + "@cosmjs/stream": "0.28.10", + "@cosmjs/tendermint-rpc": "0.28.10", + "@cosmjs/utils": "0.28.10", + "cosmjs-types": "^0.4.0", + "long": "^4.0.0", + "protobufjs": "~6.11.3", + "xstream": "^11.14.0" + } + }, + "@cosmjs/stream": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.28.10.tgz", + "integrity": "sha512-rKdlKPBSYqoDqqNfDbT0diUVacr0/PSja50AASwPVBJNUqBa3QOm1xFn0qbE9l9LgskIH66UmUNwgNRAUJIRQQ==", + "requires": { + "xstream": "^11.14.0" + } + }, + "@cosmjs/tendermint-rpc": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.28.10.tgz", + "integrity": "sha512-FcsRkGmaYrGLLx16xWZfauG9E6PBKMG4cnP5aDTBnvDgfbAWzYiOj1BLjCswWzfDq90kvRUxjXs6rZkQauD7cA==", + "requires": { + "@cosmjs/crypto": "0.28.10", + "@cosmjs/encoding": "0.28.10", + "@cosmjs/json-rpc": "0.28.10", + "@cosmjs/math": "0.28.10", + "@cosmjs/socket": "0.28.10", + "@cosmjs/stream": "0.28.10", + "@cosmjs/utils": "0.28.10", + "axios": "^0.21.2", + "readonly-date": "^1.0.0", + "xstream": "^11.14.0" + } + }, + "@cosmjs/utils": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.10.tgz", + "integrity": "sha512-S0t2kFRiAo1MvIrbXlfrGdsn2D3PApyO1d+GCze14Cg4QOOGWDcTsd6VhHcxKhETO1Z9ofEhE4soJ8ZldBlnpg==" + }, "@cspotcode/source-map-consumer": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", @@ -26246,6 +26861,11 @@ "integrity": "sha512-JtYuWzKXKLDMgE/xTcFtCm1MiCIRaAc5XYZfYX3n/ZWSI1SJS/GMm+Su0SAHJgRFavJh6U/p998YwO/iGTIgqQ==", "optional": true }, + "@noble/hashes": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -26277,6 +26897,60 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz", "integrity": "sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA==" }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "@samverschueren/stream-to-observable": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz", @@ -26830,6 +27504,11 @@ "@types/node": "*" } }, + "@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, "@types/node": { "version": "14.14.37", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", @@ -27282,7 +27961,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -27757,8 +28435,7 @@ "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "bech32": { "version": "2.0.0", @@ -27770,6 +28447,11 @@ "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==" }, + "bignumber.js": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", + "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==" + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -27795,6 +28477,11 @@ } } }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -27916,6 +28603,11 @@ "fill-range": "^7.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, "browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", @@ -28458,6 +29150,11 @@ "toggle-selection": "^1.0.6" } }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" + }, "core-js-compat": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.0.tgz", @@ -28540,6 +29237,15 @@ "@iarna/toml": "^2.2.5" } }, + "cosmjs-types": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz", + "integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==", + "requires": { + "long": "^4.0.0", + "protobufjs": "~6.11.2" + } + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -28767,6 +29473,19 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.16.tgz", "integrity": "sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q==" }, + "cudosjs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cudosjs/-/cudosjs-0.1.0.tgz", + "integrity": "sha512-JInJP6z8e7fwXYEf2NLpjvAUaoA+UYuvKJw8JfwbiMLGuKlsAukatvB0RRyzFU4yQ2N/rlWAS2OZ85qFu72q2Q==", + "requires": { + "@cosmjs/cosmwasm-stargate": "^0.28.4", + "@cosmjs/crypto": "^0.28.4", + "@cosmjs/proto-signing": "^0.28.4", + "@cosmjs/stargate": "^0.28.4", + "@cosmjs/tendermint-rpc": "^0.28.4", + "bignumber.js": "^9.0.2" + } + }, "d3-array": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", @@ -28982,7 +29701,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -29193,6 +29911,32 @@ "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", "dev": true }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + } + } + }, "emittery": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", @@ -30194,8 +30938,7 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-equals": { "version": "2.0.0", @@ -30495,6 +31238,14 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "requires": { + "define-properties": "^1.1.3" + } + }, "globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -30689,6 +31440,15 @@ "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "header-case": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", @@ -30712,6 +31472,16 @@ "resolved": "https://registry.npmjs.org/helmet/-/helmet-4.6.0.tgz", "integrity": "sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg==" }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -34627,8 +35397,7 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-stable-stringify": { "version": "1.0.1", @@ -34882,6 +35651,19 @@ "type-check": "~0.4.0" } }, + "libsodium": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.10.tgz", + "integrity": "sha512-eY+z7hDrDKxkAK+QKZVNv92A5KYkxfvIshtBJkmg5TSiCnYqZP3i9OO9whE79Pwgm4jGaoHgkM4ao/b9Cyu4zQ==" + }, + "libsodium-wrappers": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz", + "integrity": "sha512-pO3F1Q9NPLB/MWIhehim42b/Fwb30JNScCNh8TcQ/kIc+qGLQch8ag8wb0keK3EP5kbGakk1H8Wwo7v+36rNQg==", + "requires": { + "libsodium": "^0.7.0" + } + }, "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -35332,6 +36114,11 @@ } } }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -35520,6 +36307,16 @@ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -35813,8 +36610,7 @@ "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { "version": "4.1.2", @@ -36057,6 +36853,11 @@ "semver": "^6.2.0" } }, + "pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" + }, "param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -36351,6 +37152,26 @@ "react-is": "^16.8.1" } }, + "protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + } + }, "proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", @@ -36385,8 +37206,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "pupa": { "version": "2.1.1", @@ -36511,6 +37331,21 @@ "prop-types": "^15.6.2" } }, + "react-jsonschema-form": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/react-jsonschema-form/-/react-jsonschema-form-1.8.1.tgz", + "integrity": "sha512-aaDloxNAcGXOOOcdKOxxqEEn5oDlPUZgWcs8unXXB9vjBRgCF8rCm/wVSv1u2G5ih0j/BX6Ewd/WjI2g00lPdg==", + "requires": { + "@babel/runtime-corejs2": "^7.4.5", + "ajv": "^6.7.0", + "core-js": "^2.5.7", + "lodash": "^4.17.15", + "prop-types": "^15.5.8", + "react-is": "^16.8.4", + "react-lifecycles-compat": "^3.0.4", + "shortid": "^2.2.14" + } + }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -36739,6 +37574,11 @@ "util-deprecate": "^1.0.1" } }, + "readonly-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readonly-date/-/readonly-date-1.0.0.tgz", + "integrity": "sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==" + }, "recharts": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.0.9.tgz", @@ -37322,6 +38162,21 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "shortid": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", + "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", + "requires": { + "nanoid": "^2.1.0" + }, + "dependencies": { + "nanoid": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + } + } + }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -38538,7 +39393,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -38827,6 +39681,15 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, + "xstream": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", + "integrity": "sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==", + "requires": { + "globalthis": "^1.0.1", + "symbol-observable": "^2.0.3" + } + }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 0425302197..3180cd96ef 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "@apollo/client": "^3.1.5", + "@cosmjs/stargate": "^0.28.10", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@material-ui/core": "^4.11.3", @@ -32,6 +33,7 @@ "color": "^3.1.3", "copy-to-clipboard": "^3.3.1", "cors": "^2.8.5", + "cudosjs": "^0.1.0", "dayjs": "^1.10.4", "dompurify": "^2.3.1", "dotenv": "^8.2.0", @@ -52,6 +54,7 @@ "react-cookie-consent": "^7.2.1", "react-dom": "^17.0.2", "react-json-pretty": "^2.2.0", + "react-jsonschema-form": "^1.8.1", "react-share": "^4.4.0", "react-toastify": "^7.0.3", "react-virtualized-auto-sizer": "^1.0.4", diff --git a/public/locales/en/accounts.json b/public/locales/en/accounts.json index 4fbb28a813..2a407efaa3 100644 --- a/public/locales/en/accounts.json +++ b/public/locales/en/accounts.json @@ -39,5 +39,7 @@ "label": "Label", "codeId": "Code Id", "instaBlock": "Instantiated At Block", - "collateralTransactions": "Collateral Transactions" + "collateralTransactions": "Collateral Transactions", + "smartContractMessages": "Messages", + "smartContractInteraction": "Interact" } diff --git a/src/screens/account_details/components/index.ts b/src/screens/account_details/components/index.ts index 155ef1ad8b..dda72df706 100644 --- a/src/screens/account_details/components/index.ts +++ b/src/screens/account_details/components/index.ts @@ -4,6 +4,7 @@ import Staking from './staking'; import Transactions from './transactions'; import OtherTokens from './other_tokens'; import SimpleBalance from './simple_balance'; +import SmartContractInteraction from './smart_contract'; export { Overview, @@ -12,4 +13,5 @@ export { Transactions, OtherTokens, SimpleBalance, + SmartContractInteraction, }; diff --git a/src/screens/account_details/components/smart_contract/index.tsx b/src/screens/account_details/components/smart_contract/index.tsx new file mode 100644 index 0000000000..9d59232ab7 --- /dev/null +++ b/src/screens/account_details/components/smart_contract/index.tsx @@ -0,0 +1,190 @@ +import { + useEffect, useState, +} from 'react'; +import Form from 'react-jsonschema-form'; +import { + connectWasmQueryClient, connectWasmSigningClient, + getAccount, getQueryFunc, getExecuteFunc, +} from '@utils/smart_contract_interaction'; +import { + SigningCosmWasmClient, CosmWasmClient, +} from 'cudosjs'; + +interface ISmartContractInteractionProps { + rpcUrl: string; + chainID: string, + gasPrice:string, + address: string, + querySchema?: string, + executeSchema?: string, +} + +type SmartContractInteractionDetails = { + account: any; + querySchemaObj: any; + executeSchemaObj: any; + queryClient: CosmWasmClient; + executeClient: SigningCosmWasmClient; +} + +const initialState: SmartContractInteractionDetails = { + account: '', + querySchemaObj: null, + executeSchemaObj: null, + queryClient: null, + executeClient: null, +}; + +const SmartContractInteraction = (props: ISmartContractInteractionProps) => { + const [state, setState] = useState(initialState); + + useEffect(() => { + const newState: any = {}; + + if (props.querySchema) { + const querySchemaObj = JSON.parse(props.querySchema); + + AddMissingTitles(querySchemaObj, ''); + + newState.querySchemaObj = querySchemaObj; + + connectWasmQueryClient(props.rpcUrl).then((client) => { + setState((prevState) => ({ + ...prevState, + queryClient: client, + })); + }).catch((err) => { + console.error(`connecting query client failed ${err}`); + }); + } + + if (props.executeSchema) { + const executeSchemaObj = JSON.parse(props.executeSchema); + + AddMissingTitles(executeSchemaObj, ''); + + newState.executeSchemaObj = executeSchemaObj; + + getAccount(props.chainID).then((acc) => { + setState((prevState) => ({ + ...prevState, + account: acc, + })); + }).catch((err) => { + console.error(`getting account failed ${err}`); + }); + + connectWasmSigningClient(props.chainID, props.rpcUrl, props.gasPrice).then((client) => { + setState((prevState) => ({ + ...prevState, + executeClient: client, + })); + }).catch((err) => { + console.error(`connecting execute client failed ${err}`); + }); + } + + setState((prevState) => ({ + ...prevState, + ...newState, + })); + }, []); + + const onSubmitQuery = (event: any) => { + const formData = getFormData(event, 0); + const queryFunc = getQueryFunc(state.queryClient, props.address); + queryFunc(formData).then((res) => { + console.log(res); + }); + }; + + const onSubmitExecute = async (event: any) => { + const formData = getFormData(event, 1); + const executeFunc = getExecuteFunc(state.executeClient, props.address); + executeFunc(state.account.address, formData).then((res) => { + console.log(res); + }); + }; + + return ( + <> + { + state.querySchemaObj + &&

Query:

+ &&
+ } + { + state.executeSchemaObj + &&

Execute:

+ && + } + + ); +}; + +SmartContractInteraction.defaultProps = { + querySchema: '', + executeSchema: '', +}; + +const getFormData = (event: any, menuIndex: number): string => { + const menu = document.querySelectorAll('select[id=\'root_anyof_select\']')[menuIndex] as any; + const selectedOption = menu.selectedOptions[0].text as string; + + if (!(selectedOption in event.formData)) { + throw new Error('Invalid form data'); + } + + // Not using event.formData directly becasue it may contain unnecessary properties + + return JSON.stringify({ [selectedOption]: event.formData[selectedOption] }); +}; + +const AddMissingTitles = (obj: any, parentProp: string) => { + if (typeof obj !== 'object') { + return; + } + + const keys = Object.keys(obj); + + for (const key of keys) { + if (!obj.hasOwnProperty(key)) { + continue; + } + + let nextKey = key; + + if (Number.isInteger(key)) { + nextKey = parentProp; + } + + AddMissingTitles(obj[key], nextKey); + + if (['oneOf', 'anyOf'].includes(parentProp)) { + AddMissingTitle(obj[nextKey]); + } + } +}; + +const AddMissingTitle = (obj: any) => { + if ('title' in obj) { + return; + } + + if ('required' in obj && obj.required.length == 1) { + obj.title = obj.required[0]; + return; + } + + if ('type' in obj && obj.type === 'null') { + obj.title = 'None'; + return; + } + + if ('$ref' in obj) { + const parts = obj.$ref.split('/'); + obj.title = parts[parts.length - 1]; + } +}; + +export default SmartContractInteraction; diff --git a/src/screens/account_details/hooks.ts b/src/screens/account_details/hooks.ts index 0f148b9037..809272da11 100644 --- a/src/screens/account_details/hooks.ts +++ b/src/screens/account_details/hooks.ts @@ -19,6 +19,7 @@ import { fetchRewards, fetchUnbondingBalance, fetchCosmWasmInstantiation, + fetchContractSchemasByAddress, } from './utils'; const defaultTokenUnit: TokenUnit = { @@ -62,6 +63,7 @@ const initialState: AccountDetailState = { }, }, }, + contractSchemas: [], tab: 0, }; @@ -128,6 +130,7 @@ export const useAccountDetails = () => { fetchUnbondingBalance(address), fetchRewards(address), fetchCosmWasmInstantiation(address), + fetchContractSchemasByAddress(address), ]; const [ commission, @@ -136,6 +139,7 @@ export const useAccountDetails = () => { unbonding, rewards, cosmWasmInstantiation, + fetchedContractSchemas, ] = await Promise.allSettled(promises); const formattedRawData: any = {}; @@ -148,6 +152,7 @@ export const useAccountDetails = () => { const rawData: any = {}; rawData.cosmwasm = R.pathOr([], ['value'], cosmWasmInstantiation); + rawData.contractSchemas = R.pathOr([], ['value'], fetchedContractSchemas); handleSetState(rawData); }; diff --git a/src/screens/account_details/index.tsx b/src/screens/account_details/index.tsx index 7e5843be52..c19db95b97 100644 --- a/src/screens/account_details/index.tsx +++ b/src/screens/account_details/index.tsx @@ -20,6 +20,7 @@ import { Transactions, OtherTokens, SimpleBalance, + SmartContractInteraction, } from './components'; import { useAccountDetails } from './hooks'; @@ -33,7 +34,7 @@ const AccountDetails = () => { const isSmartContract = state.cosmwasm.result_contract_address === state.overview.address; - const tabs = [ + let tabs = [ { id: 0, key: 'transactions', @@ -56,6 +57,45 @@ const AccountDetails = () => { }, ]; + if (isSmartContract) { + let querySchema = ''; let + executeSchema = ''; + + if (state.contractSchemas && state.contractSchemas.length > 0) { + for (const schema of state.contractSchemas) { + if (schema.funcName == 'query') { + querySchema = schema.data; + } else if (schema.funcName == 'execute') { + executeSchema = schema.data; + } + } + } + + tabs = [ + { + id: 0, + key: 'smartContractMessages', + component: ( + + ), + }, + { + id: 1, + key: 'smartContractInteraction', + component: ( + + ), + }, + ]; + } + return ( <> { rewards={state.rewards} /> )} - {isSmartContract - ? ( - - ) - : ( - <> - - {tabs.map((x) => { - return ( - - {x.component} - - ); - })} - - )} + <> + + {tabs.map((x) => { + return ( + + {x.component} + + ); + })} + diff --git a/src/screens/account_details/types.ts b/src/screens/account_details/types.ts index 76f0aca447..1d3e771e19 100644 --- a/src/screens/account_details/types.ts +++ b/src/screens/account_details/types.ts @@ -46,4 +46,5 @@ export type AccountDetailState = { rewards: RewardsType; cosmwasm: CosmwasmType; tab: number; + contractSchemas: any[], } diff --git a/src/screens/account_details/utils.ts b/src/screens/account_details/utils.ts index 19a31a9276..339ee68f87 100644 --- a/src/screens/account_details/utils.ts +++ b/src/screens/account_details/utils.ts @@ -147,3 +147,37 @@ export const fetchCosmWasmInstantiation = async (address: string) => { return defaultReturnValue; } }; + +export const fetchContractSchemasByAddress = async (address: string) => { + const fetchedSourcesSchemas = []; + + try { + const { data } = await axios.get(`${process.env.NEXT_PUBLIC_CONTRACTS_URL}/contract-schemas?address=${address}`); + const sourcesSchemas = data.sources; + + await new Promise((resolve, _) => { + if (sourcesSchemas.length == 0) { + resolve({}); + return; + } + + sourcesSchemas.forEach((_, sourceIdx) => { + sourcesSchemas[sourceIdx].schemas.forEach(async (schema, schemaIdx) => { + const schemaResponse = await axios.get(`${process.env.NEXT_PUBLIC_CONTRACTS_URL}/schema?id=${schema.id}`); + sourcesSchemas[sourceIdx].schemas[schemaIdx].data = JSON.stringify(schemaResponse.data); + + fetchedSourcesSchemas.push(sourcesSchemas[sourceIdx].schemas[schemaIdx]); + + if (fetchedSourcesSchemas.length == sourcesSchemas.length) { + console.log('resolved'); + resolve({}); + } + }); + }); + }); + + return fetchedSourcesSchemas; + } catch (error) { + return fetchedSourcesSchemas; + } +}; diff --git a/src/utils/smart_contract_interaction.ts b/src/utils/smart_contract_interaction.ts new file mode 100644 index 0000000000..d21ddcf525 --- /dev/null +++ b/src/utils/smart_contract_interaction.ts @@ -0,0 +1,48 @@ +import { + SigningCosmWasmClient, CosmWasmClient, +} from 'cudosjs'; +import { GasPrice } from '@cosmjs/stargate'; + +export const connectWasmQueryClient = async (rpcUrl: string) => { + return CosmWasmClient.connect(rpcUrl); +}; + +export const connectWasmSigningClient = async (chainID: string, + rpcUrl: string, gasPrice: string) => { + await (window as any).keplr.enable(chainID); + + const offlineSigner = (window as any).getOfflineSigner(chainID); + + return SigningCosmWasmClient.connectWithSigner(rpcUrl, offlineSigner, { + gasPrice: GasPrice.fromString(gasPrice), + }); +}; + +export const getAccount = async (chainID: string) => { + const offlineSigner = (window as any).getOfflineSigner(chainID); + return (await offlineSigner.getAccounts())[0]; +}; + +export const getQueryFunc = (client: CosmWasmClient, address: string) => { + return (query: string) => { + return new Promise((resolve, reject) => { + client.queryContractSmart(address, JSON.parse(query)).then((result) => { + resolve(result); + }).catch((error) => { + reject(error); + }); + }); + }; +}; + +export const getExecuteFunc = (client: SigningCosmWasmClient, address: string) => { + return (senderAddress: string, msg: string) => { + return new Promise((resolve, reject) => { + client.execute(senderAddress, address, JSON.parse(msg), 'auto', 'Sent with CUDOS Explorer').then((result) => { + resolve(JSON.stringify(result)); + }).catch((error) => { + reject(error); + }); + }); + }; +}; From 5bfe2fc381bb6ee252de7ad9eef130895e0170a4 Mon Sep 17 00:00:00 2001 From: avalkov Date: Tue, 16 Aug 2022 11:14:01 +0300 Subject: [PATCH 2/2] Integrate simplified schema fetching API --- .env-dev | 2 +- .../components/smart_contract/index.tsx | 4 +-- src/screens/account_details/utils.ts | 31 +++++-------------- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/.env-dev b/.env-dev index 414ff83713..86a30d5858 100644 --- a/.env-dev +++ b/.env-dev @@ -5,7 +5,7 @@ PORT=3000 NEXT_PUBLIC_URL=http://localhost:3000 NEXT_PUBLIC_WS_CHAIN_URL=ws://34.123.153.6:26657/websocket NEXT_PUBLIC_CHAIN_STATUS=testnet -NEXT_PUBLIC_CONTRACTS_URL=http://localhost:3333 +NEXT_PUBLIC_CONTRACTS_URL=http://34.172.163.122:3333 NEXT_PUBLIC_RPC_URL=http://34.123.153.6:26657 # TODO: This can be fetched direclty from hasura NEXT_PUBLIC_CHAIN_ID=cudos-testnet-private-3 diff --git a/src/screens/account_details/components/smart_contract/index.tsx b/src/screens/account_details/components/smart_contract/index.tsx index 9d59232ab7..5d4162647a 100644 --- a/src/screens/account_details/components/smart_contract/index.tsx +++ b/src/screens/account_details/components/smart_contract/index.tsx @@ -42,7 +42,7 @@ const SmartContractInteraction = (props: ISmartContractInteractionProps) => { const newState: any = {}; if (props.querySchema) { - const querySchemaObj = JSON.parse(props.querySchema); + const querySchemaObj = props.querySchema; AddMissingTitles(querySchemaObj, ''); @@ -59,7 +59,7 @@ const SmartContractInteraction = (props: ISmartContractInteractionProps) => { } if (props.executeSchema) { - const executeSchemaObj = JSON.parse(props.executeSchema); + const executeSchemaObj = props.executeSchema; AddMissingTitles(executeSchemaObj, ''); diff --git a/src/screens/account_details/utils.ts b/src/screens/account_details/utils.ts index 339ee68f87..ab32707643 100644 --- a/src/screens/account_details/utils.ts +++ b/src/screens/account_details/utils.ts @@ -149,32 +149,15 @@ export const fetchCosmWasmInstantiation = async (address: string) => { }; export const fetchContractSchemasByAddress = async (address: string) => { - const fetchedSourcesSchemas = []; + const schemasTypes = ['query', 'execute']; + let fetchedSourcesSchemas = []; + try { - const { data } = await axios.get(`${process.env.NEXT_PUBLIC_CONTRACTS_URL}/contract-schemas?address=${address}`); - const sourcesSchemas = data.sources; - - await new Promise((resolve, _) => { - if (sourcesSchemas.length == 0) { - resolve({}); - return; - } - - sourcesSchemas.forEach((_, sourceIdx) => { - sourcesSchemas[sourceIdx].schemas.forEach(async (schema, schemaIdx) => { - const schemaResponse = await axios.get(`${process.env.NEXT_PUBLIC_CONTRACTS_URL}/schema?id=${schema.id}`); - sourcesSchemas[sourceIdx].schemas[schemaIdx].data = JSON.stringify(schemaResponse.data); - - fetchedSourcesSchemas.push(sourcesSchemas[sourceIdx].schemas[schemaIdx]); - - if (fetchedSourcesSchemas.length == sourcesSchemas.length) { - console.log('resolved'); - resolve({}); - } - }); - }); - }); + for (let i = 0; i < schemasTypes.length; i++) { + const { data } = await axios.get(`${process.env.NEXT_PUBLIC_CONTRACTS_URL}/schema?type=${schemasTypes[i]}&address=${address}`); + fetchedSourcesSchemas.push({ funcName: schemasTypes[i], data: data }); + } return fetchedSourcesSchemas; } catch (error) {