Class: ContractFactory
Constructors​
constructor​
• new ContractFactory(compiledContract
, classHash
, account
, abi?
)
Parameters​
Name | Type | Default value |
---|---|---|
compiledContract | CompiledContract | undefined |
classHash | string | undefined |
account | AccountInterface | undefined |
abi | Abi | compiledContract.abi |
Defined in​
src/contract/contractFactory.ts:18
Properties​
abi​
• abi: Abi
Defined in​
src/contract/contractFactory.ts:8
compiledContract​
• compiledContract: CompiledContract
Defined in​
src/contract/contractFactory.ts:10
classHash​
• classHash: string
Defined in​
src/contract/contractFactory.ts:12
account​
• account: AccountInterface
Defined in​
src/contract/contractFactory.ts:14
CallData​
• Private
CallData: CallData
Defined in​
src/contract/contractFactory.ts:16
Methods​
deploy​
â–¸ deploy(...args
): Promise
<Contract
>
Deploys contract and returns new instance of the Contract
Parameters​
Name | Type | Description |
---|---|---|
...args | ArgsOrCalldataWithOptions | Array of the constructor arguments for deployment |
Returns​
Promise
<Contract
>
deployed Contract
Defined in​
src/contract/contractFactory.ts:38
connect​
â–¸ connect(account
): ContractFactory
Attaches to new Account
Parameters​
Name | Type | Description |
---|---|---|
account | AccountInterface | new Provider or Account to attach to |
Returns​
ContractFactory
Defined in​
src/contract/contractFactory.ts:76
attach​
â–¸ attach(address
): Contract
Attaches current abi and account to the new address
Parameters​
Name | Type | Description |
---|---|---|
address | string | Contract address |
Returns​
Contract