TransactionSEALED

#○&^%█▓*╳^#*~╱◇▫■▒●#◇◆▒&@■^^░▒◇╱○╳^?▓*~*@█$●▓○■▓!^%╲%%▫◆╱▫!╲▓■░╱

Transaction ID

Timestamp

Sep 05, 2024, 12:47:02 PM UTC
1y ago

Block Height

86,041,824

Computation

0

Execution Fee

0.00000908 FLOW

Proposerseq:397 key:119

Authorizers

1

Transaction Summary

Contract Call

Called TrmAssetV2_2

Contracts

Script Arguments

0assetCollectionAddressAddress
1tokenIDs[UInt64]
[
  "48350"
]
2kIDString
8d2e6759582dec0f5f35fa5a91ca0000
3assetNameString?
Chime(本編)
4assetDescriptionString?
null
5assetThumbnailURLString?
null
6assetTypeString?
private
7assetMetadataKeys[String]
[]
8assetMetadataValues[String]
[]

Cadence Script

1import TrmAssetV2_2 from 0x61fc4b873e58733b
2
3		transaction(assetCollectionAddress: Address, tokenIDs: [UInt64], kID: String, assetName: String?, assetDescription: String?, assetThumbnailURL: String?, assetType: String?, assetMetadataKeys: [String], assetMetadataValues: [String]) {
4
5			let adminResource: &TrmAssetV2_2.Admin
6
7			prepare(adminAccount: auth(BorrowValue) &Account) {
8				self.adminResource = adminAccount.storage.borrow<&TrmAssetV2_2.Admin>(from: TrmAssetV2_2.adminStoragePath)
9					?? panic("could not borrow admin resource from account storage")
10			}
11
12			pre {
13				assetType == "private" || assetType == "public" || assetType == nil:
14					"asset type must be private or public"
15
16				(assetMetadataKeys == nil && assetMetadataValues == nil) || assetMetadataKeys!.length ==  assetMetadataValues!.length:
17					"asset metadata keys and values must have the same length"
18			}
19
20			execute {
21				let assetMetadata: {String: String} = {}
22
23				for index, key in assetMetadataKeys! {
24					assetMetadata[key] = assetMetadataValues![index]
25				}
26				
27				self.adminResource.batchUpdateAsset(assetCollectionAddress: assetCollectionAddress, ids: tokenIDs, kID: kID, assetName: assetName, assetDescription: assetDescription, assetThumbnailURL: assetThumbnailURL, assetType: assetType, assetMetadata: assetMetadata)
28			}
29		}