From 214b444b56039c1c4f632dc0d63e387d00bd2c4d Mon Sep 17 00:00:00 2001 From: dankelleher Date: Thu, 19 Sep 2024 15:42:38 +0200 Subject: [PATCH] Added some example scripts for backend pass lookup --- .../exampleScripts/getPassStatusUsingAPI.ts | 40 +++++ .../getPassStatusUsingContractABI.ts | 41 +++++ .../getPassStatusUsingLibrary.ts | 32 ++++ packages/evm/exampleScripts/util.ts | 14 ++ packages/evm/package.json | 2 + .../getPassStatusUsingLibrary.ts | 25 +++ packages/solana/package.json | 1 + yarn.lock | 144 ++++++++++++++++-- 8 files changed, 290 insertions(+), 9 deletions(-) create mode 100644 packages/evm/exampleScripts/getPassStatusUsingAPI.ts create mode 100644 packages/evm/exampleScripts/getPassStatusUsingContractABI.ts create mode 100644 packages/evm/exampleScripts/getPassStatusUsingLibrary.ts create mode 100644 packages/evm/exampleScripts/util.ts create mode 100644 packages/solana/exampleScripts/getPassStatusUsingLibrary.ts diff --git a/packages/evm/exampleScripts/getPassStatusUsingAPI.ts b/packages/evm/exampleScripts/getPassStatusUsingAPI.ts new file mode 100644 index 0000000..8ab1886 --- /dev/null +++ b/packages/evm/exampleScripts/getPassStatusUsingAPI.ts @@ -0,0 +1,40 @@ +// Get the state of a custom pass by calling the Civic Partner API with Oauth client credentials. +// Usage: CLIENT_ID= CLIENT_SECRET= bun run getPassStatusUsingAPI.ts +// Full documentation: https://civicteam.github.io/openapi-docs + +const clientId = process.env.CLIENT_ID; +const clientSecret = process.env.CLIENT_SECRET; +const walletAddress = process.argv[2]; +const chain = process.argv[3]; + +// Authentication credentials for the Civic API +const basicAuth = Buffer.from(`${clientId}:${clientSecret}`).toString('base64'); + +// The Civic endpoints used to authenticate and lookup the pass status +const authUrl = "https://auth.civic.com/oauth/token"; +const lookupUrl = `https://api.civic.com/partner/pass/${chain}/${walletAddress}`; + +(async () => { + // fetch the oauth client credentials token + const loginResponse = await fetch(authUrl, { + headers: { + accept: "application/json, text/plain, */*", + authorization: `Basic ${basicAuth}`, + "content-type": "application/x-www-form-urlencoded", + }, + body: "grant_type=client_credentials", + method: "POST" + }); + const token = (await loginResponse.json()).access_token; + + // now use that token to fetch the pass status + const lookupResponse = await fetch(lookupUrl, { + headers: { + accept: "application/json", + authorization: `Bearer ${token}`, + }, + }); + + const passStatus = await lookupResponse.json(); + console.log(passStatus); +})().catch((error) => console.error(error)); \ No newline at end of file diff --git a/packages/evm/exampleScripts/getPassStatusUsingContractABI.ts b/packages/evm/exampleScripts/getPassStatusUsingContractABI.ts new file mode 100644 index 0000000..003ef3d --- /dev/null +++ b/packages/evm/exampleScripts/getPassStatusUsingContractABI.ts @@ -0,0 +1,41 @@ +// Get the state of a pass by calling the contract directly +// Usage: RPC= bun run getPassStatusUsingContractABI.ts + +import {ethers} from "ethers"; +import {base58ToBigInt, GATEWAY_CONTRACT_ADDRESS} from "./util"; + +// The script needs the wallet address and gatekeeper network as arguments +const walletAddress = process.argv[2]; // 0x... +const gatekeeperNetwork = process.argv[3]; // The gatekeeper network key in base58 + +// check the args - you must also provide an RPC as an environment variable +if (!walletAddress || !gatekeeperNetwork || !process.env.RPC) { + console.log('Usage: RPC= bun run getPassStatusUsingContractABI.ts '); + process.exit(1); +} + +// create the ethers provider +const provider = new ethers.providers.JsonRpcProvider(process.env.RPC); +// converting the network key to a number for the ethereum contract +// NOTE - Pass types created before July 2024 are mapped to a slot ID in the gateway contract - these are not supported here. +// If you are using a pass type created before July 2024, contact Civic support to get the associated slot ID. +const slotId = base58ToBigInt(gatekeeperNetwork); +// A portion of the ABI. The full ABI is available here: https://github.com/civicteam/on-chain-identity-gateway/blob/main/ethereum/gateway-eth-ts/src/contracts/abi/GatewayToken.sol/GatewayToken.json +const abi = [ + 'function getToken(uint256) view returns (address,uint8,string,uint256,uint256)', + 'function getTokenIdsByOwnerAndNetwork(address,uint256,bool) view returns (uint[])', +]; + +// Call the contract to get the token IDs for the wallet address and gatekeeper network +// Note - we are not using typescript here, but typescript bindings are available here: +// https://github.com/civicteam/on-chain-identity-gateway/tree/main/ethereum/gateway-eth-ts/src/contracts/typechain-types +const contract = new ethers.Contract(GATEWAY_CONTRACT_ADDRESS, abi, provider); +contract.getTokenIdsByOwnerAndNetwork(walletAddress, slotId, true).then((tokenIds: bigint[]) => { + // For each token ID, look up its state on chain. + tokenIds.forEach(async tokenId => { + const [owner, state, identity, expiration, bitmask] = await contract.getToken(tokenId); + console.log(`Token ID: ${tokenId}`); + console.log(`Pass status: ${state}`); // An enum, see details here: https://github.com/civicteam/on-chain-identity-gateway/blob/e742e9f628c0886dfbbeb43596736f0952dd64bc/ethereum/gateway-eth-ts/src/utils/types.ts#L9 + console.log(`Expiration: ${expiration}`); + }) +}); \ No newline at end of file diff --git a/packages/evm/exampleScripts/getPassStatusUsingLibrary.ts b/packages/evm/exampleScripts/getPassStatusUsingLibrary.ts new file mode 100644 index 0000000..1b34c9a --- /dev/null +++ b/packages/evm/exampleScripts/getPassStatusUsingLibrary.ts @@ -0,0 +1,32 @@ +// Get the state of a pass using the @civic/gateway-eth-ts NPM library +// Usage: RPC= bun run getPassStatusUsingLibrary.ts + +import {GatewayTs, TokenState} from '@civic/gateway-eth-ts'; +import {ethers} from "ethers"; +import {base58ToBigInt, GATEWAY_CONTRACT_ADDRESS} from "./util"; + +// The script needs the wallet address and gatekeeper network as arguments +const walletAddress = process.argv[2]; // 0x... +const gatekeeperNetwork = process.argv[3]; // The gatekeeper network key in base58 + +// check the args - you must also provide an RPC as an environment variable +if (!walletAddress || !gatekeeperNetwork || !process.env.RPC) { + console.log('Usage: RPC= bun run getPassStatusUsingLibrary.ts '); + process.exit(1); +} + +// create the ethers provider and pass it into civic library +const provider = new ethers.providers.JsonRpcProvider(process.env.RPC); +const gatewayTs = new GatewayTs(provider, GATEWAY_CONTRACT_ADDRESS) + +// Get the token for the wallet address and gatekeeper network +gatewayTs.getToken(walletAddress, base58ToBigInt(gatekeeperNetwork)).then(token => { + if (!token) { + console.log('Token not found'); + return; + } + + console.log(`Token ID: ${token.tokenId}`); + console.log(`Pass status: ${TokenState[token.state]}`); + console.log(`Expiration: ${token.expiration}`); +}); diff --git a/packages/evm/exampleScripts/util.ts b/packages/evm/exampleScripts/util.ts new file mode 100644 index 0000000..8f95c0f --- /dev/null +++ b/packages/evm/exampleScripts/util.ts @@ -0,0 +1,14 @@ +import {decode} from "bs58"; + +const base58ToHex = (base58: string) => { + try { + return decode(base58).toString('hex'); + } catch (error) { + console.log('Error decoding base58 string:', error); + throw new Error(`Invalid base58 string: ${base58}. Pass types created before July 2024 are mapped to a slot ID in the gateway contract - these are not supported here.`); + } +} +const hexToBigInt = (hex: string) => BigInt(`0x${hex}`) +export const base58ToBigInt = (base58: string) => hexToBigInt(base58ToHex(base58)) + +export const GATEWAY_CONTRACT_ADDRESS = '0xF65b6396dF6B7e2D8a6270E3AB6c7BB08BAEF22E'; \ No newline at end of file diff --git a/packages/evm/package.json b/packages/evm/package.json index 0b09d78..1262af0 100644 --- a/packages/evm/package.json +++ b/packages/evm/package.json @@ -12,6 +12,7 @@ "deploy:testnet": "hardhat deploy --network testnet" }, "devDependencies": { + "@civic/gateway-eth-ts": "^0.8.1", "@identity.com/gateway-protocol-eth": "^0.0.4", "@nomicfoundation/hardhat-chai-matchers": "^2.0.7", "@nomicfoundation/hardhat-ethers": "^3.0.6", @@ -19,6 +20,7 @@ "@nomicfoundation/hardhat-verify": "^2.0.8", "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", + "@types/bs58": "^4.0.4", "@types/chai": "^4.3.16", "@types/mocha": "^10.0.7", "chai": "^5.1.1", diff --git a/packages/solana/exampleScripts/getPassStatusUsingLibrary.ts b/packages/solana/exampleScripts/getPassStatusUsingLibrary.ts new file mode 100644 index 0000000..2f037cd --- /dev/null +++ b/packages/solana/exampleScripts/getPassStatusUsingLibrary.ts @@ -0,0 +1,25 @@ +// Get the state of a pass using the @civic/solana-gateway-ts NPM library +// Usage: RPC= bun run getPassStatusUsingLibrary.ts + +import {findGatewayTokensForOwnerAndNetwork} from '@civic/solana-gateway-ts'; +import {Connection, PublicKey} from "@solana/web3.js"; + +// The script needs the wallet address and gatekeeper network as arguments +const walletAddress = process.argv[2]; // A solana public key +const gatekeeperNetwork = process.argv[3]; // The gatekeeper network key in base58 + +// check the args - you must also provide an RPC as an environment variable +if (!walletAddress || !gatekeeperNetwork || !process.env.RPC) { + console.log('Usage: RPC= bun run getPassStatusUsingLibrary.ts '); + process.exit(1); +} + +const connection = new Connection(process.env.RPC, 'confirmed'); + +// Get the token for the wallet address and gatekeeper network +findGatewayTokensForOwnerAndNetwork(connection, new PublicKey(walletAddress), new PublicKey(gatekeeperNetwork)).then((tokens) => { + tokens.forEach((token) => { + console.log(`Pass status: ${token.state}`); + console.log(`Expiration: ${token.expiryTime}`); + }); +}); diff --git a/packages/solana/package.json b/packages/solana/package.json index 5f504c7..656eba7 100644 --- a/packages/solana/package.json +++ b/packages/solana/package.json @@ -7,6 +7,7 @@ "@solana/spl-token": "^0.4.7" }, "devDependencies": { + "@civic/solana-gateway-ts": "^0.13.0", "@coral-xyz/anchor-cli": "^0.30.1", "@types/bn.js": "^5.1.5", "@types/chai": "^4.3.16", diff --git a/yarn.lock b/yarn.lock index 6a625f1..b9237db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -393,6 +393,23 @@ uuid "^9.0.1" zustand "^4.5.2" +"@civic/gateway-eth-ts@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@civic/gateway-eth-ts/-/gateway-eth-ts-0.8.1.tgz#102b74923274346d1220b5ccfd817103593d1b95" + integrity sha512-3/l2vvOCPqIwZkj3WkbZVRED5ELJNvoEh2q6z7Qux9TU6T8IU1IT8a8NVe2pVEDLFeJFKrM9088aSTsCrJGt3Q== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/providers" "^5.7.2" + "@types/ramda" "^0.28.14" + bignumber.js "^9.0.1" + debug "^4.3.4" + eth-sig-util "2.1.1" + ethers "^5.7.2" + gas-price-oracle "^0.3.3" + ramda "^0.28.0" + tslib "^2.5.0" + "@civic/identity-store-client@0.1.2": version "0.1.2" resolved "https://registry.yarnpkg.com/@civic/identity-store-client/-/identity-store-client-0.1.2.tgz#a9c836a0ea2044b63735b8474f125ad5a9aec111" @@ -453,6 +470,17 @@ uuid "^9.0.1" zustand "^4.5.2" +"@civic/solana-gateway-ts@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@civic/solana-gateway-ts/-/solana-gateway-ts-0.13.0.tgz#47ec8eb504c532a82253258faeca1218c2364dbf" + integrity sha512-YdYwQep/4QupPJJqO/arrcYJoP7BpkxvIlNCejU0MHWnoj0Y9SpgmxUuR7YUnXJePt46Erz1tSKpOo9Kz18hyQ== + dependencies: + "@solana/web3.js" "^1.91.4" + async-retry "^1.3.3" + bn.js "^5.2.1" + borsh "^0.4.0" + bs58 "^5.0.0" + "@civic/storage-adapter@*": version "0.1.0" resolved "https://registry.yarnpkg.com/@civic/storage-adapter/-/storage-adapter-0.1.0.tgz#92a966958a3745aac79832928f51cc08cf2d7448" @@ -3960,6 +3988,14 @@ dependencies: "@types/node" "*" +"@types/bs58@^4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@types/bs58/-/bs58-4.0.4.tgz#49fbcb0c7db5f7cea26f0e0f61dc4a41a2445aab" + integrity sha512-0IEpMFXXQi2zXaXl9GJ3sRwQo0uEkD+yFOv+FnAU5lkPtcu6h61xb7jc2CFPEZ5BUOaiP13ThuGc9HD4R8lR5g== + dependencies: + "@types/node" "*" + base-x "^3.0.6" + "@types/chai-as-promised@^7.1.3": version "7.1.8" resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz#f2b3d82d53c59626b5d6bbc087667ccb4b677fe9" @@ -4080,6 +4116,13 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" integrity sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg== +"@types/ramda@^0.28.14": + version "0.28.25" + resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.28.25.tgz#68080ef9eed92cddcd2c727cf3fe09f6a093e475" + integrity sha512-HrQNqQAGcITpn9HAJFamDxm7iZeeXiP/95pN5OMbNniDjzCCeOHbBKNGmUy8NRi0fhYS+/cXeo91MFC+06gbow== + dependencies: + ts-toolbelt "^6.15.1" + "@types/react-dom@^18", "@types/react-dom@^18.3.0": version "18.3.0" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0" @@ -5106,6 +5149,13 @@ axe-core@^4.9.1: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59" integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g== +axios@^0.19.2: + version "0.19.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" + integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== + dependencies: + follow-redirects "1.5.10" + axios@^0.21.1: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" @@ -5145,7 +5195,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-x@^3.0.2, base-x@^3.0.9: +base-x@^3.0.2, base-x@^3.0.6, base-x@^3.0.9: version "3.0.10" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.10.tgz#62de58653f8762b5d6f8d9fe30fa75f7b2585a75" integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ== @@ -5257,7 +5307,7 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.12.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.12.0, bn.js@^4.8.0: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== @@ -5503,7 +5553,7 @@ buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3, buffer@~6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@^5.1.0, buffer@^5.4.3, buffer@^5.7.1: +buffer@^5.1.0, buffer@^5.2.1, buffer@^5.4.3, buffer@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -6389,6 +6439,13 @@ debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, d dependencies: ms "2.1.2" +debug@=3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -7320,6 +7377,18 @@ eth-rpc-errors@^4.0.2, eth-rpc-errors@^4.0.3: dependencies: fast-safe-stringify "^2.0.6" +eth-sig-util@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.1.1.tgz#4459ee4dd59091754b50410c9ca6c70fb339f59f" + integrity sha512-B9VA2WCuf+dp0UbWlzsCXWcryZe1H9PixrNmG+tQDBpyTiIbDvf2w8jUb1BNPbxFXeWHUcr2I6pmg+MkdA4Ovg== + dependencies: + buffer "^5.2.1" + elliptic "^6.4.0" + ethereumjs-abi "0.6.5" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.0" + tweetnacl-util "^0.15.0" + ethereum-bloom-filters@^1.0.6: version "1.2.0" resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.2.0.tgz#8294f074c1a6cbd32c39d2cc77ce86ff14797dab" @@ -7368,6 +7437,14 @@ ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2, ethereum-cryptograph "@scure/bip32" "1.4.0" "@scure/bip39" "1.3.0" +ethereumjs-abi@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" + integrity sha512-rCjJZ/AE96c/AAZc6O3kaog4FhOsAViaysBxqJNy2+LHP0ttH0zkZ7nXdVHOAyt6lFwLO0nlCwWszysG/ao1+g== + dependencies: + bn.js "^4.10.0" + ethereumjs-util "^4.3.0" + ethereumjs-abi@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" @@ -7376,6 +7453,30 @@ ethereumjs-abi@^0.6.8: bn.js "^4.11.8" ethereumjs-util "^6.0.0" +ethereumjs-util@^4.3.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz#f4bf9b3b515a484e3cc8781d61d9d980f7c83bd0" + integrity sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w== + dependencies: + bn.js "^4.8.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + rlp "^2.0.0" + +ethereumjs-util@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" @@ -7400,7 +7501,7 @@ ethereumjs-util@^7.1.4: ethereum-cryptography "^0.1.3" rlp "^2.2.4" -ethers@^5.5.1, ethers@^5.7.0, ethers@~5.7.0: +ethers@^5.5.1, ethers@^5.7.0, ethers@^5.7.2, ethers@~5.7.0: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -7457,7 +7558,7 @@ ethjs-unit@0.1.6: bn.js "4.11.6" number-to-bn "1.7.0" -ethjs-util@0.1.6, ethjs-util@^0.1.6: +ethjs-util@0.1.6, ethjs-util@^0.1.3, ethjs-util@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== @@ -7706,6 +7807,13 @@ fmix@^0.1.0: dependencies: imul "^1.0.0" +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== + dependencies: + debug "=3.1.0" + follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" @@ -7822,6 +7930,14 @@ futoin-hkdf@^1.5.3: resolved "https://registry.yarnpkg.com/futoin-hkdf/-/futoin-hkdf-1.5.3.tgz#6c8024f2e1429da086d4e18289ef2239ad33ee35" integrity sha512-SewY5KdMpaoCeh7jachEWFsh1nNlaDjNHZXWqL5IGwtpEYHTgkr2+AMCgNwKWkcc0wpSYrZfR7he4WdmHFtDxQ== +gas-price-oracle@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/gas-price-oracle/-/gas-price-oracle-0.3.5.tgz#b7bff364e37fb7f30a2297cb65be80fceb4b8da3" + integrity sha512-9NAKzmGgWLjGUc4XsqNJjh0JXthETucijNrkV47FrZIjP8YMzq4jhBvlNeMBt6VVGnr64qjIY2RWb+In7qNsFA== + dependencies: + axios "^0.19.2" + bignumber.js "^9.0.0" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -9542,6 +9658,11 @@ mri@^1.2.0: resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -10912,7 +11033,7 @@ ripple-lib@^1.10.1: ripple-lib-transactionparser "0.8.2" ws "^7.2.0" -rlp@^2.2.3, rlp@^2.2.4: +rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4: version "2.2.7" resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== @@ -11922,6 +12043,11 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +ts-toolbelt@^6.15.1: + version "6.15.5" + resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz#cb3b43ed725cb63644782c64fbcad7d8f28c0a83" + integrity sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A== + tsconfig-paths@^3.15.0, tsconfig-paths@^3.5.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" @@ -11942,7 +12068,7 @@ tslib@2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0: version "2.7.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== @@ -11957,12 +12083,12 @@ tty-browserify@0.0.1: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== -tweetnacl-util@^0.15.1: +tweetnacl-util@^0.15.0, tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== -tweetnacl@^1.0.3: +tweetnacl@^1.0.0, tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==