Convex

Convex

Account #68
Account 69 / 14299
FieldValueNotes
Account KeynullEd25519 public key (null for actors)
Balance
            0.000000000
Convex coin balance
Account Fields
FieldValueDescription
:sequence0Number of transactions executed by this account to date.
:keynilEd25519 public key of this account. If nil, account cannot execute external transactions (e.g. an actor).
:balance
            0.000000000
CVM balance of account. This is used for transaction fees and may be freely transferred.
:allowance0Memory allowance credit on the CVM. If positive, the account may allocated up to this amount of memory before incurring fees for additional memory.
:holdings0 value(s)Storage for holdings data referenced by other accounts.
:controller#6Account controller. If set, the controller can execute code in this account (e.g. change the key). If you don't trust the controller, don't trust the account!
:environment15 value(s)Symbols defined in this account. Typically used to store data or executable code.
:metadata15 value(s)Metadata attached to symbols defined in this account.
:parentnilParent account. This defines fallback values for symbols not defined in this account.
Environment (15)

The Environment contains symbols defined in this account. These may be referenced like: #45/symbol-name

SymbolValueDescription
get-metadata(fn ([] (recur *scope*)) ([id] (get #68/meta %0)))"Gets metadata for a given NFT ID."
create(fn ([] (recur nil)) ([metadata] (let [id #68/counter owner *caller* owned-nfts (cond (get-holding %2) *result* #{}) ] (set-holding %2 (conj %3 %1)) (cond (nil? %0) *result* (def meta (assoc #68/meta %1 %0))) (def counter (inc #68/counter)) %1)))"Creates a new NFT with a fresh ID."
quantity-addunionnil
balance(fn [owner] (cond (get-holding %0) *result* #{}))nil
direct-transfer(fn [receiver quantity data] (#68/-direct-transfer *caller* %0 %1))nil
quantity-subset?subset?nil
-direct-transfer(fn [sender receiver quantity] (do (let [q (#68/-qc %2) receiver (address %1) sender-balance (cond (get-holding %0) *result* #{}) _ (cond (subset? %3 %5) *result* (fail :FUNDS "Cannot transfer non-owned NFT(s)")) receiver-balance (cond (get-holding %4) *result* #{}) new-sender-balance (difference %5 %3) new-receiver-balance (union %6 %3) ] (set-holding %0 %7) (set-holding %4 %8)) %2))nil
offer(fn [receiver quantity] (let [q (#68/-qc %1) caller-offers (get #68/offers *caller* {}) ] (def offers (assoc #68/offers *caller* (assoc %3 %0 %2)))))nil
offers{}"Map of `owner` -> map of `recipient address` -> `set of NFT ids`"
burn(fn [nft-set] (let [owned-nfts (get-holding *caller*) nft-set (cond (int? %0) (hash-set %0) (set? %0) %0 :else (set %0)) ] (cond (subset? %2 %1) nil (fail :TRUST "Can only burn owned NFTs")) (set-holding *caller* (difference %1 %2)) (def meta (reduce dissoc #68/meta %2)) %2))"Destroys a set of NFTs. NFTs must be owned by the caller."
-qc(fn [q] (cond (set? %0) %0 (int? %0) (hash-set %0) (nil? %0) #{} (fail :ARGUMENT "Invalid NFT quantity")))"Checks a basic NFT quantity."
counter0"Used for creating NFT ids."
quantity-subdifferencenil
meta{}"Map of ID -> NFT metadata. May be nil for no metadata"
accept(fn [sender quantity] (let [q (#68/-qc %1) sender (address %0) sender-offers (cond (get #68/offers %3) *result* {}) offer (cond (get-in #68/offers (vector %3 *caller*)) *result* #{}) _ (cond (subset? %2 %5) *result* (fail :STATE "Insuffient NFT offer to accept")) receiver-balance (cond (get-holding *caller*) *result* #{}) new-offer (difference %5 %2) ] (def offers (assoc #68/offers %3 (assoc %4 *caller* %7))) (#68/-direct-transfer %3 *caller* %1)))nil
Holdings (Empty)

Holdings track token balances and other indexed values by address.

AddressValue