Convex

Convex

Account #133
Account 134 / 14299
FieldValueNotes
Account Key
Identicon for 7daefe22af88daa30d4aaa1ba2f049dcf166b19782e02dcece8584d8ff3a06f8
0x7daefe22af88daa3...
Ed25519 public key (null for actors)
Balance
           16.361150566
Convex coin balance
Account Fields
FieldValueDescription
:sequence101Number of transactions executed by this account to date.
:key
Identicon for 7daefe22af88daa30d4aaa1ba2f049dcf166b19782e02dcece8584d8ff3a06f8
0x7daefe22af88daa30d4aaa1ba2f049dcf166b19782e02dcece8584d8ff3a06f8
Ed25519 public key of this account. If nil, account cannot execute external transactions (e.g. an actor).
:balance
           16.361150566
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.
:holdings2 value(s)Storage for holdings data referenced by other accounts.
:controller#133Account 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!
:environment22 value(s)Symbols defined in this account. Typically used to store data or executable code.
:metadata17 value(s)Metadata attached to symbols defined in this account.
:parentnilParent account. This defines fallback values for symbols not defined in this account.
Environment (22)

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

SymbolValueDescription
Rich#161nil
asset#65nil
transfer-nft(fn [to-address nft-id] (call* #133 0 transfer #134 0x0020))nil
get-metadata(fn ([] (recur *scope*)) ([id] (do (cond (#133/valid-id? %0) *result* (return nil)) (let [hex (str %0) img (str #133/base-url %1 ".png") ] (hash-map "image" %2 "name" "Peace")))))"Gets metadata for a given NFT ID."
create-actor-account(fn [controller-address] (let [code (list do (assert *caller*) (list set-controller %0)) addr (deploy %1) ] %2))nil
guv#133nil
quantity-addunionnil
balance(fn [owner] (cond (get-holding %0) *result* #{}))nil
direct-transfer(fn [receiver quantity data] (#133/-direct-transfer *caller* %0 %1))nil
tok()nil
quantity-subset?subset?nil
-direct-transfer(fn [sender receiver quantity] (let [q (#133/-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
base-url"http://localhost:8080/dlfs/peace0x"nil
offer(fn [receiver quantity] (let [q (#133/-qc %1) caller-offers (get #133/offers *caller* {}) ] (def offers (assoc #133/offers *caller* (assoc %3 %0 %2)))))nil
fun#64nil
offers{}"Map of `owner` -> map of `recipient address` -> `set of NFT ids`"
valid-id?(fn [id] (cond (cond (blob? %0) (cond (= 2 (count %0)) (<= 1 (int %0) 100) *result*) *result*) true false))nil
-qc(fn [q] (cond (set? %0) %0 (#133/valid-id? %0) (hash-set %0) (nil? %0) #{} (fail :ARGUMENT "Invalid NFT quantity")))nil
quantity-subdifferencenil
distribute(fn [key amt] (let [a (deploy (list do (list set-key %0) (set-controller #50))) ] (transfer %2 %1) %2))nil
accept(fn [sender quantity] (let [q (#133/-qc %1) sender (address %0) sender-offers (cond (get #133/offers %3) *result* {}) offer (cond (get-in #133/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 #133/offers %3 (assoc %4 *caller* %7))) (#133/-direct-transfer %3 *caller* %1)))nil
controller-addressnilnil
Holdings (2)

Holdings track token balances and other indexed values by address.

AddressValue
#133#{0x0009,0x003c,0x0024,0x0052,0x002a,0x0013,0x004a,0x005b,0x0018,0x004f,0x0016,0x003a,0x003e,0x0008,0x0002,0x0045,0x0055,0x002d,0x003b,0x0049,0x0061,0x0031,0x000c,0x0040,0x002f,0x0060,0x0014,0x0001,0x0007,0x0010,0x0048,0x001b,0x004b,0x000b,0x0027,0x0033,0x000e,0x0058,0x000d,0x0056,0x0011,0x0064,0x0042,0x003f,0x0032,0x0053,0x0063,0x0039,0x001f,0x0003,0x001e,0x000a,0x0006,0x005d,0x0041,0x003d,0x004c,0x0046,0x0057,0x0028,0x001a,0x002b,0x0022,0x0034,0x0017,0x004e,0x0030,0x0038,0x005e,0x0004,0x0021,0x0043,0x0015,0x0005,0x0019,0x001c,0x0035,0x005c,0x0036,0x005f,0x000f,0x0023,0x001d,0x004d,0x0025,0x0037,0x0050,0x0059,0x0026,0x0029,0x0054,0x0051,0x002e,0x005a,0x0044,0x0047,0x0062,0x002c,0x0012}
#134#{0x0020}