starknet 4.13.2 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/README.md +2 -2
- package/__tests__/account.test.ts +38 -14
- package/__tests__/contract.test.ts +70 -57
- package/__tests__/defaultProvider.test.ts +14 -13
- package/__tests__/fixtures.ts +26 -27
- package/__tests__/rpcProvider.test.ts +19 -16
- package/__tests__/sequencerProvider.test.ts +47 -55
- package/__tests__/utils/utils.test.ts +10 -0
- package/dist/index.d.ts +112 -28
- package/dist/index.global.js +511 -453
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +107 -49
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +107 -49
- package/dist/index.mjs.map +1 -1
- package/index.d.ts +112 -28
- package/index.global.js +511 -453
- package/index.global.js.map +1 -1
- package/index.js +107 -49
- package/index.js.map +1 -1
- package/index.mjs +107 -49
- package/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/account/default.ts +29 -7
- package/src/account/interface.ts +71 -5
- package/src/contract/contractFactory.ts +20 -13
- package/src/contract/default.ts +10 -1
- package/src/provider/default.ts +26 -11
- package/src/provider/interface.ts +9 -3
- package/src/provider/rpc.ts +15 -11
- package/src/provider/sequencer.ts +11 -6
- package/src/provider/utils.ts +19 -11
- package/src/types/account.ts +21 -1
- package/src/types/lib.ts +5 -2
- package/src/types/provider.ts +0 -5
- package/src/utils/events.ts +32 -0
- package/src/utils/number.ts +6 -0
- package/www/docs/API/account.md +156 -2
- package/www/docs/API/contractFactory.md +7 -11
- package/www/docs/API/provider.md +5 -9
- package/www/docs/API/utils.md +8 -0
- package/www/guides/account.md +89 -38
- package/www/guides/erc20.md +115 -59
- package/www/guides/intro.md +11 -4
package/index.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ declare function toBN(number: BigNumberish, base?: number | 'hex'): BN__default;
|
|
|
9
9
|
declare function toHex(number: BN__default): string;
|
|
10
10
|
declare function hexToDecimalString(hex: string): string;
|
|
11
11
|
declare function toFelt(num: BigNumberish): string;
|
|
12
|
+
/**
|
|
13
|
+
* Remove hex string leading zero and lower case '0x01A'.. -> '0x1a..'
|
|
14
|
+
* @param hex string
|
|
15
|
+
*/
|
|
16
|
+
declare const cleanHex: (hex: string) => string;
|
|
12
17
|
declare function assertInRange(input: BigNumberish, lowerBound: BigNumberish, upperBound: BigNumberish, inputName?: string): void;
|
|
13
18
|
declare function bigNumberishArrayToDecimalStringArray(rawCalldata: BigNumberish[]): string[];
|
|
14
19
|
declare function bigNumberishArrayToHexadecimalStringArray(rawCalldata: BigNumberish[]): string[];
|
|
@@ -25,6 +30,7 @@ declare const number_toBN: typeof toBN;
|
|
|
25
30
|
declare const number_toHex: typeof toHex;
|
|
26
31
|
declare const number_hexToDecimalString: typeof hexToDecimalString;
|
|
27
32
|
declare const number_toFelt: typeof toFelt;
|
|
33
|
+
declare const number_cleanHex: typeof cleanHex;
|
|
28
34
|
declare const number_assertInRange: typeof assertInRange;
|
|
29
35
|
declare const number_bigNumberishArrayToDecimalStringArray: typeof bigNumberishArrayToDecimalStringArray;
|
|
30
36
|
declare const number_bigNumberishArrayToHexadecimalStringArray: typeof bigNumberishArrayToHexadecimalStringArray;
|
|
@@ -42,6 +48,7 @@ declare namespace number {
|
|
|
42
48
|
number_toHex as toHex,
|
|
43
49
|
number_hexToDecimalString as hexToDecimalString,
|
|
44
50
|
number_toFelt as toFelt,
|
|
51
|
+
number_cleanHex as cleanHex,
|
|
45
52
|
number_assertInRange as assertInRange,
|
|
46
53
|
number_bigNumberishArrayToDecimalStringArray as bigNumberishArrayToDecimalStringArray,
|
|
47
54
|
number_bigNumberishArrayToHexadecimalStringArray as bigNumberishArrayToHexadecimalStringArray,
|
|
@@ -686,8 +693,8 @@ interface ContractClass {
|
|
|
686
693
|
}
|
|
687
694
|
declare type UniversalDeployerContractPayload = {
|
|
688
695
|
classHash: BigNumberish;
|
|
689
|
-
salt
|
|
690
|
-
unique
|
|
696
|
+
salt?: string;
|
|
697
|
+
unique?: boolean;
|
|
691
698
|
constructorCalldata?: RawArgs;
|
|
692
699
|
additionalCalls?: AllowArray<Call>;
|
|
693
700
|
};
|
|
@@ -709,6 +716,7 @@ declare type DeclareContractPayload = {
|
|
|
709
716
|
contract: CompiledContract | string;
|
|
710
717
|
classHash: BigNumberish;
|
|
711
718
|
};
|
|
719
|
+
declare type DeclareDeployContractPayload = DeclareContractPayload & UniversalDeployerContractPayload;
|
|
712
720
|
declare type DeclareContractTransaction = {
|
|
713
721
|
contractDefinition: ContractClass;
|
|
714
722
|
senderAddress: string;
|
|
@@ -1013,10 +1021,6 @@ interface EstimateFeeResponse {
|
|
|
1013
1021
|
interface InvokeFunctionResponse {
|
|
1014
1022
|
transaction_hash: string;
|
|
1015
1023
|
}
|
|
1016
|
-
interface DeployContractResponse {
|
|
1017
|
-
contract_address: string;
|
|
1018
|
-
transaction_hash: string;
|
|
1019
|
-
}
|
|
1020
1024
|
interface DeclareContractResponse {
|
|
1021
1025
|
transaction_hash: string;
|
|
1022
1026
|
class_hash: string;
|
|
@@ -1045,6 +1049,23 @@ interface EstimateFeeDetails {
|
|
|
1045
1049
|
nonce?: BigNumberish;
|
|
1046
1050
|
blockIdentifier?: BlockIdentifier;
|
|
1047
1051
|
}
|
|
1052
|
+
interface DeployContractResponse {
|
|
1053
|
+
contract_address: string;
|
|
1054
|
+
transaction_hash: string;
|
|
1055
|
+
}
|
|
1056
|
+
interface DeployContractUDCResponse extends DeployContractResponse {
|
|
1057
|
+
address: string;
|
|
1058
|
+
deployer: string;
|
|
1059
|
+
unique: string;
|
|
1060
|
+
classHash: string;
|
|
1061
|
+
calldata_len: string;
|
|
1062
|
+
calldata: Array<string>;
|
|
1063
|
+
salt: string;
|
|
1064
|
+
}
|
|
1065
|
+
declare type DeclareDeployContractResponse = {
|
|
1066
|
+
declare: DeclareTransactionReceiptResponse;
|
|
1067
|
+
deploy: DeployContractUDCResponse;
|
|
1068
|
+
};
|
|
1048
1069
|
|
|
1049
1070
|
declare type GetTransactionStatusResponse = {
|
|
1050
1071
|
tx_status: Status;
|
|
@@ -1413,7 +1434,7 @@ declare abstract class ProviderInterface {
|
|
|
1413
1434
|
* @param contractAddress - contract address
|
|
1414
1435
|
* @returns the hex nonce
|
|
1415
1436
|
*/
|
|
1416
|
-
abstract
|
|
1437
|
+
abstract getNonceForAddress(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
1417
1438
|
/**
|
|
1418
1439
|
* Gets the contract's storage variable at a specific key.
|
|
1419
1440
|
*
|
|
@@ -1448,7 +1469,7 @@ declare abstract class ProviderInterface {
|
|
|
1448
1469
|
* - address salt
|
|
1449
1470
|
* @returns a confirmation of sending a transaction on the starknet contract
|
|
1450
1471
|
*/
|
|
1451
|
-
abstract deployContract(payload: DeployContractPayload, details?: InvocationsDetails): Promise<DeployContractResponse>;
|
|
1472
|
+
abstract deployContract(payload: DeployContractPayload | any, details?: InvocationsDetails): Promise<DeployContractResponse>;
|
|
1452
1473
|
/**
|
|
1453
1474
|
* Deploys a given compiled Account contract (json) to starknet
|
|
1454
1475
|
*
|
|
@@ -1554,8 +1575,9 @@ declare abstract class ProviderInterface {
|
|
|
1554
1575
|
* Wait for the transaction to be accepted
|
|
1555
1576
|
* @param txHash - transaction hash
|
|
1556
1577
|
* @param retryInterval - retry interval
|
|
1578
|
+
* @return GetTransactionReceiptResponse
|
|
1557
1579
|
*/
|
|
1558
|
-
abstract waitForTransaction(txHash: BigNumberish, retryInterval?: number): Promise<
|
|
1580
|
+
abstract waitForTransaction(txHash: BigNumberish, successStates?: Array<Status>, retryInterval?: number): Promise<GetTransactionReceiptResponse>;
|
|
1559
1581
|
}
|
|
1560
1582
|
|
|
1561
1583
|
declare type RpcProviderOptions = {
|
|
@@ -1579,7 +1601,7 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
1579
1601
|
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<RPC.GetBlockWithTxHashesResponse>;
|
|
1580
1602
|
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<RPC.GetBlockWithTxs>;
|
|
1581
1603
|
getClassHashAt(contractAddress: RPC.ContractAddress, blockIdentifier?: BlockIdentifier): Promise<RPC.Felt>;
|
|
1582
|
-
|
|
1604
|
+
getNonceForAddress(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<RPC.Nonce>;
|
|
1583
1605
|
getPendingTransactions(): Promise<RPC.PendingTransactions>;
|
|
1584
1606
|
getProtocolVersion(): Promise<Error>;
|
|
1585
1607
|
getStateUpdate(blockIdentifier?: BlockIdentifier): Promise<RPC.StateUpdate>;
|
|
@@ -1606,7 +1628,7 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
1606
1628
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<CallContractResponse>;
|
|
1607
1629
|
traceTransaction(transactionHash: RPC.TransactionHash): Promise<RPC.Trace>;
|
|
1608
1630
|
traceBlockTransactions(blockHash: RPC.BlockHash): Promise<RPC.Traces>;
|
|
1609
|
-
waitForTransaction(txHash: string, retryInterval?: number): Promise<
|
|
1631
|
+
waitForTransaction(txHash: string, successStates?: string[], retryInterval?: number): Promise<any>;
|
|
1610
1632
|
/**
|
|
1611
1633
|
* Gets the transaction count from a block.
|
|
1612
1634
|
*
|
|
@@ -1666,7 +1688,7 @@ declare class SequencerProvider implements ProviderInterface {
|
|
|
1666
1688
|
getChainId(): Promise<StarknetChainId>;
|
|
1667
1689
|
callContract({ contractAddress, entrypoint: entryPointSelector, calldata }: Call, blockIdentifier?: BlockIdentifier): Promise<CallContractResponse>;
|
|
1668
1690
|
getBlock(blockIdentifier?: BlockIdentifier): Promise<GetBlockResponse>;
|
|
1669
|
-
|
|
1691
|
+
getNonceForAddress(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
1670
1692
|
getStorageAt(contractAddress: string, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
1671
1693
|
getTransaction(txHash: BigNumberish): Promise<GetTransactionResponse>;
|
|
1672
1694
|
getTransactionReceipt(txHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
|
|
@@ -1685,7 +1707,7 @@ declare class SequencerProvider implements ProviderInterface {
|
|
|
1685
1707
|
getDeclareEstimateFee({ senderAddress, contractDefinition, signature }: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
1686
1708
|
getDeployAccountEstimateFee({ classHash, addressSalt, constructorCalldata, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
1687
1709
|
getCode(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<Sequencer.GetCodeResponse>;
|
|
1688
|
-
waitForTransaction(txHash: BigNumberish, retryInterval?: number): Promise<
|
|
1710
|
+
waitForTransaction(txHash: BigNumberish, successStates?: string[], retryInterval?: number): Promise<GetTransactionReceiptResponse>;
|
|
1689
1711
|
/**
|
|
1690
1712
|
* Gets the status of a transaction.
|
|
1691
1713
|
*
|
|
@@ -1728,7 +1750,7 @@ declare class Provider implements ProviderInterface {
|
|
|
1728
1750
|
getClassByHash(classHash: string): Promise<ContractClass>;
|
|
1729
1751
|
getEstimateFee(invocationWithTxType: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
1730
1752
|
getInvokeEstimateFee(invocationWithTxType: Invocation, invocationDetails: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
1731
|
-
|
|
1753
|
+
getNonceForAddress(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
1732
1754
|
getStorageAt(contractAddress: string, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
|
|
1733
1755
|
getTransaction(txHash: BigNumberish): Promise<GetTransactionResponse>;
|
|
1734
1756
|
getTransactionReceipt(txHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
|
|
@@ -1737,13 +1759,13 @@ declare class Provider implements ProviderInterface {
|
|
|
1737
1759
|
/**
|
|
1738
1760
|
* @deprecated This method won't be supported, use Account.deploy instead
|
|
1739
1761
|
*/
|
|
1740
|
-
deployContract(payload: DeployContractPayload, details: InvocationsDetails): Promise<DeployContractResponse>;
|
|
1762
|
+
deployContract(payload: DeployContractPayload | any, details: InvocationsDetails): Promise<DeployContractResponse>;
|
|
1741
1763
|
deployAccountContract(payload: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeployContractResponse>;
|
|
1742
1764
|
declareContract(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeclareContractResponse>;
|
|
1743
1765
|
getDeclareEstimateFee(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
1744
1766
|
getDeployAccountEstimateFee(transaction: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier): Promise<EstimateFeeResponse>;
|
|
1745
1767
|
getCode(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<GetCodeResponse>;
|
|
1746
|
-
waitForTransaction(txHash: BigNumberish, retryInterval?: number): Promise<
|
|
1768
|
+
waitForTransaction(txHash: BigNumberish, successStates?: Array<Status>, retryInterval?: number): Promise<any>;
|
|
1747
1769
|
}
|
|
1748
1770
|
|
|
1749
1771
|
declare class GatewayError extends CustomError {
|
|
@@ -2041,7 +2063,6 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2041
2063
|
* @param contractPayload transaction payload to be deployed containing:
|
|
2042
2064
|
- contract: compiled contract code
|
|
2043
2065
|
- classHash: computed class hash of compiled contract
|
|
2044
|
-
- signature
|
|
2045
2066
|
* @param transactionsDetail Invocation Details containing:
|
|
2046
2067
|
- optional nonce
|
|
2047
2068
|
- optional version
|
|
@@ -2055,16 +2076,72 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
2055
2076
|
*
|
|
2056
2077
|
* @param deployContractPayload containing
|
|
2057
2078
|
* - classHash: computed class hash of compiled contract
|
|
2058
|
-
* -
|
|
2059
|
-
* -
|
|
2060
|
-
* -
|
|
2061
|
-
* - additionalCalls - optional additional calls array to support
|
|
2079
|
+
* - constructorCalldata: constructor calldata
|
|
2080
|
+
* - optional salt: address salt - default random
|
|
2081
|
+
* - optional unique: bool if true ensure unique salt - default true
|
|
2082
|
+
* - optional additionalCalls - optional additional calls array to support multi-call
|
|
2062
2083
|
* @param transactionsDetail Invocation Details containing:
|
|
2063
2084
|
* - optional nonce
|
|
2064
2085
|
* - optional version
|
|
2065
2086
|
* - optional maxFee
|
|
2087
|
+
* @returns Promise<InvokeFunctionResponse>
|
|
2088
|
+
* - transaction_hash
|
|
2066
2089
|
*/
|
|
2067
2090
|
abstract deploy(deployContractPayload: UniversalDeployerContractPayload, transactionsDetail?: InvocationsDetails): Promise<InvokeFunctionResponse>;
|
|
2091
|
+
/**
|
|
2092
|
+
* Simplify deploy simulating old DeployContract with same response + UDC specific response
|
|
2093
|
+
*
|
|
2094
|
+
* @param payload UniversalDeployerContractPayload
|
|
2095
|
+
* - classHash: computed class hash of compiled contract
|
|
2096
|
+
* - constructorCalldata: constructor calldata
|
|
2097
|
+
* - optional salt: address salt - default random
|
|
2098
|
+
* - optional unique: bool if true ensure unique salt - default true
|
|
2099
|
+
* - optional additionalCalls - optional additional calls array to support multi-call
|
|
2100
|
+
* @param details InvocationsDetails
|
|
2101
|
+
* - optional nonce
|
|
2102
|
+
* - optional version
|
|
2103
|
+
* - optional maxFee
|
|
2104
|
+
* @returns Promise<DeployContractUDCResponse>
|
|
2105
|
+
* - contract_address
|
|
2106
|
+
* - transaction_hash
|
|
2107
|
+
* - address
|
|
2108
|
+
* - deployer
|
|
2109
|
+
* - unique
|
|
2110
|
+
* - classHash
|
|
2111
|
+
* - calldata_len
|
|
2112
|
+
* - calldata
|
|
2113
|
+
* - salt
|
|
2114
|
+
*/
|
|
2115
|
+
abstract deployContract(payload: UniversalDeployerContractPayload, details: InvocationsDetails): Promise<DeployContractUDCResponse>;
|
|
2116
|
+
/**
|
|
2117
|
+
* Declares and Deploy a given compiled contract (json) to starknet using UDC
|
|
2118
|
+
*
|
|
2119
|
+
* @param declareDeployerContractPayload containing
|
|
2120
|
+
* - contract: compiled contract code
|
|
2121
|
+
* - classHash: computed class hash of compiled contract
|
|
2122
|
+
* - optional constructorCalldata: constructor calldata
|
|
2123
|
+
* - optional salt: address salt - default random
|
|
2124
|
+
* - optional unique: bool if true ensure unique salt - default true
|
|
2125
|
+
* - optional additionalCalls: - optional additional calls array to support multicall
|
|
2126
|
+
* @param details
|
|
2127
|
+
* - optional nonce
|
|
2128
|
+
* - optional version
|
|
2129
|
+
* - optional maxFee
|
|
2130
|
+
* @returns Promise<DeclareDeployContractResponse>
|
|
2131
|
+
* - declare
|
|
2132
|
+
* - transaction_hash
|
|
2133
|
+
* - deploy
|
|
2134
|
+
* - contract_address
|
|
2135
|
+
* - transaction_hash
|
|
2136
|
+
* - address
|
|
2137
|
+
* - deployer
|
|
2138
|
+
* - unique
|
|
2139
|
+
* - classHash
|
|
2140
|
+
* - calldata_len
|
|
2141
|
+
* - calldata
|
|
2142
|
+
* - salt
|
|
2143
|
+
*/
|
|
2144
|
+
abstract declareDeploy(declareDeployerContractPayload: DeclareDeployContractPayload, details?: InvocationsDetails): Promise<DeclareDeployContractResponse>;
|
|
2068
2145
|
/**
|
|
2069
2146
|
* Deploy the account on Starknet
|
|
2070
2147
|
*
|
|
@@ -2146,7 +2223,12 @@ declare class Account extends Provider implements AccountInterface {
|
|
|
2146
2223
|
estimateDeployFee({ classHash, salt, unique, constructorCalldata, additionalCalls, }: UniversalDeployerContractPayload, transactionsDetail?: InvocationsDetails | undefined): Promise<EstimateFee>;
|
|
2147
2224
|
execute(calls: AllowArray<Call>, abis?: Abi[] | undefined, transactionsDetail?: InvocationsDetails): Promise<InvokeFunctionResponse>;
|
|
2148
2225
|
declare({ classHash, contract }: DeclareContractPayload, transactionsDetail?: InvocationsDetails): Promise<DeclareContractResponse>;
|
|
2149
|
-
deploy({ classHash, salt, unique, constructorCalldata, additionalCalls, }: UniversalDeployerContractPayload,
|
|
2226
|
+
deploy({ classHash, salt, unique, constructorCalldata, additionalCalls, }: UniversalDeployerContractPayload, invocationsDetails?: InvocationsDetails): Promise<InvokeFunctionResponse>;
|
|
2227
|
+
deployContract(payload: UniversalDeployerContractPayload, details?: InvocationsDetails): Promise<DeployContractUDCResponse>;
|
|
2228
|
+
declareDeploy({ classHash, contract, constructorCalldata }: DeclareDeployContractPayload, details?: InvocationsDetails): Promise<{
|
|
2229
|
+
declare: any;
|
|
2230
|
+
deploy: DeployContractUDCResponse;
|
|
2231
|
+
}>;
|
|
2150
2232
|
deployAccount({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, transactionsDetail?: InvocationsDetails): Promise<DeployContractResponse>;
|
|
2151
2233
|
signMessage(typedData: TypedData): Promise<Signature>;
|
|
2152
2234
|
hashMessage(typedData: TypedData): Promise<string>;
|
|
@@ -2338,8 +2420,9 @@ declare class Contract implements ContractInterface {
|
|
|
2338
2420
|
declare class ContractFactory {
|
|
2339
2421
|
abi: Abi;
|
|
2340
2422
|
compiledContract: CompiledContract;
|
|
2341
|
-
|
|
2342
|
-
|
|
2423
|
+
classHash: string;
|
|
2424
|
+
account: AccountInterface;
|
|
2425
|
+
constructor(compiledContract: CompiledContract, classHash: string, account: AccountInterface, abi?: Abi);
|
|
2343
2426
|
/**
|
|
2344
2427
|
* Deploys contract and returns new instance of the Contract
|
|
2345
2428
|
*
|
|
@@ -2347,13 +2430,14 @@ declare class ContractFactory {
|
|
|
2347
2430
|
* @param addressSalt (optional) - Address Salt for deployment
|
|
2348
2431
|
* @returns deployed Contract
|
|
2349
2432
|
*/
|
|
2350
|
-
deploy(constructorCalldata?:
|
|
2433
|
+
deploy(constructorCalldata?: RawArgs, addressSalt?: string | undefined): Promise<Contract>;
|
|
2351
2434
|
/**
|
|
2352
2435
|
* Attaches to new Provider or Account
|
|
2353
2436
|
*
|
|
2354
|
-
* @param
|
|
2437
|
+
* @param account - new Provider or Account to attach to
|
|
2438
|
+
* @returns ContractFactory
|
|
2355
2439
|
*/
|
|
2356
|
-
connect(
|
|
2440
|
+
connect(account: AccountInterface): ContractFactory;
|
|
2357
2441
|
/**
|
|
2358
2442
|
* Attaches current abi and provider or account to the new address
|
|
2359
2443
|
*
|
|
@@ -2648,4 +2732,4 @@ declare function validateChecksumAddress(address: string): boolean;
|
|
|
2648
2732
|
declare function isUrl(s?: string): boolean;
|
|
2649
2733
|
declare function buildUrl(baseUrl: string, defaultPath: string, urlOrPath?: string): string;
|
|
2650
2734
|
|
|
2651
|
-
export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, CallL1Handler, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractFactory, ContractFunction, ContractInterface, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeDetails, EstimateFeeResponse, Event, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, GetTransactionTraceResponse, HttpError, Invocation, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, KeyPair, MessageToL1, MessageToL2, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RPC, RawArgs, RawCalldata, Result, RpcProvider, RpcProviderOptions, Sequencer, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, Status, Struct, StructAbi, TransactionStatus, TransactionType, UniversalDeployerContractPayload, addAddressPadding, buildUrl, constants, defaultProvider, ellipticCurve as ec, encode, getChecksumAddress, hash, isUrl, json, merkle, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress };
|
|
2735
|
+
export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, CallL1Handler, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractFactory, ContractFunction, ContractInterface, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployContractPayload, DeclareDeployContractResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, DeployContractUDCResponse, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeDetails, EstimateFeeResponse, Event, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, GetTransactionTraceResponse, HttpError, Invocation, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, KeyPair, MessageToL1, MessageToL2, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RPC, RawArgs, RawCalldata, Result, RpcProvider, RpcProviderOptions, Sequencer, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, Status, Struct, StructAbi, TransactionStatus, TransactionType, UniversalDeployerContractPayload, addAddressPadding, buildUrl, constants, defaultProvider, ellipticCurve as ec, encode, getChecksumAddress, hash, isUrl, json, merkle, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress };
|