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.
[x] Compile Solidity
[x] Creates deploy function eg (deploy-simple-token!)
[x] Creates TX functions for each public non constant solidity function eg (issue! ...)
[x] Creates TX functions for each public non constant solidity function returning receipt eg (issue!! ...)
[x] Creates functions for each public constant function
[x] Creates a calling version of each TX function with eg (issue? ...)
[x] Support for int parameters and return values
[x] Support for fixed and ufixed parameters and return values
[ ] Multi dimensional arrays probably don't work right
[x] Add tweaks for clojurescript
The following I will fix in later releases:
[ ] Add support for contract events
[ ] Failure when calling a function returning a string (this same failure happens with truffle as well so may not be an issue)
The purpose of this is to allow compilation of Solidity code and a resulting clojure API mapping to the contract.
Note all of these TX functions return promises, so when I say returning below, that is what is returned from promise.
(deploy-simple-token!)
(issue! ...)
(issue!! ...)
(issue? ...)
int
parameters and return valuesfixed
andufixed
parameters and return valuesThe following I will fix in later releases:
string
(this same failure happens with truffle as well so may not be an issue)