Skip to content

Commit

Permalink
fix unwrap tx
Browse files Browse the repository at this point in the history
  • Loading branch information
loic1 committed Feb 12, 2025
1 parent 329b8c8 commit 7305d64
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,8 @@ transaction(wrapperERC721Address: String, nftIDs: [UInt256]) {
}

execute {
// Get contract addresses
let wrapperAddress = EVM.addressFromString(wrapperERC721Address)
let underlyingAddress = getUnderlyingERC721Address(self.coa, wrapperAddress)

// Approve contract to withdraw underlying NFTs from signer's coa
call(self.coa, wrapperAddress,
functionSig: "setApprovalForAll(address,bool)",
args: [underlyingAddress, true]
)

// Unwrap NFTs with provided IDs
call(self.coa, wrapperAddress,
call(self.coa, EVM.addressFromString(wrapperERC721Address),
functionSig: "withdrawTo(address,uint256[])",
args: [self.coa.address(), nftIDs]
)
Expand Down

0 comments on commit 7305d64

Please sign in to comment.