viem 0.0.0-main.20240324T200829 → 0.0.0-main.20240325T040621
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 +15 -0
- package/_cjs/chains/zksync/actions/deployContract.js +26 -0
- package/_cjs/chains/zksync/actions/deployContract.js.map +1 -0
- package/_cjs/chains/zksync/constants/abis.js +427 -0
- package/_cjs/chains/zksync/constants/abis.js.map +1 -0
- package/_cjs/chains/zksync/constants/address.js +5 -0
- package/_cjs/chains/zksync/constants/address.js.map +1 -0
- package/_cjs/chains/zksync/constants/contract.js +6 -0
- package/_cjs/chains/zksync/constants/contract.js.map +1 -0
- package/_cjs/chains/zksync/constants/number.js +6 -0
- package/_cjs/chains/zksync/constants/number.js.map +1 -0
- package/_cjs/chains/zksync/decorators/eip712.js +2 -0
- package/_cjs/chains/zksync/decorators/eip712.js.map +1 -1
- package/_cjs/chains/zksync/errors/bytecode.js +41 -0
- package/_cjs/chains/zksync/errors/bytecode.js.map +1 -0
- package/_cjs/chains/zksync/formatters.js +5 -1
- package/_cjs/chains/zksync/formatters.js.map +1 -1
- package/_cjs/chains/zksync/index.js +3 -1
- package/_cjs/chains/zksync/index.js.map +1 -1
- package/_cjs/chains/zksync/types/contract.js +3 -0
- package/_cjs/chains/zksync/types/contract.js.map +1 -0
- package/_cjs/chains/zksync/utils/abi/encodeDeployData.js +68 -0
- package/_cjs/chains/zksync/utils/abi/encodeDeployData.js.map +1 -0
- package/_cjs/chains/zksync/utils/getEip712Domain.js +4 -2
- package/_cjs/chains/zksync/utils/getEip712Domain.js.map +1 -1
- package/_cjs/chains/zksync/utils/hashBytecode.js +36 -0
- package/_cjs/chains/zksync/utils/hashBytecode.js.map +1 -0
- package/_cjs/errors/version.js +1 -1
- package/_esm/chains/zksync/actions/deployContract.js +52 -0
- package/_esm/chains/zksync/actions/deployContract.js.map +1 -0
- package/_esm/chains/zksync/constants/abis.js +425 -0
- package/_esm/chains/zksync/constants/abis.js.map +1 -0
- package/_esm/chains/zksync/constants/address.js +2 -0
- package/_esm/chains/zksync/constants/address.js.map +1 -0
- package/_esm/chains/zksync/constants/contract.js +3 -0
- package/_esm/chains/zksync/constants/contract.js.map +1 -0
- package/_esm/chains/zksync/constants/number.js +3 -0
- package/_esm/chains/zksync/constants/number.js.map +1 -0
- package/_esm/chains/zksync/decorators/eip712.js +2 -0
- package/_esm/chains/zksync/decorators/eip712.js.map +1 -1
- package/_esm/chains/zksync/errors/bytecode.js +35 -0
- package/_esm/chains/zksync/errors/bytecode.js.map +1 -0
- package/_esm/chains/zksync/formatters.js +5 -1
- package/_esm/chains/zksync/formatters.js.map +1 -1
- package/_esm/chains/zksync/index.js +1 -0
- package/_esm/chains/zksync/index.js.map +1 -1
- package/_esm/chains/zksync/types/contract.js +2 -0
- package/_esm/chains/zksync/types/contract.js.map +1 -0
- package/_esm/chains/zksync/utils/abi/encodeDeployData.js +65 -0
- package/_esm/chains/zksync/utils/abi/encodeDeployData.js.map +1 -0
- package/_esm/chains/zksync/utils/getEip712Domain.js +4 -2
- package/_esm/chains/zksync/utils/getEip712Domain.js.map +1 -1
- package/_esm/chains/zksync/utils/hashBytecode.js +36 -0
- package/_esm/chains/zksync/utils/hashBytecode.js.map +1 -0
- package/_esm/errors/version.js +1 -1
- package/_types/chains/zksync/actions/deployContract.d.ts +49 -0
- package/_types/chains/zksync/actions/deployContract.d.ts.map +1 -0
- package/_types/chains/zksync/constants/abis.d.ts +70 -0
- package/_types/chains/zksync/constants/abis.d.ts.map +1 -0
- package/_types/chains/zksync/constants/address.d.ts +2 -0
- package/_types/chains/zksync/constants/address.d.ts.map +1 -0
- package/_types/chains/zksync/constants/contract.d.ts +3 -0
- package/_types/chains/zksync/constants/contract.d.ts.map +1 -0
- package/_types/chains/zksync/constants/number.d.ts +2 -0
- package/_types/chains/zksync/constants/number.d.ts.map +1 -0
- package/_types/chains/zksync/decorators/eip712.d.ts +32 -0
- package/_types/chains/zksync/decorators/eip712.d.ts.map +1 -1
- package/_types/chains/zksync/errors/bytecode.d.ts +30 -0
- package/_types/chains/zksync/errors/bytecode.d.ts.map +1 -0
- package/_types/chains/zksync/formatters.d.ts.map +1 -1
- package/_types/chains/zksync/index.d.ts +1 -0
- package/_types/chains/zksync/index.d.ts.map +1 -1
- package/_types/chains/zksync/types/contract.d.ts +2 -0
- package/_types/chains/zksync/types/contract.d.ts.map +1 -0
- package/_types/chains/zksync/utils/abi/encodeDeployData.d.ts +13 -0
- package/_types/chains/zksync/utils/abi/encodeDeployData.d.ts.map +1 -0
- package/_types/chains/zksync/utils/getEip712Domain.d.ts.map +1 -1
- package/_types/chains/zksync/utils/hashBytecode.d.ts +3 -0
- package/_types/chains/zksync/utils/hashBytecode.d.ts.map +1 -0
- package/_types/errors/version.d.ts +1 -1
- package/chains/zksync/actions/deployContract.ts +100 -0
- package/chains/zksync/constants/abis.ts +424 -0
- package/chains/zksync/constants/address.ts +2 -0
- package/chains/zksync/constants/contract.ts +2 -0
- package/chains/zksync/constants/number.ts +3 -0
- package/chains/zksync/decorators/eip712.ts +47 -0
- package/chains/zksync/errors/bytecode.ts +46 -0
- package/chains/zksync/formatters.ts +7 -1
- package/chains/zksync/index.ts +6 -0
- package/chains/zksync/types/contract.ts +6 -0
- package/chains/zksync/utils/abi/encodeDeployData.ts +120 -0
- package/chains/zksync/utils/getEip712Domain.ts +4 -2
- package/chains/zksync/utils/hashBytecode.ts +48 -0
- package/errors/version.ts +1 -1
- package/package.json +1 -1
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.encodeDeployData = void 0;
|
4
|
+
const bytes_js_1 = require("../../../../constants/bytes.js");
|
5
|
+
const abi_js_1 = require("../../../../errors/abi.js");
|
6
|
+
const encodeAbiParameters_js_1 = require("../../../../utils/abi/encodeAbiParameters.js");
|
7
|
+
const encodeFunctionData_js_1 = require("../../../../utils/abi/encodeFunctionData.js");
|
8
|
+
const toHex_js_1 = require("../../../../utils/encoding/toHex.js");
|
9
|
+
const abis_js_1 = require("../../constants/abis.js");
|
10
|
+
const contract_js_1 = require("../../constants/contract.js");
|
11
|
+
const hashBytecode_js_1 = require("../hashBytecode.js");
|
12
|
+
const docsPath = '/docs/contract/encodeDeployData';
|
13
|
+
function encodeDeployData(parameters) {
|
14
|
+
const { abi, args, bytecode, deploymentType, salt } = parameters;
|
15
|
+
if (!args || args.length === 0) {
|
16
|
+
const { functionName, argsContractDeployer } = getDeploymentDetails(deploymentType, salt ?? bytes_js_1.zeroHash, (0, toHex_js_1.toHex)((0, hashBytecode_js_1.hashBytecode)(bytecode)), '0x');
|
17
|
+
return (0, encodeFunctionData_js_1.encodeFunctionData)({
|
18
|
+
abi: abis_js_1.contractDeployerAbi,
|
19
|
+
functionName,
|
20
|
+
args: argsContractDeployer,
|
21
|
+
});
|
22
|
+
}
|
23
|
+
const description = abi.find((x) => 'type' in x && x.type === 'constructor');
|
24
|
+
if (!description)
|
25
|
+
throw new abi_js_1.AbiConstructorNotFoundError({ docsPath });
|
26
|
+
if (!('inputs' in description))
|
27
|
+
throw new abi_js_1.AbiConstructorParamsNotFoundError({ docsPath });
|
28
|
+
if (!description.inputs || description.inputs.length === 0)
|
29
|
+
throw new abi_js_1.AbiConstructorParamsNotFoundError({ docsPath });
|
30
|
+
const data = (0, encodeAbiParameters_js_1.encodeAbiParameters)(description.inputs, args);
|
31
|
+
const { functionName, argsContractDeployer } = getDeploymentDetails(deploymentType, salt ?? bytes_js_1.zeroHash, (0, toHex_js_1.toHex)((0, hashBytecode_js_1.hashBytecode)(bytecode)), data);
|
32
|
+
return (0, encodeFunctionData_js_1.encodeFunctionData)({
|
33
|
+
abi: abis_js_1.contractDeployerAbi,
|
34
|
+
functionName,
|
35
|
+
args: argsContractDeployer,
|
36
|
+
});
|
37
|
+
}
|
38
|
+
exports.encodeDeployData = encodeDeployData;
|
39
|
+
function getDeploymentDetails(deploymentType, salt, bytecodeHash, data) {
|
40
|
+
const contractDeploymentArgs = [salt, bytecodeHash, data];
|
41
|
+
const deploymentOptions = {
|
42
|
+
create: {
|
43
|
+
functionName: 'create',
|
44
|
+
argsContractDeployer: contractDeploymentArgs,
|
45
|
+
},
|
46
|
+
create2: {
|
47
|
+
functionName: 'create2',
|
48
|
+
argsContractDeployer: contractDeploymentArgs,
|
49
|
+
},
|
50
|
+
createAccount: {
|
51
|
+
functionName: 'createAccount',
|
52
|
+
argsContractDeployer: [
|
53
|
+
...contractDeploymentArgs,
|
54
|
+
contract_js_1.accountAbstractionVersion1,
|
55
|
+
],
|
56
|
+
},
|
57
|
+
create2Account: {
|
58
|
+
functionName: 'create2Account',
|
59
|
+
argsContractDeployer: [
|
60
|
+
...contractDeploymentArgs,
|
61
|
+
contract_js_1.accountAbstractionVersion1,
|
62
|
+
],
|
63
|
+
},
|
64
|
+
};
|
65
|
+
const deploymentKey = deploymentType || 'create';
|
66
|
+
return deploymentOptions[deploymentKey];
|
67
|
+
}
|
68
|
+
//# sourceMappingURL=encodeDeployData.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encodeDeployData.js","sourceRoot":"","sources":["../../../../../chains/zksync/utils/abi/encodeDeployData.ts"],"names":[],"mappings":";;;AAEA,6DAAyD;AACzD,sDAGkC;AAIlC,yFAAkF;AAKlF,uFAAgF;AAChF,kEAA2D;AAC3D,qDAA6D;AAC7D,6DAAwE;AAExE,wDAAiD;AAEjD,MAAM,QAAQ,GAAG,iCAAiC,CAAA;AAiBlD,SAAgB,gBAAgB,CAC9B,UAA2C;IAE3C,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,GACjD,UAAwC,CAAA;IAE1C,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CACjE,cAAc,EACd,IA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sB,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;IAEzD,MAAM,iBAAiB,GAAG;QACxB,MAAM,EAAE;YACN,YAAY,EAAE,QAAQ;YACtB,oBAAoB,EAAE,sBAAsB;SAC7C;QACD,OAAO,EAAE;YACP,YAAY,EAAE,SAAS;YACvB,oBAAoB,EAAE,sBAAsB;SAC7C;QACD,aAAa,EAAE;YACb,YAAY,EAAE,eAAe;YAC7B,oBAAoB,EAAE;gBACpB,GAAG,sBAAsB;gBACzB,wCAA0B;aAC3B;SACF;QACD,cAAc,EAAE;YACd,YAAY,EAAE,gBAAgB;YAC9B,oBAAoB,EAAE;gBACpB,GAAG,sBAAsB;gBACzB,wCAA0B;aAC3B;SACF;KACF,CAAA;IAED,MAAM,aAAa,GAAG,cAAc,IAAI,QAAQ,CAAA;IAChD,OAAO,iBAAiB,CAAC,aAAa,CAAC,CAAA;AACzC,CAAC"}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getEip712Domain = void 0;
|
4
|
+
const toHex_js_1 = require("../../../utils/encoding/toHex.js");
|
4
5
|
const assertEip712Transaction_js_1 = require("./assertEip712Transaction.js");
|
6
|
+
const hashBytecode_js_1 = require("./hashBytecode.js");
|
5
7
|
const getEip712Domain = (transaction) => {
|
6
8
|
(0, assertEip712Transaction_js_1.assertEip712Transaction)(transaction);
|
7
9
|
const message = transactionToMessage(transaction);
|
@@ -47,8 +49,8 @@ function transactionToMessage(transaction) {
|
|
47
49
|
nonce: nonce ? BigInt(nonce) : 0n,
|
48
50
|
value: value ?? 0n,
|
49
51
|
data: data ? data : '0x0',
|
50
|
-
factoryDeps: factoryDeps ?? [],
|
51
|
-
paymasterInput: paymasterInput ? paymasterInput : '
|
52
|
+
factoryDeps: factoryDeps?.map((dep) => (0, toHex_js_1.toHex)((0, hashBytecode_js_1.hashBytecode)(dep))) ?? [],
|
53
|
+
paymasterInput: paymasterInput ? paymasterInput : '0x',
|
52
54
|
};
|
53
55
|
}
|
54
56
|
//# sourceMappingURL=getEip712Domain.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getEip712Domain.js","sourceRoot":"","sources":["../../../../chains/zksync/utils/getEip712Domain.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"getEip712Domain.js","sourceRoot":"","sources":["../../../../chains/zksync/utils/getEip712Domain.ts"],"names":[],"mappings":";;;AAAA,+DAAwD;AAOxD,6EAAsE;AACtE,uDAAgD;AAEzC,MAAM,eAAe,GAGxB,CAAC,WAAW,EAAE,EAAE;IAClB,IAAA,oDAAuB,EAAC,WAAW,CAAC,CAAA;IAEpC,MAAM,OAAO,GAAG,oBAAoB,CAClC,WAAkD,CACnD,CAAA;IAED,OAAO;QACL,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,WAAW,CAAC,OAAO;SAC7B;QACD,KAAK,EAAE;YACL,WAAW,EAAE;gBACX,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;gBACnC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;gBACjC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC/B,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;gBACrC,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,SAAS,EAAE;gBACnD,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE;gBACzC,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,SAAS,EAAE;gBACjD,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;gBACtC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;gBAClC,EAAE,IAA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AE,CAAC,IAAA,gBAAK,EAAC,IAAA,8BAAY,EAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;QACtE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI;KACvD,CAAA;AACH,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.hashBytecode = void 0;
|
4
|
+
const pad_js_1 = require("../../../utils/data/pad.js");
|
5
|
+
const toBytes_js_1 = require("../../../utils/encoding/toBytes.js");
|
6
|
+
const sha256_js_1 = require("../../../utils/hash/sha256.js");
|
7
|
+
const number_js_1 = require("../constants/number.js");
|
8
|
+
const bytecode_js_1 = require("../errors/bytecode.js");
|
9
|
+
function hashBytecode(bytecode) {
|
10
|
+
const bytecodeBytes = (0, toBytes_js_1.toBytes)(bytecode);
|
11
|
+
if (bytecodeBytes.length % 32 !== 0)
|
12
|
+
throw new bytecode_js_1.BytecodeLengthMustBeDivisibleBy32Error({
|
13
|
+
givenLength: bytecodeBytes.length,
|
14
|
+
});
|
15
|
+
if (bytecodeBytes.length > number_js_1.maxBytecodeSize)
|
16
|
+
throw new bytecode_js_1.BytecodeLengthExceedsMaxSizeError({
|
17
|
+
givenLength: bytecodeBytes.length,
|
18
|
+
maxBytecodeSize: number_js_1.maxBytecodeSize,
|
19
|
+
});
|
20
|
+
const hashStr = (0, sha256_js_1.sha256)(bytecodeBytes);
|
21
|
+
const hash = (0, toBytes_js_1.toBytes)(hashStr);
|
22
|
+
const bytecodeLengthInWords = bytecodeBytes.length / 32;
|
23
|
+
if (bytecodeLengthInWords % 2 === 0) {
|
24
|
+
throw new bytecode_js_1.BytecodeLengthInWordsMustBeOddError({
|
25
|
+
givenLengthInWords: bytecodeLengthInWords,
|
26
|
+
});
|
27
|
+
}
|
28
|
+
const bytecodeLength = (0, toBytes_js_1.toBytes)(bytecodeLengthInWords);
|
29
|
+
const bytecodeLengthPadded = (0, pad_js_1.pad)(bytecodeLength, { size: 2 });
|
30
|
+
const codeHashVersion = new Uint8Array([1, 0]);
|
31
|
+
hash.set(codeHashVersion, 0);
|
32
|
+
hash.set(bytecodeLengthPadded, 2);
|
33
|
+
return hash;
|
34
|
+
}
|
35
|
+
exports.hashBytecode = hashBytecode;
|
36
|
+
//# sourceMappingURL=hashBytecode.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"hashBytecode.js","sourceRoot":"","sources":["../../../../chains/zksync/utils/hashBytecode.ts"],"names":[],"mappings":";;;AACA,uDAAgD;AAChD,mEAA4D;AAC5D,6DAAsD;AACtD,sDAAwD;AACxD,uDAI8B;AAE9B,SAAgB,YAAY,CAAC,QAAa;IACxC,MAAM,aAAa,GAAG,IAAA,oBAAO,EAAC,QAAQ,CAAC,CAAA;IACvC,IAAI,aAAa,CAAC,MAAM,GAAG,EAAE,KAAK,CAAC;QACjC,MAAM,IAAI,oDAAsC,CAAC;YAC/C,WAAW,EAAE,aAAa,CAAC,MAAM;SAClC,CAAC,CAAA;IAEJ,IAAI,aAAa,CAAC,MAAM,GAAG,2BAAe;QACxC,MAAM,IAAI,+CAAiC,CAAC;YAC1C,WAAW,EAAE,aAAa,CAAC,MAAM;YACjC,eAAe,EAAf,2BAAe;SAChB,CAAC,CAAA;IAEJ,MAAM,OAAO,GAAG,IAAA,kBAAM,EAAC,aAAa,CAAC,CAAA;IACrC,MAAM,IAAI,GAAG,IAAA,oBAAO,EAAC,OAAO,CAAC,CAAA;IAI7B,MAAM,qBAAqB,GAAG,aAAa,CAAC,MAAM,GAAG,EAAE,CAAA;IACvD,IAAI,qBAAqB,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,iDAAmC,CAAC;YAC5C,kBAAkB,EAAE,qBAAqB;SAC1C,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,cAAc,GAAG,IAAA,oBAAO,EAAC,qBAAqB,CAAC,CAAA;IAIrD,MAAM,oBAAoB,GAAG,IAAA,YAAG,EAAC,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAA;IAE7D,MAAM,eAAe,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAC9C,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,CAAA;IAC5B,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAA;IAEjC,OAAO,IAAI,CAAA;AACb,CAAC;AApCD,oCAoCC"}
|
package/_cjs/errors/version.js
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
import { contractDeployerAddress } from '../constants/address.js';
|
2
|
+
import { encodeDeployData } from '../utils/abi/encodeDeployData.js';
|
3
|
+
import { sendEip712Transaction, } from './sendEip712Transaction.js';
|
4
|
+
/**
|
5
|
+
* Deploys a contract to the network, given bytecode and constructor arguments using EIP712 transaction.
|
6
|
+
*
|
7
|
+
* - Docs: https://viem.sh/docs/contract/deployContract
|
8
|
+
*
|
9
|
+
* @param client - Client to use
|
10
|
+
* @param parameters - {@link DeployContractParameters}
|
11
|
+
* @returns The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. {@link DeployContractReturnType}
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* import { createWalletClient, custom } from 'viem'
|
15
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
16
|
+
* import { zkSync } from 'viem/chains'
|
17
|
+
* import { deployContract } from 'viem/zksync'
|
18
|
+
*
|
19
|
+
* const client = createWalletClient({
|
20
|
+
* account: privateKeyToAccount('0x…'),
|
21
|
+
* chain: zksync,
|
22
|
+
* transport: custom(provider),
|
23
|
+
* })
|
24
|
+
* const hash = await deployContract(client, {
|
25
|
+
* abi: [],
|
26
|
+
* account: '0x…,
|
27
|
+
* deploymentType: 'create',
|
28
|
+
* bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',
|
29
|
+
* factoryDeps: ['0x608060405260405161083e38038061083e833981016040819052610...'],
|
30
|
+
* gasPerPubdata: 50000n
|
31
|
+
* })
|
32
|
+
*/
|
33
|
+
export function deployContract(walletClient, parameters) {
|
34
|
+
const { abi, args, bytecode, deploymentType, salt, ...request } = parameters;
|
35
|
+
const data = encodeDeployData({
|
36
|
+
abi,
|
37
|
+
args,
|
38
|
+
bytecode,
|
39
|
+
deploymentType,
|
40
|
+
salt,
|
41
|
+
});
|
42
|
+
// Add the bytecode to the factoryDeps if it's not already there
|
43
|
+
request.factoryDeps = request.factoryDeps || [];
|
44
|
+
if (!request.factoryDeps.includes(bytecode))
|
45
|
+
request.factoryDeps.push(bytecode);
|
46
|
+
return sendEip712Transaction(walletClient, {
|
47
|
+
...request,
|
48
|
+
data,
|
49
|
+
to: contractDeployerAddress,
|
50
|
+
});
|
51
|
+
}
|
52
|
+
//# sourceMappingURL=deployContract.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deployContract.js","sourceRoot":"","sources":["../../../../chains/zksync/actions/deployContract.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAGjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAIL,qBAAqB,GACtB,MAAM,4BAA4B,CAAA;AAkBnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,cAAc,CAM5B,YAA+C,EAC/C,UAAwE;IAExE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAC7D,UAAsC,CAAA;IAExC,MAAM,IAAI,GAAG,gBAAgB,CAAC;QAC5B,GAAG;QACH,IAAI;QACJ,QAAQ;QACR,cAAc;QACd,IAAI;KACL,CAAC,CAAA;IAEF,gEAAgE;IAChE,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,CAAA;IAC/C,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACzC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAEpC,OAAO,qBAAqB,CAAC,YAAY,EAAE;QACzC,GAAG,OAAO;QACV,IAAI;QACJ,EAAE,EAAE,uBAAuB;KAK5B,CAAC,CAAA;AACJ,CAAC"}
|
@@ -0,0 +1,425 @@
|
|
1
|
+
/* [ContractDeployer](https://github.com/matter-labs/era-system-contracts/blob/main/contracts/ContractDeployer.sol) */
|
2
|
+
export const contractDeployerAbi = [
|
3
|
+
{
|
4
|
+
anonymous: false,
|
5
|
+
inputs: [
|
6
|
+
{
|
7
|
+
indexed: true,
|
8
|
+
internalType: 'address',
|
9
|
+
name: 'accountAddress',
|
10
|
+
type: 'address',
|
11
|
+
},
|
12
|
+
{
|
13
|
+
indexed: false,
|
14
|
+
internalType: 'enum IContractDeployer.AccountNonceOrdering',
|
15
|
+
name: 'nonceOrdering',
|
16
|
+
type: 'uint8',
|
17
|
+
},
|
18
|
+
],
|
19
|
+
name: 'AccountNonceOrderingUpdated',
|
20
|
+
type: 'event',
|
21
|
+
},
|
22
|
+
{
|
23
|
+
anonymous: false,
|
24
|
+
inputs: [
|
25
|
+
{
|
26
|
+
indexed: true,
|
27
|
+
internalType: 'address',
|
28
|
+
name: 'accountAddress',
|
29
|
+
type: 'address',
|
30
|
+
},
|
31
|
+
{
|
32
|
+
indexed: false,
|
33
|
+
internalType: 'enum IContractDeployer.AccountAbstractionVersion',
|
34
|
+
name: 'aaVersion',
|
35
|
+
type: 'uint8',
|
36
|
+
},
|
37
|
+
],
|
38
|
+
name: 'AccountVersionUpdated',
|
39
|
+
type: 'event',
|
40
|
+
},
|
41
|
+
{
|
42
|
+
anonymous: false,
|
43
|
+
inputs: [
|
44
|
+
{
|
45
|
+
indexed: true,
|
46
|
+
internalType: 'address',
|
47
|
+
name: 'deployerAddress',
|
48
|
+
type: 'address',
|
49
|
+
},
|
50
|
+
{
|
51
|
+
indexed: true,
|
52
|
+
internalType: 'bytes32',
|
53
|
+
name: 'bytecodeHash',
|
54
|
+
type: 'bytes32',
|
55
|
+
},
|
56
|
+
{
|
57
|
+
indexed: true,
|
58
|
+
internalType: 'address',
|
59
|
+
name: 'contractAddress',
|
60
|
+
type: 'address',
|
61
|
+
},
|
62
|
+
],
|
63
|
+
name: 'ContractDeployed',
|
64
|
+
type: 'event',
|
65
|
+
},
|
66
|
+
{
|
67
|
+
inputs: [
|
68
|
+
{
|
69
|
+
internalType: 'bytes32',
|
70
|
+
name: '_salt',
|
71
|
+
type: 'bytes32',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
internalType: 'bytes32',
|
75
|
+
name: '_bytecodeHash',
|
76
|
+
type: 'bytes32',
|
77
|
+
},
|
78
|
+
{
|
79
|
+
internalType: 'bytes',
|
80
|
+
name: '_input',
|
81
|
+
type: 'bytes',
|
82
|
+
},
|
83
|
+
],
|
84
|
+
name: 'create',
|
85
|
+
outputs: [
|
86
|
+
{
|
87
|
+
internalType: 'address',
|
88
|
+
name: '',
|
89
|
+
type: 'address',
|
90
|
+
},
|
91
|
+
],
|
92
|
+
stateMutability: 'payable',
|
93
|
+
type: 'function',
|
94
|
+
},
|
95
|
+
{
|
96
|
+
inputs: [
|
97
|
+
{
|
98
|
+
internalType: 'bytes32',
|
99
|
+
name: '_salt',
|
100
|
+
type: 'bytes32',
|
101
|
+
},
|
102
|
+
{
|
103
|
+
internalType: 'bytes32',
|
104
|
+
name: '_bytecodeHash',
|
105
|
+
type: 'bytes32',
|
106
|
+
},
|
107
|
+
{
|
108
|
+
internalType: 'bytes',
|
109
|
+
name: '_input',
|
110
|
+
type: 'bytes',
|
111
|
+
},
|
112
|
+
],
|
113
|
+
name: 'create2',
|
114
|
+
outputs: [
|
115
|
+
{
|
116
|
+
internalType: 'address',
|
117
|
+
name: '',
|
118
|
+
type: 'address',
|
119
|
+
},
|
120
|
+
],
|
121
|
+
stateMutability: 'payable',
|
122
|
+
type: 'function',
|
123
|
+
},
|
124
|
+
{
|
125
|
+
inputs: [
|
126
|
+
{
|
127
|
+
internalType: 'bytes32',
|
128
|
+
name: '_salt',
|
129
|
+
type: 'bytes32',
|
130
|
+
},
|
131
|
+
{
|
132
|
+
internalType: 'bytes32',
|
133
|
+
name: '_bytecodeHash',
|
134
|
+
type: 'bytes32',
|
135
|
+
},
|
136
|
+
{
|
137
|
+
internalType: 'bytes',
|
138
|
+
name: '_input',
|
139
|
+
type: 'bytes',
|
140
|
+
},
|
141
|
+
{
|
142
|
+
internalType: 'enum IContractDeployer.AccountAbstractionVersion',
|
143
|
+
name: '_aaVersion',
|
144
|
+
type: 'uint8',
|
145
|
+
},
|
146
|
+
],
|
147
|
+
name: 'create2Account',
|
148
|
+
outputs: [
|
149
|
+
{
|
150
|
+
internalType: 'address',
|
151
|
+
name: '',
|
152
|
+
type: 'address',
|
153
|
+
},
|
154
|
+
],
|
155
|
+
stateMutability: 'payable',
|
156
|
+
type: 'function',
|
157
|
+
},
|
158
|
+
{
|
159
|
+
inputs: [
|
160
|
+
{
|
161
|
+
internalType: 'bytes32',
|
162
|
+
name: '',
|
163
|
+
type: 'bytes32',
|
164
|
+
},
|
165
|
+
{
|
166
|
+
internalType: 'bytes32',
|
167
|
+
name: '_bytecodeHash',
|
168
|
+
type: 'bytes32',
|
169
|
+
},
|
170
|
+
{
|
171
|
+
internalType: 'bytes',
|
172
|
+
name: '_input',
|
173
|
+
type: 'bytes',
|
174
|
+
},
|
175
|
+
{
|
176
|
+
internalType: 'enum IContractDeployer.AccountAbstractionVersion',
|
177
|
+
name: '_aaVersion',
|
178
|
+
type: 'uint8',
|
179
|
+
},
|
180
|
+
],
|
181
|
+
name: 'createAccount',
|
182
|
+
outputs: [
|
183
|
+
{
|
184
|
+
internalType: 'address',
|
185
|
+
name: '',
|
186
|
+
type: 'address',
|
187
|
+
},
|
188
|
+
],
|
189
|
+
stateMutability: 'payable',
|
190
|
+
type: 'function',
|
191
|
+
},
|
192
|
+
{
|
193
|
+
inputs: [
|
194
|
+
{
|
195
|
+
internalType: 'address',
|
196
|
+
name: '_address',
|
197
|
+
type: 'address',
|
198
|
+
},
|
199
|
+
],
|
200
|
+
name: 'extendedAccountVersion',
|
201
|
+
outputs: [
|
202
|
+
{
|
203
|
+
internalType: 'enum IContractDeployer.AccountAbstractionVersion',
|
204
|
+
name: '',
|
205
|
+
type: 'uint8',
|
206
|
+
},
|
207
|
+
],
|
208
|
+
stateMutability: 'view',
|
209
|
+
type: 'function',
|
210
|
+
},
|
211
|
+
{
|
212
|
+
inputs: [
|
213
|
+
{
|
214
|
+
internalType: 'bytes32',
|
215
|
+
name: '_keccak256BytecodeHash',
|
216
|
+
type: 'bytes32',
|
217
|
+
},
|
218
|
+
],
|
219
|
+
name: 'forceDeployKeccak256',
|
220
|
+
outputs: [],
|
221
|
+
stateMutability: 'payable',
|
222
|
+
type: 'function',
|
223
|
+
},
|
224
|
+
{
|
225
|
+
inputs: [
|
226
|
+
{
|
227
|
+
components: [
|
228
|
+
{
|
229
|
+
internalType: 'bytes32',
|
230
|
+
name: 'bytecodeHash',
|
231
|
+
type: 'bytes32',
|
232
|
+
},
|
233
|
+
{
|
234
|
+
internalType: 'address',
|
235
|
+
name: 'newAddress',
|
236
|
+
type: 'address',
|
237
|
+
},
|
238
|
+
{
|
239
|
+
internalType: 'bool',
|
240
|
+
name: 'callConstructor',
|
241
|
+
type: 'bool',
|
242
|
+
},
|
243
|
+
{
|
244
|
+
internalType: 'uint256',
|
245
|
+
name: 'value',
|
246
|
+
type: 'uint256',
|
247
|
+
},
|
248
|
+
{
|
249
|
+
internalType: 'bytes',
|
250
|
+
name: 'input',
|
251
|
+
type: 'bytes',
|
252
|
+
},
|
253
|
+
],
|
254
|
+
internalType: 'struct ContractDeployer.ForceDeployment',
|
255
|
+
name: '_deployment',
|
256
|
+
type: 'tuple',
|
257
|
+
},
|
258
|
+
{
|
259
|
+
internalType: 'address',
|
260
|
+
name: '_sender',
|
261
|
+
type: 'address',
|
262
|
+
},
|
263
|
+
],
|
264
|
+
name: 'forceDeployOnAddress',
|
265
|
+
outputs: [],
|
266
|
+
stateMutability: 'payable',
|
267
|
+
type: 'function',
|
268
|
+
},
|
269
|
+
{
|
270
|
+
inputs: [
|
271
|
+
{
|
272
|
+
components: [
|
273
|
+
{
|
274
|
+
internalType: 'bytes32',
|
275
|
+
name: 'bytecodeHash',
|
276
|
+
type: 'bytes32',
|
277
|
+
},
|
278
|
+
{
|
279
|
+
internalType: 'address',
|
280
|
+
name: 'newAddress',
|
281
|
+
type: 'address',
|
282
|
+
},
|
283
|
+
{
|
284
|
+
internalType: 'bool',
|
285
|
+
name: 'callConstructor',
|
286
|
+
type: 'bool',
|
287
|
+
},
|
288
|
+
{
|
289
|
+
internalType: 'uint256',
|
290
|
+
name: 'value',
|
291
|
+
type: 'uint256',
|
292
|
+
},
|
293
|
+
{
|
294
|
+
internalType: 'bytes',
|
295
|
+
name: 'input',
|
296
|
+
type: 'bytes',
|
297
|
+
},
|
298
|
+
],
|
299
|
+
internalType: 'struct ContractDeployer.ForceDeployment[]',
|
300
|
+
name: '_deployments',
|
301
|
+
type: 'tuple[]',
|
302
|
+
},
|
303
|
+
],
|
304
|
+
name: 'forceDeployOnAddresses',
|
305
|
+
outputs: [],
|
306
|
+
stateMutability: 'payable',
|
307
|
+
type: 'function',
|
308
|
+
},
|
309
|
+
{
|
310
|
+
inputs: [
|
311
|
+
{
|
312
|
+
internalType: 'address',
|
313
|
+
name: '_address',
|
314
|
+
type: 'address',
|
315
|
+
},
|
316
|
+
],
|
317
|
+
name: 'getAccountInfo',
|
318
|
+
outputs: [
|
319
|
+
{
|
320
|
+
components: [
|
321
|
+
{
|
322
|
+
internalType: 'enum IContractDeployer.AccountAbstractionVersion',
|
323
|
+
name: 'supportedAAVersion',
|
324
|
+
type: 'uint8',
|
325
|
+
},
|
326
|
+
{
|
327
|
+
internalType: 'enum IContractDeployer.AccountNonceOrdering',
|
328
|
+
name: 'nonceOrdering',
|
329
|
+
type: 'uint8',
|
330
|
+
},
|
331
|
+
],
|
332
|
+
internalType: 'struct IContractDeployer.AccountInfo',
|
333
|
+
name: 'info',
|
334
|
+
type: 'tuple',
|
335
|
+
},
|
336
|
+
],
|
337
|
+
stateMutability: 'view',
|
338
|
+
type: 'function',
|
339
|
+
},
|
340
|
+
{
|
341
|
+
inputs: [
|
342
|
+
{
|
343
|
+
internalType: 'address',
|
344
|
+
name: '_sender',
|
345
|
+
type: 'address',
|
346
|
+
},
|
347
|
+
{
|
348
|
+
internalType: 'uint256',
|
349
|
+
name: '_senderNonce',
|
350
|
+
type: 'uint256',
|
351
|
+
},
|
352
|
+
],
|
353
|
+
name: 'getNewAddressCreate',
|
354
|
+
outputs: [
|
355
|
+
{
|
356
|
+
internalType: 'address',
|
357
|
+
name: 'newAddress',
|
358
|
+
type: 'address',
|
359
|
+
},
|
360
|
+
],
|
361
|
+
stateMutability: 'pure',
|
362
|
+
type: 'function',
|
363
|
+
},
|
364
|
+
{
|
365
|
+
inputs: [
|
366
|
+
{
|
367
|
+
internalType: 'address',
|
368
|
+
name: '_sender',
|
369
|
+
type: 'address',
|
370
|
+
},
|
371
|
+
{
|
372
|
+
internalType: 'bytes32',
|
373
|
+
name: '_bytecodeHash',
|
374
|
+
type: 'bytes32',
|
375
|
+
},
|
376
|
+
{
|
377
|
+
internalType: 'bytes32',
|
378
|
+
name: '_salt',
|
379
|
+
type: 'bytes32',
|
380
|
+
},
|
381
|
+
{
|
382
|
+
internalType: 'bytes',
|
383
|
+
name: '_input',
|
384
|
+
type: 'bytes',
|
385
|
+
},
|
386
|
+
],
|
387
|
+
name: 'getNewAddressCreate2',
|
388
|
+
outputs: [
|
389
|
+
{
|
390
|
+
internalType: 'address',
|
391
|
+
name: 'newAddress',
|
392
|
+
type: 'address',
|
393
|
+
},
|
394
|
+
],
|
395
|
+
stateMutability: 'view',
|
396
|
+
type: 'function',
|
397
|
+
},
|
398
|
+
{
|
399
|
+
inputs: [
|
400
|
+
{
|
401
|
+
internalType: 'enum IContractDeployer.AccountAbstractionVersion',
|
402
|
+
name: '_version',
|
403
|
+
type: 'uint8',
|
404
|
+
},
|
405
|
+
],
|
406
|
+
name: 'updateAccountVersion',
|
407
|
+
outputs: [],
|
408
|
+
stateMutability: 'nonpayable',
|
409
|
+
type: 'function',
|
410
|
+
},
|
411
|
+
{
|
412
|
+
inputs: [
|
413
|
+
{
|
414
|
+
internalType: 'enum IContractDeployer.AccountNonceOrdering',
|
415
|
+
name: '_nonceOrdering',
|
416
|
+
type: 'uint8',
|
417
|
+
},
|
418
|
+
],
|
419
|
+
name: 'updateNonceOrdering',
|
420
|
+
outputs: [],
|
421
|
+
stateMutability: 'nonpayable',
|
422
|
+
type: 'function',
|
423
|
+
},
|
424
|
+
];
|
425
|
+
//# sourceMappingURL=abis.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../../../../chains/zksync/constants/abis.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;QACE,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE;YACN;gBACE,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,OAAO,EAAE,KAAK;gBACd,YAAY,EAAE,6CAA6C;gBAC3D,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,OAAO;aACd;SACF;QACD,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,OAAO;KACd;IACD;QACE,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE;YACN;gBACE,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,OAAO,EAAE,KAAK;gBACd,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O,EAAE,EAAE;QACX,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN;gBACE,YAAY,EAAE,6CAA6C;gBAC3D,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,OAAO;aACd;SACF;QACD,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../../chains/zksync/constants/address.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAClC,4CAAqD,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../../chains/zksync/constants/contract.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAA"}
|