Skip to content

Commit 4595d58

Browse files
committed
WIP: TODO's created to fetch for ContractInitialized event and updated salt transforming
1 parent 9fedac3 commit 4595d58

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/data-table.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ export function DataTable({
101101
throw new Error("No active account");
102102
}
103103

104+
// TODO: fetch the ContractIntialized event
105+
// Guessing it has to fetch the transaction hash based on the contract address
106+
// Then fetch the block number from the transaction hash
107+
// Then fetch the event by limiting the block number
108+
104109
const coreInitializeParams = {
105110
...(
106111
coreMetadata.abi

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export default async function Page(props: {
7777
id: chainId,
7878
network: chainMetadata.name,
7979
chainId: chain.id,
80-
status: code === _originalCode ? "DEPLOYED" : "NOT_DEPLOYED",
80+
status:
81+
code === _originalCode
82+
? ("DEPLOYED" as const)
83+
: ("NOT_DEPLOYED" as const),
8184
};
8285
}),
8386
);
@@ -129,7 +132,6 @@ export default async function Page(props: {
129132
coreMetadata={coreMetadata}
130133
modulesMetadata={modulesMetadata}
131134
erc20InitialData={erc20InitialData}
132-
contract={contract}
133135
data={chainsDeployedOn}
134136
/>
135137
);

apps/dashboard/src/data/explore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const CROSS_CHAIN = {
201201
contracts: [
202202
// erc20 drop
203203
[
204-
"thirdweb.eth/ERC20CoreInitializable",
204+
"0x5bb2610C42280674d6f70682f76311B44D1c07FB/ERC20CoreInitializable", // TODO: replace this with the thirdweb published contract
205205
[
206206
"deployer.thirdweb.eth/ClaimableERC20",
207207
"0xf2d22310905EaD92C19c7ef0003C1AD38e129cb1/SuperChainInterop", // TODO: replace this with the OP published contract

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { keccakId } from "src/exports/utils.js";
12
import { parseEventLogs } from "../../event/actions/parse-logs.js";
23
import { proxyDeployedEvent } from "../../extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployed.js";
34
import { deployProxyByImplementation } from "../../extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.js";
@@ -34,8 +35,9 @@ export function prepareAutoFactoryDeployTransaction(
3435
});
3536
const blockNumber = await eth_blockNumber(rpcRequest);
3637
const salt = args.salt
37-
? //? keccakId(args.salt)
38-
(args.salt as `0x${string}`)
38+
? args.salt.startsWith("0x") && args.salt.length === 66
39+
? (args.salt as `0x${string}`)
40+
: keccakId(args.salt)
3941
: toHex(blockNumber, {
4042
size: 32,
4143
});

0 commit comments

Comments
 (0)