@aztec/aztec.js 3.0.0-nightly.20251118 → 3.0.0-nightly.20251120
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/dest/api/contract.d.ts +1 -1
- package/dest/api/contract.js +1 -1
- package/dest/api/tx.d.ts +1 -1
- package/dest/api/tx.d.ts.map +1 -1
- package/dest/api/tx.js +1 -1
- package/dest/api/wallet.d.ts +1 -1
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +1 -1
- package/dest/contract/batch_call.js +1 -2
- package/dest/contract/contract.d.ts +1 -1
- package/dest/contract/contract.d.ts.map +1 -1
- package/dest/contract/contract.js +4 -5
- package/dest/contract/contract_base.d.ts +5 -9
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_base.js +5 -12
- package/dest/contract/deploy_method.d.ts +5 -4
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +4 -2
- package/dest/contract/deploy_sent_tx.d.ts +11 -6
- package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
- package/dest/contract/deploy_sent_tx.js +10 -4
- package/dest/contract/unsafe_contract.js +1 -1
- package/dest/deployment/contract_deployer.d.ts.map +1 -1
- package/dest/deployment/contract_deployer.js +1 -1
- package/dest/wallet/account_manager.js +1 -1
- package/dest/wallet/base_wallet.d.ts +4 -4
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +24 -41
- package/dest/wallet/deploy_account_method.d.ts +2 -2
- package/dest/wallet/deploy_account_method.d.ts.map +1 -1
- package/dest/wallet/wallet.d.ts +57 -860
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +7 -28
- package/package.json +8 -8
- package/src/api/contract.ts +1 -1
- package/src/api/tx.ts +1 -0
- package/src/api/wallet.ts +0 -3
- package/src/contract/batch_call.ts +1 -1
- package/src/contract/contract.ts +7 -5
- package/src/contract/contract_base.ts +5 -15
- package/src/contract/deploy_method.ts +8 -7
- package/src/contract/deploy_sent_tx.ts +17 -10
- package/src/contract/unsafe_contract.ts +1 -1
- package/src/deployment/contract_deployer.ts +3 -2
- package/src/wallet/account_manager.ts +1 -1
- package/src/wallet/base_wallet.ts +26 -49
- package/src/wallet/deploy_account_method.ts +2 -1
- package/src/wallet/wallet.ts +9 -45
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,2BAA2B,EAEhC,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,MAAM,EAAqB,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,uB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;;;;;;;;;;oBAQ2C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAD,CAAC;;;;;EAyG9B,CAAC;AAE3C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAgD7C,CAAC"}
|
package/dest/wallet/wallet.js
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import { AbiTypeSchema, ContractArtifactSchema,
|
|
1
|
+
import { AbiTypeSchema, ContractArtifactSchema, FunctionType } from '@aztec/stdlib/abi';
|
|
2
2
|
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
3
3
|
import { ContractClassWithIdSchema, ContractInstanceWithAddressSchema } from '@aztec/stdlib/contract';
|
|
4
4
|
import { Gas } from '@aztec/stdlib/gas';
|
|
5
|
-
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
6
5
|
import { AbiDecodedSchema, optional, schemas } from '@aztec/stdlib/schemas';
|
|
7
6
|
import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
8
7
|
import { z } from 'zod';
|
|
9
|
-
export const ContractInstantiationDataSchema = z.object({
|
|
10
|
-
constructorArtifact: optional(z.union([
|
|
11
|
-
FunctionAbiSchema,
|
|
12
|
-
z.string()
|
|
13
|
-
])),
|
|
14
|
-
constructorArgs: optional(z.array(z.any())),
|
|
15
|
-
skipArgsDecoding: optional(z.boolean()),
|
|
16
|
-
salt: schemas.Fr,
|
|
17
|
-
publicKeys: optional(PublicKeys.schema),
|
|
18
|
-
deployer: optional(schemas.AztecAddress)
|
|
19
|
-
});
|
|
20
8
|
export const FunctionCallSchema = z.object({
|
|
21
9
|
name: z.string(),
|
|
22
10
|
to: schemas.AztecAddress,
|
|
@@ -31,7 +19,8 @@ export const ExecutionPayloadSchema = z.object({
|
|
|
31
19
|
calls: z.array(FunctionCallSchema),
|
|
32
20
|
authWitnesses: z.array(AuthWitness.schema),
|
|
33
21
|
capsules: z.array(Capsule.schema),
|
|
34
|
-
extraHashedArgs: z.array(HashedValues.schema)
|
|
22
|
+
extraHashedArgs: z.array(HashedValues.schema),
|
|
23
|
+
feePayer: optional(schemas.AztecAddress)
|
|
35
24
|
});
|
|
36
25
|
export const GasSettingsOptionSchema = z.object({
|
|
37
26
|
gasSettings: optional(z.object({
|
|
@@ -74,15 +63,6 @@ export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
|
|
|
74
63
|
]),
|
|
75
64
|
skipProofGeneration: optional(z.boolean())
|
|
76
65
|
});
|
|
77
|
-
export const InstanceDataSchema = z.union([
|
|
78
|
-
schemas.AztecAddress,
|
|
79
|
-
ContractInstanceWithAddressSchema,
|
|
80
|
-
ContractInstantiationDataSchema,
|
|
81
|
-
z.object({
|
|
82
|
-
instance: ContractInstanceWithAddressSchema,
|
|
83
|
-
artifact: ContractArtifactSchema
|
|
84
|
-
})
|
|
85
|
-
]);
|
|
86
66
|
export const MessageHashOrIntentSchema = z.union([
|
|
87
67
|
schemas.Fr,
|
|
88
68
|
z.object({
|
|
@@ -105,7 +85,7 @@ export const BatchedMethodSchema = z.union([
|
|
|
105
85
|
z.object({
|
|
106
86
|
name: z.literal('registerContract'),
|
|
107
87
|
args: z.tuple([
|
|
108
|
-
|
|
88
|
+
ContractInstanceWithAddressSchema,
|
|
109
89
|
optional(ContractArtifactSchema),
|
|
110
90
|
optional(schemas.Fr)
|
|
111
91
|
])
|
|
@@ -121,8 +101,7 @@ export const BatchedMethodSchema = z.union([
|
|
|
121
101
|
name: z.literal('simulateUtility'),
|
|
122
102
|
args: z.tuple([
|
|
123
103
|
FunctionCallSchema,
|
|
124
|
-
optional(z.array(AuthWitness.schema))
|
|
125
|
-
optional(z.array(schemas.AztecAddress))
|
|
104
|
+
optional(z.array(AuthWitness.schema))
|
|
126
105
|
])
|
|
127
106
|
}),
|
|
128
107
|
z.object({
|
|
@@ -175,9 +154,9 @@ export const WalletSchema = {
|
|
|
175
154
|
alias: z.string(),
|
|
176
155
|
item: schemas.AztecAddress
|
|
177
156
|
}))),
|
|
178
|
-
registerContract: z.function().args(
|
|
157
|
+
registerContract: z.function().args(ContractInstanceWithAddressSchema, optional(ContractArtifactSchema), optional(schemas.Fr)).returns(ContractInstanceWithAddressSchema),
|
|
179
158
|
simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
|
|
180
|
-
simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))
|
|
159
|
+
simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
|
|
181
160
|
profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
|
|
182
161
|
sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
|
|
183
162
|
createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec.js",
|
|
3
3
|
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js",
|
|
4
|
-
"version": "3.0.0-nightly.
|
|
4
|
+
"version": "3.0.0-nightly.20251120",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./abi": "./dest/api/abi.js",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
88
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
89
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
90
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
91
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
92
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
93
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
87
|
+
"@aztec/constants": "3.0.0-nightly.20251120",
|
|
88
|
+
"@aztec/entrypoints": "3.0.0-nightly.20251120",
|
|
89
|
+
"@aztec/ethereum": "3.0.0-nightly.20251120",
|
|
90
|
+
"@aztec/foundation": "3.0.0-nightly.20251120",
|
|
91
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251120",
|
|
92
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251120",
|
|
93
|
+
"@aztec/stdlib": "3.0.0-nightly.20251120",
|
|
94
94
|
"axios": "^1.12.0",
|
|
95
95
|
"tslib": "^2.4.0",
|
|
96
96
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
|
package/src/api/contract.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
17
|
* ```ts
|
|
18
|
-
* const contract =
|
|
18
|
+
* const contract = Contract.at(address, MyContractArtifact, wallet);
|
|
19
19
|
* await contract.methods.mint(1000, owner).send().wait();
|
|
20
20
|
* console.log(`Total supply is now ${await contract.methods.totalSupply().simulate()}`);
|
|
21
21
|
* ```
|
package/src/api/tx.ts
CHANGED
package/src/api/wallet.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export {
|
|
2
2
|
type Aliased,
|
|
3
|
-
type ContractInstanceAndArtifact,
|
|
4
3
|
type SimulateOptions,
|
|
5
4
|
type ProfileOptions,
|
|
6
5
|
type SendOptions,
|
|
@@ -10,7 +9,6 @@ export {
|
|
|
10
9
|
type BatchedMethodResultWrapper,
|
|
11
10
|
type BatchResults,
|
|
12
11
|
type Wallet,
|
|
13
|
-
ContractInstantiationDataSchema,
|
|
14
12
|
FunctionCallSchema,
|
|
15
13
|
ExecutionPayloadSchema,
|
|
16
14
|
GasSettingsOptionSchema,
|
|
@@ -18,7 +16,6 @@ export {
|
|
|
18
16
|
SendOptionsSchema,
|
|
19
17
|
SimulateOptionsSchema,
|
|
20
18
|
ProfileOptionsSchema,
|
|
21
|
-
InstanceDataSchema,
|
|
22
19
|
MessageHashOrIntentSchema,
|
|
23
20
|
BatchedMethodSchema,
|
|
24
21
|
ContractMetadataSchema,
|
|
@@ -80,7 +80,7 @@ export class BatchCall extends BaseContractInteraction {
|
|
|
80
80
|
for (const [call] of utility) {
|
|
81
81
|
batchRequests.push({
|
|
82
82
|
name: 'simulateUtility' as const,
|
|
83
|
-
args: [call, options?.authWitnesses
|
|
83
|
+
args: [call, options?.authWitnesses] as const,
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
|
package/src/contract/contract.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
3
4
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
4
5
|
|
|
5
6
|
import type { Wallet } from '../wallet/wallet.js';
|
|
@@ -21,9 +22,8 @@ export class Contract extends ContractBase {
|
|
|
21
22
|
* @param wallet - The wallet to use when interacting with the contract.
|
|
22
23
|
* @returns A promise that resolves to a new Contract instance.
|
|
23
24
|
*/
|
|
24
|
-
public static
|
|
25
|
-
|
|
26
|
-
return new Contract(instance, artifact, wallet);
|
|
25
|
+
public static at(address: AztecAddress, artifact: ContractArtifact, wallet: Wallet): Contract {
|
|
26
|
+
return new Contract(address, artifact, wallet);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -34,7 +34,8 @@ export class Contract extends ContractBase {
|
|
|
34
34
|
* @param constructorName - The name of the constructor function to call.
|
|
35
35
|
*/
|
|
36
36
|
public static deploy(wallet: Wallet, artifact: ContractArtifact, args: any[], constructorName?: string) {
|
|
37
|
-
const postDeployCtor = (
|
|
37
|
+
const postDeployCtor = (instance: ContractInstanceWithAddress, wallet: Wallet) =>
|
|
38
|
+
Contract.at(instance.address, artifact, wallet);
|
|
38
39
|
return new DeployMethod(PublicKeys.default(), wallet, artifact, postDeployCtor, args, constructorName);
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -54,7 +55,8 @@ export class Contract extends ContractBase {
|
|
|
54
55
|
args: any[],
|
|
55
56
|
constructorName?: string,
|
|
56
57
|
) {
|
|
57
|
-
const postDeployCtor = (
|
|
58
|
+
const postDeployCtor = (instance: ContractInstanceWithAddress, wallet: Wallet) =>
|
|
59
|
+
Contract.at(instance.address, artifact, wallet);
|
|
58
60
|
return new DeployMethod(publicKeys, wallet, artifact, postDeployCtor, args, constructorName);
|
|
59
61
|
}
|
|
60
62
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
FunctionSelector,
|
|
6
6
|
getAllFunctionAbis,
|
|
7
7
|
} from '@aztec/stdlib/abi';
|
|
8
|
-
import
|
|
8
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
9
9
|
|
|
10
10
|
import type { Wallet } from '../wallet/wallet.js';
|
|
11
11
|
import { ContractFunctionInteraction } from './contract_function_interaction.js';
|
|
@@ -38,8 +38,8 @@ export class ContractBase {
|
|
|
38
38
|
public methods: { [name: string]: ContractMethod } = {};
|
|
39
39
|
|
|
40
40
|
protected constructor(
|
|
41
|
-
/** The
|
|
42
|
-
public readonly
|
|
41
|
+
/** The contract's address. */
|
|
42
|
+
public readonly address: AztecAddress,
|
|
43
43
|
/** The Application Binary Interface for the contract. */
|
|
44
44
|
public readonly artifact: ContractArtifact,
|
|
45
45
|
/** The wallet used for interacting with this contract. */
|
|
@@ -47,7 +47,7 @@ export class ContractBase {
|
|
|
47
47
|
) {
|
|
48
48
|
getAllFunctionAbis(artifact).forEach((f: FunctionAbi) => {
|
|
49
49
|
const interactionFunction = (...args: any[]) => {
|
|
50
|
-
return new ContractFunctionInteraction(this.wallet, this.
|
|
50
|
+
return new ContractFunctionInteraction(this.wallet, this.address, f, args);
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
this.methods[f.name] = Object.assign(interactionFunction, {
|
|
@@ -62,22 +62,12 @@ export class ContractBase {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/** Address of the contract. */
|
|
66
|
-
public get address() {
|
|
67
|
-
return this.instance.address;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** Partial address of the contract. */
|
|
71
|
-
public get partialAddress() {
|
|
72
|
-
return computePartialAddress(this.instance);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
65
|
/**
|
|
76
66
|
* Creates a new instance of the contract wrapper attached to a different wallet.
|
|
77
67
|
* @param wallet - Wallet to use for sending txs.
|
|
78
68
|
* @returns A new contract instance.
|
|
79
69
|
*/
|
|
80
70
|
public withWallet(wallet: Wallet): this {
|
|
81
|
-
return new ContractBase(this.
|
|
71
|
+
return new ContractBase(this.address, this.artifact, wallet) as this;
|
|
82
72
|
}
|
|
83
73
|
}
|
|
@@ -16,7 +16,6 @@ import { publishContractClass } from '../deployment/publish_class.js';
|
|
|
16
16
|
import { publishInstance } from '../deployment/publish_instance.js';
|
|
17
17
|
import type { Wallet } from '../wallet/wallet.js';
|
|
18
18
|
import { BaseContractInteraction } from './base_contract_interaction.js';
|
|
19
|
-
import type { Contract } from './contract.js';
|
|
20
19
|
import type { ContractBase } from './contract_base.js';
|
|
21
20
|
import { ContractFunctionInteraction } from './contract_function_interaction.js';
|
|
22
21
|
import { DeploySentTx } from './deploy_sent_tx.js';
|
|
@@ -51,6 +50,8 @@ export type RequestDeployOptions = RequestInteractionOptions & {
|
|
|
51
50
|
skipInstancePublication?: boolean;
|
|
52
51
|
/** Skip contract initialization. */
|
|
53
52
|
skipInitialization?: boolean;
|
|
53
|
+
/** Skip contract registration in the wallet */
|
|
54
|
+
skipRegistration?: boolean;
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
/**
|
|
@@ -63,8 +64,6 @@ export type DeployOptions = Omit<RequestDeployOptions, 'deployer'> & {
|
|
|
63
64
|
*/
|
|
64
65
|
universalDeploy?: boolean;
|
|
65
66
|
} & Pick<SendInteractionOptions, 'from' | 'fee'>;
|
|
66
|
-
// docs:end:deploy_options
|
|
67
|
-
// TODO(@spalladino): Add unit tests for this class!
|
|
68
67
|
|
|
69
68
|
/**
|
|
70
69
|
* Options for simulating the deployment of a contract
|
|
@@ -96,7 +95,7 @@ export type SimulateDeployOptions = Omit<DeployOptions, 'fee'> & {
|
|
|
96
95
|
*
|
|
97
96
|
* Extends the BaseContractInteraction class.
|
|
98
97
|
*/
|
|
99
|
-
export class DeployMethod<TContract extends ContractBase =
|
|
98
|
+
export class DeployMethod<TContract extends ContractBase = ContractBase> extends BaseContractInteraction {
|
|
100
99
|
/** The contract instance to be deployed. */
|
|
101
100
|
private instance?: ContractInstanceWithAddress = undefined;
|
|
102
101
|
|
|
@@ -107,7 +106,7 @@ export class DeployMethod<TContract extends ContractBase = Contract> extends Bas
|
|
|
107
106
|
private publicKeys: PublicKeys,
|
|
108
107
|
wallet: Wallet,
|
|
109
108
|
protected artifact: ContractArtifact,
|
|
110
|
-
protected postDeployCtor: (
|
|
109
|
+
protected postDeployCtor: (instance: ContractInstanceWithAddress, wallet: Wallet) => TContract,
|
|
111
110
|
private args: any[] = [],
|
|
112
111
|
constructorNameOrArtifact?: string | FunctionArtifact,
|
|
113
112
|
authWitnesses: AuthWitness[] = [],
|
|
@@ -125,7 +124,9 @@ export class DeployMethod<TContract extends ContractBase = Contract> extends Bas
|
|
|
125
124
|
public async request(options?: RequestDeployOptions): Promise<ExecutionPayload> {
|
|
126
125
|
const publication = await this.getPublicationExecutionPayload(options);
|
|
127
126
|
|
|
128
|
-
|
|
127
|
+
if (!options?.skipRegistration) {
|
|
128
|
+
await this.wallet.registerContract(await this.getInstance(options), this.artifact);
|
|
129
|
+
}
|
|
129
130
|
|
|
130
131
|
const initialization = await this.getInitializationExecutionPayload(options);
|
|
131
132
|
const feeExecutionPayload = options?.fee?.paymentMethod
|
|
@@ -155,7 +156,7 @@ export class DeployMethod<TContract extends ContractBase = Contract> extends Bas
|
|
|
155
156
|
public async register(options?: RequestDeployOptions): Promise<TContract> {
|
|
156
157
|
const instance = await this.getInstance(options);
|
|
157
158
|
await this.wallet.registerContract(instance, this.artifact);
|
|
158
|
-
return this.postDeployCtor(instance
|
|
159
|
+
return this.postDeployCtor(instance, this.wallet);
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
/**
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
3
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
5
4
|
import type { TxHash, TxReceipt } from '@aztec/stdlib/tx';
|
|
6
5
|
|
|
7
6
|
import type { Wallet } from '../wallet/wallet.js';
|
|
8
|
-
import type { Contract } from './contract.js';
|
|
9
7
|
import type { ContractBase } from './contract_base.js';
|
|
10
8
|
import { SentTx, type WaitOpts } from './sent_tx.js';
|
|
11
9
|
|
|
@@ -16,27 +14,37 @@ export type DeployedWaitOpts = WaitOpts & {
|
|
|
16
14
|
};
|
|
17
15
|
|
|
18
16
|
/** Extends a transaction receipt with a contract instance that represents the newly deployed contract. */
|
|
19
|
-
export type DeployTxReceipt<TContract extends ContractBase =
|
|
17
|
+
export type DeployTxReceipt<TContract extends ContractBase = ContractBase> = FieldsOf<TxReceipt> & {
|
|
20
18
|
/** Instance of the newly deployed contract. */
|
|
21
19
|
contract: TContract;
|
|
20
|
+
/** The deployed contract instance with address and metadata. */
|
|
21
|
+
instance: ContractInstanceWithAddress;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* A contract deployment transaction sent to the network, extending SentTx with methods to publish a contract instance.
|
|
26
26
|
*/
|
|
27
|
-
export class DeploySentTx<TContract extends
|
|
27
|
+
export class DeploySentTx<TContract extends ContractBase = ContractBase> extends SentTx {
|
|
28
28
|
private log = createLogger('aztecjs:deploy_sent_tx');
|
|
29
29
|
|
|
30
30
|
constructor(
|
|
31
31
|
wallet: Wallet,
|
|
32
32
|
sendTx: () => Promise<TxHash>,
|
|
33
|
-
private postDeployCtor: (
|
|
33
|
+
private postDeployCtor: (instance: ContractInstanceWithAddress, wallet: Wallet) => TContract,
|
|
34
34
|
/** A getter for the deployed contract instance */
|
|
35
|
-
|
|
35
|
+
private instanceGetter: () => Promise<ContractInstanceWithAddress>,
|
|
36
36
|
) {
|
|
37
37
|
super(wallet, sendTx);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Returns the contract instance for this deployment.
|
|
42
|
+
* @returns The deployed contract instance with address and metadata.
|
|
43
|
+
*/
|
|
44
|
+
public async getInstance(): Promise<ContractInstanceWithAddress> {
|
|
45
|
+
return await this.instanceGetter();
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
/**
|
|
41
49
|
* Awaits for the tx to be mined and returns the contract instance. Throws if tx is not mined.
|
|
42
50
|
* @param opts - Options for configuring the waiting for the tx to be mined.
|
|
@@ -44,8 +52,7 @@ export class DeploySentTx<TContract extends Contract = Contract> extends SentTx
|
|
|
44
52
|
*/
|
|
45
53
|
public async deployed(opts?: DeployedWaitOpts): Promise<TContract> {
|
|
46
54
|
const receipt = await this.wait(opts);
|
|
47
|
-
|
|
48
|
-
this.log.info(`Contract ${instance.address.toString()} successfully deployed.`);
|
|
55
|
+
this.log.info(`Contract ${receipt.instance.address.toString()} successfully deployed.`);
|
|
49
56
|
return receipt.contract;
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -62,7 +69,7 @@ export class DeploySentTx<TContract extends Contract = Contract> extends SentTx
|
|
|
62
69
|
throw new Error(`A wallet is required for creating a contract instance`);
|
|
63
70
|
}
|
|
64
71
|
const instance = await this.instanceGetter();
|
|
65
|
-
const contract =
|
|
66
|
-
return { ...receipt, contract };
|
|
72
|
+
const contract = this.postDeployCtor(instance, contractWallet) as TContract;
|
|
73
|
+
return { ...receipt, contract, instance };
|
|
67
74
|
}
|
|
68
75
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
2
|
-
import {
|
|
2
|
+
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
3
3
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
4
4
|
|
|
5
5
|
import { Contract } from '../contract/contract.js';
|
|
@@ -28,7 +28,8 @@ export class ContractDeployer {
|
|
|
28
28
|
* @returns A DeployMethod instance configured with the ABI, PXE, and constructor arguments.
|
|
29
29
|
*/
|
|
30
30
|
public deploy(...args: any[]) {
|
|
31
|
-
const postDeployCtor = (
|
|
31
|
+
const postDeployCtor = (instance: ContractInstanceWithAddress, wallet: Wallet) =>
|
|
32
|
+
Contract.at(instance.address, this.artifact, wallet);
|
|
32
33
|
return new DeployMethod(
|
|
33
34
|
this.publicKeys ?? PublicKeys.default(),
|
|
34
35
|
this.wallet,
|
|
@@ -138,7 +138,7 @@ export class AccountManager {
|
|
|
138
138
|
this.getPublicKeys(),
|
|
139
139
|
this.wallet,
|
|
140
140
|
artifact,
|
|
141
|
-
|
|
141
|
+
instance => Contract.at(instance.address, artifact, this.wallet),
|
|
142
142
|
new Fr(this.salt),
|
|
143
143
|
constructorArgs,
|
|
144
144
|
constructorName,
|
|
@@ -20,11 +20,9 @@ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
|
20
20
|
import {
|
|
21
21
|
type ContractClassMetadata,
|
|
22
22
|
type ContractInstanceWithAddress,
|
|
23
|
-
type ContractInstantiationData,
|
|
24
23
|
type ContractMetadata,
|
|
25
24
|
computePartialAddress,
|
|
26
25
|
getContractClassFromArtifact,
|
|
27
|
-
getContractInstanceFromInstantiationParams,
|
|
28
26
|
} from '@aztec/stdlib/contract';
|
|
29
27
|
import { SimulationError } from '@aztec/stdlib/errors';
|
|
30
28
|
import { Gas, GasSettings } from '@aztec/stdlib/gas';
|
|
@@ -49,7 +47,6 @@ import type {
|
|
|
49
47
|
BatchResults,
|
|
50
48
|
BatchableMethods,
|
|
51
49
|
BatchedMethod,
|
|
52
|
-
ContractInstanceAndArtifact,
|
|
53
50
|
ProfileOptions,
|
|
54
51
|
SendOptions,
|
|
55
52
|
SimulateOptions,
|
|
@@ -226,54 +223,38 @@ export abstract class BaseWallet implements Wallet {
|
|
|
226
223
|
}
|
|
227
224
|
|
|
228
225
|
async registerContract(
|
|
229
|
-
|
|
226
|
+
instance: ContractInstanceWithAddress,
|
|
230
227
|
artifact?: ContractArtifact,
|
|
231
228
|
secretKey?: Fr,
|
|
232
229
|
): Promise<ContractInstanceWithAddress> {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
(instanceData as ContractInstanceAndArtifact).instance !== undefined &&
|
|
245
|
-
(instanceData as ContractInstanceAndArtifact).artifact !== undefined
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
let instance: ContractInstanceWithAddress;
|
|
249
|
-
if (isContractInstanceAndArtifact(instanceData)) {
|
|
250
|
-
instance = instanceData.instance;
|
|
251
|
-
await this.pxe.registerContract(instanceData);
|
|
252
|
-
} else if (isInstanceWithAddress(instanceData)) {
|
|
253
|
-
instance = instanceData;
|
|
254
|
-
await this.pxe.registerContract({ artifact, instance });
|
|
255
|
-
} else if (isContractInstantiationData(instanceData)) {
|
|
256
|
-
if (!artifact) {
|
|
257
|
-
throw new Error(`Contract artifact must be provided when registering a contract using instantiation data`);
|
|
230
|
+
const { contractInstance: existingInstance } = await this.pxe.getContractMetadata(instance.address);
|
|
231
|
+
|
|
232
|
+
if (existingInstance) {
|
|
233
|
+
// Instance already registered in the wallet
|
|
234
|
+
if (artifact) {
|
|
235
|
+
const thisContractClass = await getContractClassFromArtifact(artifact);
|
|
236
|
+
if (!thisContractClass.id.equals(existingInstance.currentContractClassId)) {
|
|
237
|
+
// wallet holds an outdated version of this contract
|
|
238
|
+
await this.pxe.updateContract(instance.address, artifact);
|
|
239
|
+
instance.currentContractClassId = thisContractClass.id;
|
|
240
|
+
}
|
|
258
241
|
}
|
|
259
|
-
|
|
260
|
-
await this.pxe.registerContract({ artifact, instance });
|
|
242
|
+
// If no artifact provided, we just use the existing registration
|
|
261
243
|
} else {
|
|
244
|
+
// Instance not registered yet
|
|
262
245
|
if (!artifact) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
if (!thisContractClass.id.equals(instance.currentContractClassId)) {
|
|
272
|
-
// wallet holds an outdated version of this contract
|
|
273
|
-
await this.pxe.updateContract(instance.address, artifact);
|
|
274
|
-
instance.currentContractClassId = thisContractClass.id;
|
|
246
|
+
// Try to get the artifact from the wallet's contract class storage
|
|
247
|
+
const classMetadata = await this.pxe.getContractClassMetadata(instance.currentContractClassId, true);
|
|
248
|
+
if (!classMetadata.artifact) {
|
|
249
|
+
throw new Error(
|
|
250
|
+
`Cannot register contract at ${instance.address.toString()}: artifact is required but not provided, and wallet does not have the artifact for contract class ${instance.currentContractClassId.toString()}`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
artifact = classMetadata.artifact;
|
|
275
254
|
}
|
|
255
|
+
await this.pxe.registerContract({ artifact, instance });
|
|
276
256
|
}
|
|
257
|
+
|
|
277
258
|
if (secretKey) {
|
|
278
259
|
await this.pxe.registerAccount(secretKey, await computePartialAddress(instance));
|
|
279
260
|
}
|
|
@@ -330,12 +311,8 @@ export abstract class BaseWallet implements Wallet {
|
|
|
330
311
|
return err;
|
|
331
312
|
}
|
|
332
313
|
|
|
333
|
-
simulateUtility(
|
|
334
|
-
call
|
|
335
|
-
authwits?: AuthWitness[],
|
|
336
|
-
scopes?: AztecAddress[],
|
|
337
|
-
): Promise<UtilitySimulationResult> {
|
|
338
|
-
return this.pxe.simulateUtility(call, authwits, scopes);
|
|
314
|
+
simulateUtility(call: FunctionCall, authwits?: AuthWitness[]): Promise<UtilitySimulationResult> {
|
|
315
|
+
return this.pxe.simulateUtility(call, authwits);
|
|
339
316
|
}
|
|
340
317
|
|
|
341
318
|
getContractClassMetadata(id: Fr, includeArtifact: boolean = false): Promise<ContractClassMetadata> {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import type { ContractArtifact, FunctionArtifact } from '@aztec/stdlib/abi';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
4
5
|
import type { PublicKeys } from '@aztec/stdlib/keys';
|
|
5
6
|
import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/stdlib/tx';
|
|
6
7
|
|
|
@@ -44,7 +45,7 @@ export class DeployAccountMethod<TContract extends ContractBase = Contract> exte
|
|
|
44
45
|
publicKeys: PublicKeys,
|
|
45
46
|
wallet: Wallet,
|
|
46
47
|
artifact: ContractArtifact,
|
|
47
|
-
postDeployCtor: (
|
|
48
|
+
postDeployCtor: (instance: ContractInstanceWithAddress, wallet: Wallet) => TContract,
|
|
48
49
|
private salt: Fr,
|
|
49
50
|
args: any[] = [],
|
|
50
51
|
constructorNameOrArtifact?: string | FunctionArtifact,
|