TransactionSEALED

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

Transaction ID

Timestamp

Feb 11, 2026, 01:34:46 PM UTC
2w ago

Block Height

141,872,232

Computation

0

Execution Error

Error Code: 1007

error caused by: 1 error occurred:

Raw Error

[Error Code: 1007] error caused by: 1 error occurred: * checking sequence number failed: [Error Code: 1007] invalid proposal key: public key 25 on account 82ed1b9cba5bb1b3 has sequence number 19857, but given 19856

Transaction Summary

Transaction

Script Arguments

0amountUFix64
100.00000000
1nameString
【ポイント交換】100コイン→10ポイント進呈
2artistString
JOSHIN
3artistAddressAddress
4descriptionString
5royaltyUFix64
0.00000000
6typeIDString
atJKV9ZsPlV4sFF8ngDc

Cadence Script

1/// transactions/nft/buy.cdc
2
3import NonFungibleToken from 0x1d7e57aa55817448
4import MetadataViews from 0x1d7e57aa55817448
5import KARAT1DHGCDSBT from 0x82ed1b9cba5bb1b3
6import FungibleToken from 0xf233dcee88fe0abe
7import FungibleTokenMetadataViews from 0xf233dcee88fe0abe
8
9import JOSHIN from 0x82ed1b9cba5bb1b3
10
11transaction(amount: UFix64, name: String, artist: String, artistAddress: Address, description: String, royalty: UFix64, typeID: String) {
12
13  // The Vault resource that holds the tokens that are being transferred
14  let sentVault: @{FungibleToken.Vault}
15  let sellerReceiverTokenRef: &{FungibleToken.Receiver}
16
17  let nftMinter: &KARAT1DHGCDSBT.NFTMinter
18  /// Reference to the buyer's collection
19  let buyerRecipientCollectionRef: &{NonFungibleToken.Receiver}
20
21
22  prepare(
23    minter: auth(BorrowValue) &Account,
24    seller: auth(BorrowValue, IssueStorageCapabilityController, PublishCapability, SaveValue) &Account,
25    buyer: auth(BorrowValue, IssueStorageCapabilityController, PublishCapability, SaveValue, UnpublishCapability) &Account)
26  {
27    let vaultData = JOSHIN.resolveContractView(resourceType: nil, viewType: Type<FungibleTokenMetadataViews.FTVaultData>()) as! FungibleTokenMetadataViews.FTVaultData?
28        ?? panic("ViewResolver does not resolve FTVaultData view")
29
30    // enable seller token
31    if seller.storage.borrow<&JOSHIN.Vault>(from: vaultData.storagePath) == nil {
32      let vault <- JOSHIN.createEmptyVault(vaultType: Type<@JOSHIN.Vault>())
33
34      // Create a new JOSHIN Vault and put it in storage
35      seller.storage.save(<-vault, to: vaultData.storagePath)
36
37      // Create a public capability to the Vault that exposes the Vault interfaces
38      let vaultCap = seller.capabilities.storage.issue<&JOSHIN.Vault>(
39        vaultData.storagePath
40      )
41      seller.capabilities.publish(vaultCap, at: vaultData.metadataPath)
42
43      // Create a public Capability to the Vault's Receiver functionality
44      let receiverCap = seller.capabilities.storage.issue<&JOSHIN.Vault>(
45        vaultData.storagePath
46      )
47      seller.capabilities.publish(receiverCap, at: vaultData.receiverPath)
48    }
49
50    // Get a reference to the signer's stored vault
51    let vaultRef = buyer.storage.borrow<auth(FungibleToken.Withdraw) &JOSHIN.Vault>(from: vaultData.storagePath)
52        ?? panic("Could not borrow reference to the buyer's Vault!")
53
54    // Withdraw tokens from the signer's stored vault
55    self.sentVault <- vaultRef.withdraw(amount: amount)
56
57    let sellerAccount = getAccount(seller.address)
58    // Get a reference to the sellerAccount's Receiver
59    self.sellerReceiverTokenRef = sellerAccount.capabilities.borrow<&{FungibleToken.Receiver}>(vaultData.receiverPath)
60        ?? panic("Could not borrow receiver reference to the sellerAccount's Vault")
61
62
63    let collectionData = KARAT1DHGCDSBT.resolveContractView(resourceType: nil, viewType: Type<MetadataViews.NFTCollectionData>()) as! MetadataViews.NFTCollectionData?
64            ?? panic("ViewResolver does not resolve NFTCollectionData view")
65
66    // enable buyer nft
67    if buyer.storage.borrow<&KARAT1DHGCDSBT.Collection>(from: collectionData.storagePath) == nil {
68      // Create a new empty collection
69      let collection <- KARAT1DHGCDSBT.createEmptyCollection(nftType: Type<@KARAT1DHGCDSBT.NFT>())
70
71      // save it to the account
72      buyer.storage.save(<-collection, to: collectionData.storagePath)
73
74      // create a public capability for the collection
75      buyer.capabilities.unpublish(collectionData.publicPath)
76      let collectionCap = buyer.capabilities.storage.issue<&KARAT1DHGCDSBT.Collection>(collectionData.storagePath)
77      buyer.capabilities.publish(collectionCap, at: collectionData.publicPath)
78    }
79
80    // Borrow the recipient's public NFT collection reference
81    self.buyerRecipientCollectionRef = getAccount(buyer.address).capabilities.borrow<&{NonFungibleToken.Receiver}>(collectionData.publicPath)
82      ?? panic("Could not get receiver reference to the buyer's NFT Collection")
83
84
85    // borrow a reference to the NFTMinter resource in storage
86    self.nftMinter = minter.storage.borrow<&KARAT1DHGCDSBT.NFTMinter>(from: KARAT1DHGCDSBT.AdminStoragePath)
87        ?? panic("Account does not store an object at the specified path")
88  }
89
90	execute {
91    // Deposit the withdrawn tokens in the sellerAccount's receiver
92      self.sellerReceiverTokenRef.deposit(from: <-self.sentVault)
93
94		let metadata=KARAT1DHGCDSBT.Metadata(name: name, artist: artist, artistAddress: artistAddress, description: description, type: typeID, serialId: 1, royalty: royalty)
95    // Mint the NFT and deposit it to the recipient's collection
96    self.nftMinter.mintNFT(recipient: self.buyerRecipientCollectionRef, metadata: metadata)
97	}
98}