Convex

Convex

Transaction 1 / 1
FieldValueNotes
AddressOrigin address of transaction
Account Key
Identicon for 5abb7143b3a48328300f99c5e0e711f829ce4bba8be328a40de2e410b2496d38
0x5abb7143b3a48328...
Ed25519 public key of the signer
Transaction Hash
Identicon for 3fcc433a98ee0db336cce9ea7711b7051fedc9ffd580e3cfc1d2728b2cea3ada
0x3fcc433a98ee0db3...
Hash code of the transaction object
TypeInvokeType of transaction. Most common is 'Invoke' for general purpose execution.
Transaction Data{:origin #135,:sequence 82,:command (defn mk-tipper [original-caller state] (deploy (quasiquote (do (def actor-name "tipper") (def tip-state (unquote state)) (def state (lookup tip-state state)) (defn ^{:callable true} add-artifact [artifact] (if (not artifact) (fail :ARGUMENT "Arguments require an artifact") (call state (swap! update artifact merge {:sender *caller*})))) (defn ^{:callable true} add-recipient [artifact recipient] (when recipient (let [tips (call state (deref)) sender (:sender (get tips artifact))] (cond (not (= *caller* sender)) (fail :TRUST (str *caller* " not authorised to add recipient on behalf of " sender)) (not recipient) (fail :ARGUMENT "recipient field is nil") :else (call state (swap! assoc-in [artifact :recipient] recipient)))))) (defn ^{:callable true} add-amount [artifact amount] (let [tips (call state (deref)) sender (:sender (get tips artifact))] (cond (not (= *caller* sender)) (fail :TRUST (str *caller* " not authorised to add amount on behalf of " sender)) (not (> amount 0)) (fail :FUNDS "No tip offered!") :else (do (accept amount) (call state (swap! assoc-in [artifact :amount] amount)) (return "Thanks for the tip!"))))) (defn ^{:callable true} tip! [tip-map] (let [tips (call state (deref)) artifact (:artifact tip-map) amount (get-in tips [artifact :amount] *offer*) recipient (get-in tips [artifact :recipient] (:recipient tip-map))] (add-artifact artifact) (add-recipient artifact recipient) (add-amount artifact amount))) (def disabled? false) (def original-caller (unquote original-caller)) (def admin-account *caller*) (defn ^{:callable true} admin [code] (if disabled? (fail :STATE "Administrative access is permenantly disabled.") (if (not (= *caller* admin-account)) (fail :TRUST (str *caller* " is not authorised to administrate on behalf of admin " admin-account)) (eval code))))))))}CVX representation of the transaction
Storage Size3069Bytes consumed by transaction data
Transaction Result
FieldValueNotes
StatusSUCCESSTransaction executed successfully
Return Value(fn [original-caller state] (deploy (list do (def actor-name "tipper") (list def tip-state %1) (def state (lookup tip-state state)) (defn ^{:callable true} add-artifact [artifact] (if (not artifact) (fail :ARGUMENT "Arguments require an artifact") (call state (swap! update artifact merge {:sender *caller*})))) (defn ^{:callable true} add-recipient [artifact recipient] (when recipient (let [tips (call state (deref)) sender (:sender (get tips artifact))] (cond (not (= *caller* sender)) (fail :TRUST (str *caller* " not authorised to add recipient on behalf of " sender)) (not recipient) (fail :ARGUMENT "recipient field is nil") :else (call state (swap! assoc-in [artifact :recipient] recipient)))))) (defn ^{:callable true} add-amount [artifact amount] (let [tips (call state (deref)) sender (:sender (get tips artifact))] (cond (not (= *caller* sender)) (fail :TRUST (str *caller* " not authorised to add amount on behalf of " sender)) (not (> amount 0)) (fail :FUNDS "No tip offered!") :else (do (accept amount) (call state (swap! assoc-in [artifact :amount] amount)) (return "Thanks for the tip!"))))) (defn ^{:callable true} tip! [tip-map] (let [tips (call state (deref)) artifact (:artifact tip-map) amount (get-in tips [artifact :amount] *offer*) recipient (get-in tips [artifact :recipient] (:recipient tip-map))] (add-artifact artifact) (add-recipient artifact recipient) (add-amount artifact amount))) (def disabled? false) (list def original-caller %0) (def admin-account *caller*) (defn ^{:callable true} admin [code] (if disabled? (fail :STATE "Administrative access is permenantly disabled.") (if (not (= *caller* admin-account)) (fail :TRUST (str *caller* " is not authorised to administrate on behalf of admin " admin-account)) (eval code)))))))Value returned by transaction
Juice Used439790Computational cost in juice units
Fees Paid
            0.295327681
Transaction fees paid in Convex Coins
Memory Used2988Memory allocated/deallocated (bytes)
Log Entries (0)

No log entries were generated during transaction execution