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 df7770b537a95207a38022c90a225a815f69cf790a3c93144733bffb9585d9e9
0xdf7770b537a95207...
Hash code of the transaction object
TypeInvokeType of transaction. Most common is 'Invoke' for general purpose execution.
Transaction Data{:origin #135,:sequence 141,:command (account #135)}CVX representation of the transaction
Storage Size119Bytes consumed by transaction data
Transaction Result
FieldValueNotes
StatusSUCCESSTransaction executed successfully
Return Value{:sequence 140,:key 0x5abb7143b3a48328300f99c5e0e711f829ce4bba8be328a40de2e410b2496d38,:balance 17868006697,:allowance 68,:holdings nil,:controller #11,:environment {dummy #144,gateway #171,mk-tip-logic (fn [state gateway] (deploy (list do (def actor-name "tipper") (list def gateway %1) (list def state %0) (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) (transfer gateway 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 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))))))),tipper4 #164,mk-state-actor (fn [gateway] (deploy (list do (def actor-name "state") (list def gateway %0) (def state {}) (defn ^{:callable true} swap! [afn & args] (let [user-key *caller*] (def state (assoc state user-key (apply afn (get state user-key {}) args))))) (defn ^{:callable true} gateway-swap! [user-key afn & args] (if (not (= gateway *caller*)) (fail :TRUST "Cannot swap on behalf of gateway " gateway) (def state (assoc state user-key (apply afn (get state user-key {}) args))))) (defn ^{:callable true} deref [] (get state *caller* {})) (defn ^{:callable true} deref-as [as-account] (get state as-account {})) (def admin-account *caller*) (def disabled? false) (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 parent " admin-account)) (eval code))))))),mk-tip-gateway (fn [] (deploy (do (def actor-name "collect-tip") (defn ^{:callable true} receive-coin [sender amount data] (accept amount)) (defn ^{:callable true} collect [state from artifact] (let [tips (call state (deref-as from)) recipient (get-in tips [artifact :recipient])] (if (not ((lookup (resolve convex.trust) trusted?) recipient *caller*)) (fail :TRUST (str *caller* " is not authorised to collect funds on behalf of " recipient " for tips-state: " tips)) (let [amount (or (get-in tips [artifact :amount]) 0)] (call state (gateway-swap! from dissoc artifact)) (transfer *caller* amount))))) (def disabled? false) (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 parent " admin-account)) (eval code))))))),state #172,hello "world",test-upgradable-actor #138,tipper3 #151,mk-tip-state (fn [state-addy] (deploy (list do (def actor-name "tip-state") (defn ^{:callable true} receive-coin [sender amount data] (accept amount)) (list def state %0) (defn ^{:callable true} collect [from artifact] (let [tips (call state (deref-as from)) recipient (get-in tips [artifact :recipient])] (if (not ((lookup (resolve convex.trust) trusted?) recipient *caller*)) (fail :TRUST (str *caller* " is not authorised to collect funds on behalf of " recipient " for tips-state: " tips)) (let [amount (or (get-in tips [artifact :amount]) 0)] (call state (swap! dissoc artifact)) (transfer *caller* amount))))) (def disabled? false) (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 parent " admin-account)) (eval code))))))),mk-tipper (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))))))),tipper #173,tip-state (fn [] (deploy (do (def actor-name "tip-state") (def state (mk-state-actor)) (defn ^{:callable true} collect [artifact] (let [tips (call state (deref)) recipient (get-in tips [artifact :recipient])] (if (not ((lookup (resolve convex.trust) trusted?) recipient *caller*)) (fail :TRUST (str *caller* " is not authorised to collect funds on behalf of " recipient)) (let [amount (or (get-in tips [artifact :amount]) 0)] (call state (swap! dissoc artifact)) (transfer *caller* amount))))) (def disabled? false) (def parent *caller*) (defn ^{:callable true} admin [code] (if disabled? (fail :STATE "Administrative access is permenantly disabled.") (if (not (= *caller* parent)) (fail :TRUST (str *caller* " is not authorised to administrate on behalf of parent " parent)) (eval code))))))),tipper6 #170,tipper5 #167,tipper2 #148},:metadata {mk-tip-logic {},mk-state-actor {},mk-tip-gateway {},mk-tip-state {},mk-tipper {},tip-state {}},:parent nil}Value returned by transaction
Juice Used490Computational cost in juice units
Fees Paid
            0.000014300
Transaction fees paid in Convex Coins
Log Entries (0)

No log entries were generated during transaction execution