LoadedContract
Defined in: src/Contract.ts:339
A loaded contract — ready for deployment or joining.
Created via client.loadContract() or Contract.load(). Call deploy() or
join() to transition to a DeployedContract.
Since
0.7.0
Type Parameters
TLedger
TLedger = unknown
The ledger state type (inferred from module)
TCircuits
TCircuits extends string = string
Union of circuit names (inferred from module)
TActions
TActions extends Record<string, (…args) => Promise<CallResult>> = Record<string, (…args) => Promise<CallResult>>
Properties
effect
readonlyeffect:object
Defined in: src/Contract.ts:369
Effect versions of loaded contract methods
deploy()
deploy(
options?):Effect<DeployedContract<TLedger,TCircuits,TActions>,ContractError|TxTimeoutError>
Parameters
options?
Returns
Effect<DeployedContract<TLedger, TCircuits, TActions>, ContractError | TxTimeoutError>
join()
join(
address,options?):Effect<DeployedContract<TLedger,TCircuits,TActions>,ContractError|TxTimeoutError>
Parameters
address
string
options?
Returns
Effect<DeployedContract<TLedger, TCircuits, TActions>, ContractError | TxTimeoutError>
module
readonlymodule:LoadedContractModule<TLedger,TCircuits>
Defined in: src/Contract.ts:346
The loaded contract module
providers
readonlyproviders:ContractProviders
Defined in: src/Contract.ts:348
Contract providers (for advanced use)
Methods
deploy()
deploy(
options?):Promise<DeployedContract<TLedger,TCircuits,TActions>>
Defined in: src/Contract.ts:357
Deploy a new contract instance.
Parameters
options?
Returns
Promise<DeployedContract<TLedger, TCircuits, TActions>>
A deployed contract handle ready for calls.
Throws
When deployment fails
Throws
When the timeout is exceeded
join()
join(
address,options?):Promise<DeployedContract<TLedger,TCircuits,TActions>>
Defined in: src/Contract.ts:366
Join an existing contract at an address.
Parameters
address
string
options?
Returns
Promise<DeployedContract<TLedger, TCircuits, TActions>>
A deployed contract handle ready for calls.
Throws
When joining fails
Throws
When the timeout is exceeded