@aztec/aztec.js 0.0.1-commit.c80b6263 → 0.0.1-commit.cd76b27

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.
Files changed (79) hide show
  1. package/dest/api/contract.d.ts +2 -2
  2. package/dest/api/contract.js +2 -2
  3. package/dest/api/deployment.d.ts +1 -2
  4. package/dest/api/deployment.d.ts.map +1 -1
  5. package/dest/api/deployment.js +0 -1
  6. package/dest/api/events.d.ts +10 -6
  7. package/dest/api/events.d.ts.map +1 -1
  8. package/dest/api/events.js +30 -20
  9. package/dest/api/fields.d.ts +2 -1
  10. package/dest/api/fields.d.ts.map +1 -1
  11. package/dest/api/fields.js +1 -0
  12. package/dest/api/keys.d.ts +1 -1
  13. package/dest/api/keys.js +1 -1
  14. package/dest/api/wallet.d.ts +3 -2
  15. package/dest/api/wallet.d.ts.map +1 -1
  16. package/dest/api/wallet.js +2 -1
  17. package/dest/contract/batch_call.d.ts +3 -3
  18. package/dest/contract/batch_call.d.ts.map +1 -1
  19. package/dest/contract/batch_call.js +8 -5
  20. package/dest/contract/contract_function_interaction.d.ts +3 -12
  21. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  22. package/dest/contract/contract_function_interaction.js +10 -7
  23. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -1
  24. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  25. package/dest/contract/protocol_contracts/auth-registry.js +32 -6
  26. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -22
  27. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  28. package/dest/contract/protocol_contracts/contract-class-registry.js +13 -658
  29. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  30. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  31. package/dest/contract/protocol_contracts/contract-instance-registry.js +76 -473
  32. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  33. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  34. package/dest/contract/protocol_contracts/fee-juice.js +0 -401
  35. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +1 -1
  36. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  37. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +23 -1
  38. package/dest/contract/protocol_contracts/public-checks.d.ts +1 -1
  39. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  40. package/dest/contract/protocol_contracts/public-checks.js +23 -9
  41. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -6
  42. package/dest/fee/private_fee_payment_method.js +10 -10
  43. package/dest/fee/public_fee_payment_method.js +10 -10
  44. package/dest/fee/sponsored_fee_payment.js +3 -3
  45. package/dest/wallet/capabilities.d.ts +444 -0
  46. package/dest/wallet/capabilities.d.ts.map +1 -0
  47. package/dest/wallet/capabilities.js +3 -0
  48. package/dest/wallet/index.d.ts +2 -1
  49. package/dest/wallet/index.d.ts.map +1 -1
  50. package/dest/wallet/index.js +1 -0
  51. package/dest/wallet/wallet.d.ts +1452 -89
  52. package/dest/wallet/wallet.d.ts.map +1 -1
  53. package/dest/wallet/wallet.js +146 -23
  54. package/package.json +19 -10
  55. package/src/api/contract.ts +2 -2
  56. package/src/api/deployment.ts +0 -1
  57. package/src/api/events.ts +35 -27
  58. package/src/api/fields.ts +1 -0
  59. package/src/api/keys.ts +2 -2
  60. package/src/api/wallet.ts +43 -1
  61. package/src/contract/batch_call.ts +7 -12
  62. package/src/contract/contract_function_interaction.ts +17 -7
  63. package/src/contract/protocol_contracts/auth-registry.ts +6 -2
  64. package/src/contract/protocol_contracts/contract-class-registry.ts +4 -338
  65. package/src/contract/protocol_contracts/contract-instance-registry.ts +33 -225
  66. package/src/contract/protocol_contracts/fee-juice.ts +0 -193
  67. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +4 -1
  68. package/src/contract/protocol_contracts/public-checks.ts +4 -3
  69. package/src/fee/fee_juice_payment_method_with_claim.ts +5 -5
  70. package/src/fee/private_fee_payment_method.ts +7 -7
  71. package/src/fee/public_fee_payment_method.ts +8 -8
  72. package/src/fee/sponsored_fee_payment.ts +3 -3
  73. package/src/wallet/capabilities.ts +491 -0
  74. package/src/wallet/index.ts +1 -0
  75. package/src/wallet/wallet.ts +201 -38
  76. package/dest/deployment/broadcast_function.d.ts +0 -24
  77. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  78. package/dest/deployment/broadcast_function.js +0 -74
  79. package/src/deployment/broadcast_function.ts +0 -148
@@ -44,7 +44,6 @@ const FeeJuiceContractArtifact: ContractArtifact = {
44
44
  errorTypes: {
45
45
  '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
46
46
  '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
47
- '2754040237334517471': { error_kind: 'fmtstring', length: 92, item_types: [] },
48
47
  '6609888949476313245': { error_kind: 'string', string: 'Message not in state' },
49
48
  '11019205087382408538': { error_kind: 'string', string: 'Field failed to decompose into specified 4 limbs' },
50
49
  '12370419938245003393': { error_kind: 'string', string: 'Field failed to decompose into specified 36 limbs' },
@@ -94,112 +93,6 @@ const FeeJuiceContractArtifact: ContractArtifact = {
94
93
  bytecode: Buffer.from([]),
95
94
  debugSymbols: '',
96
95
  },
97
- {
98
- ...{
99
- functionType: FunctionType.UTILITY,
100
- name: 'process_message',
101
- isOnlySelf: false,
102
- isStatic: false,
103
- isInitializer: false,
104
- parameters: [
105
- {
106
- name: 'message_ciphertext',
107
- type: {
108
- kind: 'struct',
109
- fields: [
110
- { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
111
- { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
112
- ],
113
- path: 'std::collections::bounded_vec::BoundedVec',
114
- },
115
- visibility: 'private',
116
- },
117
- {
118
- name: 'message_context',
119
- type: {
120
- kind: 'struct',
121
- fields: [
122
- { name: 'tx_hash', type: { kind: 'field' } },
123
- {
124
- name: 'unique_note_hashes_in_tx',
125
- type: {
126
- kind: 'struct',
127
- fields: [
128
- { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
129
- { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
130
- ],
131
- path: 'std::collections::bounded_vec::BoundedVec',
132
- },
133
- },
134
- { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
135
- {
136
- name: 'recipient',
137
- type: {
138
- kind: 'struct',
139
- fields: [{ name: 'inner', type: { kind: 'field' } }],
140
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
141
- },
142
- },
143
- ],
144
- path: 'aztec::messages::processing::message_context::MessageContext',
145
- },
146
- visibility: 'private',
147
- },
148
- ],
149
- returnTypes: [],
150
- errorTypes: {
151
- '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
152
- '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
153
- '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
154
- '2967937905572420042': {
155
- error_kind: 'fmtstring',
156
- length: 61,
157
- item_types: [{ kind: 'field' }, { kind: 'field' }],
158
- },
159
- '3330370348214585450': {
160
- error_kind: 'fmtstring',
161
- length: 48,
162
- item_types: [{ kind: 'field' }, { kind: 'field' }],
163
- },
164
- '3670003311596808700': {
165
- error_kind: 'fmtstring',
166
- length: 77,
167
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
168
- },
169
- '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
170
- '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
171
- '9791669845391776238': {
172
- error_kind: 'string',
173
- string: '0 has a square root; you cannot claim it is not square',
174
- },
175
- '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
176
- '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
177
- '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
178
- '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
179
- '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
180
- '13557316507370296400': {
181
- error_kind: 'fmtstring',
182
- length: 130,
183
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
184
- },
185
- '14938672389828944159': {
186
- error_kind: 'fmtstring',
187
- length: 146,
188
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
189
- },
190
- '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
191
- '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
192
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
193
- '17531474008201752295': {
194
- error_kind: 'fmtstring',
195
- length: 133,
196
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
197
- },
198
- },
199
- },
200
- bytecode: Buffer.from([]),
201
- debugSymbols: '',
202
- },
203
96
  {
204
97
  ...{
205
98
  functionType: FunctionType.PUBLIC,
@@ -238,77 +131,6 @@ const FeeJuiceContractArtifact: ContractArtifact = {
238
131
  bytecode: Buffer.from([]),
239
132
  debugSymbols: '',
240
133
  },
241
- {
242
- ...{
243
- functionType: FunctionType.UTILITY,
244
- name: 'sync_state',
245
- isOnlySelf: false,
246
- isStatic: false,
247
- isInitializer: false,
248
- parameters: [],
249
- returnTypes: [],
250
- errorTypes: {
251
- '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
252
- '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
253
- '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
254
- '2967937905572420042': {
255
- error_kind: 'fmtstring',
256
- length: 61,
257
- item_types: [{ kind: 'field' }, { kind: 'field' }],
258
- },
259
- '3330370348214585450': {
260
- error_kind: 'fmtstring',
261
- length: 48,
262
- item_types: [{ kind: 'field' }, { kind: 'field' }],
263
- },
264
- '3670003311596808700': {
265
- error_kind: 'fmtstring',
266
- length: 77,
267
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
268
- },
269
- '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
270
- '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
271
- '9791669845391776238': {
272
- error_kind: 'string',
273
- string: '0 has a square root; you cannot claim it is not square',
274
- },
275
- '9885968605480832328': {
276
- error_kind: 'string',
277
- string: 'Attempted to read past the length of a CapsuleArray',
278
- },
279
- '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
280
- '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
281
- '11021520179822076911': {
282
- error_kind: 'string',
283
- string: 'Attempted to delete past the length of a CapsuleArray',
284
- },
285
- '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
286
- '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
287
- '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
288
- '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
289
- '13557316507370296400': {
290
- error_kind: 'fmtstring',
291
- length: 130,
292
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
293
- },
294
- '14938672389828944159': {
295
- error_kind: 'fmtstring',
296
- length: 146,
297
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
298
- },
299
- '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
300
- '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
301
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
302
- '17531474008201752295': {
303
- error_kind: 'fmtstring',
304
- length: 133,
305
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
306
- },
307
- },
308
- },
309
- bytecode: Buffer.from([]),
310
- debugSymbols: '',
311
- },
312
134
  ],
313
135
  nonDispatchPublicFunctions: [
314
136
  {
@@ -436,22 +258,7 @@ export class FeeJuiceContract extends ContractBase {
436
258
  ) => ContractFunctionInteraction) &
437
259
  Pick<ContractMethod, 'selector'>;
438
260
 
439
- /** process_message(message_ciphertext: struct, message_context: struct) */
440
- process_message: ((
441
- message_ciphertext: FieldLike[],
442
- message_context: {
443
- tx_hash: FieldLike;
444
- unique_note_hashes_in_tx: FieldLike[];
445
- first_nullifier_in_tx: FieldLike;
446
- recipient: AztecAddressLike;
447
- },
448
- ) => ContractFunctionInteraction) &
449
- Pick<ContractMethod, 'selector'>;
450
-
451
261
  /** public_dispatch(selector: field) */
452
262
  public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
453
-
454
- /** sync_state() */
455
- sync_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
456
263
  };
457
264
  }
@@ -99,7 +99,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
99
99
  type: {
100
100
  kind: 'struct',
101
101
  fields: [
102
- { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
102
+ { name: 'storage', type: { kind: 'array', length: 15, type: { kind: 'field' } } },
103
103
  { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
104
104
  ],
105
105
  path: 'std::collections::bounded_vec::BoundedVec',
@@ -160,6 +160,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
160
160
  },
161
161
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
162
162
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
163
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
163
164
  '9791669845391776238': {
164
165
  error_kind: 'string',
165
166
  string: '0 has a square root; you cannot claim it is not square',
@@ -222,6 +223,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
222
223
  },
223
224
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
224
225
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
226
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
225
227
  '9791669845391776238': {
226
228
  error_kind: 'string',
227
229
  string: '0 has a square root; you cannot claim it is not square',
@@ -258,6 +260,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
258
260
  length: 133,
259
261
  item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
260
262
  },
263
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
261
264
  },
262
265
  },
263
266
  bytecode: Buffer.from([]),
@@ -32,7 +32,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
32
32
  type: {
33
33
  kind: 'struct',
34
34
  fields: [
35
- { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
35
+ { name: 'storage', type: { kind: 'array', length: 15, type: { kind: 'field' } } },
36
36
  { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
37
37
  ],
38
38
  path: 'std::collections::bounded_vec::BoundedVec',
@@ -93,6 +93,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
93
93
  },
94
94
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
95
95
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
96
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
96
97
  '9791669845391776238': {
97
98
  error_kind: 'string',
98
99
  string: '0 has a square root; you cannot claim it is not square',
@@ -146,10 +147,8 @@ const PublicChecksContractArtifact: ContractArtifact = {
146
147
  },
147
148
  '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
148
149
  '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
149
- '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
150
150
  '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
151
151
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
152
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
153
152
  },
154
153
  },
155
154
  bytecode: Buffer.from([]),
@@ -185,6 +184,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
185
184
  },
186
185
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
187
186
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
187
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
188
188
  '9791669845391776238': {
189
189
  error_kind: 'string',
190
190
  string: '0 has a square root; you cannot claim it is not square',
@@ -221,6 +221,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
221
221
  length: 133,
222
222
  item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
223
223
  },
224
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
224
225
  },
225
226
  },
226
227
  bytecode: Buffer.from([]),
@@ -1,6 +1,6 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
3
- import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
3
+ import { FunctionCall, FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
4
4
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import type { GasSettings } from '@aztec/stdlib/gas';
6
6
  import { ExecutionPayload } from '@aztec/stdlib/tx';
@@ -27,10 +27,11 @@ export class FeeJuicePaymentMethodWithClaim implements FeePaymentMethod {
27
27
 
28
28
  return new ExecutionPayload(
29
29
  [
30
- {
31
- to: ProtocolContractAddress.FeeJuice,
30
+ FunctionCall.from({
32
31
  name: 'claim_and_end_setup',
32
+ to: ProtocolContractAddress.FeeJuice,
33
33
  selector,
34
+ type: FunctionType.PRIVATE,
34
35
  hideMsgSender: false,
35
36
  isStatic: false,
36
37
  args: [
@@ -40,8 +41,7 @@ export class FeeJuicePaymentMethodWithClaim implements FeePaymentMethod {
40
41
  new Fr(this.claim.messageLeafIndex),
41
42
  ],
42
43
  returnTypes: [],
43
- type: FunctionType.PRIVATE,
44
- },
44
+ }),
45
45
  ],
46
46
  [],
47
47
  [],
@@ -1,5 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { type FunctionAbi, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
2
+ import { type FunctionAbi, FunctionCall, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { GasSettings } from '@aztec/stdlib/gas';
5
5
  import { ExecutionPayload } from '@aztec/stdlib/tx';
@@ -102,21 +102,21 @@ export class PrivateFeePaymentMethod implements FeePaymentMethod {
102
102
 
103
103
  const witness = await this.wallet.createAuthWit(this.sender, {
104
104
  caller: this.paymentContract,
105
- call: {
105
+ call: FunctionCall.from({
106
106
  name: 'transfer_to_public',
107
- args: [this.sender.toField(), this.paymentContract.toField(), maxFee, txNonce],
107
+ to: await this.getAsset(),
108
108
  selector: await FunctionSelector.fromSignature('transfer_to_public((Field),(Field),u128,Field)'),
109
109
  type: FunctionType.PRIVATE,
110
110
  hideMsgSender: false,
111
111
  isStatic: false,
112
- to: await this.getAsset(),
112
+ args: [this.sender.toField(), this.paymentContract.toField(), maxFee, txNonce],
113
113
  returnTypes: [],
114
- },
114
+ }),
115
115
  });
116
116
 
117
117
  return new ExecutionPayload(
118
118
  [
119
- {
119
+ FunctionCall.from({
120
120
  name: 'fee_entrypoint_private',
121
121
  to: this.paymentContract,
122
122
  selector: await FunctionSelector.fromSignature('fee_entrypoint_private(u128,Field)'),
@@ -125,7 +125,7 @@ export class PrivateFeePaymentMethod implements FeePaymentMethod {
125
125
  isStatic: false,
126
126
  args: [maxFee, txNonce],
127
127
  returnTypes: [],
128
- },
128
+ }),
129
129
  ],
130
130
  [witness],
131
131
  [],
@@ -1,5 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { type FunctionAbi, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
2
+ import { type FunctionAbi, FunctionCall, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import { GasSettings } from '@aztec/stdlib/gas';
5
5
  import { ExecutionPayload } from '@aztec/stdlib/tx';
@@ -94,16 +94,16 @@ export class PublicFeePaymentMethod implements FeePaymentMethod {
94
94
 
95
95
  const intent = {
96
96
  caller: this.paymentContract,
97
- call: {
97
+ call: FunctionCall.from({
98
98
  name: 'transfer_in_public',
99
- args: [this.sender.toField(), this.paymentContract.toField(), maxFee, txNonce],
99
+ to: await this.getAsset(),
100
100
  selector: await FunctionSelector.fromSignature('transfer_in_public((Field),(Field),u128,Field)'),
101
101
  type: FunctionType.PUBLIC,
102
- isStatic: false,
103
102
  hideMsgSender: false /** The target function performs an authwit check, so msg_sender is needed */,
104
- to: await this.getAsset(),
103
+ isStatic: false,
104
+ args: [this.sender.toField(), this.paymentContract.toField(), maxFee, txNonce],
105
105
  returnTypes: [],
106
- },
106
+ }),
107
107
  };
108
108
 
109
109
  const setPublicAuthWitInteraction = await SetPublicAuthwitContractInteraction.create(
@@ -116,7 +116,7 @@ export class PublicFeePaymentMethod implements FeePaymentMethod {
116
116
  return new ExecutionPayload(
117
117
  [
118
118
  ...(await setPublicAuthWitInteraction.request()).calls,
119
- {
119
+ FunctionCall.from({
120
120
  name: 'fee_entrypoint_public',
121
121
  to: this.paymentContract,
122
122
  selector: await FunctionSelector.fromSignature('fee_entrypoint_public(u128,Field)'),
@@ -125,7 +125,7 @@ export class PublicFeePaymentMethod implements FeePaymentMethod {
125
125
  isStatic: false,
126
126
  args: [maxFee, txNonce],
127
127
  returnTypes: [],
128
- },
128
+ }),
129
129
  ],
130
130
  [],
131
131
  [],
@@ -1,5 +1,5 @@
1
1
  import type { FeePaymentMethod } from '@aztec/aztec.js/fee';
2
- import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
2
+ import { FunctionCall, FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { GasSettings } from '@aztec/stdlib/gas';
5
5
  import { ExecutionPayload } from '@aztec/stdlib/tx';
@@ -22,7 +22,7 @@ export class SponsoredFeePaymentMethod implements FeePaymentMethod {
22
22
  async getExecutionPayload(): Promise<ExecutionPayload> {
23
23
  return new ExecutionPayload(
24
24
  [
25
- {
25
+ FunctionCall.from({
26
26
  name: 'sponsor_unconditionally',
27
27
  to: this.paymentContract,
28
28
  selector: await FunctionSelector.fromSignature('sponsor_unconditionally()'),
@@ -31,7 +31,7 @@ export class SponsoredFeePaymentMethod implements FeePaymentMethod {
31
31
  isStatic: false,
32
32
  args: [],
33
33
  returnTypes: [],
34
- },
34
+ }),
35
35
  ],
36
36
  [],
37
37
  [],