Account #161
| Field | Value | Notes |
|---|---|---|
| Account Key | null | Ed25519 public key (null for actors) |
| Balance | | Convex coin balance |
| Field | Value | Notes |
|---|---|---|
| Account Key | null | Ed25519 public key (null for actors) |
| Balance | | Convex coin balance |
| Field | Value | Description |
|---|---|---|
:sequence | 0 | Number of transactions executed by this account to date. |
:key | nil | Ed25519 public key of this account. If nil, account cannot execute external transactions (e.g. an actor). |
:balance | | CVM balance of account. This is used for transaction fees and may be freely transferred. |
:allowance | 0 | Memory allowance credit on the CVM. If positive, the account may allocated up to this amount of memory before incurring fees for additional memory. |
:holdings | 59 value(s) | Storage for holdings data referenced by other accounts. |
:controller | nil | Account 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! |
:environment | 14 value(s) | Symbols defined in this account. Typically used to store data or executable code. |
:metadata | 12 value(s) | Metadata attached to symbols defined in this account. |
:parent | nil | Parent account. This defines fallback values for symbols not defined in this account. |
The Environment contains symbols defined in this account. These may be referenced like: #45/symbol-name
| Symbol | Value | Description |
|---|---|---|
decimals | (fn [] 0) | nil |
total-supply | (fn [] #161/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 (#161/-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 (#161/-qc %1) ] (cond (<= %3 0) (cond (lookup-meta *address* offers) (def offers (#8/dissoc-in #161/offers (vector *caller* %2))) (fail :UNDECLARED offers)) (cond (lookup-meta *address* offers) (def offers (assoc-in #161/offers (vector *caller* %2) %3)) (fail :UNDECLARED offers))) %3)) | nil |
supply | 1000000000000000000 | nil |
check-transfer | (fn [_sender _receiver _quantity] nil) | nil |
offers | {} | nil |
get-offer | (fn [sender receiver] (get-in #161/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 (#161/-qc %1) om (get #161/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 #161/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 track token balances and other indexed values by address.
| Address | Value |
|---|---|
| #13 | 10000000000000 |
| #132 | 10000000000000 |
| #133 | 999420000000000000 |
| #134 | 10000000000000 |
| #135 | 10000000000000 |
| #136 | 10000000000000 |
| #139 | 10000000000000 |
| #155 | 10000000000000 |
| #156 | 10000000000000 |
| #157 | 10000000000000 |
| #158 | 10000000000000 |
| #159 | 10000000000000 |
| #160 | 10000000000000 |
| #189 | 10000000000000 |
| #190 | 10000000000000 |
| #191 | 10000000000000 |
| #192 | 10000000000000 |
| #193 | 10000000000000 |
| #194 | 10000000000000 |
| #195 | 10000000000000 |
| #196 | 10000000000000 |
| #197 | 10000000000000 |
| #198 | 10000000000000 |
| #199 | 10000000000000 |
| #200 | 10000000000000 |
| #201 | 10000000000000 |
| #202 | 10000000000000 |
| #203 | 10000000000000 |
| #204 | 10000000000000 |
| #205 | 10000000000000 |
| #206 | 10000000000000 |
| #209 | 10000000000000 |
| #210 | 10000000000000 |
| #211 | 10000000000000 |
| #212 | 10000000000000 |
| #213 | 10000000000000 |
| #214 | 10000000000000 |
| #215 | 10000000000000 |
| #216 | 10000000000000 |
| #217 | 10000000000000 |
| #218 | 10000000000000 |
| #219 | 10000000000000 |
| #220 | 10000000000000 |
| #221 | 10000000000000 |
| #222 | 10000000000000 |
| #223 | 10000000000000 |
| #224 | 10000000000000 |
| #225 | 10000000000000 |
| #226 | 10000000000000 |
| #227 | 10000000000000 |
| #228 | 10000000000000 |
| #229 | 10000000000000 |
| #230 | 10000000000000 |
| #231 | 10000000000000 |
| #232 | 10000000000000 |
| #238 | 10000000000000 |
| #263 | 10000000000000 |
| #269 | 10000000000000 |
| #14278 | 10000000000000 |