TransactionSEALED
●■░╲▫░@?~@◇╱▓&■◇▓█%*^▫▒▪#◆&█◇^█●█╳▓▪*●~▓░!▓*▒**?▒■▒◆!▫░██~▓╲#▓◇●
Transaction ID
Script Arguments
0offersByWalletAddress{Address
{
"0x90198a23b7928a83": [
"58274118798775"
]
}Cadence Script
1import DapperOffersV2 from 0xb8ea91944fd51c43
2
3transaction(offersByWalletAddress: {Address: [UInt64]}) {
4 prepare(acct: auth(BorrowValue) &Account) {
5 let dapperOffer = acct.storage.borrow<auth(DapperOffersV2.ProxyManager) &DapperOffersV2.DapperOffer>(from: DapperOffersV2.DapperOffersStoragePath) ?? panic("DapperOffer not found")
6 offersByWalletAddress.forEachKey(fun (key: Address): Bool {
7 let offerIdsOpt = offersByWalletAddress[key]
8 if let offerIds = offerIdsOpt {
9 let userDapperOffersRef = getAccount(key).capabilities.borrow<&DapperOffersV2.DapperOffer>( DapperOffersV2.DapperOffersPublicPath )
10 if userDapperOffersRef == nil {
11 return true
12 }
13 let existingOfferIds = userDapperOffersRef!.getOfferIds()
14 for offerId in offerIds {
15 if existingOfferIds.contains(offerId) {
16 dapperOffer.removeOfferFromProxy(account: key, offerId: offerId)
17 }
18 }
19 }
20 return true
21 })
22 }
23
24 execute {
25 }
26}