πhow to inscribe a flowmap
Each flowmap inscription needs 0.025 flow to be inscribed which ensures its value.
Easy mode



Hardcore mode

Last updated
Each flowmap inscription needs 0.025 flow to be inscribed which ensures its value.




Last updated
import FlowToken from 0x1654653399040a61
import NonFungibleToken from 0x1d7e57aa55817448
import Flowmap from 0x483f0fe77f0d59fb
transaction(qty: UFix64) {
prepare(signer: AuthAccount) {
if(signer.borrow<&Flowmap.Collection>(from: Flowmap.CollectionStoragePath) == nil) {
signer.save<@NonFungibleToken.Collection>(<- Flowmap.createEmptyCollection(), to: Flowmap.CollectionStoragePath)
signer.unlink(Flowmap.CollectionPublicPath)
signer.link<&{Flowmap.CollectionPublic}>(Flowmap.CollectionPublicPath, target: Flowmap.CollectionStoragePath)
}
let vaultRef = signer.borrow<&FlowToken.Vault>(from: /storage/flowTokenVault)?? panic("Could not borrow reference to the owner's Vault!")
let inscriptionFee <- vaultRef.withdraw(amount: Flowmap.inscriptionFee * qty) as! @FlowToken.Vault
Flowmap.batchInscribe(inscriptionFee: <-inscriptionFee, quantity: qty, receiver: signer.address)
}
}