File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/thirdweb/src/contract/actions Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,22 @@ import { eth_getTransactionByHash } from "../../rpc/actions/eth_getTransactionBy
44import { getRpcClient } from "../../rpc/rpc.js" ;
55import { download } from "../../storage/download.js" ;
66import { decodeUriFromCalldata } from "../../utils/any-evm/decode-uri-from-calldata.js" ;
7+ import { resolveImplementation } from "../../utils/bytecode/resolveImplementation.js" ;
8+ import { getContract } from "../contract.js" ;
79
810export async function extractUriFromCalldata ( options : {
911 client : ThirdwebClient ;
1012 chain : Chain ;
1113 contractAddress : `0x${string } `;
1214} ) {
15+ const contract = getContract ( {
16+ client : options . client ,
17+ chain : options . chain ,
18+ address : options . contractAddress ,
19+ } ) ;
20+ const impl = await resolveImplementation ( contract ) ;
1321 const res = await fetch (
14- `https://contract.thirdweb-dev.com/creation/${ options . chain . id } /${ options . contractAddress } ` ,
22+ `https://contract.thirdweb-dev.com/creation/${ options . chain . id } /${ impl } ` ,
1523 ) ;
1624 const creationData = await res . json ( ) ;
1725
You can’t perform that action at this time.
0 commit comments