| Return Value | {:sequence 0,:key nil,:balance 0,:allowance 0,:holdings #Index {#13 10000000000000,#132 10000000000000,#133 999740000000000000,#134 10000000000000,#135 10000000000000,#136 10000000000000,#139 10000000000000,#155 10000000000000,#156 10000000000000,#157 10000000000000,#158 10000000000000,#159 10000000000000,#160 10000000000000,#189 10000000000000,#190 10000000000000,#191 10000000000000,#192 10000000000000,#193 10000000000000,#194 10000000000000,#195 10000000000000,#196 10000000000000,#197 10000000000000,#198 10000000000000,#199 10000000000000,#200 10000000000000,#201 10000000000000,#202 10000000000000},:controller nil,:environment {decimals (fn [] 0),total-supply (fn [] #161/supply),quantity-add (fn [a b] (let [a (cond %0 (int %0) 0) b (cond %1 (int %1) 0) ] (+ %2 %3))),balance (fn [addr] (cond (get-holding %0) *result* 0)),direct-transfer (fn [addr amount data] (let [addr (address %0) amount (#161/-qc %1) bal (cond (get-holding *caller*) *result* 0) tbal (cond (get-holding %3) *result* 0) ] nil (cond (< %4 0) (fail :ARGUMENT "negative transfer")) (cond (> %4 %5) (fail :FUNDS "insufficent token balance")) (cond (= *caller* %3) (do (log "TR" *caller* %3 %4 %5 %5 %2) (return %4)) nil) (let [nsb (- %5 %4) nrb (+ %6 %4) ] (log "TR" *caller* %3 %4 %7 %8 %2) (set-holding *caller* %7) (set-holding %3 %8)))),quantity-subset? (fn [a b] (<= (cond %0 (int %0) 0) (cond %1 (int %1) 0))),offer (fn [receiver quantity] (let [receiver (address %0) quantity (#161/-qc %1) ] (cond (<= %3 0) (cond (lookup-meta *address* offers) (def offers (#8/dissoc-in #161/offers (vector *caller* %2))) (fail :UNDECLARED offers)) (cond (lookup-meta *address* offers) (def offers (assoc-in #161/offers (vector *caller* %2) %3)) (fail :UNDECLARED offers))) %3)),supply 1000000000000000000,check-transfer (fn [_sender _receiver _quantity] nil),offers {},get-offer (fn [sender receiver] (get-in #161/offers (vector %0 %1) 0)),-qc (fn [q] (cond (int? %0) %0 (nil? %0) 0 (fail :ARGUMENT "Invalid quantity"))),quantity-sub (fn [a b] (let [a (cond %0 (int %0) 0) b (cond %1 (int %1) 0) ] (cond (> %2 %3) (- %2 %3) 0))),accept (fn [sender quantity] (let [sender (address %0) quantity (#161/-qc %1) om (get #161/offers %2) sendbal (cond (get-holding %2) *result* 0) offer (get %4 *caller* 0) ] (cond (< %3 0) (fail "Can't accept a negative quantity of fungible tokens.") (< %6 %3) (fail :STATE "Offer is insufficient") (< %5 %3) (fail :FUNDS "Sender token balance is insufficient") (let [new-offer (- %6 %3) ] (def offers (assoc #161/offers %2 (cond (> %7 0) (assoc %4 *caller* %7) (dissoc %4 *caller*)))) (set-holding %2 (- %5 %3)) (set-holding *caller* (+ (cond (get-holding *caller*) *result* 0) %3)) %3))))},:metadata {decimals {:callable true},total-supply {:callable true},quantity-add {:callable true},balance {:callable true},direct-transfer {:callable true},quantity-subset? {:callable true},offer {:callable true},check-transfer {:callable true},get-offer {:callable true},-qc {},quantity-sub {:callable true},accept {:callable true}},:parent nil} | Value returned by transaction |