pelle / cloth

Simple Ethereum library for Clojure(Script)
142 stars 20 forks source link

High level contract support #1

Closed pelle closed 8 years ago

pelle commented 8 years ago

The purpose of this is to allow compilation of Solidity code and a resulting clojure API mapping to the contract.

(defcontract simple-token "test/cloth/SimpleToken.sol")

(def c @(deploy-simple-token!))

@(issue! c "0x...." 1231) ;; Calls contract function and waits for it to mine
@(issue!! c "0x...." 1231) ;; Calls contract function and waits for receipt

@(balances c "0x...) ;; Calls static function

Note all of these TX functions return promises, so when I say returning below, that is what is returned from promise.

The following I will fix in later releases: