From f1a14d7ad39ae203875ba068d482a2784cee0475 Mon Sep 17 00:00:00 2001 From: Anson Date: Wed, 15 Jan 2025 18:01:09 +0000 Subject: [PATCH 1/3] fix(contracts-sdk): claimAndMint(...) missing stakingContractAddress argument --- packages/contracts-sdk/src/lib/contracts-sdk.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/contracts-sdk/src/lib/contracts-sdk.ts b/packages/contracts-sdk/src/lib/contracts-sdk.ts index 32b189cd3..1d09896a2 100644 --- a/packages/contracts-sdk/src/lib/contracts-sdk.ts +++ b/packages/contracts-sdk/src/lib/contracts-sdk.ts @@ -2021,13 +2021,23 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope claimAndMint: async ( derivedKeyId: BytesLike, signatures: IPubkeyRouter.SignatureStruct[], - txOpts: ethers.CallOverrides = {} + txOpts: ethers.CallOverrides = {}, + stakingContractAddress?: string ) => { + + let params = [2, derivedKeyId, signatures]; + + if (stakingContractAddress) { + params.push(stakingContractAddress); + } + try { const tx = await this._callWithAdjustedOverrides( this.pkpNftContract.write, 'claimAndMint', - [2, derivedKeyId, signatures], + // @ts-ignore - upcoming refactor will include inferred types from the ABIs instead of using the generated types, which in this case are incorrect/out-of-date + // Thanks zach-is-my-name for reporting this issue :) + params, { ...txOpts, value: From 8752fd2d3c4a29114e65c42a90928bf5a1d234d6 Mon Sep 17 00:00:00 2001 From: Anson Date: Wed, 15 Jan 2025 18:08:32 +0000 Subject: [PATCH 2/3] fmt --- packages/contracts-sdk/src/lib/contracts-sdk.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/contracts-sdk/src/lib/contracts-sdk.ts b/packages/contracts-sdk/src/lib/contracts-sdk.ts index 1d09896a2..6067bad0c 100644 --- a/packages/contracts-sdk/src/lib/contracts-sdk.ts +++ b/packages/contracts-sdk/src/lib/contracts-sdk.ts @@ -2024,7 +2024,6 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope txOpts: ethers.CallOverrides = {}, stakingContractAddress?: string ) => { - let params = [2, derivedKeyId, signatures]; if (stakingContractAddress) { From 96b9ef3d4f8d178f3e8c4e18b968ce791b33c1b6 Mon Sep 17 00:00:00 2001 From: Anson Date: Wed, 15 Jan 2025 18:14:37 +0000 Subject: [PATCH 3/3] fix(ci): update Rust version to 1.83.0 for wasm compatibility --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a9a2627a..8e4243486 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,11 @@ jobs: node-version: '20' cache: 'yarn' - name: Install rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.83.0 + override: true + components: rust-std - uses: jetli/wasm-pack-action@v0.4.0 with: # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')