Convex

Convex

Transaction 1 / 1
FieldValueNotes
AddressOrigin address of transaction
Account Key
Identicon for 89b5142678bfef7a2245af5ae5b9ab1e10c282b375fa297c5aaeccc48ac97cac
0x89b5142678bfef7a...
Ed25519 public key of the signer
Transaction Hash
Identicon for 68a327604ca43e9c144ac2ff04ee4eddbf401c546b6f908492da3d444adf76ef
0x68a327604ca43e9c...
Hash code of the transaction object
TypeInvokeType of transaction. Most common is 'Invoke' for general purpose execution.
Transaction Data{:origin #50,:sequence 2,:command (eval-as #50 (quote ((import convex.trust :as trust) (def allocator *caller*) (def distributor *caller*) (declare available-coins) (def available-coins 0) (defn ^{:callable true} set-available [amount] (if (not ((lookup trust trusted?) allocator *caller* :set-available amount)) (fail :TRUST "Not authorised as allocator")) (if (< amount 0) (fail :ARGUMENT "Negative amount!")) (set! available-coins (int amount))) (defn ^{:callable true} distribute [receiver amount] (if (not (int? amount)) (fail :ARGUMENT "amount must be an integer")) (if (not ((lookup trust trusted?) distributor *caller* :distribute amount)) (fail :TRUST "Not authorised to distribute")) (if (> amount available-coins) (fail :FUNDS "Insufficient available coins")) (do (set! available-coins (- available-coins amount)) (transfer receiver amount))) (defn ^{:callable true} receive-coin [_ _ _] (accept *offer*)) (defn ^{:callable true} withdraw [amount] (if (not ((lookup trust trusted?) allocator *caller* :withdraw amount)) (fail :TRUST "Not authorised to withdraw")) (transfer *caller* amount)))))}CVX representation of the transaction
Storage Size1690Bytes consumed by transaction data
Transaction Result
FieldValueNotes
StatusERRORTransaction failed with error
Error Message"Can't convert value of type Address to type Function"Error message from failed transaction
Error Code:CASTArgument cannot be cast to the required type
Juice Used48792Computational cost in juice units
Fees Paid
            0.000798720
Transaction fees paid in Convex Coins
Stack Trace["Trying to get function for expression: ((def ^{:static true} trust (cond ((fn [sym] (get (#9/read %0) 0)) convex.trust) *result* (fail :NOBODY (str \"Could not resolve library name for import: \" convex.trust)))) (def allocator *caller*) (def distributor *caller*) nil (def available-coins 0) (def ^{:callable true} set-available (fn [amount] (do (cond (not (#50/trust/trusted? #50/allocator *caller* :set-available %0)) (fail :TRUST \"Not authorised as allocator\")) (cond (< %0 0) (fail :ARGUMENT \"Negative amount!\")) (def available-coins (int %0))))) (def ^{:callable true} distribute (fn [receiver amount] (do (cond (not (int? %1)) (fail :ARGUMENT \"amount must be an integer\")) (cond (not (#50/trust/trusted? #50/distributor *caller* :distribute %1)) (fail :TRUST \"Not authorised to distribute\")) (cond (> %1 #50/available-coins) (fail :FUNDS \"Insufficient available coins\")) (do (def available-coins (- #50/available-coins %1)) (transfer %0 %1))))) (def ^{:callable true} receive-coin (fn [_ _ _] (accept *offer*))) (def ^{:callable true} withdraw (fn [amount] (do (cond (not (#50/trust/trusted? #50/allocator *caller* :withdraw %0)) (fail :TRUST \"Not authorised to withdraw\")) (transfer *caller* %0)))))" "In core function: eval-as" "In expression: (eval-as #50 ((import convex.trust :as trust) (def allocator *caller*) (def distributor *caller*) (declare available-coins) (def available-coins 0) (defn ^{:callable true} set-available [amount] (if (not ((lookup trust trusted?) allocator *caller* :set-available amount)) (fail :TRUST \"Not authorised as allocator\")) (if (< amount 0) (fail :ARGUMENT \"Negative amount!\")) (set! available-coins (int amount))) (defn ^{:callable true} distribute [receiver amount] (if (not (int? amount)) (fail :ARGUMENT \"amount must be an integer\")) (if (not ((lookup trust trusted?) distributor *caller* :distribute amount)) (fail :TRUST \"Not authorised to distribute\")) (if (> amount available-coins) (fail :FUNDS \"Insufficient available coins\")) (do (set! available-coins (- available-coins amount)) (transfer receiver amount))) (defn ^{:callable true} receive-coin [_ _ _] (accept *offer*)) (defn ^{:callable true} withdraw [amount] (if (not ((lookup trust trusted?) allocator *caller* :withdraw amount)) (fail :TRUST \"Not authorised to withdraw\")) (transfer *caller* amount))))"]Stack trace for error location
Log Entries (0)

No log entries were generated during transaction execution