@1inch/solidity-utils 5.0.0 → 5.2.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/dist/src/bySig.d.ts +50 -0
- package/dist/src/bySig.js +77 -0
- package/dist/src/bySig.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/utils.d.ts +46 -4
- package/dist/src/utils.js +76 -2
- package/dist/src/utils.js.map +1 -1
- package/dist/typechain-types/@0xsequence/create3/contracts/Create3.d.ts +20 -0
- package/dist/typechain-types/@0xsequence/create3/contracts/Create3.js +3 -0
- package/dist/typechain-types/@0xsequence/create3/contracts/Create3.js.map +1 -0
- package/dist/typechain-types/@0xsequence/create3/contracts/index.d.ts +1 -0
- package/dist/typechain-types/@0xsequence/create3/contracts/index.js +3 -0
- package/dist/typechain-types/@0xsequence/create3/contracts/index.js.map +1 -0
- package/dist/typechain-types/@0xsequence/create3/index.d.ts +2 -0
- package/dist/typechain-types/@0xsequence/create3/index.js +3 -0
- package/dist/typechain-types/@0xsequence/create3/index.js.map +1 -0
- package/dist/typechain-types/@0xsequence/index.d.ts +2 -0
- package/dist/typechain-types/@0xsequence/index.js +3 -0
- package/dist/typechain-types/@0xsequence/index.js.map +1 -0
- package/dist/typechain-types/contracts/tests/mocks/Create3Mock.d.ts +39 -0
- package/dist/typechain-types/contracts/tests/mocks/Create3Mock.js +3 -0
- package/dist/typechain-types/contracts/tests/mocks/Create3Mock.js.map +1 -0
- package/dist/typechain-types/contracts/tests/mocks/index.d.ts +1 -0
- package/dist/typechain-types/factories/@0xsequence/create3/contracts/Create3__factory.d.ts +34 -0
- package/dist/typechain-types/factories/@0xsequence/create3/contracts/Create3__factory.js +55 -0
- package/dist/typechain-types/factories/@0xsequence/create3/contracts/Create3__factory.js.map +1 -0
- package/dist/typechain-types/factories/@0xsequence/create3/contracts/index.d.ts +1 -0
- package/dist/typechain-types/factories/@0xsequence/create3/contracts/index.js +9 -0
- package/dist/typechain-types/factories/@0xsequence/create3/contracts/index.js.map +1 -0
- package/dist/typechain-types/factories/@0xsequence/create3/index.d.ts +1 -0
- package/dist/typechain-types/factories/@0xsequence/create3/index.js +9 -0
- package/dist/typechain-types/factories/@0xsequence/create3/index.js.map +1 -0
- package/dist/typechain-types/factories/@0xsequence/index.d.ts +1 -0
- package/dist/typechain-types/factories/@0xsequence/index.js +9 -0
- package/dist/typechain-types/factories/@0xsequence/index.js.map +1 -0
- package/dist/typechain-types/factories/contracts/tests/mocks/Create3Mock__factory.d.ts +66 -0
- package/dist/typechain-types/factories/contracts/tests/mocks/Create3Mock__factory.js +98 -0
- package/dist/typechain-types/factories/contracts/tests/mocks/Create3Mock__factory.js.map +1 -0
- package/dist/typechain-types/factories/contracts/tests/mocks/index.d.ts +1 -0
- package/dist/typechain-types/factories/contracts/tests/mocks/index.js +3 -1
- package/dist/typechain-types/factories/contracts/tests/mocks/index.js.map +1 -1
- package/dist/typechain-types/factories/index.d.ts +1 -0
- package/dist/typechain-types/factories/index.js +2 -1
- package/dist/typechain-types/factories/index.js.map +1 -1
- package/dist/typechain-types/index.d.ts +6 -0
- package/dist/typechain-types/index.js +6 -2
- package/dist/typechain-types/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Wallet } from 'ethers';
|
|
2
|
+
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
|
|
3
|
+
/**
|
|
4
|
+
* Enum defining types of nonces.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum NonceType {
|
|
7
|
+
Account = 0,// Nonce for account
|
|
8
|
+
Selector = 1,// Nonce for selector
|
|
9
|
+
Unique = 2
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Builds traits for {bySig} contract by combining params.
|
|
13
|
+
* @param nonceType The type of nonce to use. Default is NonceType.Account.
|
|
14
|
+
* @param deadline The deadline for the message. Default is 0.
|
|
15
|
+
* @param relayer The relayer address. Default is the zero address.
|
|
16
|
+
* @param nonce The nonce. Default is 0.
|
|
17
|
+
* @returns A bigint representing the combined traits.
|
|
18
|
+
* @throws Error if provided with invalid parameters.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildBySigTraits({ nonceType, deadline, relayer, nonce, }?: {
|
|
21
|
+
nonceType?: NonceType | undefined;
|
|
22
|
+
deadline?: number | undefined;
|
|
23
|
+
relayer?: string | undefined;
|
|
24
|
+
nonce?: number | undefined;
|
|
25
|
+
}): bigint;
|
|
26
|
+
export interface SignedCallStruct {
|
|
27
|
+
traits: bigint;
|
|
28
|
+
data: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Computes the EIP-712 hash for a given bySig call.
|
|
32
|
+
* @param name The user readable name of EIP-712 domain.
|
|
33
|
+
* @param version The version of the EIP-712 domain.
|
|
34
|
+
* @param chainId The unique identifier for the blockchain network.
|
|
35
|
+
* @param verifyingContract The Ethereum address of the contract that will verify the signature. This ties the signature to a specific contract.
|
|
36
|
+
* @param sig The data to be signed.
|
|
37
|
+
* @returns The EIP-712 hash of the fully encoded data.
|
|
38
|
+
*/
|
|
39
|
+
export declare function hashBySig(name: string, version: string, chainId: bigint, verifyingContract: string, sig: SignedCallStruct): string;
|
|
40
|
+
/**
|
|
41
|
+
* Signs a given data for {bySig} contract call using EIP-712 standard.
|
|
42
|
+
* @param name The user readable name of EIP-712 domain.
|
|
43
|
+
* @param version The version of the EIP-712 domain.
|
|
44
|
+
* @param chainId The unique identifier for the blockchain network.
|
|
45
|
+
* @param verifyingContract The Ethereum address of the contract that will verify the signature. This ties the signature to a specific contract.
|
|
46
|
+
* @param signer The wallet or signer to sign the data.
|
|
47
|
+
* @param signedCall The call data to be signed, consisting of traits and data.
|
|
48
|
+
* @returns A Promise that resolves to the signature.
|
|
49
|
+
*/
|
|
50
|
+
export declare function signSignedCall(name: string, version: string, chainId: bigint | string, verifyingContract: string, signer: Wallet | SignerWithAddress, signedCall: SignedCallStruct): Promise<string>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.signSignedCall = exports.hashBySig = exports.buildBySigTraits = exports.NonceType = void 0;
|
|
4
|
+
const hardhat_1 = require("hardhat");
|
|
5
|
+
const prelude_1 = require("./prelude");
|
|
6
|
+
/**
|
|
7
|
+
* Enum defining types of nonces.
|
|
8
|
+
*/
|
|
9
|
+
var NonceType;
|
|
10
|
+
(function (NonceType) {
|
|
11
|
+
NonceType[NonceType["Account"] = 0] = "Account";
|
|
12
|
+
NonceType[NonceType["Selector"] = 1] = "Selector";
|
|
13
|
+
NonceType[NonceType["Unique"] = 2] = "Unique";
|
|
14
|
+
})(NonceType || (exports.NonceType = NonceType = {}));
|
|
15
|
+
/**
|
|
16
|
+
* Builds traits for {bySig} contract by combining params.
|
|
17
|
+
* @param nonceType The type of nonce to use. Default is NonceType.Account.
|
|
18
|
+
* @param deadline The deadline for the message. Default is 0.
|
|
19
|
+
* @param relayer The relayer address. Default is the zero address.
|
|
20
|
+
* @param nonce The nonce. Default is 0.
|
|
21
|
+
* @returns A bigint representing the combined traits.
|
|
22
|
+
* @throws Error if provided with invalid parameters.
|
|
23
|
+
*/
|
|
24
|
+
function buildBySigTraits({ nonceType = NonceType.Account, deadline = 0, relayer = prelude_1.constants.ZERO_ADDRESS.toString(), nonce = 0, } = {}) {
|
|
25
|
+
if (nonceType > 3) {
|
|
26
|
+
throw new Error('Wrong nonce type, it should be less than 4');
|
|
27
|
+
}
|
|
28
|
+
if (deadline > 0xffffffffff) {
|
|
29
|
+
throw new Error('Wrong deadline, it should be less than 0xffffffff');
|
|
30
|
+
}
|
|
31
|
+
if (relayer.length > 42) {
|
|
32
|
+
throw new Error('Wrong relayer address, it should be less than 42 symbols');
|
|
33
|
+
}
|
|
34
|
+
if (nonce > 0xffffffffffffffffffffffffffffffffn) {
|
|
35
|
+
throw new Error('Wrong nonce, it should not be more than 128 bits');
|
|
36
|
+
}
|
|
37
|
+
return (BigInt(nonceType) << 254n) +
|
|
38
|
+
(BigInt(deadline) << 208n) +
|
|
39
|
+
((BigInt(relayer) & 0xffffffffffffffffffffn) << 128n) +
|
|
40
|
+
BigInt(nonce);
|
|
41
|
+
}
|
|
42
|
+
exports.buildBySigTraits = buildBySigTraits;
|
|
43
|
+
/**
|
|
44
|
+
* Computes the EIP-712 hash for a given bySig call.
|
|
45
|
+
* @param name The user readable name of EIP-712 domain.
|
|
46
|
+
* @param version The version of the EIP-712 domain.
|
|
47
|
+
* @param chainId The unique identifier for the blockchain network.
|
|
48
|
+
* @param verifyingContract The Ethereum address of the contract that will verify the signature. This ties the signature to a specific contract.
|
|
49
|
+
* @param sig The data to be signed.
|
|
50
|
+
* @returns The EIP-712 hash of the fully encoded data.
|
|
51
|
+
*/
|
|
52
|
+
function hashBySig(name, version, chainId, verifyingContract, sig) {
|
|
53
|
+
const domain = { name, version, chainId, verifyingContract };
|
|
54
|
+
const types = {
|
|
55
|
+
SignedCall: [
|
|
56
|
+
{ name: 'traits', type: 'uint256' },
|
|
57
|
+
{ name: 'data', type: 'bytes' },
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
return hardhat_1.ethers.TypedDataEncoder.hash(domain, types, sig);
|
|
61
|
+
}
|
|
62
|
+
exports.hashBySig = hashBySig;
|
|
63
|
+
/**
|
|
64
|
+
* Signs a given data for {bySig} contract call using EIP-712 standard.
|
|
65
|
+
* @param name The user readable name of EIP-712 domain.
|
|
66
|
+
* @param version The version of the EIP-712 domain.
|
|
67
|
+
* @param chainId The unique identifier for the blockchain network.
|
|
68
|
+
* @param verifyingContract The Ethereum address of the contract that will verify the signature. This ties the signature to a specific contract.
|
|
69
|
+
* @param signer The wallet or signer to sign the data.
|
|
70
|
+
* @param signedCall The call data to be signed, consisting of traits and data.
|
|
71
|
+
* @returns A Promise that resolves to the signature.
|
|
72
|
+
*/
|
|
73
|
+
function signSignedCall(name, version, chainId, verifyingContract, signer, signedCall) {
|
|
74
|
+
return signer.signTypedData({ name, version, chainId, verifyingContract }, { SignedCall: [{ name: 'traits', type: 'uint256' }, { name: 'data', type: 'bytes' }] }, signedCall);
|
|
75
|
+
}
|
|
76
|
+
exports.signSignedCall = signSignedCall;
|
|
77
|
+
//# sourceMappingURL=bySig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bySig.js","sourceRoot":"","sources":["../../src/bySig.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AACjC,uCAAsC;AAItC;;GAEG;AACH,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,+CAAO,CAAA;IACP,iDAAQ,CAAA;IACR,6CAAM,CAAA;AACV,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAAC,EAC7B,SAAS,GAAG,SAAS,CAAC,OAAO,EAC7B,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,mBAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,EAC3C,KAAK,GAAG,CAAC,GACZ,GAAG,EAAE;IACF,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,QAAQ,GAAG,YAAY,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAChF,CAAC;IACD,IAAI,KAAK,GAAG,mCAAmC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;QAC1B,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;QAC1B,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,uBAAuB,CAAC,IAAI,IAAI,CAAC;QACrD,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAvBD,4CAuBC;AAOD;;;;;;;;GAQG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,OAAe,EAAE,OAAe,EAAE,iBAAyB,EAAE,GAAqB;IACtH,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7D,MAAM,KAAK,GAAG;QACV,UAAU,EAAE;YACR,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;YACnC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;SAClC;KACJ,CAAC;IACF,OAAO,gBAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC;AATD,8BASC;AAED;;;;;;;;;GASG;AACH,SAAgB,cAAc,CAC1B,IAAY,EACZ,OAAe,EACf,OAAwB,EACxB,iBAAyB,EACzB,MAAkC,EAClC,UAA4B;IAE5B,OAAO,MAAM,CAAC,aAAa,CACvB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAC7C,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EACtF,UAAU,CACb,CAAC;AACN,CAAC;AAbD,wCAaC"}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// created from 'create-ts-index'
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./bySig"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./expect"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./permit"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./prelude"), exports);
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;AAEjC,mDAAyB;AACzB,mDAAyB;AACzB,oDAA0B;AAC1B,uDAA6B;AAC7B,kDAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;AAEjC,kDAAwB;AACxB,mDAAyB;AACzB,mDAAyB;AACzB,oDAA0B;AAC1B,uDAA6B;AAC7B,kDAAwB"}
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import '@nomicfoundation/hardhat-ethers';
|
|
2
|
+
import { SignerWithAddress } from '@nomicfoundation/hardhat-ethers/signers';
|
|
2
3
|
import { BaseContract, BigNumberish, BytesLike, Contract, ContractTransactionReceipt, ContractTransactionResponse, JsonRpcProvider, Signer, Wallet } from 'ethers';
|
|
3
|
-
import {
|
|
4
|
+
import { DeploymentsExtension } from 'hardhat-deploy/types';
|
|
4
5
|
import { constants } from './prelude';
|
|
6
|
+
import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider';
|
|
5
7
|
/**
|
|
6
8
|
* @category utils
|
|
7
9
|
* @notice Options for deployment methods.
|
|
@@ -21,9 +23,7 @@ import { constants } from './prelude';
|
|
|
21
23
|
export interface DeployContractOptions {
|
|
22
24
|
contractName: string;
|
|
23
25
|
constructorArgs?: any[];
|
|
24
|
-
deployments:
|
|
25
|
-
deploy: (name: string, options: DeployOptions) => Promise<DeployResult>;
|
|
26
|
-
};
|
|
26
|
+
deployments: DeploymentsExtension;
|
|
27
27
|
deployer: string;
|
|
28
28
|
deploymentName?: string;
|
|
29
29
|
skipVerify?: boolean;
|
|
@@ -34,10 +34,23 @@ export interface DeployContractOptions {
|
|
|
34
34
|
log?: boolean;
|
|
35
35
|
waitConfirmations?: number;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @category utils
|
|
39
|
+
* @notice Options for deployment methods with create3. This is an extension of DeployContractOptions without `deployer` and `skipIfAlreadyDeployed`.
|
|
40
|
+
* @param txSigner Signer object to sign the deployment transaction.
|
|
41
|
+
* @param create3Deployer Address of the create3 deployer contract, which related to `contracts/interfaces/ICreate3Deployer.sol`.
|
|
42
|
+
* @param salt Salt value for create3 deployment.
|
|
43
|
+
*/
|
|
44
|
+
interface DeployContractOptionsWithCreate3 extends Omit<DeployContractOptions, 'deployer' | 'skipIfAlreadyDeployed'> {
|
|
45
|
+
txSigner?: Wallet | SignerWithAddress;
|
|
46
|
+
create3Deployer: string;
|
|
47
|
+
salt: string;
|
|
48
|
+
}
|
|
37
49
|
/**
|
|
38
50
|
* @category utils
|
|
39
51
|
* @notice Deploys a contract with optional Etherscan verification.
|
|
40
52
|
* @param options Deployment options. Default values:
|
|
53
|
+
* - constructorArgs: []
|
|
41
54
|
* - deploymentName: contractName
|
|
42
55
|
* - skipVerify: false
|
|
43
56
|
* - skipIfAlreadyDeployed: true
|
|
@@ -46,6 +59,34 @@ export interface DeployContractOptions {
|
|
|
46
59
|
* @returns The deployed contract instance.
|
|
47
60
|
*/
|
|
48
61
|
export declare function deployAndGetContract(options: DeployContractOptions): Promise<Contract>;
|
|
62
|
+
/**
|
|
63
|
+
* @category utils
|
|
64
|
+
* @notice Deploys a contract using create3 and saves the deployment information.
|
|
65
|
+
* @param options Deployment options. Default values:
|
|
66
|
+
* - constructorArgs: []
|
|
67
|
+
* - txSigner: first signer in the environment
|
|
68
|
+
* - deploymentName: contractName
|
|
69
|
+
* - skipVerify: false
|
|
70
|
+
* - waitConfirmations: 1 on dev chains, 6 on others
|
|
71
|
+
* @returns The deployed contract instance.
|
|
72
|
+
*/
|
|
73
|
+
export declare function deployAndGetContractWithCreate3(options: DeployContractOptionsWithCreate3): Promise<Contract>;
|
|
74
|
+
/**
|
|
75
|
+
* @category utils
|
|
76
|
+
* @notice Saves the deployment information using the deploy transaction hash.
|
|
77
|
+
* @param provider JSON RPC provider or Hardhat Ethers Provider.
|
|
78
|
+
* @param deployments Deployment facilitator object from Hardhat.
|
|
79
|
+
* @param contractName Name of the contract to deploy.
|
|
80
|
+
* @param deploymentName Optional custom name for deployment.
|
|
81
|
+
* @param constructorArgs Arguments for the contract's constructor.
|
|
82
|
+
* @param salt Salt value for create3 deployment.
|
|
83
|
+
* @param create3Deployer Address of the create3 deployer contract.
|
|
84
|
+
* @param deployTxHash Transaction hash of the create3 deployment.
|
|
85
|
+
* @param skipVerify Skips Etherscan verification if true.
|
|
86
|
+
* @returns The deployed contract instance.
|
|
87
|
+
*/
|
|
88
|
+
export declare function saveContractWithCreate3Deployment(provider: JsonRpcProvider | HardhatEthersProvider, deployments: DeploymentsExtension, contractName: string, deploymentName: string, constructorArgs: any[], // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
89
|
+
salt: string, create3Deployer: string, deployTxHash: string, skipVerify?: boolean): Promise<Contract>;
|
|
49
90
|
/**
|
|
50
91
|
* @category utils
|
|
51
92
|
* @notice Advances the blockchain time to a specific timestamp for testing purposes.
|
|
@@ -147,3 +188,4 @@ export declare function countInstructions(provider: JsonRpcProvider | {
|
|
|
147
188
|
* @return The price of the specified native token in USD, scaled by 1e18 to preserve precision.
|
|
148
189
|
*/
|
|
149
190
|
export declare function getEthPrice(nativeTokenSymbol?: string): Promise<bigint>;
|
|
191
|
+
export {};
|
package/dist/src/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEthPrice = exports.countInstructions = exports.signMessage = exports.fixSignature = exports.trackReceivedTokenAndTx = exports.deployContractFromBytecode = exports.deployContract = exports.timeIncreaseTo = exports.deployAndGetContract = void 0;
|
|
3
|
+
exports.getEthPrice = exports.countInstructions = exports.signMessage = exports.fixSignature = exports.trackReceivedTokenAndTx = exports.deployContractFromBytecode = exports.deployContract = exports.timeIncreaseTo = exports.saveContractWithCreate3Deployment = exports.deployAndGetContractWithCreate3 = exports.deployAndGetContract = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
require("@nomicfoundation/hardhat-ethers"); // required to populate the HardhatRuntimeEnvironment with ethers
|
|
6
6
|
const hardhat_1 = tslib_1.__importStar(require("hardhat"));
|
|
@@ -11,6 +11,7 @@ const prelude_1 = require("./prelude");
|
|
|
11
11
|
* @category utils
|
|
12
12
|
* @notice Deploys a contract with optional Etherscan verification.
|
|
13
13
|
* @param options Deployment options. Default values:
|
|
14
|
+
* - constructorArgs: []
|
|
14
15
|
* - deploymentName: contractName
|
|
15
16
|
* - skipVerify: false
|
|
16
17
|
* - skipIfAlreadyDeployed: true
|
|
@@ -20,7 +21,7 @@ const prelude_1 = require("./prelude");
|
|
|
20
21
|
*/
|
|
21
22
|
async function deployAndGetContract(options) {
|
|
22
23
|
// Set default values for options
|
|
23
|
-
const { contractName, constructorArgs, deployments, deployer, deploymentName = contractName, skipVerify = false, skipIfAlreadyDeployed = true, gasPrice, maxPriorityFeePerGas, maxFeePerGas, log = true, waitConfirmations = prelude_1.constants.DEV_CHAINS.includes(hardhat_1.default.network.name) ? 1 : 6, } = options;
|
|
24
|
+
const { contractName, constructorArgs = [], deployments, deployer, deploymentName = contractName, skipVerify = false, skipIfAlreadyDeployed = true, gasPrice, maxPriorityFeePerGas, maxFeePerGas, log = true, waitConfirmations = prelude_1.constants.DEV_CHAINS.includes(hardhat_1.default.network.name) ? 1 : 6, } = options;
|
|
24
25
|
/**
|
|
25
26
|
* Deploys contract and tries to verify it on Etherscan if requested.
|
|
26
27
|
* @remarks
|
|
@@ -39,6 +40,7 @@ async function deployAndGetContract(options) {
|
|
|
39
40
|
log,
|
|
40
41
|
waitConfirmations,
|
|
41
42
|
};
|
|
43
|
+
// If hardhat-deploy `deploy` function logs need to be displayed, add HARDHAT_DEPLOY_LOG = 'true' to the .env file
|
|
42
44
|
const deployResult = await deploy(deploymentName, deployOptions);
|
|
43
45
|
if (!(skipVerify || prelude_1.constants.DEV_CHAINS.includes(hardhat_1.default.network.name))) {
|
|
44
46
|
await hardhat_1.default.run('verify:verify', {
|
|
@@ -52,6 +54,78 @@ async function deployAndGetContract(options) {
|
|
|
52
54
|
return await hardhat_1.ethers.getContractAt(contractName, deployResult.address);
|
|
53
55
|
}
|
|
54
56
|
exports.deployAndGetContract = deployAndGetContract;
|
|
57
|
+
/**
|
|
58
|
+
* @category utils
|
|
59
|
+
* @notice Deploys a contract using create3 and saves the deployment information.
|
|
60
|
+
* @param options Deployment options. Default values:
|
|
61
|
+
* - constructorArgs: []
|
|
62
|
+
* - txSigner: first signer in the environment
|
|
63
|
+
* - deploymentName: contractName
|
|
64
|
+
* - skipVerify: false
|
|
65
|
+
* - waitConfirmations: 1 on dev chains, 6 on others
|
|
66
|
+
* @returns The deployed contract instance.
|
|
67
|
+
*/
|
|
68
|
+
async function deployAndGetContractWithCreate3(options) {
|
|
69
|
+
// Set default values for options
|
|
70
|
+
const { create3Deployer, salt, contractName, constructorArgs = [], deployments, txSigner = (await hardhat_1.ethers.getSigners())[0], deploymentName = contractName, skipVerify = false, gasPrice, maxPriorityFeePerGas, maxFeePerGas, waitConfirmations = prelude_1.constants.DEV_CHAINS.includes(hardhat_1.default.network.name) ? 1 : 6, } = options;
|
|
71
|
+
const deployer = await hardhat_1.ethers.getContractAt('ICreate3Deployer', create3Deployer);
|
|
72
|
+
const CustomContract = await hardhat_1.ethers.getContractFactory(contractName);
|
|
73
|
+
const deployData = (await CustomContract.getDeployTransaction(...constructorArgs)).data;
|
|
74
|
+
const txn = await deployer.connect(txSigner).deploy(salt, deployData, { gasPrice, maxPriorityFeePerGas, maxFeePerGas });
|
|
75
|
+
const receipt = await txn.wait(waitConfirmations);
|
|
76
|
+
const customContractAddress = await deployer.addressOf(salt);
|
|
77
|
+
console.log(`${contractName} deployed to: ${customContractAddress}`);
|
|
78
|
+
return await saveContractWithCreate3Deployment(txSigner.provider, deployments, contractName, deploymentName, constructorArgs, salt, create3Deployer, receipt.hash, skipVerify);
|
|
79
|
+
}
|
|
80
|
+
exports.deployAndGetContractWithCreate3 = deployAndGetContractWithCreate3;
|
|
81
|
+
/**
|
|
82
|
+
* @category utils
|
|
83
|
+
* @notice Saves the deployment information using the deploy transaction hash.
|
|
84
|
+
* @param provider JSON RPC provider or Hardhat Ethers Provider.
|
|
85
|
+
* @param deployments Deployment facilitator object from Hardhat.
|
|
86
|
+
* @param contractName Name of the contract to deploy.
|
|
87
|
+
* @param deploymentName Optional custom name for deployment.
|
|
88
|
+
* @param constructorArgs Arguments for the contract's constructor.
|
|
89
|
+
* @param salt Salt value for create3 deployment.
|
|
90
|
+
* @param create3Deployer Address of the create3 deployer contract.
|
|
91
|
+
* @param deployTxHash Transaction hash of the create3 deployment.
|
|
92
|
+
* @param skipVerify Skips Etherscan verification if true.
|
|
93
|
+
* @returns The deployed contract instance.
|
|
94
|
+
*/
|
|
95
|
+
async function saveContractWithCreate3Deployment(provider, deployments, contractName, deploymentName, constructorArgs, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
96
|
+
salt, create3Deployer, deployTxHash, skipVerify = false) {
|
|
97
|
+
const deployer = await hardhat_1.ethers.getContractAt('ICreate3Deployer', create3Deployer);
|
|
98
|
+
const contract = await deployer.addressOf(salt);
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
|
+
const receipt = await provider.getTransactionReceipt(deployTxHash);
|
|
101
|
+
if (receipt != null) {
|
|
102
|
+
// conver ethers.TransactionReceipt object to hardhat-deploy.Receipt object
|
|
103
|
+
receipt.transactionHash = receipt.transactionHash || receipt.hash;
|
|
104
|
+
receipt.transactionIndex = receipt.transactionIndex || receipt.index;
|
|
105
|
+
['provider', 'blobGasPrice', 'type', 'root', 'hash', 'index'].forEach(key => delete receipt[key]);
|
|
106
|
+
}
|
|
107
|
+
if (!(skipVerify || prelude_1.constants.DEV_CHAINS.includes(hardhat_1.default.network.name))) {
|
|
108
|
+
await hardhat_1.default.run('verify:verify', {
|
|
109
|
+
address: contract,
|
|
110
|
+
constructorArguments: constructorArgs,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
console.log('Skipping verification');
|
|
115
|
+
}
|
|
116
|
+
const ContractArtifact = await deployments.getArtifact(contractName);
|
|
117
|
+
const ContractDeploymentData = {};
|
|
118
|
+
ContractDeploymentData.address = contract;
|
|
119
|
+
ContractDeploymentData.transactionHash = receipt.hash;
|
|
120
|
+
ContractDeploymentData.receipt = receipt;
|
|
121
|
+
ContractDeploymentData.args = constructorArgs;
|
|
122
|
+
ContractDeploymentData.abi = ContractArtifact.abi;
|
|
123
|
+
ContractDeploymentData.bytecode = ContractArtifact.bytecode;
|
|
124
|
+
ContractDeploymentData.deployedBytecode = ContractArtifact.deployedBytecode;
|
|
125
|
+
await deployments.save(deploymentName, ContractDeploymentData);
|
|
126
|
+
return await hardhat_1.ethers.getContractAt(contractName, contract);
|
|
127
|
+
}
|
|
128
|
+
exports.saveContractWithCreate3Deployment = saveContractWithCreate3Deployment;
|
|
55
129
|
/**
|
|
56
130
|
* @category utils
|
|
57
131
|
* @notice Advances the blockchain time to a specific timestamp for testing purposes.
|
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;AAAA,2CAAyC,CAAE,iEAAiE;AAC5G,2DAAsC;AACtC,sFAAgE;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"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} from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../common";
|
|
3
|
+
export interface Create3Interface extends Interface {
|
|
4
|
+
}
|
|
5
|
+
export interface Create3 extends BaseContract {
|
|
6
|
+
connect(runner?: ContractRunner | null): Create3;
|
|
7
|
+
waitForDeployment(): Promise<this>;
|
|
8
|
+
interface: Create3Interface;
|
|
9
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
10
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
11
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
12
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
13
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
14
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
15
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
16
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
17
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
18
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
19
|
+
filters: {};
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Create3.js","sourceRoot":"","sources":["../../../../../typechain-types/@0xsequence/create3/contracts/Create3.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Create3 } from "./Create3";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../typechain-types/@0xsequence/create3/contracts/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../typechain-types/@0xsequence/create3/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../typechain-types/@0xsequence/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../../../common";
|
|
3
|
+
export interface Create3MockInterface extends Interface {
|
|
4
|
+
getFunction(nameOrSignature: "addressOf" | "deploy"): FunctionFragment;
|
|
5
|
+
encodeFunctionData(functionFragment: "addressOf", values: [BytesLike]): string;
|
|
6
|
+
encodeFunctionData(functionFragment: "deploy", values: [BytesLike, BytesLike]): string;
|
|
7
|
+
decodeFunctionResult(functionFragment: "addressOf", data: BytesLike): Result;
|
|
8
|
+
decodeFunctionResult(functionFragment: "deploy", data: BytesLike): Result;
|
|
9
|
+
}
|
|
10
|
+
export interface Create3Mock extends BaseContract {
|
|
11
|
+
connect(runner?: ContractRunner | null): Create3Mock;
|
|
12
|
+
waitForDeployment(): Promise<this>;
|
|
13
|
+
interface: Create3MockInterface;
|
|
14
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
15
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
16
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
17
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
18
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
19
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
20
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
21
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
22
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
23
|
+
addressOf: TypedContractMethod<[salt: BytesLike], [string], "view">;
|
|
24
|
+
deploy: TypedContractMethod<[
|
|
25
|
+
salt: BytesLike,
|
|
26
|
+
code: BytesLike
|
|
27
|
+
], [
|
|
28
|
+
string
|
|
29
|
+
], "nonpayable">;
|
|
30
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
31
|
+
getFunction(nameOrSignature: "addressOf"): TypedContractMethod<[salt: BytesLike], [string], "view">;
|
|
32
|
+
getFunction(nameOrSignature: "deploy"): TypedContractMethod<[
|
|
33
|
+
salt: BytesLike,
|
|
34
|
+
code: BytesLike
|
|
35
|
+
], [
|
|
36
|
+
string
|
|
37
|
+
], "nonpayable">;
|
|
38
|
+
filters: {};
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Create3Mock.js","sourceRoot":"","sources":["../../../../../typechain-types/contracts/tests/mocks/Create3Mock.ts"],"names":[],"mappings":""}
|
|
@@ -8,6 +8,7 @@ export type { AddressSetMock } from "./AddressSetMock";
|
|
|
8
8
|
export type { BySigTraitsMock } from "./BySigTraitsMock";
|
|
9
9
|
export type { BytesMemoryMock } from "./BytesMemoryMock";
|
|
10
10
|
export type { BytesStorageMock } from "./BytesStorageMock";
|
|
11
|
+
export type { Create3Mock } from "./Create3Mock";
|
|
11
12
|
export type { DaiLikePermitMock } from "./DaiLikePermitMock";
|
|
12
13
|
export type { ERC1271WalletMock } from "./ERC1271WalletMock";
|
|
13
14
|
export type { EthReceiverMock } from "./EthReceiverMock";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ContractFactory, ContractTransactionResponse } from "ethers";
|
|
2
|
+
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
|
|
3
|
+
import type { NonPayableOverrides } from "../../../../common";
|
|
4
|
+
import type { Create3, Create3Interface } from "../../../../@0xsequence/create3/contracts/Create3";
|
|
5
|
+
type Create3ConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
|
|
6
|
+
export declare class Create3__factory extends ContractFactory {
|
|
7
|
+
constructor(...args: Create3ConstructorParams);
|
|
8
|
+
getDeployTransaction(overrides?: NonPayableOverrides & {
|
|
9
|
+
from?: string;
|
|
10
|
+
}): Promise<ContractDeployTransaction>;
|
|
11
|
+
deploy(overrides?: NonPayableOverrides & {
|
|
12
|
+
from?: string;
|
|
13
|
+
}): Promise<Create3 & {
|
|
14
|
+
deploymentTransaction(): ContractTransactionResponse;
|
|
15
|
+
}>;
|
|
16
|
+
connect(runner: ContractRunner | null): Create3__factory;
|
|
17
|
+
static readonly bytecode = "0x6080806040523460175760399081601c823930815050f35b5f80fdfe5f80fdfea264697066735822122099deb8fbccc0ed640c2ccaa57f93cfb12f791290c0a8032ea47dfc8b4ece489664736f6c63430008190033";
|
|
18
|
+
static readonly abi: readonly [{
|
|
19
|
+
readonly inputs: readonly [];
|
|
20
|
+
readonly name: "ErrorCreatingContract";
|
|
21
|
+
readonly type: "error";
|
|
22
|
+
}, {
|
|
23
|
+
readonly inputs: readonly [];
|
|
24
|
+
readonly name: "ErrorCreatingProxy";
|
|
25
|
+
readonly type: "error";
|
|
26
|
+
}, {
|
|
27
|
+
readonly inputs: readonly [];
|
|
28
|
+
readonly name: "TargetAlreadyExists";
|
|
29
|
+
readonly type: "error";
|
|
30
|
+
}];
|
|
31
|
+
static createInterface(): Create3Interface;
|
|
32
|
+
static connect(address: string, runner?: ContractRunner | null): Create3;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Create3__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [],
|
|
11
|
+
name: "ErrorCreatingContract",
|
|
12
|
+
type: "error",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
inputs: [],
|
|
16
|
+
name: "ErrorCreatingProxy",
|
|
17
|
+
type: "error",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
inputs: [],
|
|
21
|
+
name: "TargetAlreadyExists",
|
|
22
|
+
type: "error",
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
const _bytecode = "0x6080806040523460175760399081601c823930815050f35b5f80fdfe5f80fdfea264697066735822122099deb8fbccc0ed640c2ccaa57f93cfb12f791290c0a8032ea47dfc8b4ece489664736f6c63430008190033";
|
|
26
|
+
const isSuperArgs = (xs) => xs.length > 1;
|
|
27
|
+
class Create3__factory extends ethers_1.ContractFactory {
|
|
28
|
+
constructor(...args) {
|
|
29
|
+
if (isSuperArgs(args)) {
|
|
30
|
+
super(...args);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
super(_abi, _bytecode, args[0]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
getDeployTransaction(overrides) {
|
|
37
|
+
return super.getDeployTransaction(overrides || {});
|
|
38
|
+
}
|
|
39
|
+
deploy(overrides) {
|
|
40
|
+
return super.deploy(overrides || {});
|
|
41
|
+
}
|
|
42
|
+
connect(runner) {
|
|
43
|
+
return super.connect(runner);
|
|
44
|
+
}
|
|
45
|
+
static createInterface() {
|
|
46
|
+
return new ethers_1.Interface(_abi);
|
|
47
|
+
}
|
|
48
|
+
static connect(address, runner) {
|
|
49
|
+
return new ethers_1.Contract(address, _abi, runner);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.Create3__factory = Create3__factory;
|
|
53
|
+
Create3__factory.bytecode = _bytecode;
|
|
54
|
+
Create3__factory.abi = _abi;
|
|
55
|
+
//# sourceMappingURL=Create3__factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Create3__factory.js","sourceRoot":"","sources":["../../../../../../typechain-types/factories/@0xsequence/create3/contracts/Create3__factory.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,mCAKgB;AAQhB,MAAM,IAAI,GAAG;IACX;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,OAAO;KACd;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,OAAO;KACd;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,OAAO;KACd;CACO,CAAC;AAEX,MAAM,SAAS,GACb,8KAA8K,CAAC;AAMjL,MAAM,WAAW,GAAG,CAClB,EAA4B,EACyB,EAAE,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAExE,MAAa,gBAAiB,SAAQ,wBAAe;IACnD,YAAY,GAAG,IAA8B;QAC3C,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAEQ,oBAAoB,CAC3B,SAAmD;QAEnD,OAAO,KAAK,CAAC,oBAAoB,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;IACQ,MAAM,CAAC,SAAmD;QACjE,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAIlC,CAAC;IACJ,CAAC;IACQ,OAAO,CAAC,MAA6B;QAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAqB,CAAC;IACnD,CAAC;IAID,MAAM,CAAC,eAAe;QACpB,OAAO,IAAI,kBAAS,CAAC,IAAI,CAAqB,CAAC;IACjD,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,OAAe,EAAE,MAA8B;QAC5D,OAAO,IAAI,iBAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAuB,CAAC;IACnE,CAAC;;AAhCH,4CAiCC;AARiB,yBAAQ,GAAG,SAAS,CAAC;AACrB,oBAAG,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Create3__factory } from "./Create3__factory";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Create3__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
var Create3__factory_1 = require("./Create3__factory");
|
|
8
|
+
Object.defineProperty(exports, "Create3__factory", { enumerable: true, get: function () { return Create3__factory_1.Create3__factory; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../typechain-types/factories/@0xsequence/create3/contracts/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as contracts from "./contracts";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contracts = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/* Autogenerated file. Do not edit manually. */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
exports.contracts = tslib_1.__importStar(require("./contracts"));
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../typechain-types/factories/@0xsequence/create3/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,iEAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as create3 from "./create3";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.create3 = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/* Autogenerated file. Do not edit manually. */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
exports.create3 = tslib_1.__importStar(require("./create3"));
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../typechain-types/factories/@0xsequence/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,6DAAqC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ContractFactory, ContractTransactionResponse } from "ethers";
|
|
2
|
+
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
|
|
3
|
+
import type { NonPayableOverrides } from "../../../../common";
|
|
4
|
+
import type { Create3Mock, Create3MockInterface } from "../../../../contracts/tests/mocks/Create3Mock";
|
|
5
|
+
type Create3MockConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
|
|
6
|
+
export declare class Create3Mock__factory extends ContractFactory {
|
|
7
|
+
constructor(...args: Create3MockConstructorParams);
|
|
8
|
+
getDeployTransaction(overrides?: NonPayableOverrides & {
|
|
9
|
+
from?: string;
|
|
10
|
+
}): Promise<ContractDeployTransaction>;
|
|
11
|
+
deploy(overrides?: NonPayableOverrides & {
|
|
12
|
+
from?: string;
|
|
13
|
+
}): Promise<Create3Mock & {
|
|
14
|
+
deploymentTransaction(): ContractTransactionResponse;
|
|
15
|
+
}>;
|
|
16
|
+
connect(runner: ContractRunner | null): Create3Mock__factory;
|
|
17
|
+
static readonly bytecode = "0x6080806040523460155761051a908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c8063bb34534c146100de5763cdcb760a1461002f575f80fd5b346100da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da5760243567ffffffffffffffff8082116100da57366023830112156100da5781600401359081116100da5736602482840101116100da576100a76100af9160246100d69401610201565b6004356103f8565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390f35b5f80fd5b346100da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da57602061011a600435610236565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761018157604052565b610138565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761018157604052565b67ffffffffffffffff811161018157601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b9061020b816101c7565b916102196040519384610186565b81835236828201116100da57815f92602092838601378301015290565b6040519060208201907fff0000000000000000000000000000000000000000000000000000000000000082523060601b602184015260358301527f21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f605583015260558252608082019180831067ffffffffffffffff84111761018157827f010000000000000000000000000000000000000000000000000000000000000060b66103639461037c9660405284519020937fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060a08201957fd694000000000000000000000000000000000000000000000000000000000000875260601b1660a282015201526017815261034781610165565b51902073ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b604051906040820182811067ffffffffffffffff82111761018157604052601082527f67363d3d37363d34f03d5260086018f3000000000000000000000000000000006020830152565b3d156103f3573d906103da826101c7565b916103e86040519384610186565b82523d5f602084013e565b606090565b919061040261037f565b9261040c81610236565b93843b6104ba576020815191015ff573ffffffffffffffffffffffffffffffffffffffff81161561049057815f92918360208194519301915af161044e6103c9565b50158015610487575b61045d57565b60046040517f53de54b9000000000000000000000000000000000000000000000000000000008152fd5b50813b15610457565b60046040517fbbd2fe87000000000000000000000000000000000000000000000000000000008152fd5b60046040517fcd43efa1000000000000000000000000000000000000000000000000000000008152fdfea264697066735822122024d5ab2db26034059d4b0c11ec10761b28d49093b980ad58857a79d08158202664736f6c63430008190033";
|
|
18
|
+
static readonly abi: readonly [{
|
|
19
|
+
readonly inputs: readonly [];
|
|
20
|
+
readonly name: "ErrorCreatingContract";
|
|
21
|
+
readonly type: "error";
|
|
22
|
+
}, {
|
|
23
|
+
readonly inputs: readonly [];
|
|
24
|
+
readonly name: "ErrorCreatingProxy";
|
|
25
|
+
readonly type: "error";
|
|
26
|
+
}, {
|
|
27
|
+
readonly inputs: readonly [];
|
|
28
|
+
readonly name: "TargetAlreadyExists";
|
|
29
|
+
readonly type: "error";
|
|
30
|
+
}, {
|
|
31
|
+
readonly inputs: readonly [{
|
|
32
|
+
readonly internalType: "bytes32";
|
|
33
|
+
readonly name: "salt";
|
|
34
|
+
readonly type: "bytes32";
|
|
35
|
+
}];
|
|
36
|
+
readonly name: "addressOf";
|
|
37
|
+
readonly outputs: readonly [{
|
|
38
|
+
readonly internalType: "address";
|
|
39
|
+
readonly name: "";
|
|
40
|
+
readonly type: "address";
|
|
41
|
+
}];
|
|
42
|
+
readonly stateMutability: "view";
|
|
43
|
+
readonly type: "function";
|
|
44
|
+
}, {
|
|
45
|
+
readonly inputs: readonly [{
|
|
46
|
+
readonly internalType: "bytes32";
|
|
47
|
+
readonly name: "salt";
|
|
48
|
+
readonly type: "bytes32";
|
|
49
|
+
}, {
|
|
50
|
+
readonly internalType: "bytes";
|
|
51
|
+
readonly name: "code";
|
|
52
|
+
readonly type: "bytes";
|
|
53
|
+
}];
|
|
54
|
+
readonly name: "deploy";
|
|
55
|
+
readonly outputs: readonly [{
|
|
56
|
+
readonly internalType: "address";
|
|
57
|
+
readonly name: "";
|
|
58
|
+
readonly type: "address";
|
|
59
|
+
}];
|
|
60
|
+
readonly stateMutability: "nonpayable";
|
|
61
|
+
readonly type: "function";
|
|
62
|
+
}];
|
|
63
|
+
static createInterface(): Create3MockInterface;
|
|
64
|
+
static connect(address: string, runner?: ContractRunner | null): Create3Mock;
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Create3Mock__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [],
|
|
11
|
+
name: "ErrorCreatingContract",
|
|
12
|
+
type: "error",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
inputs: [],
|
|
16
|
+
name: "ErrorCreatingProxy",
|
|
17
|
+
type: "error",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
inputs: [],
|
|
21
|
+
name: "TargetAlreadyExists",
|
|
22
|
+
type: "error",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
inputs: [
|
|
26
|
+
{
|
|
27
|
+
internalType: "bytes32",
|
|
28
|
+
name: "salt",
|
|
29
|
+
type: "bytes32",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
name: "addressOf",
|
|
33
|
+
outputs: [
|
|
34
|
+
{
|
|
35
|
+
internalType: "address",
|
|
36
|
+
name: "",
|
|
37
|
+
type: "address",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
stateMutability: "view",
|
|
41
|
+
type: "function",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
inputs: [
|
|
45
|
+
{
|
|
46
|
+
internalType: "bytes32",
|
|
47
|
+
name: "salt",
|
|
48
|
+
type: "bytes32",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
internalType: "bytes",
|
|
52
|
+
name: "code",
|
|
53
|
+
type: "bytes",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
name: "deploy",
|
|
57
|
+
outputs: [
|
|
58
|
+
{
|
|
59
|
+
internalType: "address",
|
|
60
|
+
name: "",
|
|
61
|
+
type: "address",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
stateMutability: "nonpayable",
|
|
65
|
+
type: "function",
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
const _bytecode = "0x6080806040523460155761051a908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c8063bb34534c146100de5763cdcb760a1461002f575f80fd5b346100da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da5760243567ffffffffffffffff8082116100da57366023830112156100da5781600401359081116100da5736602482840101116100da576100a76100af9160246100d69401610201565b6004356103f8565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390f35b5f80fd5b346100da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da57602061011a600435610236565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761018157604052565b610138565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761018157604052565b67ffffffffffffffff811161018157601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b9061020b816101c7565b916102196040519384610186565b81835236828201116100da57815f92602092838601378301015290565b6040519060208201907fff0000000000000000000000000000000000000000000000000000000000000082523060601b602184015260358301527f21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f605583015260558252608082019180831067ffffffffffffffff84111761018157827f010000000000000000000000000000000000000000000000000000000000000060b66103639461037c9660405284519020937fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060a08201957fd694000000000000000000000000000000000000000000000000000000000000875260601b1660a282015201526017815261034781610165565b51902073ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b604051906040820182811067ffffffffffffffff82111761018157604052601082527f67363d3d37363d34f03d5260086018f3000000000000000000000000000000006020830152565b3d156103f3573d906103da826101c7565b916103e86040519384610186565b82523d5f602084013e565b606090565b919061040261037f565b9261040c81610236565b93843b6104ba576020815191015ff573ffffffffffffffffffffffffffffffffffffffff81161561049057815f92918360208194519301915af161044e6103c9565b50158015610487575b61045d57565b60046040517f53de54b9000000000000000000000000000000000000000000000000000000008152fd5b50813b15610457565b60046040517fbbd2fe87000000000000000000000000000000000000000000000000000000008152fd5b60046040517fcd43efa1000000000000000000000000000000000000000000000000000000008152fdfea264697066735822122024d5ab2db26034059d4b0c11ec10761b28d49093b980ad58857a79d08158202664736f6c63430008190033";
|
|
69
|
+
const isSuperArgs = (xs) => xs.length > 1;
|
|
70
|
+
class Create3Mock__factory extends ethers_1.ContractFactory {
|
|
71
|
+
constructor(...args) {
|
|
72
|
+
if (isSuperArgs(args)) {
|
|
73
|
+
super(...args);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
super(_abi, _bytecode, args[0]);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
getDeployTransaction(overrides) {
|
|
80
|
+
return super.getDeployTransaction(overrides || {});
|
|
81
|
+
}
|
|
82
|
+
deploy(overrides) {
|
|
83
|
+
return super.deploy(overrides || {});
|
|
84
|
+
}
|
|
85
|
+
connect(runner) {
|
|
86
|
+
return super.connect(runner);
|
|
87
|
+
}
|
|
88
|
+
static createInterface() {
|
|
89
|
+
return new ethers_1.Interface(_abi);
|
|
90
|
+
}
|
|
91
|
+
static connect(address, runner) {
|
|
92
|
+
return new ethers_1.Contract(address, _abi, runner);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.Create3Mock__factory = Create3Mock__factory;
|
|
96
|
+
Create3Mock__factory.bytecode = _bytecode;
|
|
97
|
+
Create3Mock__factory.abi = _abi;
|
|
98
|
+
//# sourceMappingURL=Create3Mock__factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Create3Mock__factory.js","sourceRoot":"","sources":["../../../../../../typechain-types/factories/contracts/tests/mocks/Create3Mock__factory.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,mCAKgB;AAQhB,MAAM,IAAI,GAAG;IACX;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,OAAO;KACd;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,OAAO;KACd;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,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;IACrD,CAAC;IACQ,MAAM,CAAC,SAAmD;QACjE,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAIlC,CAAC;IACJ,CAAC;IACQ,OAAO,CAAC,MAA6B;QAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAyB,CAAC;IACvD,CAAC;IAID,MAAM,CAAC,eAAe;QACpB,OAAO,IAAI,kBAAS,CAAC,IAAI,CAAyB,CAAC;IACrD,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,OAAe,EAAE,MAA8B;QAC5D,OAAO,IAAI,iBAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAA2B,CAAC;IACvE,CAAC;;AAhCH,oDAiCC;AARiB,6BAAQ,GAAG,SAAS,CAAC;AACrB,wBAAG,GAAG,IAAI,CAAC"}
|
|
@@ -6,6 +6,7 @@ export { AddressSetMock__factory } from "./AddressSetMock__factory";
|
|
|
6
6
|
export { BySigTraitsMock__factory } from "./BySigTraitsMock__factory";
|
|
7
7
|
export { BytesMemoryMock__factory } from "./BytesMemoryMock__factory";
|
|
8
8
|
export { BytesStorageMock__factory } from "./BytesStorageMock__factory";
|
|
9
|
+
export { Create3Mock__factory } from "./Create3Mock__factory";
|
|
9
10
|
export { DaiLikePermitMock__factory } from "./DaiLikePermitMock__factory";
|
|
10
11
|
export { ERC1271WalletMock__factory } from "./ERC1271WalletMock__factory";
|
|
11
12
|
export { EthReceiverMock__factory } from "./EthReceiverMock__factory";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WethReceiverMock__factory = exports.WETH__factory = exports.USDCLikePermitMock__factory = exports.TokenWithBySig__factory = exports.PermitableMock__factory = exports.PermitAndCallMock__factory = exports.EthSenderMock__factory = exports.EthReceiverMock__factory = exports.ERC1271WalletMock__factory = exports.DaiLikePermitMock__factory = exports.BytesStorageMock__factory = exports.BytesMemoryMock__factory = exports.BySigTraitsMock__factory = exports.AddressSetMock__factory = exports.AddressLibMock__factory = exports.AddressArrayMock__factory = exports.uniErc20HelperSol = exports.safeErc20HelperSol = void 0;
|
|
3
|
+
exports.WethReceiverMock__factory = exports.WETH__factory = exports.USDCLikePermitMock__factory = exports.TokenWithBySig__factory = exports.PermitableMock__factory = exports.PermitAndCallMock__factory = exports.EthSenderMock__factory = exports.EthReceiverMock__factory = exports.ERC1271WalletMock__factory = exports.DaiLikePermitMock__factory = exports.Create3Mock__factory = exports.BytesStorageMock__factory = exports.BytesMemoryMock__factory = exports.BySigTraitsMock__factory = exports.AddressSetMock__factory = exports.AddressLibMock__factory = exports.AddressArrayMock__factory = exports.uniErc20HelperSol = exports.safeErc20HelperSol = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* Autogenerated file. Do not edit manually. */
|
|
6
6
|
/* tslint:disable */
|
|
@@ -19,6 +19,8 @@ var BytesMemoryMock__factory_1 = require("./BytesMemoryMock__factory");
|
|
|
19
19
|
Object.defineProperty(exports, "BytesMemoryMock__factory", { enumerable: true, get: function () { return BytesMemoryMock__factory_1.BytesMemoryMock__factory; } });
|
|
20
20
|
var BytesStorageMock__factory_1 = require("./BytesStorageMock__factory");
|
|
21
21
|
Object.defineProperty(exports, "BytesStorageMock__factory", { enumerable: true, get: function () { return BytesStorageMock__factory_1.BytesStorageMock__factory; } });
|
|
22
|
+
var Create3Mock__factory_1 = require("./Create3Mock__factory");
|
|
23
|
+
Object.defineProperty(exports, "Create3Mock__factory", { enumerable: true, get: function () { return Create3Mock__factory_1.Create3Mock__factory; } });
|
|
22
24
|
var DaiLikePermitMock__factory_1 = require("./DaiLikePermitMock__factory");
|
|
23
25
|
Object.defineProperty(exports, "DaiLikePermitMock__factory", { enumerable: true, get: function () { return DaiLikePermitMock__factory_1.DaiLikePermitMock__factory; } });
|
|
24
26
|
var ERC1271WalletMock__factory_1 = require("./ERC1271WalletMock__factory");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../typechain-types/factories/contracts/tests/mocks/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,oFAA4D;AAC5D,kFAA0D;AAC1D,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAClC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAClC,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../typechain-types/factories/contracts/tests/mocks/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,oFAA4D;AAC5D,kFAA0D;AAC1D,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAClC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAClC,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.contracts = exports.openzeppelin = void 0;
|
|
3
|
+
exports.contracts = exports.openzeppelin = exports._0Xsequence = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* Autogenerated file. Do not edit manually. */
|
|
6
6
|
/* tslint:disable */
|
|
7
7
|
/* eslint-disable */
|
|
8
|
+
exports._0Xsequence = tslib_1.__importStar(require("./@0xsequence"));
|
|
8
9
|
exports.openzeppelin = tslib_1.__importStar(require("./@openzeppelin"));
|
|
9
10
|
exports.contracts = tslib_1.__importStar(require("./contracts"));
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../typechain-types/factories/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,wEAAgD;AAChD,iEAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../typechain-types/factories/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,qEAA6C;AAC7C,wEAAgD;AAChD,iEAAyC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type * as _0Xsequence from "./@0xsequence";
|
|
2
|
+
export type { _0Xsequence };
|
|
1
3
|
import type * as openzeppelin from "./@openzeppelin";
|
|
2
4
|
export type { openzeppelin };
|
|
3
5
|
import type * as contracts from "./contracts";
|
|
4
6
|
export type { contracts };
|
|
5
7
|
export * as factories from "./factories";
|
|
8
|
+
export type { Create3 } from "./@0xsequence/create3/contracts/Create3";
|
|
9
|
+
export { Create3__factory } from "./factories/@0xsequence/create3/contracts/Create3__factory";
|
|
6
10
|
export type { Ownable } from "./@openzeppelin/contracts/access/Ownable";
|
|
7
11
|
export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory";
|
|
8
12
|
export type { IERC1155Errors } from "./@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors";
|
|
@@ -97,6 +101,8 @@ export type { BytesMemoryMock } from "./contracts/tests/mocks/BytesMemoryMock";
|
|
|
97
101
|
export { BytesMemoryMock__factory } from "./factories/contracts/tests/mocks/BytesMemoryMock__factory";
|
|
98
102
|
export type { BytesStorageMock } from "./contracts/tests/mocks/BytesStorageMock";
|
|
99
103
|
export { BytesStorageMock__factory } from "./factories/contracts/tests/mocks/BytesStorageMock__factory";
|
|
104
|
+
export type { Create3Mock } from "./contracts/tests/mocks/Create3Mock";
|
|
105
|
+
export { Create3Mock__factory } from "./factories/contracts/tests/mocks/Create3Mock__factory";
|
|
100
106
|
export type { DaiLikePermitMock } from "./contracts/tests/mocks/DaiLikePermitMock";
|
|
101
107
|
export { DaiLikePermitMock__factory } from "./factories/contracts/tests/mocks/DaiLikePermitMock__factory";
|
|
102
108
|
export type { ERC1271WalletMock } from "./contracts/tests/mocks/ERC1271WalletMock";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.StringUtilTest__factory = exports.RevertReasonParserTest__factory = exports.WethReceiverMock__factory = exports.WETH__factory = exports.USDCLikePermitMock__factory = exports.UniERC20Wrapper__factory = exports.IUniERC20Wrapper__factory = exports.ETHBadReceiver__factory = exports.ERC20Capitals__factory = exports.ERC20bytes32Capitals__factory = exports.ERC20bytes32__factory = exports.TokenWithBySig__factory = exports.SafeWETHWrapper__factory = exports.SafeERC20Wrapper__factory = exports.Permit2ReturnTrueMock__factory = exports.ERC20WithSafeBalance__factory = exports.ERC20ThroughZeroApprove__factory = exports.ERC20ReturnTrueMock__factory = exports.ERC20ReturnFalseMock__factory = exports.ERC20PermitNoRevertMock__factory = exports.ERC20NoReturnMock__factory = exports.PermitAndCallMock__factory = exports.PermitableMock__factory = exports.EthSenderMock__factory = exports.EthReceiverMock__factory = void 0;
|
|
3
|
+
exports.Create3Mock__factory = exports.BytesStorageMock__factory = exports.BytesMemoryMock__factory = exports.BySigTraitsMock__factory = exports.AddressSetMock__factory = exports.AddressLibMock__factory = exports.AddressArrayMock__factory = exports.ECDSATest__factory = exports.TokenMock__factory = exports.TokenCustomDecimalsMock__factory = exports.SelfdestructEthSenderMock__factory = exports.ERC20PermitMock__factory = exports.SelfdestructEthSender__factory = exports.PermitAndCall__factory = exports.OnlyWethReceiver__factory = exports.EthReceiver__factory = exports.BySig__factory = exports.UniERC20__factory = exports.SafeERC20__factory = exports.RevertReasonParser__factory = exports.BytesStorage__factory = exports.BytesMemory__factory = exports.BySigTraits__factory = exports.AddressArray__factory = exports.IWETH__factory = exports.IPermit2__factory = exports.IERC7597Permit__factory = exports.IERC20MetadataUppercase__factory = exports.IDaiLikePermit__factory = exports.ICreate3Deployer__factory = exports.Strings__factory = exports.ShortStrings__factory = exports.Nonces__factory = exports.Math__factory = exports.EIP712__factory = exports.ECDSA__factory = exports.Address__factory = exports.IERC20__factory = exports.IERC20Permit__factory = exports.IERC20Metadata__factory = exports.ERC20Permit__factory = exports.ERC20__factory = exports.IERC5267__factory = exports.IERC1271__factory = exports.IERC721Errors__factory = exports.IERC20Errors__factory = exports.IERC1155Errors__factory = exports.Ownable__factory = exports.Create3__factory = exports.factories = void 0;
|
|
4
|
+
exports.StringUtilTest__factory = exports.RevertReasonParserTest__factory = exports.WethReceiverMock__factory = exports.WETH__factory = exports.USDCLikePermitMock__factory = exports.UniERC20Wrapper__factory = exports.IUniERC20Wrapper__factory = exports.ETHBadReceiver__factory = exports.ERC20Capitals__factory = exports.ERC20bytes32Capitals__factory = exports.ERC20bytes32__factory = exports.TokenWithBySig__factory = exports.SafeWETHWrapper__factory = exports.SafeERC20Wrapper__factory = exports.Permit2ReturnTrueMock__factory = exports.ERC20WithSafeBalance__factory = exports.ERC20ThroughZeroApprove__factory = exports.ERC20ReturnTrueMock__factory = exports.ERC20ReturnFalseMock__factory = exports.ERC20PermitNoRevertMock__factory = exports.ERC20NoReturnMock__factory = exports.PermitAndCallMock__factory = exports.PermitableMock__factory = exports.EthSenderMock__factory = exports.EthReceiverMock__factory = exports.ERC1271WalletMock__factory = exports.DaiLikePermitMock__factory = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
exports.factories = tslib_1.__importStar(require("./factories"));
|
|
7
|
+
var Create3__factory_1 = require("./factories/@0xsequence/create3/contracts/Create3__factory");
|
|
8
|
+
Object.defineProperty(exports, "Create3__factory", { enumerable: true, get: function () { return Create3__factory_1.Create3__factory; } });
|
|
7
9
|
var Ownable__factory_1 = require("./factories/@openzeppelin/contracts/access/Ownable__factory");
|
|
8
10
|
Object.defineProperty(exports, "Ownable__factory", { enumerable: true, get: function () { return Ownable__factory_1.Ownable__factory; } });
|
|
9
11
|
var IERC1155Errors__factory_1 = require("./factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory");
|
|
@@ -98,6 +100,8 @@ var BytesMemoryMock__factory_1 = require("./factories/contracts/tests/mocks/Byte
|
|
|
98
100
|
Object.defineProperty(exports, "BytesMemoryMock__factory", { enumerable: true, get: function () { return BytesMemoryMock__factory_1.BytesMemoryMock__factory; } });
|
|
99
101
|
var BytesStorageMock__factory_1 = require("./factories/contracts/tests/mocks/BytesStorageMock__factory");
|
|
100
102
|
Object.defineProperty(exports, "BytesStorageMock__factory", { enumerable: true, get: function () { return BytesStorageMock__factory_1.BytesStorageMock__factory; } });
|
|
103
|
+
var Create3Mock__factory_1 = require("./factories/contracts/tests/mocks/Create3Mock__factory");
|
|
104
|
+
Object.defineProperty(exports, "Create3Mock__factory", { enumerable: true, get: function () { return Create3Mock__factory_1.Create3Mock__factory; } });
|
|
101
105
|
var DaiLikePermitMock__factory_1 = require("./factories/contracts/tests/mocks/DaiLikePermitMock__factory");
|
|
102
106
|
Object.defineProperty(exports, "DaiLikePermitMock__factory", { enumerable: true, get: function () { return DaiLikePermitMock__factory_1.DaiLikePermitMock__factory; } });
|
|
103
107
|
var ERC1271WalletMock__factory_1 = require("./factories/contracts/tests/mocks/ERC1271WalletMock__factory");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../typechain-types/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../typechain-types/index.ts"],"names":[],"mappings":";;;;;AASA,iEAAyC;AAEzC,+FAA8F;AAArF,oHAAA,gBAAgB,OAAA;AAEzB,gGAA+F;AAAtF,oHAAA,gBAAgB,OAAA;AAEzB,qIAAoI;AAA3H,kIAAA,uBAAuB,OAAA;AAEhC,iIAAgI;AAAvH,8HAAA,qBAAqB,OAAA;AAE9B,mIAAkI;AAAzH,gIAAA,sBAAsB,OAAA;AAE/B,sGAAqG;AAA5F,sHAAA,iBAAiB,OAAA;AAE1B,sGAAqG;AAA5F,sHAAA,iBAAiB,OAAA;AAE1B,iGA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AAA,wBAAwB,OAAA;AAEjC,qGAAoG;AAA3F,kIAAA,uBAAuB,OAAA;AAEhC,oHAAmH;AAA1G,8HAAA,qBAAqB,OAAA;AAE9B,oIAAmI;AAA1H,8IAAA,6BAA6B,OAAA;AAEtC,sHAAqH;AAA5G,gIAAA,sBAAsB,OAAA;AAE/B,wHAAuH;AAA9G,kIAAA,uBAAuB,OAAA;AAEhC,4HAA2H;AAAlH,sIAAA,yBAAyB,OAAA;AAElC,0HAAyH;AAAhH,oIAAA,wBAAwB,OAAA;AAEjC,6GAA4G;AAAnG,0IAAA,2BAA2B,OAAA;AAEpC,iFAAgF;AAAvE,8GAAA,aAAa,OAAA;AAEtB,yGAAwG;AAA/F,sIAAA,yBAAyB,OAAA;AAElC,+GAA8G;AAArG,kJAAA,+BAA+B,OAAA;AAExC,+FAA8F;AAArF,kIAAA,uBAAuB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1inch/solidity-utils",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"types": "dist/src/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"node-fetch": "2.7.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
+
"@0xsequence/create3": "0xsequence/create3",
|
|
57
58
|
"@nomicfoundation/hardhat-chai-matchers": "2.0.6",
|
|
58
59
|
"@typechain/ethers-v6": "0.5.1",
|
|
59
60
|
"@typechain/hardhat": "9.1.0",
|