Skip to content

Commit 558885a

Browse files
jxomjoaquim-verges
andauthored
fix: resolves viem#2306 (thirdweb-dev#3237)
Co-authored-by: Joaquim Verges <[email protected]>
1 parent 21ca67d commit 558885a

File tree

13 files changed

+656
-595
lines changed

13 files changed

+656
-595
lines changed

packages/thirdweb/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"mipd": "0.0.7",
198198
"node-libs-browser": "2.2.1",
199199
"uqr": "0.1.2",
200-
"viem": "2.10.9"
200+
"viem": "2.13.7"
201201
},
202202
"peerDependencies": {
203203
"@aws-sdk/client-lambda": "^3",
@@ -310,4 +310,4 @@
310310
"shamir-secret-sharing": "0.0.3",
311311
"vitest": "1.5.0"
312312
}
313-
}
313+
}

packages/thirdweb/src/adapters/ethers5.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,13 @@ function alignTxToEthers(
484484
}
485485
}
486486

487-
return { ...rest, gasLimit: gas, to, type };
487+
return {
488+
...rest,
489+
gasLimit: gas,
490+
to,
491+
type,
492+
accessList: tx.accessList as ethers5.utils.AccessListish | undefined,
493+
};
488494
}
489495

490496
async function alignTxFromEthers(

packages/thirdweb/src/adapters/ethers6.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,11 @@ function alignTxToEthers(
447447
break;
448448
}
449449
}
450-
return { ...rest, type };
450+
return {
451+
...rest,
452+
type,
453+
accessList: tx.accessList as ethers6.AccessListish | null | undefined,
454+
};
451455
}
452456

453457
async function alignTxFromEthers(options: {

packages/thirdweb/src/contract/deployment/publisher.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ vi.mock("../../../transaction/read-contract");
77
vi.mock("../../../storage/download");
88

99
// TODO: Add mocks to these tests instead of using live data
10-
describe("fetchPublishedContract", () => {
10+
describe.runIf(process.env.TW_SECRET_KEY)("fetchPublishedContract", () => {
1111
it("fetches the latest published contract when no version is specified", async () => {
1212
const result = await fetchPublishedContractMetadata({
1313
publisher: "0x4a706de5CE9bfe2f9C37BA945805e396d1810824",

0 commit comments

Comments
 (0)