Convex

Convex

Account #207
Account 208 / 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.
:holdings4 value(s)Storage for holdings data referenced by other accounts.
:controllernilAccount 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!
:environment14 value(s)Symbols defined in this account. Typically used to store data or executable code.
:metadata12 value(s)Metadata attached to symbols defined in this account.
:parentnilParent account. This defines fallback values for symbols not defined in this account.
Environment (14)

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

SymbolValueDescription
decimals(fn [] 0)nil
total-supply(fn [] #207/supply)nil
quantity-add(fn [a b] (let [a (cond %0 (int %0) 0) b (cond %1 (int %1) 0) ] (+ %2 %3)))nil
balance(fn [addr] (cond (get-holding %0) *result* 0))nil
direct-transfer(fn [addr amount data] (let [addr (address %0) amount (#207/-qc %1) bal (cond (get-holding *caller*) *result* 0) tbal (cond (get-holding %3) *result* 0) ] nil (cond (< %4 0) (fail :ARGUMENT "negative transfer")) (cond (> %4 %5) (fail :FUNDS "insufficent token balance")) (cond (= *caller* %3) (do (log "TR" *caller* %3 %4 %5 %5 %2) (return %4)) nil) (let [nsb (- %5 %4) nrb (+ %6 %4) ] (log "TR" *caller* %3 %4 %7 %8 %2) (set-holding *caller* %7) (set-holding %3 %8))))nil
quantity-subset?(fn [a b] (<= (cond %0 (int %0) 0) (cond %1 (int %1) 0)))nil
offer(fn [receiver quantity] (let [receiver (address %0) quantity (#207/-qc %1) ] (cond (<= %3 0) (cond (lookup-meta *address* offers) (def offers (#8/dissoc-in #207/offers (vector *caller* %2))) (fail :UNDECLARED offers)) (cond (lookup-meta *address* offers) (def offers (assoc-in #207/offers (vector *caller* %2) %3)) (fail :UNDECLARED offers))) %3))nil
supply7777nil
check-transfer(fn [_sender _receiver _quantity] nil)nil
offers{#206 {},#132 {}}nil
get-offer(fn [sender receiver] (get-in #207/offers (vector %0 %1) 0))nil
-qc(fn [q] (cond (int? %0) %0 (nil? %0) 0 (fail :ARGUMENT "Invalid quantity")))nil
quantity-sub(fn [a b] (let [a (cond %0 (int %0) 0) b (cond %1 (int %1) 0) ] (cond (> %2 %3) (- %2 %3) 0)))nil
accept(fn [sender quantity] (let [sender (address %0) quantity (#207/-qc %1) om (get #207/offers %2) sendbal (cond (get-holding %2) *result* 0) offer (get %4 *caller* 0) ] (cond (< %3 0) (fail "Can't accept a negative quantity of fungible tokens.") (< %6 %3) (fail :STATE "Offer is insufficient") (< %5 %3) (fail :FUNDS "Sender token balance is insufficient") (let [new-offer (- %6 %3) ] (def offers (assoc #207/offers %2 (cond (> %7 0) (assoc %4 *caller* %7) (dissoc %4 *caller*)))) (set-holding %2 (- %5 %3)) (set-holding *caller* (+ (cond (get-holding *caller*) *result* 0) %3)) %3))))nil
Holdings (4)

Holdings track token balances and other indexed values by address.

AddressValue
#132947
#2052
#2066776
#20852