diff --git a/.changeset/angry-mayflies-grab.md b/.changeset/angry-mayflies-grab.md new file mode 100644 index 000000000..119927759 --- /dev/null +++ b/.changeset/angry-mayflies-grab.md @@ -0,0 +1,5 @@ +--- +"@layerzerolabs/ua-devtools-solana": patch +--- + +Fix Squads Multisig Support diff --git a/examples/oft-solana/tasks/common/wire.ts b/examples/oft-solana/tasks/common/wire.ts index c7996dc02..d0c5af0fa 100644 --- a/examples/oft-solana/tasks/common/wire.ts +++ b/examples/oft-solana/tasks/common/wire.ts @@ -167,6 +167,7 @@ task(TASK_LZ_OWNABLE_TRANSFER_OWNERSHIP) // Only pass this if you deployed a new OFT program, if you are using the default // LayerZero OFT program you can omit this .addParam('solanaProgramId', 'The OFT program ID to use', undefined, publicKey, true) + .addParam('multisigKey', 'The MultiSig key', undefined, publicKey, true) .setAction(async (args: Args, hre) => { return hre.run(TASK_LZ_OAPP_WIRE, { ...args, internalConfigurator: configureOwnable }) }) diff --git a/packages/ua-devtools-solana/src/oft/sdk.ts b/packages/ua-devtools-solana/src/oft/sdk.ts index cdf596045..921da9046 100644 --- a/packages/ua-devtools-solana/src/oft/sdk.ts +++ b/packages/ua-devtools-solana/src/oft/sdk.ts @@ -414,7 +414,7 @@ export class OFT extends OmniSDK implements IOApp { this._umiToWeb3Tx([ oft.initConfig( { - admin: await this._getOwnerSigner(), + admin: await this._getAdmin(), oftStore: this.umiPublicKey, payer: createNoopSigner(this.umiUserAccount), }, @@ -476,7 +476,7 @@ export class OFT extends OmniSDK implements IOApp { return oft.setOFTConfig( { oftStore: this.umiPublicKey, - admin: (await this.getOwner()) as unknown as Signer, + admin: await this._getAdmin(), }, param, { @@ -503,7 +503,7 @@ export class OFT extends OmniSDK implements IOApp { return oft.setPeerConfig( { oftStore: this.umiPublicKey, - admin: await this._getOwnerSigner(), + admin: await this._getAdmin(), }, param, this.umiProgramId @@ -574,11 +574,8 @@ export class OFT extends OmniSDK implements IOApp { return web3Transaction } - protected async _getOwnerSigner(): Promise { + protected async _getAdmin(): Promise { const owner = await this.getOwner() - if (!owner) { - throw new Error(`No owner found for ${this.label}`) - } return createNoopSigner(publicKey(owner)) } }