Account #173
| 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 | 5 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 |
|---|---|---|
add-amount | (fn [artifact amount] (let [tips (call* #173/state 0 deref) sender (:sender (get %2 %0)) ] (cond (not (= *caller* %3)) (fail :TRUST (str *caller* " not authorised to add amount on behalf of " %3)) (not (> %1 0)) (fail :FUNDS "No tip offered!") :else (do (accept %1) (transfer #173/gateway %1) (call* #173/state 0 swap! assoc-in (vector %0 :amount) %1) (return "Thanks for the tip!"))))) | nil |
disabled? | false | nil |
gateway | #171 | nil |
actor-name | "tipper" | nil |
add-artifact | (fn [artifact] (cond (not %0) (fail :ARGUMENT "Arguments require an artifact") (call* #173/state 0 swap! #8/update %0 merge (hash-map :sender *caller*)))) | nil |
tip! | (fn [tip-map] (let [tips (call* #173/state 0 deref) artifact (:artifact %0) amount (get-in %1 (vector %2 :amount) *offer*) recipient (get-in %1 (vector %2 :recipient) (:recipient %0)) ] (#173/add-artifact %2) (#173/add-recipient %2 %4) (#173/add-amount %2 %3))) | nil |
state | #172 | nil |
add-recipient | (fn [artifact recipient] (cond %1 (let [tips (call* #173/state 0 deref) sender (:sender (get %2 %0)) ] (cond (not (= *caller* %3)) (fail :TRUST (str *caller* " not authorised to add recipient on behalf of " %3)) (not %1) (fail :ARGUMENT "recipient field is nil") :else (call* #173/state 0 swap! assoc-in (vector %0 :recipient) %1))) nil)) | nil |
admin-account | #135 | nil |
admin | (fn [code] (cond #173/disabled? (fail :STATE "Administrative access is permenantly disabled.") (cond (not (= *caller* #173/admin-account)) (fail :TRUST (str *caller* " is not authorised to administrate on behalf of admin " #173/admin-account)) (eval %0)))) | nil |
Holdings track token balances and other indexed values by address.
| Address | Value |
|---|