diff --git a/libs/moloch-v3-macro-ui/src/components/ProposalActionData/ProposalActionData.tsx b/libs/moloch-v3-macro-ui/src/components/ProposalActionData/ProposalActionData.tsx index 9405fc4f..e99a9348 100644 --- a/libs/moloch-v3-macro-ui/src/components/ProposalActionData/ProposalActionData.tsx +++ b/libs/moloch-v3-macro-ui/src/components/ProposalActionData/ProposalActionData.tsx @@ -1,7 +1,10 @@ import { useState } from 'react'; import { isValidNetwork } from '@daohaus/keychain-utils'; import { MolochV3Proposal } from '@daohaus/moloch-v3-data'; -import { DecodedMultiTX, isActionError } from '@daohaus/tx-builder'; +import { + DeepDecodedMultiTX as DecodedMultiTX, + isActionError, +} from '@daohaus/tx-builder'; import { AddressDisplay, Bold, @@ -73,7 +76,7 @@ export const ProposalActionData = ({ - Transaction Call Data + Decoded Transaction Data {!actionData && ( @@ -166,6 +169,16 @@ export const ProposalActionData = ({ ); })} + {action.decodedActions?.length ? ( + + ) : null} ); })} diff --git a/libs/moloch-v3-macro-ui/src/components/ProposalDetails/ProposalDetailsContainer.tsx b/libs/moloch-v3-macro-ui/src/components/ProposalDetails/ProposalDetailsContainer.tsx index 40e00364..630d7e4f 100644 --- a/libs/moloch-v3-macro-ui/src/components/ProposalDetails/ProposalDetailsContainer.tsx +++ b/libs/moloch-v3-macro-ui/src/components/ProposalDetails/ProposalDetailsContainer.tsx @@ -16,8 +16,8 @@ import { TXLego, } from '@daohaus/utils'; import { - DecodedMultiTX, - decodeProposalActions, + DeepDecodedMultiTX as DecodedMultiTX, + deepDecodeProposalActions as decodeProposalActions, isActionError, } from '@daohaus/tx-builder'; import { ValidNetwork, isValidNetwork } from '@daohaus/keychain-utils'; @@ -61,12 +61,11 @@ export const ProposalDetailsContainer = ({ const fetchPropActions = async ( chainId: ValidNetwork, actionData: string, - actionMeta?: MulticallAction[] + _actionMeta?: MulticallAction[] ) => { const proposalActions = await decodeProposalActions({ chainId, actionData, - actionsMeta: actionMeta, }); if (shouldUpdate) { setActionData(proposalActions); diff --git a/libs/tx-builder/src/utils/deepDecoding.ts b/libs/tx-builder/src/utils/deepDecoding.ts new file mode 100644 index 00000000..486d7f82 --- /dev/null +++ b/libs/tx-builder/src/utils/deepDecoding.ts @@ -0,0 +1,275 @@ +import { decodeFunctionData, fromHex, getAbiItem } from 'viem'; +import { ArgType, ENCODED_0X0_DATA } from '@daohaus/utils'; +import { + ABI_EXPLORER_KEYS, + HAUS_NETWORK_DATA, + HAUS_RPC, + Keychain, + ValidNetwork, +} from '@daohaus/keychain-utils'; + +import { MetaTransaction, OperationType, decodeMulti } from 'ethers-multisend'; +import { whatsabi, loaders } from '@shazow/whatsabi'; +import { providers } from 'ethers'; + +import { fetchABI, getCode } from './abi'; +import { ActionError } from './decoding'; +const { MultiABILoader, SourcifyABILoader } = loaders; + +export type DeepDecodedAction = { + to: string; + operation: OperationType; + name: string; + value: string; + params: { + name: string; + type: string; + value: ArgType; + }[]; + decodedActions?: DeepDecodedMultiTX; +}; + +export type DeepDecodedMultiTX = (DeepDecodedAction | ActionError)[]; + +class EtherscanABILoader implements loaders.ABILoader { + chainId: ValidNetwork; + rpcs: Keychain; + explorerKeys: Keychain; + + constructor(options: { + chainId: ValidNetwork; + rpcs: Keychain; + explorerKeys: Keychain; + }) { + this.chainId = options.chainId; + this.rpcs = options.rpcs; + this.explorerKeys = options.explorerKeys; + } + + async loadABI(address: string): Promise { + const abi = await fetchABI({ + chainId: this.chainId, + contractAddress: address, + rpcs: this.rpcs, + explorerKeys: this.explorerKeys, + }); + if (!abi || !abi?.length) { + throw new Error('No ABI found for this contract'); + } + return abi; + } +} + +type Options = { + chainId: ValidNetwork; + rpcs: Keychain; + explorerKeys: Keychain; + loader: loaders.ABILoader; +}; + +export const deepDecodeProposalActions = async ({ + chainId, + actionData, + rpcs = HAUS_RPC, + explorerKeys = ABI_EXPLORER_KEYS, +}: { + chainId: ValidNetwork; + actionData: string; + rpcs?: Keychain; + explorerKeys?: Keychain; +}): Promise<(DeepDecodedAction | ActionError)[]> => { + const abiLoader = new MultiABILoader([ + new EtherscanABILoader({ + chainId, + rpcs, + explorerKeys, + }), + new SourcifyABILoader(), + ]); + + const options = { + chainId, + rpcs, + explorerKeys, + loader: abiLoader, + }; + + return decodeMultiCall(options, actionData as `0x${string}`); +}; + +const decodeMultiCall = async ( + options: Options, + data: `0x${string}` +): Promise => { + const proposalActions: MetaTransaction[] = decodeMulti(data); + + const decodedProposalActions = await Promise.all( + proposalActions.map(async (action) => { + try { + return await decodeAction(options, action); + } catch (e) { + return { + error: true, + message: (e as Error).message, + data, + }; + } + }) + ); + + return decodedProposalActions; +}; + +type FunctionDataWithInputsReturnType = { + functionName: string; + inputs: { + name: string; + type: string; + value: string; + }[]; +}; + +const decodeValue = (value: unknown): string => { + if (typeof value === 'string') { + if (value.startsWith('0x')) { + return fromHex(value as `0x${string}`, 'bigint').toString(); + } + return value; + } + if (typeof value === 'number' || typeof value === 'bigint') { + return BigInt(value).toString(); + } + return '0'; +}; + +const decodeFunctionDataWithInputs = (options: { + abi: any[]; + data: `0x${string}`; +}): FunctionDataWithInputsReturnType => { + const result = decodeFunctionData(options); + + const functionDetails = getAbiItem({ + abi: options.abi, + name: result.functionName, + }); + + const inputs = functionDetails['inputs'] || []; + + const inputsWithValues = (inputs as any[]).map((input, index) => ({ + name: input.name, + type: input.type, + value: result.args?.[index]?.toString() || '0x', + })); + + return { + functionName: result.functionName, + inputs: inputsWithValues, + }; +}; + +const decodeAction = async ( + options: Options, + action: MetaTransaction +): Promise => { + const { data, to, value, operation } = action; + const { chainId, rpcs, loader } = options; + if ( + !data || + data === '0x' || + !data.startsWith('0x') || + data === ENCODED_0X0_DATA || + (await getCode({ chainId, contractAddress: action.to, rpcs })) === '0x' + ) { + return { + to: to, + operation: operation || OperationType.Call, + name: `${HAUS_NETWORK_DATA[chainId]?.symbol} Transfer`, + value: decodeValue(value), + params: [], + decodedActions: [], + }; + } + + const { abi } = await whatsabi.autoload(to, { + provider: new providers.JsonRpcProvider(rpcs[chainId]), + followProxies: true, + abiLoader: loader, + }); + + if (!abi || !abi?.length) { + throw new Error('No ABI found for this contract'); + } + + const result = decodeFunctionDataWithInputs({ + abi, + data: data as `0x${string}`, + }); + + if (!result) { + throw new Error('Could not decode action'); + } + + if (result.functionName === 'multiSend' && result.inputs.length === 1) { + const decodedActions = await decodeMultiCall( + options, + data as `0x${string}` + ); + + return { + to: to, + operation: OperationType.DelegateCall, + name: result.functionName, + value: decodeValue(value), + params: result.inputs, + decodedActions, + }; + } + + if (result.functionName.toLowerCase().includes('exec')) { + const inputTo = result.inputs.find((input) => input.type === 'address'); + const inputData = result.inputs.find((input) => input.type === 'bytes'); + const inputValue = result.inputs.find((input) => input.type === 'uint256'); + const inputOperation = result.inputs.find( + (input) => input.type === 'uint8' + ); + + if (!inputTo || !inputData) { + return { + to: to, + operation: operation || OperationType.Call, + name: result.functionName, + value: decodeValue(value), + params: result.inputs, + decodedActions: [], + }; + } + + const decodedData = await decodeAction(options, { + to: inputTo.value as `0x${string}`, + data: inputData.value as `0x${string}`, + value: decodeValue(inputValue?.value), + operation: + decodeValue(inputOperation?.value) === '1' + ? OperationType.DelegateCall + : OperationType.Call, + }); + + return { + to: to, + operation: operation || OperationType.Call, + name: result.functionName, + value: decodeValue(value), + params: result.inputs, + decodedActions: [decodedData], + }; + } + + return { + to: to, + operation: operation || OperationType.Call, + name: result.functionName, + value: decodeValue(value), + params: result.inputs, + decodedActions: [], + }; +}; diff --git a/libs/tx-builder/src/utils/index.ts b/libs/tx-builder/src/utils/index.ts index 617d9fed..17f174fc 100644 --- a/libs/tx-builder/src/utils/index.ts +++ b/libs/tx-builder/src/utils/index.ts @@ -4,4 +4,5 @@ export * from './search'; export * from './abi'; export * from './cache'; export * from './decoding'; +export * from './deepDecoding'; export * from './ethersFallback'; diff --git a/package.json b/package.json index f1a88ccc..409001db 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@radix-ui/react-toast": "^1.1.1", "@radix-ui/react-tooltip": "^1.0.2", "@safe-global/safe-apps-sdk": "^8.0.0", + "@shazow/whatsabi": "^0.8.5", "@svgr/webpack": "^6.5.1", "@types/react-table": "^7.7.12", "@wagmi/connectors": "^2.6.6", @@ -49,6 +50,7 @@ "deep-eql": "^4.1.1", "ethereum-blockies-base64": "^1.0.2", "ethers": "^5.7.2", + "ethers-multisend": "^2.4.0", "graphql": "16.3.0", "graphql-request": "^4.2.0", "localforage": "^1.10.0", diff --git a/yarn.lock b/yarn.lock index 0c458083..599798c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,10 +12,10 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.0.tgz#223572538f6bea336750039bb43a4016dcc8182d" integrity sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ== -"@adraffy/ens-normalize@1.9.4": - version "1.9.4" - resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.4.tgz#aae21cb858bbb0411949d5b7b3051f4209043f62" - integrity sha512-UK0bHA7hh9cR39V+4gl2/NnBBjoXIxkuWAPCaY4X7fbH4L/azIi7ilWOCjMUYfpJgraLUAqkRi2BqrjME8Rynw== +"@adraffy/ens-normalize@1.9.2": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz#60111a5d9db45b2e5cbb6231b0bb8d97e8659316" + integrity sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg== "@ampproject/remapping@^2.2.0": version "2.2.1" @@ -1736,7 +1736,7 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== @@ -1751,7 +1751,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.5.1", "@ethersproject/abstract-provider@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== @@ -1775,7 +1775,7 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.0", "@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -1801,7 +1801,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.0.0", "@ethersproject/bignumber@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== @@ -1810,7 +1810,7 @@ "@ethersproject/logger" "^5.7.0" bn.js "^5.2.1" -"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.0.0", "@ethersproject/bytes@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== @@ -1824,7 +1824,7 @@ dependencies: "@ethersproject/bignumber" "^5.7.0" -"@ethersproject/contracts@5.7.0": +"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.5.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== @@ -1990,7 +1990,7 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@5.7.0": +"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.0.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== @@ -2026,7 +2026,7 @@ "@ethersproject/rlp" "^5.7.0" "@ethersproject/signing-key" "^5.7.0" -"@ethersproject/units@5.7.0": +"@ethersproject/units@5.7.0", "@ethersproject/units@^5.0.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== @@ -3404,13 +3404,6 @@ dependencies: "@noble/hashes" "1.3.1" -"@noble/curves@1.2.0", "@noble/curves@~1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" - integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== - dependencies: - "@noble/hashes" "1.3.2" - "@noble/curves@~1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.0.0.tgz#e40be8c7daf088aaf291887cbc73f43464a92932" @@ -3418,6 +3411,11 @@ dependencies: "@noble/hashes" "1.3.0" +"@noble/hashes@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" + integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== + "@noble/hashes@1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" @@ -3428,10 +3426,10 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== -"@noble/hashes@1.3.2", "@noble/hashes@~1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" - integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== +"@noble/secp256k1@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -4461,11 +4459,6 @@ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== -"@scure/base@~1.1.2": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" - integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q== - "@scure/bip32@1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.0.tgz#6c8d980ef3f290987736acd0ee2e0f0d50068d87" @@ -4475,15 +4468,6 @@ "@noble/hashes" "~1.3.0" "@scure/base" "~1.1.0" -"@scure/bip32@1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.2.tgz#90e78c027d5e30f0b22c1f8d50ff12f3fb7559f8" - integrity sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA== - dependencies: - "@noble/curves" "~1.2.0" - "@noble/hashes" "~1.3.2" - "@scure/base" "~1.1.2" - "@scure/bip39@1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.0.tgz#a207e2ef96de354de7d0002292ba1503538fc77b" @@ -4492,13 +4476,12 @@ "@noble/hashes" "~1.3.0" "@scure/base" "~1.1.0" -"@scure/bip39@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" - integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== +"@shazow/whatsabi@^0.8.5": + version "0.8.5" + resolved "https://registry.yarnpkg.com/@shazow/whatsabi/-/whatsabi-0.8.5.tgz#d2cf49a04f4870a1b47b509b2ffc8fdd0ece7388" + integrity sha512-nMBylcHHa6hpsxVdmB0mbQhMLDtuI5ivbFnc0wFgftRtmQC5LAuf2L4corAsfBY6dTZJLrbzP68a6QyJM7c9pg== dependencies: - "@noble/hashes" "~1.3.0" - "@scure/base" "~1.1.0" + ethers "^6.7.1" "@sinclair/typebox@^0.24.1": version "0.24.51" @@ -5728,13 +5711,6 @@ "@testing-library/dom" "^8.5.0" "@types/react-dom" "^18.0.0" -"@tokenbound/sdk@^0.3.7": - version "0.3.7" - resolved "https://registry.yarnpkg.com/@tokenbound/sdk/-/sdk-0.3.7.tgz#65f581e809f4d08f8e2c0d3e12dc89bb217f3551" - integrity sha512-nBP0cfNzNrqCRUTuNNOUaqPEca2tTpDip9NSi5sngCycpvI83C2DQEY810+x4tvTInlLBWwu+9M8FRgogmiRSA== - dependencies: - viem "^1.10.14" - "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -6075,6 +6051,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.10.tgz#73c9480791e3ddeb4887a660fc93a7f59353ad45" integrity sha512-vwzFiiy8Rn6E0MtA13/Cxxgpan/N6UeNYR9oUu6kuJWxu6zCk98trcDp8CBhbtaeuq9SykCmXkFr2lWLoPcvLg== +"@types/node@18.15.13": + version "18.15.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" + integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== + "@types/node@18.7.18": version "18.7.18" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154" @@ -7476,11 +7457,6 @@ abitype@0.9.3: resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.3.tgz#294d25288ee683d72baf4e1fed757034e3c8c277" integrity sha512-dz4qCQLurx97FQhnb/EIYTk/ldQ+oafEDUqC0VVIeQS1Q48/YWt/9YNfMmp9SLFqN41ktxny3c8aYxHjmFIB/w== -abitype@0.9.8: - version "0.9.8" - resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.8.tgz#1f120b6b717459deafd213dfbf3a3dd1bf10ae8c" - integrity sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ== - accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -7542,6 +7518,11 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== +aes-js@4.0.0-beta.5: + version "4.0.0-beta.5" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" + integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== + aes-js@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" @@ -11244,6 +11225,20 @@ ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0: ethereum-cryptography "^0.1.3" rlp "^2.2.4" +ethers-multisend@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/ethers-multisend/-/ethers-multisend-2.4.0.tgz#abefa03b792000eb0d292b24ca7721c87138d838" + integrity sha512-/zL3/1TSS5ZFjyMcaPrk60fVmZUTYishIS/HtL3uUH52OcCswXNv9sTEa/+61nnO4x+VLxr2syM9pfwjhskYQA== + dependencies: + "@ethersproject/abi" "^5.0.0" + "@ethersproject/abstract-provider" "^5.5.1" + "@ethersproject/address" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/contracts" "^5.5.0" + "@ethersproject/solidity" "^5.0.0" + "@ethersproject/units" "^5.0.0" + ethers@^5.6.8, ethers@^5.7.1, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" @@ -11280,6 +11275,19 @@ ethers@^5.6.8, ethers@^5.7.1, ethers@^5.7.2: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" +ethers@^6.7.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.7.1.tgz#9c65e8b5d8e9ad77b7e8cf1c46099892cfafad49" + integrity sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA== + dependencies: + "@adraffy/ens-normalize" "1.9.2" + "@noble/hashes" "1.1.2" + "@noble/secp256k1" "1.7.1" + "@types/node" "18.15.13" + aes-js "4.0.0-beta.5" + tslib "2.4.0" + ws "8.5.0" + ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -19775,6 +19783,11 @@ tslib@1.14.1, tslib@^1.10.0, tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tslib@^2, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" @@ -20476,21 +20489,6 @@ viem@^1.0.0, viem@^1.3.0: isomorphic-ws "5.0.0" ws "8.12.0" -viem@^1.10.14: - version "1.12.2" - resolved "https://registry.yarnpkg.com/viem/-/viem-1.12.2.tgz#f698f5a57567ec81472aacc6801cf6eae9d41ce3" - integrity sha512-aCaUCyg72ES+jK4s6tVYOMnOt4if71RwzgiUAUpAuaCgvHFfh9DCnwuEfwkxEZLE2vafOsirgJ3fcn7nsDVQoQ== - dependencies: - "@adraffy/ens-normalize" "1.9.4" - "@noble/curves" "1.2.0" - "@noble/hashes" "1.3.2" - "@scure/bip32" "1.3.2" - "@scure/bip39" "1.2.1" - "@types/ws" "^8.5.5" - abitype "0.9.8" - isomorphic-ws "5.0.0" - ws "8.13.0" - vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -21032,6 +21030,11 @@ ws@8.13.0, ws@^8.12.0, ws@^8.13.0, ws@^8.2.2, ws@^8.2.3, ws@^8.5.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + ws@^7.4.5, ws@^7.5.1: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591"