Liking cljdoc? Tell your friends :D

cljs-web3-next.evm

Functions that can be used to control testrpc behaviour. Can ONLY (!) be used with testrpc.

See https://github.com/ethereumjs/testrpc for more information.

Functions that can be used to control testrpc behaviour. Can ONLY (!) be used
with testrpc.

See https://github.com/ethereumjs/testrpc for more information.
raw docstring

increase-time!cljs

(increase-time! web3 args & [callback])

Jump forward in time in the EVM.

Parameters: web3 - web3 instance args - The amount of time to increase in seconds. callback - callback with two parameters, error and result.

Results is the total time adjustment, in seconds.

Example: user> (web3-evm/increase-time! web3 [1000] callback)

Jump forward in time in the EVM.

Parameters:
web3     - web3 instance
args     - The amount of time to increase in seconds.
callback - callback with two parameters, error and result.

Results is the total time adjustment, in seconds.

Example:
user> `(web3-evm/increase-time! web3 [1000] callback)`
raw docstring

mine-block!cljs

(mine-block! web3 & [callback])

Force a block to be mined. Mines a block independent of whether or not mining is started or stopped.

Parameters: web3 - web3 instance callback - callback with two parameters, error and result.

Example: user> (web3-evm/mine! web3 callback)

Force a block to be mined. Mines a block independent of
whether or not mining is started or stopped.

Parameters:
web3     - web3 instance
callback - callback with two parameters, error and result.

Example:
user> `(web3-evm/mine! web3 callback)`
raw docstring

revert!cljs

(revert! web3 args & [callback])

Revert the state of the blockchain to a previous snapshot.

Takes a single parameter, which is the snapshot id to revert to. If no snapshot id is passed it will revert to the latest snapshot. Returns true.

Parameters: web3 - web3 instance args - snapshot id to revert to, if no snapshot id is passed, it will revert to the latest snapshot callback - callback with two parameters, error and result.

Result is true.

Example: user> (web3-evm/revert! web3 [0] callback)

Revert the state of the blockchain to a previous snapshot.

Takes a single
parameter, which is the snapshot id to revert to. If no snapshot id is passed
it will revert to the latest snapshot. Returns true.

Parameters:
web3     - web3 instance
args     - snapshot id to revert to, if no snapshot id is passed, it will
           revert to the latest snapshot
callback - callback with two parameters, error and result.

Result is true.

Example:
user> `(web3-evm/revert! web3 [0] callback)`
raw docstring

send-jsonrpccljs

(send-jsonrpc web3 jsonrpc & [callback])

Sends a jsonrpc message to the currentProvider.

Parameter: web3 - web3 instance

Example: user> (send-async-fn web3) #object...

Sends a jsonrpc message to the currentProvider.

Parameter:
web3 - web3 instance

Example:
user> `(send-async-fn web3)`
#object...
raw docstring

snapshot!cljs

(snapshot! web3 & [callback])

Snapshot the state of the blockchain at the current block.

Parameters: web3 - web3 instance callback - callback with two parameters, error and result.

Result is the id of the snapshot created.

Example: user> (web3-evm/snapshot! web3 callback)

Snapshot the state of the blockchain at the current block.

Parameters:
web3     - web3 instance
callback - callback with two parameters, error and result.

Result is the id of the snapshot created.

Example:
user> `(web3-evm/snapshot! web3 callback)`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close