@gearbox-protocol/sdk 3.0.0-vfour.370 → 3.0.0-vfour.371
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/dist/cjs/dev/create2.js
CHANGED
|
@@ -43,7 +43,11 @@ class Create2Deployer extends import_sdk.SDKConstruct {
|
|
|
43
43
|
}
|
|
44
44
|
async ensureExists(parameters) {
|
|
45
45
|
const { abi, args, bytecode } = parameters;
|
|
46
|
-
const address = getPublicCreate2Address({
|
|
46
|
+
const address = getPublicCreate2Address({
|
|
47
|
+
abi,
|
|
48
|
+
bytecode,
|
|
49
|
+
args
|
|
50
|
+
});
|
|
47
51
|
this.#logger?.info(`will deploy contract at ${address}`);
|
|
48
52
|
const isDeployed = await isDeployedUsingPublicCreate2(this.client, {
|
|
49
53
|
abi,
|
package/dist/esm/dev/create2.js
CHANGED
|
@@ -20,7 +20,11 @@ class Create2Deployer extends SDKConstruct {
|
|
|
20
20
|
}
|
|
21
21
|
async ensureExists(parameters) {
|
|
22
22
|
const { abi, args, bytecode } = parameters;
|
|
23
|
-
const address = getPublicCreate2Address({
|
|
23
|
+
const address = getPublicCreate2Address({
|
|
24
|
+
abi,
|
|
25
|
+
bytecode,
|
|
26
|
+
args
|
|
27
|
+
});
|
|
24
28
|
this.#logger?.info(`will deploy contract at ${address}`);
|
|
25
29
|
const isDeployed = await isDeployedUsingPublicCreate2(this.client, {
|
|
26
30
|
abi,
|
|
@@ -27,7 +27,7 @@ export interface EnsureExistsUsingPublicCreate2ReturnType {
|
|
|
27
27
|
export declare class Create2Deployer<transport extends Transport = Transport, chain extends Chain = Chain, account extends Account = Account> extends SDKConstruct {
|
|
28
28
|
#private;
|
|
29
29
|
constructor(sdk: GearboxSDK, walletClient: WalletClient<transport, chain, account>);
|
|
30
|
-
ensureExists(parameters: Create2Parameters): Promise<EnsureExistsUsingPublicCreate2ReturnType>;
|
|
30
|
+
ensureExists<abi extends Abi | readonly unknown[], chainOverride extends Chain | undefined = Chain | undefined>(parameters: Create2Parameters<abi, chain, account, chainOverride>): Promise<EnsureExistsUsingPublicCreate2ReturnType>;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Viem action that deploys a contract using the public CREATE2 factory
|
|
@@ -55,7 +55,7 @@ export type GetCreate2AddressParameters<abi extends Abi | readonly unknown[] = A
|
|
|
55
55
|
* @param bytecode - The contract bytecode to deploy
|
|
56
56
|
* @returns Address of the deployed contract
|
|
57
57
|
*/
|
|
58
|
-
export declare function getPublicCreate2Address<
|
|
58
|
+
export declare function getPublicCreate2Address<abi extends Abi | readonly unknown[]>(params: GetCreate2AddressParameters<abi>): Address;
|
|
59
59
|
/**
|
|
60
60
|
* Viem action that checks if contract is deployed using the public CREATE2 factory
|
|
61
61
|
*/
|