Class: ContractFactory
Constructors​
constructor​
• new ContractFactory(params
): ContractFactory
Parameters​
Name | Type | Description |
---|---|---|
params | ContractFactoryParams | CFParams - compiledContract: CompiledContract; - account: AccountInterface; - casm?: CairoAssembly; - classHash?: string; - compiledClassHash?: string; - abi?: Abi; |
Returns​
Defined in​
src/contract/contractFactory.ts:46
Properties​
compiledContract​
• compiledContract: CompiledContract
Defined in​
src/contract/contractFactory.ts:23
account​
• account: AccountInterface
Defined in​
src/contract/contractFactory.ts:25
abi​
• abi: Abi
Defined in​
src/contract/contractFactory.ts:27
classHash​
• Optional
classHash: string
Defined in​
src/contract/contractFactory.ts:29
casm​
• Optional
casm: CairoAssembly
Defined in​
src/contract/contractFactory.ts:31
compiledClassHash​
• Optional
compiledClassHash: string
Defined in​
src/contract/contractFactory.ts:33
CallData​
• Private
CallData: CallData
Defined in​
src/contract/contractFactory.ts:35
Methods​
deploy​
â–¸ deploy(...args
): Promise
<Contract
>
Deploys contract and returns new instance of the Contract
If contract is not declared it will first declare it, and then deploy
Parameters​
Name | Type |
---|---|
...args | ArgsOrCalldataWithOptions |
Returns​
Promise
<Contract
>
Defined in​
src/contract/contractFactory.ts:61
connect​
â–¸ connect(account
): ContractFactory
Attaches to new Account
Parameters​
Name | Type | Description |
---|---|---|
account | AccountInterface | new Account to attach to |
Returns​
Defined in​
src/contract/contractFactory.ts:101
attach​
â–¸ attach(address
): Contract
Attaches current abi and account to the new address
Parameters​
Name | Type |
---|---|
address | string |