(contract-call contract method)
(contract-call contract method args)
(contract-call contract method args {:keys [:from :gas] :as opts})
contract
parameter can be one of:method
is a :camel_case keyword corresponding to the smart-contract functionargs
is a vector of arguments for the method
opts
is a map of options passed as message datafunction returns a Promise resolving to a transaction-hash (state-altering calls) or method
return value (read-only calls).
# arguments: ## `contract` parameter can be one of: * keyword :some-contract * tuple of keyword and address [:some-contract 0x1234...] * instance SomeContract ## `method` is a :camel_case keyword corresponding to the smart-contract function ## `args` is a vector of arguments for the `method` ## `opts` is a map of options passed as message data # returns: function returns a Promise resolving to a transaction-hash (state-altering calls) or `method` return value (read-only calls).
(create-event-filter contract event filter-opts opts on-event)
This function installs event filter
contract
parameter can be one of:event
: camel_case keyword corresponding to the smart-contract eventfilter-opts
: a map of indexed return values you want to filter the logs by e.g. {:valueA 1 :valueB 2}opts
: specifies additional filter options, can be one of:on-event
: event handler functionsee https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-events for additional details
This function installs event filter # arguments: ## `contract` parameter can be one of: * keyword :some-contract * tuple of keyword and address [:some-contract 0x1234...] * instance SomeContract ## `event` : camel_case keyword corresponding to the smart-contract event ## `filter-opts` : a map of indexed return values you want to filter the logs by e.g. {:valueA 1 :valueB 2} ## `opts` : specifies additional filter options, can be one of: * string 'latest' to specify that only new observed events should be processed * map {:from-block 0 :to-block 100} specifying earliest and latest block on which the event handler should fire ## `on-event` : event handler function see https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-events for additional details
(deploy-smart-contract! contract-key args)
(deploy-smart-contract! contract-key
args
{:keys [:placeholder-replacements :from :gas] :as opts})
contract-key
keyword e.g. :some-contractargs
is a vector of arguments for the constructoropts
is a map of options:placeholder-replacements
: a map containing replacements for library placeholdersfrom
: address deploying the conract:gas
: gas limit for the contract creation transactionfunction returns a Promise resolving to the deployed contracts address.
# arguments: * `contract-key` keyword e.g. :some-contract ## `args` is a vector of arguments for the constructor ## `opts` is a map of options: * `placeholder-replacements` : a map containing replacements for library placeholders * `from` : address deploying the conract * `:gas` : gas limit for the contract creation transaction # returns: function returns a Promise resolving to the deployed contracts address.
(replay-past-events event-filter
callback
&
[{:keys [:delay :transform-fn]
:or {delay 0 transform-fn identity}}])
(wait-for-tx-receipt tx-hash)
blocks until transaction tx-hash
gets sent to the network.
blocks until transaction `tx-hash` gets sent to the network.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close