These functions create and interact with contract representations.
Returns a Reach contract abstraction after starting the deployment of a Reach DApp contract based on the
bin argument provided.
This function does not block on the completion of deployment.
To wait for deployment, see
Returns a Promise for an object that may be given to
attach to construct a Reach contract abstraction representing this contract.
This object may be stringified with
JSON.stringify for printing and parsed again with
JSON.parse without any loss of information.
The Promise will only be resolved after the contract is actually deployed on the network.
If you are using
avoid blocking on this Promise with
await until after the first
publish has occurred.
getInfo too early may cause your program to enter a state of deadlock.
Returns a Reach contract abstraction based on a deployed Reach DApp contract provided in the
ctcInfo argument (or a Promise for ctcInfo) and the
Returns an object representing the views of the contract.
This object mirrors the view hierarchy, so if X.Y is a view, then
ctc.getViews().X.Y is a view function.
A view function accepts the arguments of the view and returns a
Promise that results in the value of the view wrapped in a
Maybe type (because the view may not be bound.)
For example, if NFT.owner is a view with no arguments that represents the
Address that owns an NFT, then
await ctc.getViews().NFT.owner() is either
['Some', Owner] or