Account #136
| 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 | 0 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 | 10 value(s) | Symbols defined in this account. Typically used to store data or executable code. |
:metadata | 7 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 |
|---|---|---|
update-cert | (fn [id new-metadata-hash new-title] (let [cert (get #136/registry %0) ] (cond (nil? %3) (fail :NOT-FOUND "Certificate does not exist") nil) (let [updated (assoc %3 :metadata-hash %1 :title %2 :updated-at *timestamp*) ] (cond (lookup-meta *address* registry) (def registry (assoc #136/registry %0 %4)) (fail :UNDECLARED registry)) %4))) | nil |
owned-by | (fn [user-id] (cond (get #136/ownership %0) *result* #{})) | nil |
init-next-id | (fn [start-id] (do (cond (lookup-meta *address* next-id) (def next-id %0) (fail :UNDECLARED next-id)) %0)) | nil |
next-id | 9729 | nil |
ownership | {} | nil |
total-issued | (fn [] (dec #136/next-id)) | nil |
lookup | (fn [id] (get #136/registry %0)) | nil |
transfer-cert | (fn [id new-user-id] (let [cert (get #136/registry %0) ] (cond (nil? %2) (fail :NOT-FOUND "Certificate does not exist") nil) (let [old-user (get %2 :user-id) updated (assoc %2 :user-id %1) ] (cond (lookup-meta *address* registry) (def registry (assoc #136/registry %0 %4)) (fail :UNDECLARED registry)) (cond (lookup-meta *address* ownership) (def ownership (assoc #136/ownership %3 (disj (get #136/ownership %3) %0))) (fail :UNDECLARED ownership)) (cond (lookup-meta *address* ownership) (def ownership (assoc #136/ownership %1 (conj (cond (get #136/ownership %1) *result* #{}) %0))) (fail :UNDECLARED ownership)) %4))) | nil |
registry | {} | nil |
register | (fn [user-id metadata-hash title-hint] (let [id #136/next-id cert (hash-map :timestamp *timestamp* :user-id %0 :registered-by *caller* :metadata-hash %1 :title %2 :id %3) ] (cond (lookup-meta *address* next-id) (def next-id (inc %3)) (fail :UNDECLARED next-id)) (cond (lookup-meta *address* registry) (def registry (assoc #136/registry %3 %4)) (fail :UNDECLARED registry)) (cond (lookup-meta *address* ownership) (def ownership (assoc #136/ownership %0 (conj (cond (get #136/ownership %0) *result* #{}) %3))) (fail :UNDECLARED ownership)) %4)) | nil |
Holdings track token balances and other indexed values by address.
| Address | Value |
|---|