Skip to content

Commit 07703e9

Browse files
committed
WIP: staging to get help
1 parent 9f5289b commit 07703e9

File tree

7 files changed

+29
-13
lines changed

7 files changed

+29
-13
lines changed

apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
461461
}));
462462
console.log("module deploy data", moduleDeployData);
463463

464-
const deployData = {
464+
const coreContractAddress = await deployContractfromDeployMetadata({
465465
account: activeAccount,
466466
chain: walletChain,
467467
client: thirdwebClient,
@@ -472,11 +472,7 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
472472
? // remove modules for superchain interop in order to deploy deterministically deploy just the core contract
473473
[]
474474
: moduleDeployData,
475-
};
476-
477-
console.log("deploy data", deployData);
478-
const coreContractAddress =
479-
await deployContractfromDeployMetadata(deployData);
475+
});
480476
const coreContract = getContract({
481477
client: thirdwebClient,
482478
address: coreContractAddress,
@@ -527,6 +523,8 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
527523
}),
528524
);
529525
}
526+
527+
return coreContractAddress;
530528
},
531529
});
532530

apps/dashboard/src/data/explore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ const CROSS_CHAIN = {
203203
[
204204
"deployer.thirdweb.eth/ERC20CoreInitializable", // TODO: replace this with the thirdweb published contract
205205
[
206-
"deployer.thirdweb.eth/ClaimableERC20",
207206
"0xf2d22310905EaD92C19c7ef0003C1AD38e129cb1/SuperChainInterop", // TODO: replace this with the OP published contract
207+
"deployer.thirdweb.eth/ClaimableERC20",
208208
],
209209
{
210210
title: "Modular Token Drop",

packages/thirdweb/src/contract/deployment/deploy-via-autofactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { keccakId } from "src/exports/utils.js";
21
import { parseEventLogs } from "../../event/actions/parse-logs.js";
32
import { proxyDeployedEvent } from "../../extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployed.js";
43
import { deployProxyByImplementation } from "../../extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.js";
@@ -7,6 +6,7 @@ import { getRpcClient } from "../../rpc/rpc.js";
76
import { encode } from "../../transaction/actions/encode.js";
87
import { sendAndConfirmTransaction } from "../../transaction/actions/send-and-confirm-transaction.js";
98
import type { PreparedTransaction } from "../../transaction/prepare-transaction.js";
9+
import { keccakId } from "../../utils/any-evm/keccak-id.js";
1010
import { isZkSyncChain } from "../../utils/any-evm/zksync/isZkSyncChain.js";
1111
import { toHex } from "../../utils/encoding/hex.js";
1212
import { resolvePromisedValue } from "../../utils/promise/resolve-promised-value.js";

packages/thirdweb/src/extensions/prebuilts/deploy-published.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export async function deployContractfromDeployMetadata(
196196
chain,
197197
});
198198

199-
return deployViaAutoFactory({
199+
return await deployViaAutoFactory({
200200
client,
201201
chain,
202202
account,

packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployed.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/thirdweb/src/transaction/actions/send-and-confirm-transaction.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
import { http, createPublicClient } from "viem";
2+
import { optimismSepolia } from "viem/chains";
13
import type { TransactionReceipt } from "../types.js";
24
import {
35
type SendTransactionOptions,
46
sendTransaction,
57
} from "./send-transaction.js";
6-
import { waitForReceipt } from "./wait-for-tx-receipt.js";
8+
9+
const publicClient = createPublicClient({
10+
chain: optimismSepolia,
11+
transport: http(
12+
"https://opt-sepolia.g.alchemy.com/v2/BtOwhqwBs6IOw5fd-dkhCDTh5Fx4XPHu",
13+
),
14+
});
715

816
/**
917
* Sends a transaction using the provided wallet.
@@ -53,5 +61,12 @@ export async function sendAndConfirmTransaction(
5361
options: SendTransactionOptions,
5462
): Promise<TransactionReceipt> {
5563
const submittedTx = await sendTransaction(options);
56-
return waitForReceipt(submittedTx);
64+
const receipt = await publicClient.waitForTransactionReceipt({
65+
hash: submittedTx.transactionHash,
66+
});
67+
console.error("receipt", receipt);
68+
69+
//const receipt = await waitForReceipt(submittedTx);
70+
//console.error("receipt", receipt);
71+
return receipt;
5772
}

packages/thirdweb/src/utils/ens/namehash.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export function namehash(name: string) {
2020
const hashed = hashFromEncodedLabel
2121
? toBytes(hashFromEncodedLabel)
2222
: keccak256(stringToBytes(item), "bytes");
23-
result = keccak256(concat([result, hashed]), "bytes");
23+
result = keccak256(
24+
concat([result, hashed]),
25+
"bytes",
26+
) as Uint8Array<ArrayBuffer>;
2427
}
2528

2629
return bytesToHex(result);

0 commit comments

Comments
 (0)