Skip to content

Commit

Permalink
for latest DL
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Feb 10, 2024
1 parent 5629dac commit 4f344c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
8 changes: 3 additions & 5 deletions scalardl/test/scalardl/cas_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
(:import (com.scalar.dl.client.exception ClientException)
(com.scalar.dl.client.service ClientService)
(com.scalar.dl.ledger.model ContractExecutionResult)
(com.scalar.dl.ledger.service StatusCode)
(javax.json Json)))
(com.scalar.dl.ledger.service StatusCode)))

(def ^:dynamic contract-count (atom 0))
(def ^:dynamic execute-count (atom 0))
Expand All @@ -22,9 +21,8 @@
nil)
(executeContract [& _]
(swap! execute-count inc)
(ContractExecutionResult. (-> (Json/createObjectBuilder)
(.add "value" 3)
.build)
(ContractExecutionResult. "{\"value\": 3}"
nil
nil
nil))))

Expand Down
9 changes: 3 additions & 6 deletions scalardl/test/scalardl/transfer_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
(:import (com.scalar.dl.client.exception ClientException)
(com.scalar.dl.client.service ClientService)
(com.scalar.dl.ledger.model ContractExecutionResult)
(com.scalar.dl.ledger.service StatusCode)
(javax.json Json)))
(com.scalar.dl.ledger.service StatusCode)))

(def ^:dynamic contract-count (atom 0))
(def ^:dynamic execute-count (atom 0))
Expand All @@ -23,10 +22,8 @@
nil)
(executeContract [& _]
(swap! execute-count inc)
(ContractExecutionResult. (-> (Json/createObjectBuilder)
(.add "balance" 1000)
(.add "age" 111)
.build)
(ContractExecutionResult. "{\"balance\": 1000, \"age\": 111}"
nil
nil
nil))))

Expand Down

0 comments on commit 4f344c7

Please sign in to comment.