@layr-labs/ecloud-sdk 1.0.0-dev.6 → 1.0.0-dev.8

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/browser.cjs CHANGED
@@ -173,6 +173,7 @@ __export(browser_exports, {
173
173
  BillingApiClient: () => BillingApiClient,
174
174
  BillingSessionError: () => BillingSessionError,
175
175
  BuildApiClient: () => BuildApiClient,
176
+ EMPTY_CONTAINER_POLICY: () => EMPTY_CONTAINER_POLICY,
176
177
  SessionError: () => SessionError,
177
178
  UserApiClient: () => UserApiClient,
178
179
  addHexPrefix: () => addHexPrefix,
@@ -257,6 +258,13 @@ __export(browser_exports, {
257
258
  module.exports = __toCommonJS(browser_exports);
258
259
 
259
260
  // src/client/common/types/index.ts
261
+ var EMPTY_CONTAINER_POLICY = {
262
+ args: [],
263
+ cmdOverride: [],
264
+ env: [],
265
+ envOverride: [],
266
+ restartPolicy: ""
267
+ };
260
268
  var noopLogger = {
261
269
  debug: () => {
262
270
  },
@@ -295,6 +303,8 @@ var ENVIRONMENTS = {
295
303
  name: "sepolia",
296
304
  build: "dev",
297
305
  appControllerAddress: "0xa86DC1C47cb2518327fB4f9A1627F51966c83B92",
306
+ releaseAbiVersion: "v1.5",
307
+ // AppController upgraded to v1.5.x (containerPolicy)
298
308
  permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
299
309
  erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
300
310
  kmsServerURL: "http://10.128.0.57:8080",
@@ -308,6 +318,8 @@ var ENVIRONMENTS = {
308
318
  name: "sepolia",
309
319
  build: "prod",
310
320
  appControllerAddress: "0x0dd810a6ffba6a9820a10d97b659f07d8d23d4E2",
321
+ releaseAbiVersion: "v1.4",
322
+ // prod still on AppController v1.4.0 (3-field Release)
311
323
  permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
312
324
  erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
313
325
  kmsServerURL: "http://10.128.15.203:8080",
@@ -322,6 +334,8 @@ var ENVIRONMENTS = {
322
334
  name: "mainnet-alpha",
323
335
  build: "prod",
324
336
  appControllerAddress: "0xc38d35Fc995e75342A21CBd6D770305b142Fbe67",
337
+ releaseAbiVersion: "v1.4",
338
+ // prod still on AppController v1.4.0 (3-field Release)
325
339
  permissionControllerAddress: ChainAddresses[MAINNET_CHAIN_ID].PermissionController,
326
340
  erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
327
341
  kmsServerURL: "http://10.128.0.2:8080",
@@ -696,6 +710,7 @@ var import_axios = __toESM(require("axios"), 1);
696
710
  var MAX_RETRIES = 5;
697
711
  var INITIAL_BACKOFF_MS = 1e3;
698
712
  var MAX_BACKOFF_MS = 3e4;
713
+ var RETRYABLE_STATUSES = /* @__PURE__ */ new Set([429, 502, 503, 504]);
699
714
  function sleep(ms) {
700
715
  return new Promise((resolve) => setTimeout(resolve, ms));
701
716
  }
@@ -715,7 +730,7 @@ async function requestWithRetry(config) {
715
730
  for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
716
731
  const res = await (0, import_axios.default)({ ...config, validateStatus: () => true });
717
732
  lastResponse = res;
718
- if (res.status !== 429) {
733
+ if (!RETRYABLE_STATUSES.has(res.status)) {
719
734
  return res;
720
735
  }
721
736
  if (attempt < MAX_RETRIES) {
@@ -744,7 +759,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
744
759
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
745
760
  var CanUpdateAppProfilePermission = "0x036fef61";
746
761
  function getDefaultClientId() {
747
- const version = true ? "1.0.0-dev.6" : "0.0.0";
762
+ const version = true ? "1.0.0-dev.8" : "0.0.0";
748
763
  return `ecloud-sdk/v${version}`;
749
764
  }
750
765
  var UserApiClient = class {
@@ -3066,6 +3081,19 @@ var AppController_default = [
3066
3081
  ],
3067
3082
  stateMutability: "view"
3068
3083
  },
3084
+ {
3085
+ type: "function",
3086
+ name: "confirmUpgrade",
3087
+ inputs: [
3088
+ {
3089
+ name: "app",
3090
+ type: "address",
3091
+ internalType: "contractIApp"
3092
+ }
3093
+ ],
3094
+ outputs: [],
3095
+ stateMutability: "nonpayable"
3096
+ },
3069
3097
  {
3070
3098
  type: "function",
3071
3099
  name: "createApp",
@@ -3118,6 +3146,62 @@ var AppController_default = [
3118
3146
  name: "encryptedEnv",
3119
3147
  type: "bytes",
3120
3148
  internalType: "bytes"
3149
+ },
3150
+ {
3151
+ name: "containerPolicy",
3152
+ type: "tuple",
3153
+ internalType: "structIAppController.ContainerPolicy",
3154
+ components: [
3155
+ {
3156
+ name: "args",
3157
+ type: "string[]",
3158
+ internalType: "string[]"
3159
+ },
3160
+ {
3161
+ name: "cmdOverride",
3162
+ type: "string[]",
3163
+ internalType: "string[]"
3164
+ },
3165
+ {
3166
+ name: "env",
3167
+ type: "tuple[]",
3168
+ internalType: "structIAppController.EnvVar[]",
3169
+ components: [
3170
+ {
3171
+ name: "key",
3172
+ type: "string",
3173
+ internalType: "string"
3174
+ },
3175
+ {
3176
+ name: "value",
3177
+ type: "string",
3178
+ internalType: "string"
3179
+ }
3180
+ ]
3181
+ },
3182
+ {
3183
+ name: "envOverride",
3184
+ type: "tuple[]",
3185
+ internalType: "structIAppController.EnvVar[]",
3186
+ components: [
3187
+ {
3188
+ name: "key",
3189
+ type: "string",
3190
+ internalType: "string"
3191
+ },
3192
+ {
3193
+ name: "value",
3194
+ type: "string",
3195
+ internalType: "string"
3196
+ }
3197
+ ]
3198
+ },
3199
+ {
3200
+ name: "restartPolicy",
3201
+ type: "string",
3202
+ internalType: "string"
3203
+ }
3204
+ ]
3121
3205
  }
3122
3206
  ]
3123
3207
  }
@@ -3183,6 +3267,62 @@ var AppController_default = [
3183
3267
  name: "encryptedEnv",
3184
3268
  type: "bytes",
3185
3269
  internalType: "bytes"
3270
+ },
3271
+ {
3272
+ name: "containerPolicy",
3273
+ type: "tuple",
3274
+ internalType: "structIAppController.ContainerPolicy",
3275
+ components: [
3276
+ {
3277
+ name: "args",
3278
+ type: "string[]",
3279
+ internalType: "string[]"
3280
+ },
3281
+ {
3282
+ name: "cmdOverride",
3283
+ type: "string[]",
3284
+ internalType: "string[]"
3285
+ },
3286
+ {
3287
+ name: "env",
3288
+ type: "tuple[]",
3289
+ internalType: "structIAppController.EnvVar[]",
3290
+ components: [
3291
+ {
3292
+ name: "key",
3293
+ type: "string",
3294
+ internalType: "string"
3295
+ },
3296
+ {
3297
+ name: "value",
3298
+ type: "string",
3299
+ internalType: "string"
3300
+ }
3301
+ ]
3302
+ },
3303
+ {
3304
+ name: "envOverride",
3305
+ type: "tuple[]",
3306
+ internalType: "structIAppController.EnvVar[]",
3307
+ components: [
3308
+ {
3309
+ name: "key",
3310
+ type: "string",
3311
+ internalType: "string"
3312
+ },
3313
+ {
3314
+ name: "value",
3315
+ type: "string",
3316
+ internalType: "string"
3317
+ }
3318
+ ]
3319
+ },
3320
+ {
3321
+ name: "restartPolicy",
3322
+ type: "string",
3323
+ internalType: "string"
3324
+ }
3325
+ ]
3186
3326
  }
3187
3327
  ]
3188
3328
  }
@@ -3196,6 +3336,44 @@ var AppController_default = [
3196
3336
  ],
3197
3337
  stateMutability: "nonpayable"
3198
3338
  },
3339
+ {
3340
+ type: "function",
3341
+ name: "createEmptyApp",
3342
+ inputs: [
3343
+ {
3344
+ name: "salt",
3345
+ type: "bytes32",
3346
+ internalType: "bytes32"
3347
+ }
3348
+ ],
3349
+ outputs: [
3350
+ {
3351
+ name: "app",
3352
+ type: "address",
3353
+ internalType: "contractIApp"
3354
+ }
3355
+ ],
3356
+ stateMutability: "nonpayable"
3357
+ },
3358
+ {
3359
+ type: "function",
3360
+ name: "createEmptyAppWithIsolatedBilling",
3361
+ inputs: [
3362
+ {
3363
+ name: "salt",
3364
+ type: "bytes32",
3365
+ internalType: "bytes32"
3366
+ }
3367
+ ],
3368
+ outputs: [
3369
+ {
3370
+ name: "app",
3371
+ type: "address",
3372
+ internalType: "contractIApp"
3373
+ }
3374
+ ],
3375
+ stateMutability: "nonpayable"
3376
+ },
3199
3377
  {
3200
3378
  type: "function",
3201
3379
  name: "domainSeparator",
@@ -3230,26 +3408,26 @@ var AppController_default = [
3230
3408
  },
3231
3409
  {
3232
3410
  type: "function",
3233
- name: "getBillingType",
3411
+ name: "getAppCreator",
3234
3412
  inputs: [
3235
3413
  {
3236
3414
  name: "app",
3237
3415
  type: "address",
3238
- internalType: "address"
3416
+ internalType: "contractIApp"
3239
3417
  }
3240
3418
  ],
3241
3419
  outputs: [
3242
3420
  {
3243
3421
  name: "",
3244
- type: "uint8",
3245
- internalType: "uint8"
3422
+ type: "address",
3423
+ internalType: "address"
3246
3424
  }
3247
3425
  ],
3248
3426
  stateMutability: "view"
3249
3427
  },
3250
3428
  {
3251
3429
  type: "function",
3252
- name: "getAppCreator",
3430
+ name: "getAppLatestReleaseBlockNumber",
3253
3431
  inputs: [
3254
3432
  {
3255
3433
  name: "app",
@@ -3260,15 +3438,15 @@ var AppController_default = [
3260
3438
  outputs: [
3261
3439
  {
3262
3440
  name: "",
3263
- type: "address",
3264
- internalType: "address"
3441
+ type: "uint32",
3442
+ internalType: "uint32"
3265
3443
  }
3266
3444
  ],
3267
3445
  stateMutability: "view"
3268
3446
  },
3269
3447
  {
3270
3448
  type: "function",
3271
- name: "getAppLatestReleaseBlockNumber",
3449
+ name: "getAppOperatorSetId",
3272
3450
  inputs: [
3273
3451
  {
3274
3452
  name: "app",
@@ -3287,7 +3465,7 @@ var AppController_default = [
3287
3465
  },
3288
3466
  {
3289
3467
  type: "function",
3290
- name: "getAppOperatorSetId",
3468
+ name: "getAppPendingReleaseBlockNumber",
3291
3469
  inputs: [
3292
3470
  {
3293
3471
  name: "app",
@@ -3364,6 +3542,11 @@ var AppController_default = [
3364
3542
  type: "uint32",
3365
3543
  internalType: "uint32"
3366
3544
  },
3545
+ {
3546
+ name: "pendingReleaseBlockNumber",
3547
+ type: "uint32",
3548
+ internalType: "uint32"
3549
+ },
3367
3550
  {
3368
3551
  name: "status",
3369
3552
  type: "uint8",
@@ -3420,6 +3603,11 @@ var AppController_default = [
3420
3603
  type: "uint32",
3421
3604
  internalType: "uint32"
3422
3605
  },
3606
+ {
3607
+ name: "pendingReleaseBlockNumber",
3608
+ type: "uint32",
3609
+ internalType: "uint32"
3610
+ },
3423
3611
  {
3424
3612
  name: "status",
3425
3613
  type: "uint8",
@@ -3476,6 +3664,11 @@ var AppController_default = [
3476
3664
  type: "uint32",
3477
3665
  internalType: "uint32"
3478
3666
  },
3667
+ {
3668
+ name: "pendingReleaseBlockNumber",
3669
+ type: "uint32",
3670
+ internalType: "uint32"
3671
+ },
3479
3672
  {
3480
3673
  name: "status",
3481
3674
  type: "uint8",
@@ -3532,6 +3725,11 @@ var AppController_default = [
3532
3725
  type: "uint32",
3533
3726
  internalType: "uint32"
3534
3727
  },
3728
+ {
3729
+ name: "pendingReleaseBlockNumber",
3730
+ type: "uint32",
3731
+ internalType: "uint32"
3732
+ },
3535
3733
  {
3536
3734
  name: "status",
3537
3735
  type: "uint8",
@@ -3542,6 +3740,44 @@ var AppController_default = [
3542
3740
  ],
3543
3741
  stateMutability: "view"
3544
3742
  },
3743
+ {
3744
+ type: "function",
3745
+ name: "getBillingAccount",
3746
+ inputs: [
3747
+ {
3748
+ name: "app",
3749
+ type: "address",
3750
+ internalType: "contractIApp"
3751
+ }
3752
+ ],
3753
+ outputs: [
3754
+ {
3755
+ name: "",
3756
+ type: "address",
3757
+ internalType: "address"
3758
+ }
3759
+ ],
3760
+ stateMutability: "view"
3761
+ },
3762
+ {
3763
+ type: "function",
3764
+ name: "getBillingType",
3765
+ inputs: [
3766
+ {
3767
+ name: "app",
3768
+ type: "address",
3769
+ internalType: "contractIApp"
3770
+ }
3771
+ ],
3772
+ outputs: [
3773
+ {
3774
+ name: "",
3775
+ type: "uint8",
3776
+ internalType: "enumIAppController.BillingType"
3777
+ }
3778
+ ],
3779
+ stateMutability: "view"
3780
+ },
3545
3781
  {
3546
3782
  type: "function",
3547
3783
  name: "getMaxActiveAppsPerUser",
@@ -3797,6 +4033,62 @@ var AppController_default = [
3797
4033
  name: "encryptedEnv",
3798
4034
  type: "bytes",
3799
4035
  internalType: "bytes"
4036
+ },
4037
+ {
4038
+ name: "containerPolicy",
4039
+ type: "tuple",
4040
+ internalType: "structIAppController.ContainerPolicy",
4041
+ components: [
4042
+ {
4043
+ name: "args",
4044
+ type: "string[]",
4045
+ internalType: "string[]"
4046
+ },
4047
+ {
4048
+ name: "cmdOverride",
4049
+ type: "string[]",
4050
+ internalType: "string[]"
4051
+ },
4052
+ {
4053
+ name: "env",
4054
+ type: "tuple[]",
4055
+ internalType: "structIAppController.EnvVar[]",
4056
+ components: [
4057
+ {
4058
+ name: "key",
4059
+ type: "string",
4060
+ internalType: "string"
4061
+ },
4062
+ {
4063
+ name: "value",
4064
+ type: "string",
4065
+ internalType: "string"
4066
+ }
4067
+ ]
4068
+ },
4069
+ {
4070
+ name: "envOverride",
4071
+ type: "tuple[]",
4072
+ internalType: "structIAppController.EnvVar[]",
4073
+ components: [
4074
+ {
4075
+ name: "key",
4076
+ type: "string",
4077
+ internalType: "string"
4078
+ },
4079
+ {
4080
+ name: "value",
4081
+ type: "string",
4082
+ internalType: "string"
4083
+ }
4084
+ ]
4085
+ },
4086
+ {
4087
+ name: "restartPolicy",
4088
+ type: "string",
4089
+ internalType: "string"
4090
+ }
4091
+ ]
3800
4092
  }
3801
4093
  ]
3802
4094
  }
@@ -3992,30 +4284,1298 @@ var AppController_default = [
3992
4284
  name: "encryptedEnv",
3993
4285
  type: "bytes",
3994
4286
  internalType: "bytes"
3995
- }
3996
- ]
3997
- }
3998
- ],
3999
- anonymous: false
4000
- },
4001
- {
4002
- type: "event",
4003
- name: "GlobalMaxActiveAppsSet",
4004
- inputs: [
4005
- {
4006
- name: "limit",
4007
- type: "uint32",
4008
- indexed: false,
4009
- internalType: "uint32"
4010
- }
4011
- ],
4012
- anonymous: false
4013
- },
4014
- {
4015
- type: "event",
4016
- name: "Initialized",
4017
- inputs: [
4018
- {
4287
+ },
4288
+ {
4289
+ name: "containerPolicy",
4290
+ type: "tuple",
4291
+ internalType: "structIAppController.ContainerPolicy",
4292
+ components: [
4293
+ {
4294
+ name: "args",
4295
+ type: "string[]",
4296
+ internalType: "string[]"
4297
+ },
4298
+ {
4299
+ name: "cmdOverride",
4300
+ type: "string[]",
4301
+ internalType: "string[]"
4302
+ },
4303
+ {
4304
+ name: "env",
4305
+ type: "tuple[]",
4306
+ internalType: "structIAppController.EnvVar[]",
4307
+ components: [
4308
+ {
4309
+ name: "key",
4310
+ type: "string",
4311
+ internalType: "string"
4312
+ },
4313
+ {
4314
+ name: "value",
4315
+ type: "string",
4316
+ internalType: "string"
4317
+ }
4318
+ ]
4319
+ },
4320
+ {
4321
+ name: "envOverride",
4322
+ type: "tuple[]",
4323
+ internalType: "structIAppController.EnvVar[]",
4324
+ components: [
4325
+ {
4326
+ name: "key",
4327
+ type: "string",
4328
+ internalType: "string"
4329
+ },
4330
+ {
4331
+ name: "value",
4332
+ type: "string",
4333
+ internalType: "string"
4334
+ }
4335
+ ]
4336
+ },
4337
+ {
4338
+ name: "restartPolicy",
4339
+ type: "string",
4340
+ internalType: "string"
4341
+ }
4342
+ ]
4343
+ }
4344
+ ]
4345
+ }
4346
+ ],
4347
+ anonymous: false
4348
+ },
4349
+ {
4350
+ type: "event",
4351
+ name: "GlobalMaxActiveAppsSet",
4352
+ inputs: [
4353
+ {
4354
+ name: "limit",
4355
+ type: "uint32",
4356
+ indexed: false,
4357
+ internalType: "uint32"
4358
+ }
4359
+ ],
4360
+ anonymous: false
4361
+ },
4362
+ {
4363
+ type: "event",
4364
+ name: "Initialized",
4365
+ inputs: [
4366
+ {
4367
+ name: "version",
4368
+ type: "uint8",
4369
+ indexed: false,
4370
+ internalType: "uint8"
4371
+ }
4372
+ ],
4373
+ anonymous: false
4374
+ },
4375
+ {
4376
+ type: "event",
4377
+ name: "MaxActiveAppsSet",
4378
+ inputs: [
4379
+ {
4380
+ name: "user",
4381
+ type: "address",
4382
+ indexed: true,
4383
+ internalType: "address"
4384
+ },
4385
+ {
4386
+ name: "limit",
4387
+ type: "uint32",
4388
+ indexed: false,
4389
+ internalType: "uint32"
4390
+ }
4391
+ ],
4392
+ anonymous: false
4393
+ },
4394
+ {
4395
+ type: "event",
4396
+ name: "UpgradeConfirmed",
4397
+ inputs: [
4398
+ {
4399
+ name: "app",
4400
+ type: "address",
4401
+ indexed: true,
4402
+ internalType: "contractIApp"
4403
+ },
4404
+ {
4405
+ name: "pendingReleaseBlockNumber",
4406
+ type: "uint32",
4407
+ indexed: false,
4408
+ internalType: "uint32"
4409
+ }
4410
+ ],
4411
+ anonymous: false
4412
+ },
4413
+ {
4414
+ type: "error",
4415
+ name: "AccountHasActiveApps",
4416
+ inputs: []
4417
+ },
4418
+ {
4419
+ type: "error",
4420
+ name: "AppAlreadyExists",
4421
+ inputs: []
4422
+ },
4423
+ {
4424
+ type: "error",
4425
+ name: "AppDoesNotExist",
4426
+ inputs: []
4427
+ },
4428
+ {
4429
+ type: "error",
4430
+ name: "GlobalMaxActiveAppsExceeded",
4431
+ inputs: []
4432
+ },
4433
+ {
4434
+ type: "error",
4435
+ name: "InvalidAppStatus",
4436
+ inputs: []
4437
+ },
4438
+ {
4439
+ type: "error",
4440
+ name: "InvalidPermissions",
4441
+ inputs: []
4442
+ },
4443
+ {
4444
+ type: "error",
4445
+ name: "InvalidReleaseMetadataURI",
4446
+ inputs: []
4447
+ },
4448
+ {
4449
+ type: "error",
4450
+ name: "InvalidShortString",
4451
+ inputs: []
4452
+ },
4453
+ {
4454
+ type: "error",
4455
+ name: "InvalidSignature",
4456
+ inputs: []
4457
+ },
4458
+ {
4459
+ type: "error",
4460
+ name: "MaxActiveAppsExceeded",
4461
+ inputs: []
4462
+ },
4463
+ {
4464
+ type: "error",
4465
+ name: "MoreThanOneArtifact",
4466
+ inputs: []
4467
+ },
4468
+ {
4469
+ type: "error",
4470
+ name: "NoPendingUpgrade",
4471
+ inputs: []
4472
+ },
4473
+ {
4474
+ type: "error",
4475
+ name: "SignatureExpired",
4476
+ inputs: []
4477
+ },
4478
+ {
4479
+ type: "error",
4480
+ name: "StringTooLong",
4481
+ inputs: [
4482
+ {
4483
+ name: "str",
4484
+ type: "string",
4485
+ internalType: "string"
4486
+ }
4487
+ ]
4488
+ }
4489
+ ];
4490
+
4491
+ // src/client/common/abis/AppController.v1_4.json
4492
+ var AppController_v1_4_default = [
4493
+ {
4494
+ type: "constructor",
4495
+ inputs: [
4496
+ {
4497
+ name: "_version",
4498
+ type: "string",
4499
+ internalType: "string"
4500
+ },
4501
+ {
4502
+ name: "_permissionController",
4503
+ type: "address",
4504
+ internalType: "contractIPermissionController"
4505
+ },
4506
+ {
4507
+ name: "_releaseManager",
4508
+ type: "address",
4509
+ internalType: "contractIReleaseManager"
4510
+ },
4511
+ {
4512
+ name: "_computeAVSRegistrar",
4513
+ type: "address",
4514
+ internalType: "contractIComputeAVSRegistrar"
4515
+ },
4516
+ {
4517
+ name: "_computeOperator",
4518
+ type: "address",
4519
+ internalType: "contractIComputeOperator"
4520
+ },
4521
+ {
4522
+ name: "_appBeacon",
4523
+ type: "address",
4524
+ internalType: "contractIBeacon"
4525
+ }
4526
+ ],
4527
+ stateMutability: "nonpayable"
4528
+ },
4529
+ {
4530
+ type: "function",
4531
+ name: "API_PERMISSION_TYPEHASH",
4532
+ inputs: [],
4533
+ outputs: [
4534
+ {
4535
+ name: "",
4536
+ type: "bytes32",
4537
+ internalType: "bytes32"
4538
+ }
4539
+ ],
4540
+ stateMutability: "view"
4541
+ },
4542
+ {
4543
+ type: "function",
4544
+ name: "appBeacon",
4545
+ inputs: [],
4546
+ outputs: [
4547
+ {
4548
+ name: "",
4549
+ type: "address",
4550
+ internalType: "contractIBeacon"
4551
+ }
4552
+ ],
4553
+ stateMutability: "view"
4554
+ },
4555
+ {
4556
+ type: "function",
4557
+ name: "calculateApiPermissionDigestHash",
4558
+ inputs: [
4559
+ {
4560
+ name: "permission",
4561
+ type: "bytes4",
4562
+ internalType: "bytes4"
4563
+ },
4564
+ {
4565
+ name: "expiry",
4566
+ type: "uint256",
4567
+ internalType: "uint256"
4568
+ }
4569
+ ],
4570
+ outputs: [
4571
+ {
4572
+ name: "",
4573
+ type: "bytes32",
4574
+ internalType: "bytes32"
4575
+ }
4576
+ ],
4577
+ stateMutability: "view"
4578
+ },
4579
+ {
4580
+ type: "function",
4581
+ name: "calculateAppId",
4582
+ inputs: [
4583
+ {
4584
+ name: "deployer",
4585
+ type: "address",
4586
+ internalType: "address"
4587
+ },
4588
+ {
4589
+ name: "salt",
4590
+ type: "bytes32",
4591
+ internalType: "bytes32"
4592
+ }
4593
+ ],
4594
+ outputs: [
4595
+ {
4596
+ name: "",
4597
+ type: "address",
4598
+ internalType: "contractIApp"
4599
+ }
4600
+ ],
4601
+ stateMutability: "view"
4602
+ },
4603
+ {
4604
+ type: "function",
4605
+ name: "computeAVSRegistrar",
4606
+ inputs: [],
4607
+ outputs: [
4608
+ {
4609
+ name: "",
4610
+ type: "address",
4611
+ internalType: "contractIComputeAVSRegistrar"
4612
+ }
4613
+ ],
4614
+ stateMutability: "view"
4615
+ },
4616
+ {
4617
+ type: "function",
4618
+ name: "computeOperator",
4619
+ inputs: [],
4620
+ outputs: [
4621
+ {
4622
+ name: "",
4623
+ type: "address",
4624
+ internalType: "contractIComputeOperator"
4625
+ }
4626
+ ],
4627
+ stateMutability: "view"
4628
+ },
4629
+ {
4630
+ type: "function",
4631
+ name: "createApp",
4632
+ inputs: [
4633
+ {
4634
+ name: "salt",
4635
+ type: "bytes32",
4636
+ internalType: "bytes32"
4637
+ },
4638
+ {
4639
+ name: "release",
4640
+ type: "tuple",
4641
+ internalType: "structIAppController.Release",
4642
+ components: [
4643
+ {
4644
+ name: "rmsRelease",
4645
+ type: "tuple",
4646
+ internalType: "structIReleaseManagerTypes.Release",
4647
+ components: [
4648
+ {
4649
+ name: "artifacts",
4650
+ type: "tuple[]",
4651
+ internalType: "structIReleaseManagerTypes.Artifact[]",
4652
+ components: [
4653
+ {
4654
+ name: "digest",
4655
+ type: "bytes32",
4656
+ internalType: "bytes32"
4657
+ },
4658
+ {
4659
+ name: "registry",
4660
+ type: "string",
4661
+ internalType: "string"
4662
+ }
4663
+ ]
4664
+ },
4665
+ {
4666
+ name: "upgradeByTime",
4667
+ type: "uint32",
4668
+ internalType: "uint32"
4669
+ }
4670
+ ]
4671
+ },
4672
+ {
4673
+ name: "publicEnv",
4674
+ type: "bytes",
4675
+ internalType: "bytes"
4676
+ },
4677
+ {
4678
+ name: "encryptedEnv",
4679
+ type: "bytes",
4680
+ internalType: "bytes"
4681
+ }
4682
+ ]
4683
+ }
4684
+ ],
4685
+ outputs: [
4686
+ {
4687
+ name: "app",
4688
+ type: "address",
4689
+ internalType: "contractIApp"
4690
+ }
4691
+ ],
4692
+ stateMutability: "nonpayable"
4693
+ },
4694
+ {
4695
+ type: "function",
4696
+ name: "createAppWithIsolatedBilling",
4697
+ inputs: [
4698
+ {
4699
+ name: "salt",
4700
+ type: "bytes32",
4701
+ internalType: "bytes32"
4702
+ },
4703
+ {
4704
+ name: "release",
4705
+ type: "tuple",
4706
+ internalType: "structIAppController.Release",
4707
+ components: [
4708
+ {
4709
+ name: "rmsRelease",
4710
+ type: "tuple",
4711
+ internalType: "structIReleaseManagerTypes.Release",
4712
+ components: [
4713
+ {
4714
+ name: "artifacts",
4715
+ type: "tuple[]",
4716
+ internalType: "structIReleaseManagerTypes.Artifact[]",
4717
+ components: [
4718
+ {
4719
+ name: "digest",
4720
+ type: "bytes32",
4721
+ internalType: "bytes32"
4722
+ },
4723
+ {
4724
+ name: "registry",
4725
+ type: "string",
4726
+ internalType: "string"
4727
+ }
4728
+ ]
4729
+ },
4730
+ {
4731
+ name: "upgradeByTime",
4732
+ type: "uint32",
4733
+ internalType: "uint32"
4734
+ }
4735
+ ]
4736
+ },
4737
+ {
4738
+ name: "publicEnv",
4739
+ type: "bytes",
4740
+ internalType: "bytes"
4741
+ },
4742
+ {
4743
+ name: "encryptedEnv",
4744
+ type: "bytes",
4745
+ internalType: "bytes"
4746
+ }
4747
+ ]
4748
+ }
4749
+ ],
4750
+ outputs: [
4751
+ {
4752
+ name: "app",
4753
+ type: "address",
4754
+ internalType: "contractIApp"
4755
+ }
4756
+ ],
4757
+ stateMutability: "nonpayable"
4758
+ },
4759
+ {
4760
+ type: "function",
4761
+ name: "domainSeparator",
4762
+ inputs: [],
4763
+ outputs: [
4764
+ {
4765
+ name: "",
4766
+ type: "bytes32",
4767
+ internalType: "bytes32"
4768
+ }
4769
+ ],
4770
+ stateMutability: "view"
4771
+ },
4772
+ {
4773
+ type: "function",
4774
+ name: "getActiveAppCount",
4775
+ inputs: [
4776
+ {
4777
+ name: "user",
4778
+ type: "address",
4779
+ internalType: "address"
4780
+ }
4781
+ ],
4782
+ outputs: [
4783
+ {
4784
+ name: "",
4785
+ type: "uint32",
4786
+ internalType: "uint32"
4787
+ }
4788
+ ],
4789
+ stateMutability: "view"
4790
+ },
4791
+ {
4792
+ type: "function",
4793
+ name: "getBillingType",
4794
+ inputs: [
4795
+ {
4796
+ name: "app",
4797
+ type: "address",
4798
+ internalType: "address"
4799
+ }
4800
+ ],
4801
+ outputs: [
4802
+ {
4803
+ name: "",
4804
+ type: "uint8",
4805
+ internalType: "uint8"
4806
+ }
4807
+ ],
4808
+ stateMutability: "view"
4809
+ },
4810
+ {
4811
+ type: "function",
4812
+ name: "getAppCreator",
4813
+ inputs: [
4814
+ {
4815
+ name: "app",
4816
+ type: "address",
4817
+ internalType: "contractIApp"
4818
+ }
4819
+ ],
4820
+ outputs: [
4821
+ {
4822
+ name: "",
4823
+ type: "address",
4824
+ internalType: "address"
4825
+ }
4826
+ ],
4827
+ stateMutability: "view"
4828
+ },
4829
+ {
4830
+ type: "function",
4831
+ name: "getAppLatestReleaseBlockNumber",
4832
+ inputs: [
4833
+ {
4834
+ name: "app",
4835
+ type: "address",
4836
+ internalType: "contractIApp"
4837
+ }
4838
+ ],
4839
+ outputs: [
4840
+ {
4841
+ name: "",
4842
+ type: "uint32",
4843
+ internalType: "uint32"
4844
+ }
4845
+ ],
4846
+ stateMutability: "view"
4847
+ },
4848
+ {
4849
+ type: "function",
4850
+ name: "getAppOperatorSetId",
4851
+ inputs: [
4852
+ {
4853
+ name: "app",
4854
+ type: "address",
4855
+ internalType: "contractIApp"
4856
+ }
4857
+ ],
4858
+ outputs: [
4859
+ {
4860
+ name: "",
4861
+ type: "uint32",
4862
+ internalType: "uint32"
4863
+ }
4864
+ ],
4865
+ stateMutability: "view"
4866
+ },
4867
+ {
4868
+ type: "function",
4869
+ name: "getAppStatus",
4870
+ inputs: [
4871
+ {
4872
+ name: "app",
4873
+ type: "address",
4874
+ internalType: "contractIApp"
4875
+ }
4876
+ ],
4877
+ outputs: [
4878
+ {
4879
+ name: "",
4880
+ type: "uint8",
4881
+ internalType: "enumIAppController.AppStatus"
4882
+ }
4883
+ ],
4884
+ stateMutability: "view"
4885
+ },
4886
+ {
4887
+ type: "function",
4888
+ name: "getApps",
4889
+ inputs: [
4890
+ {
4891
+ name: "offset",
4892
+ type: "uint256",
4893
+ internalType: "uint256"
4894
+ },
4895
+ {
4896
+ name: "limit",
4897
+ type: "uint256",
4898
+ internalType: "uint256"
4899
+ }
4900
+ ],
4901
+ outputs: [
4902
+ {
4903
+ name: "apps",
4904
+ type: "address[]",
4905
+ internalType: "contractIApp[]"
4906
+ },
4907
+ {
4908
+ name: "appConfigsMem",
4909
+ type: "tuple[]",
4910
+ internalType: "structIAppController.AppConfig[]",
4911
+ components: [
4912
+ {
4913
+ name: "creator",
4914
+ type: "address",
4915
+ internalType: "address"
4916
+ },
4917
+ {
4918
+ name: "operatorSetId",
4919
+ type: "uint32",
4920
+ internalType: "uint32"
4921
+ },
4922
+ {
4923
+ name: "latestReleaseBlockNumber",
4924
+ type: "uint32",
4925
+ internalType: "uint32"
4926
+ },
4927
+ {
4928
+ name: "status",
4929
+ type: "uint8",
4930
+ internalType: "enumIAppController.AppStatus"
4931
+ }
4932
+ ]
4933
+ }
4934
+ ],
4935
+ stateMutability: "view"
4936
+ },
4937
+ {
4938
+ type: "function",
4939
+ name: "getAppsByBillingAccount",
4940
+ inputs: [
4941
+ {
4942
+ name: "account",
4943
+ type: "address",
4944
+ internalType: "address"
4945
+ },
4946
+ {
4947
+ name: "offset",
4948
+ type: "uint256",
4949
+ internalType: "uint256"
4950
+ },
4951
+ {
4952
+ name: "limit",
4953
+ type: "uint256",
4954
+ internalType: "uint256"
4955
+ }
4956
+ ],
4957
+ outputs: [
4958
+ {
4959
+ name: "apps",
4960
+ type: "address[]",
4961
+ internalType: "contractIApp[]"
4962
+ },
4963
+ {
4964
+ name: "appConfigsMem",
4965
+ type: "tuple[]",
4966
+ internalType: "structIAppController.AppConfig[]",
4967
+ components: [
4968
+ {
4969
+ name: "creator",
4970
+ type: "address",
4971
+ internalType: "address"
4972
+ },
4973
+ {
4974
+ name: "operatorSetId",
4975
+ type: "uint32",
4976
+ internalType: "uint32"
4977
+ },
4978
+ {
4979
+ name: "latestReleaseBlockNumber",
4980
+ type: "uint32",
4981
+ internalType: "uint32"
4982
+ },
4983
+ {
4984
+ name: "status",
4985
+ type: "uint8",
4986
+ internalType: "enumIAppController.AppStatus"
4987
+ }
4988
+ ]
4989
+ }
4990
+ ],
4991
+ stateMutability: "view"
4992
+ },
4993
+ {
4994
+ type: "function",
4995
+ name: "getAppsByCreator",
4996
+ inputs: [
4997
+ {
4998
+ name: "creator",
4999
+ type: "address",
5000
+ internalType: "address"
5001
+ },
5002
+ {
5003
+ name: "offset",
5004
+ type: "uint256",
5005
+ internalType: "uint256"
5006
+ },
5007
+ {
5008
+ name: "limit",
5009
+ type: "uint256",
5010
+ internalType: "uint256"
5011
+ }
5012
+ ],
5013
+ outputs: [
5014
+ {
5015
+ name: "apps",
5016
+ type: "address[]",
5017
+ internalType: "contractIApp[]"
5018
+ },
5019
+ {
5020
+ name: "appConfigsMem",
5021
+ type: "tuple[]",
5022
+ internalType: "structIAppController.AppConfig[]",
5023
+ components: [
5024
+ {
5025
+ name: "creator",
5026
+ type: "address",
5027
+ internalType: "address"
5028
+ },
5029
+ {
5030
+ name: "operatorSetId",
5031
+ type: "uint32",
5032
+ internalType: "uint32"
5033
+ },
5034
+ {
5035
+ name: "latestReleaseBlockNumber",
5036
+ type: "uint32",
5037
+ internalType: "uint32"
5038
+ },
5039
+ {
5040
+ name: "status",
5041
+ type: "uint8",
5042
+ internalType: "enumIAppController.AppStatus"
5043
+ }
5044
+ ]
5045
+ }
5046
+ ],
5047
+ stateMutability: "view"
5048
+ },
5049
+ {
5050
+ type: "function",
5051
+ name: "getAppsByDeveloper",
5052
+ inputs: [
5053
+ {
5054
+ name: "developer",
5055
+ type: "address",
5056
+ internalType: "address"
5057
+ },
5058
+ {
5059
+ name: "offset",
5060
+ type: "uint256",
5061
+ internalType: "uint256"
5062
+ },
5063
+ {
5064
+ name: "limit",
5065
+ type: "uint256",
5066
+ internalType: "uint256"
5067
+ }
5068
+ ],
5069
+ outputs: [
5070
+ {
5071
+ name: "apps",
5072
+ type: "address[]",
5073
+ internalType: "contractIApp[]"
5074
+ },
5075
+ {
5076
+ name: "appConfigsMem",
5077
+ type: "tuple[]",
5078
+ internalType: "structIAppController.AppConfig[]",
5079
+ components: [
5080
+ {
5081
+ name: "creator",
5082
+ type: "address",
5083
+ internalType: "address"
5084
+ },
5085
+ {
5086
+ name: "operatorSetId",
5087
+ type: "uint32",
5088
+ internalType: "uint32"
5089
+ },
5090
+ {
5091
+ name: "latestReleaseBlockNumber",
5092
+ type: "uint32",
5093
+ internalType: "uint32"
5094
+ },
5095
+ {
5096
+ name: "status",
5097
+ type: "uint8",
5098
+ internalType: "enumIAppController.AppStatus"
5099
+ }
5100
+ ]
5101
+ }
5102
+ ],
5103
+ stateMutability: "view"
5104
+ },
5105
+ {
5106
+ type: "function",
5107
+ name: "getMaxActiveAppsPerUser",
5108
+ inputs: [
5109
+ {
5110
+ name: "user",
5111
+ type: "address",
5112
+ internalType: "address"
5113
+ }
5114
+ ],
5115
+ outputs: [
5116
+ {
5117
+ name: "",
5118
+ type: "uint32",
5119
+ internalType: "uint32"
5120
+ }
5121
+ ],
5122
+ stateMutability: "view"
5123
+ },
5124
+ {
5125
+ type: "function",
5126
+ name: "globalActiveAppCount",
5127
+ inputs: [],
5128
+ outputs: [
5129
+ {
5130
+ name: "",
5131
+ type: "uint32",
5132
+ internalType: "uint32"
5133
+ }
5134
+ ],
5135
+ stateMutability: "view"
5136
+ },
5137
+ {
5138
+ type: "function",
5139
+ name: "initialize",
5140
+ inputs: [
5141
+ {
5142
+ name: "admin",
5143
+ type: "address",
5144
+ internalType: "address"
5145
+ }
5146
+ ],
5147
+ outputs: [],
5148
+ stateMutability: "nonpayable"
5149
+ },
5150
+ {
5151
+ type: "function",
5152
+ name: "maxGlobalActiveApps",
5153
+ inputs: [],
5154
+ outputs: [
5155
+ {
5156
+ name: "",
5157
+ type: "uint32",
5158
+ internalType: "uint32"
5159
+ }
5160
+ ],
5161
+ stateMutability: "view"
5162
+ },
5163
+ {
5164
+ type: "function",
5165
+ name: "permissionController",
5166
+ inputs: [],
5167
+ outputs: [
5168
+ {
5169
+ name: "",
5170
+ type: "address",
5171
+ internalType: "contractIPermissionController"
5172
+ }
5173
+ ],
5174
+ stateMutability: "view"
5175
+ },
5176
+ {
5177
+ type: "function",
5178
+ name: "releaseManager",
5179
+ inputs: [],
5180
+ outputs: [
5181
+ {
5182
+ name: "",
5183
+ type: "address",
5184
+ internalType: "contractIReleaseManager"
5185
+ }
5186
+ ],
5187
+ stateMutability: "view"
5188
+ },
5189
+ {
5190
+ type: "function",
5191
+ name: "setMaxActiveAppsPerUser",
5192
+ inputs: [
5193
+ {
5194
+ name: "user",
5195
+ type: "address",
5196
+ internalType: "address"
5197
+ },
5198
+ {
5199
+ name: "limit",
5200
+ type: "uint32",
5201
+ internalType: "uint32"
5202
+ }
5203
+ ],
5204
+ outputs: [],
5205
+ stateMutability: "nonpayable"
5206
+ },
5207
+ {
5208
+ type: "function",
5209
+ name: "setMaxGlobalActiveApps",
5210
+ inputs: [
5211
+ {
5212
+ name: "limit",
5213
+ type: "uint32",
5214
+ internalType: "uint32"
5215
+ }
5216
+ ],
5217
+ outputs: [],
5218
+ stateMutability: "nonpayable"
5219
+ },
5220
+ {
5221
+ type: "function",
5222
+ name: "startApp",
5223
+ inputs: [
5224
+ {
5225
+ name: "app",
5226
+ type: "address",
5227
+ internalType: "contractIApp"
5228
+ }
5229
+ ],
5230
+ outputs: [],
5231
+ stateMutability: "nonpayable"
5232
+ },
5233
+ {
5234
+ type: "function",
5235
+ name: "stopApp",
5236
+ inputs: [
5237
+ {
5238
+ name: "app",
5239
+ type: "address",
5240
+ internalType: "contractIApp"
5241
+ }
5242
+ ],
5243
+ outputs: [],
5244
+ stateMutability: "nonpayable"
5245
+ },
5246
+ {
5247
+ type: "function",
5248
+ name: "suspend",
5249
+ inputs: [
5250
+ {
5251
+ name: "account",
5252
+ type: "address",
5253
+ internalType: "address"
5254
+ },
5255
+ {
5256
+ name: "apps",
5257
+ type: "address[]",
5258
+ internalType: "contractIApp[]"
5259
+ }
5260
+ ],
5261
+ outputs: [],
5262
+ stateMutability: "nonpayable"
5263
+ },
5264
+ {
5265
+ type: "function",
5266
+ name: "terminateApp",
5267
+ inputs: [
5268
+ {
5269
+ name: "app",
5270
+ type: "address",
5271
+ internalType: "contractIApp"
5272
+ }
5273
+ ],
5274
+ outputs: [],
5275
+ stateMutability: "nonpayable"
5276
+ },
5277
+ {
5278
+ type: "function",
5279
+ name: "terminateAppByAdmin",
5280
+ inputs: [
5281
+ {
5282
+ name: "app",
5283
+ type: "address",
5284
+ internalType: "contractIApp"
5285
+ }
5286
+ ],
5287
+ outputs: [],
5288
+ stateMutability: "nonpayable"
5289
+ },
5290
+ {
5291
+ type: "function",
5292
+ name: "updateAppMetadataURI",
5293
+ inputs: [
5294
+ {
5295
+ name: "app",
5296
+ type: "address",
5297
+ internalType: "contractIApp"
5298
+ },
5299
+ {
5300
+ name: "metadataURI",
5301
+ type: "string",
5302
+ internalType: "string"
5303
+ }
5304
+ ],
5305
+ outputs: [],
5306
+ stateMutability: "nonpayable"
5307
+ },
5308
+ {
5309
+ type: "function",
5310
+ name: "upgradeApp",
5311
+ inputs: [
5312
+ {
5313
+ name: "app",
5314
+ type: "address",
5315
+ internalType: "contractIApp"
5316
+ },
5317
+ {
5318
+ name: "release",
5319
+ type: "tuple",
5320
+ internalType: "structIAppController.Release",
5321
+ components: [
5322
+ {
5323
+ name: "rmsRelease",
5324
+ type: "tuple",
5325
+ internalType: "structIReleaseManagerTypes.Release",
5326
+ components: [
5327
+ {
5328
+ name: "artifacts",
5329
+ type: "tuple[]",
5330
+ internalType: "structIReleaseManagerTypes.Artifact[]",
5331
+ components: [
5332
+ {
5333
+ name: "digest",
5334
+ type: "bytes32",
5335
+ internalType: "bytes32"
5336
+ },
5337
+ {
5338
+ name: "registry",
5339
+ type: "string",
5340
+ internalType: "string"
5341
+ }
5342
+ ]
5343
+ },
5344
+ {
5345
+ name: "upgradeByTime",
5346
+ type: "uint32",
5347
+ internalType: "uint32"
5348
+ }
5349
+ ]
5350
+ },
5351
+ {
5352
+ name: "publicEnv",
5353
+ type: "bytes",
5354
+ internalType: "bytes"
5355
+ },
5356
+ {
5357
+ name: "encryptedEnv",
5358
+ type: "bytes",
5359
+ internalType: "bytes"
5360
+ }
5361
+ ]
5362
+ }
5363
+ ],
5364
+ outputs: [
5365
+ {
5366
+ name: "",
5367
+ type: "uint256",
5368
+ internalType: "uint256"
5369
+ }
5370
+ ],
5371
+ stateMutability: "nonpayable"
5372
+ },
5373
+ {
5374
+ type: "function",
5375
+ name: "version",
5376
+ inputs: [],
5377
+ outputs: [
5378
+ {
5379
+ name: "",
5380
+ type: "string",
5381
+ internalType: "string"
5382
+ }
5383
+ ],
5384
+ stateMutability: "view"
5385
+ },
5386
+ {
5387
+ type: "event",
5388
+ name: "AppCreated",
5389
+ inputs: [
5390
+ {
5391
+ name: "creator",
5392
+ type: "address",
5393
+ indexed: true,
5394
+ internalType: "address"
5395
+ },
5396
+ {
5397
+ name: "app",
5398
+ type: "address",
5399
+ indexed: true,
5400
+ internalType: "contractIApp"
5401
+ },
5402
+ {
5403
+ name: "operatorSetId",
5404
+ type: "uint32",
5405
+ indexed: false,
5406
+ internalType: "uint32"
5407
+ }
5408
+ ],
5409
+ anonymous: false
5410
+ },
5411
+ {
5412
+ type: "event",
5413
+ name: "AppMetadataURIUpdated",
5414
+ inputs: [
5415
+ {
5416
+ name: "app",
5417
+ type: "address",
5418
+ indexed: true,
5419
+ internalType: "contractIApp"
5420
+ },
5421
+ {
5422
+ name: "metadataURI",
5423
+ type: "string",
5424
+ indexed: false,
5425
+ internalType: "string"
5426
+ }
5427
+ ],
5428
+ anonymous: false
5429
+ },
5430
+ {
5431
+ type: "event",
5432
+ name: "AppStarted",
5433
+ inputs: [
5434
+ {
5435
+ name: "app",
5436
+ type: "address",
5437
+ indexed: true,
5438
+ internalType: "contractIApp"
5439
+ }
5440
+ ],
5441
+ anonymous: false
5442
+ },
5443
+ {
5444
+ type: "event",
5445
+ name: "AppStopped",
5446
+ inputs: [
5447
+ {
5448
+ name: "app",
5449
+ type: "address",
5450
+ indexed: true,
5451
+ internalType: "contractIApp"
5452
+ }
5453
+ ],
5454
+ anonymous: false
5455
+ },
5456
+ {
5457
+ type: "event",
5458
+ name: "AppSuspended",
5459
+ inputs: [
5460
+ {
5461
+ name: "app",
5462
+ type: "address",
5463
+ indexed: true,
5464
+ internalType: "contractIApp"
5465
+ }
5466
+ ],
5467
+ anonymous: false
5468
+ },
5469
+ {
5470
+ type: "event",
5471
+ name: "AppTerminated",
5472
+ inputs: [
5473
+ {
5474
+ name: "app",
5475
+ type: "address",
5476
+ indexed: true,
5477
+ internalType: "contractIApp"
5478
+ }
5479
+ ],
5480
+ anonymous: false
5481
+ },
5482
+ {
5483
+ type: "event",
5484
+ name: "AppTerminatedByAdmin",
5485
+ inputs: [
5486
+ {
5487
+ name: "app",
5488
+ type: "address",
5489
+ indexed: true,
5490
+ internalType: "contractIApp"
5491
+ }
5492
+ ],
5493
+ anonymous: false
5494
+ },
5495
+ {
5496
+ type: "event",
5497
+ name: "AppUpgraded",
5498
+ inputs: [
5499
+ {
5500
+ name: "app",
5501
+ type: "address",
5502
+ indexed: true,
5503
+ internalType: "contractIApp"
5504
+ },
5505
+ {
5506
+ name: "rmsReleaseId",
5507
+ type: "uint256",
5508
+ indexed: false,
5509
+ internalType: "uint256"
5510
+ },
5511
+ {
5512
+ name: "release",
5513
+ type: "tuple",
5514
+ indexed: false,
5515
+ internalType: "structIAppController.Release",
5516
+ components: [
5517
+ {
5518
+ name: "rmsRelease",
5519
+ type: "tuple",
5520
+ internalType: "structIReleaseManagerTypes.Release",
5521
+ components: [
5522
+ {
5523
+ name: "artifacts",
5524
+ type: "tuple[]",
5525
+ internalType: "structIReleaseManagerTypes.Artifact[]",
5526
+ components: [
5527
+ {
5528
+ name: "digest",
5529
+ type: "bytes32",
5530
+ internalType: "bytes32"
5531
+ },
5532
+ {
5533
+ name: "registry",
5534
+ type: "string",
5535
+ internalType: "string"
5536
+ }
5537
+ ]
5538
+ },
5539
+ {
5540
+ name: "upgradeByTime",
5541
+ type: "uint32",
5542
+ internalType: "uint32"
5543
+ }
5544
+ ]
5545
+ },
5546
+ {
5547
+ name: "publicEnv",
5548
+ type: "bytes",
5549
+ internalType: "bytes"
5550
+ },
5551
+ {
5552
+ name: "encryptedEnv",
5553
+ type: "bytes",
5554
+ internalType: "bytes"
5555
+ }
5556
+ ]
5557
+ }
5558
+ ],
5559
+ anonymous: false
5560
+ },
5561
+ {
5562
+ type: "event",
5563
+ name: "GlobalMaxActiveAppsSet",
5564
+ inputs: [
5565
+ {
5566
+ name: "limit",
5567
+ type: "uint32",
5568
+ indexed: false,
5569
+ internalType: "uint32"
5570
+ }
5571
+ ],
5572
+ anonymous: false
5573
+ },
5574
+ {
5575
+ type: "event",
5576
+ name: "Initialized",
5577
+ inputs: [
5578
+ {
4019
5579
  name: "version",
4020
5580
  type: "uint8",
4021
5581
  indexed: false,
@@ -4613,6 +6173,38 @@ var PermissionController_default = [
4613
6173
  ];
4614
6174
 
4615
6175
  // src/client/common/contract/caller.ts
6176
+ function appControllerAbiFor(environmentConfig) {
6177
+ return environmentConfig.releaseAbiVersion === "v1.4" ? AppController_v1_4_default : AppController_default;
6178
+ }
6179
+ function supportsContainerPolicy(environmentConfig) {
6180
+ return environmentConfig.releaseAbiVersion !== "v1.4";
6181
+ }
6182
+ function containerPolicyForViem(policy = EMPTY_CONTAINER_POLICY) {
6183
+ return {
6184
+ args: policy.args,
6185
+ cmdOverride: policy.cmdOverride,
6186
+ env: policy.env.map((e) => ({ key: e.key, value: e.value })),
6187
+ envOverride: policy.envOverride.map((e) => ({ key: e.key, value: e.value })),
6188
+ restartPolicy: policy.restartPolicy
6189
+ };
6190
+ }
6191
+ function releaseForViem(release, environmentConfig) {
6192
+ const base = {
6193
+ rmsRelease: {
6194
+ artifacts: release.rmsRelease.artifacts.map((artifact) => ({
6195
+ digest: `0x${(0, import_viem5.bytesToHex)(artifact.digest).slice(2).padStart(64, "0")}`,
6196
+ registry: artifact.registry
6197
+ })),
6198
+ upgradeByTime: release.rmsRelease.upgradeByTime
6199
+ },
6200
+ publicEnv: (0, import_viem5.bytesToHex)(release.publicEnv),
6201
+ encryptedEnv: (0, import_viem5.bytesToHex)(release.encryptedEnv)
6202
+ };
6203
+ if (!supportsContainerPolicy(environmentConfig)) {
6204
+ return base;
6205
+ }
6206
+ return { ...base, containerPolicy: containerPolicyForViem(release.containerPolicy) };
6207
+ }
4616
6208
  function formatETH(wei) {
4617
6209
  const eth = Number(wei) / 1e18;
4618
6210
  const costStr = eth.toFixed(6);
@@ -4650,7 +6242,7 @@ async function calculateAppID(options) {
4650
6242
  const saltHex = `0x${paddedSaltHex}`;
4651
6243
  const appID = await publicClient.readContract({
4652
6244
  address: environmentConfig.appControllerAddress,
4653
- abi: AppController_default,
6245
+ abi: appControllerAbiFor(environmentConfig),
4654
6246
  functionName: "calculateAppId",
4655
6247
  args: [ownerAddress, saltHex]
4656
6248
  });
@@ -4674,22 +6266,12 @@ async function prepareDeployBatch(options, logger = noopLogger) {
4674
6266
  const saltHexString = (0, import_viem5.bytesToHex)(salt).slice(2);
4675
6267
  const paddedSaltHex = saltHexString.padStart(64, "0");
4676
6268
  const saltHex = `0x${paddedSaltHex}`;
4677
- const releaseForViem = {
4678
- rmsRelease: {
4679
- artifacts: release.rmsRelease.artifacts.map((artifact) => ({
4680
- digest: `0x${(0, import_viem5.bytesToHex)(artifact.digest).slice(2).padStart(64, "0")}`,
4681
- registry: artifact.registry
4682
- })),
4683
- upgradeByTime: release.rmsRelease.upgradeByTime
4684
- },
4685
- publicEnv: (0, import_viem5.bytesToHex)(release.publicEnv),
4686
- encryptedEnv: (0, import_viem5.bytesToHex)(release.encryptedEnv)
4687
- };
6269
+ const release_ = releaseForViem(release, environmentConfig);
4688
6270
  const functionName = options.billTo === "app" ? "createAppWithIsolatedBilling" : "createApp";
4689
6271
  const createData = (0, import_viem5.encodeFunctionData)({
4690
- abi: AppController_default,
6272
+ abi: appControllerAbiFor(environmentConfig),
4691
6273
  functionName,
4692
- args: [saltHex, releaseForViem]
6274
+ args: [saltHex, release_]
4693
6275
  });
4694
6276
  const acceptAdminData = (0, import_viem5.encodeFunctionData)({
4695
6277
  abi: PermissionController_default,
@@ -4945,21 +6527,11 @@ async function prepareUpgradeBatch(options) {
4945
6527
  publicLogs,
4946
6528
  needsPermissionChange
4947
6529
  } = options;
4948
- const releaseForViem = {
4949
- rmsRelease: {
4950
- artifacts: release.rmsRelease.artifacts.map((artifact) => ({
4951
- digest: `0x${(0, import_viem5.bytesToHex)(artifact.digest).slice(2).padStart(64, "0")}`,
4952
- registry: artifact.registry
4953
- })),
4954
- upgradeByTime: release.rmsRelease.upgradeByTime
4955
- },
4956
- publicEnv: (0, import_viem5.bytesToHex)(release.publicEnv),
4957
- encryptedEnv: (0, import_viem5.bytesToHex)(release.encryptedEnv)
4958
- };
6530
+ const release_ = releaseForViem(release, environmentConfig);
4959
6531
  const upgradeData = (0, import_viem5.encodeFunctionData)({
4960
- abi: AppController_default,
6532
+ abi: appControllerAbiFor(environmentConfig),
4961
6533
  functionName: "upgradeApp",
4962
- args: [appID, releaseForViem]
6534
+ args: [appID, release_]
4963
6535
  });
4964
6536
  const executions = [
4965
6537
  {
@@ -5093,7 +6665,7 @@ ${pendingMessage}`);
5093
6665
  if (callError.data) {
5094
6666
  try {
5095
6667
  const decoded = (0, import_viem5.decodeErrorResult)({
5096
- abi: AppController_default,
6668
+ abi: appControllerAbiFor(environmentConfig),
5097
6669
  data: callError.data
5098
6670
  });
5099
6671
  const formattedError = formatAppControllerError(decoded);
@@ -5146,7 +6718,7 @@ function formatAppControllerError(decoded) {
5146
6718
  async function getActiveAppCount(publicClient, environmentConfig, user) {
5147
6719
  const count = await publicClient.readContract({
5148
6720
  address: environmentConfig.appControllerAddress,
5149
- abi: AppController_default,
6721
+ abi: appControllerAbiFor(environmentConfig),
5150
6722
  functionName: "getActiveAppCount",
5151
6723
  args: [user]
5152
6724
  });
@@ -5155,7 +6727,7 @@ async function getActiveAppCount(publicClient, environmentConfig, user) {
5155
6727
  async function getMaxActiveAppsPerUser(publicClient, environmentConfig, user) {
5156
6728
  const quota = await publicClient.readContract({
5157
6729
  address: environmentConfig.appControllerAddress,
5158
- abi: AppController_default,
6730
+ abi: appControllerAbiFor(environmentConfig),
5159
6731
  functionName: "getMaxActiveAppsPerUser",
5160
6732
  args: [user]
5161
6733
  });
@@ -5164,7 +6736,7 @@ async function getMaxActiveAppsPerUser(publicClient, environmentConfig, user) {
5164
6736
  async function getAppsByCreator(publicClient, environmentConfig, creator, offset, limit) {
5165
6737
  const result = await publicClient.readContract({
5166
6738
  address: environmentConfig.appControllerAddress,
5167
- abi: AppController_default,
6739
+ abi: appControllerAbiFor(environmentConfig),
5168
6740
  functionName: "getAppsByCreator",
5169
6741
  args: [creator, offset, limit]
5170
6742
  });
@@ -5176,7 +6748,7 @@ async function getAppsByCreator(publicClient, environmentConfig, creator, offset
5176
6748
  async function getAppsByDeveloper(publicClient, environmentConfig, developer, offset, limit) {
5177
6749
  const result = await publicClient.readContract({
5178
6750
  address: environmentConfig.appControllerAddress,
5179
- abi: AppController_default,
6751
+ abi: appControllerAbiFor(environmentConfig),
5180
6752
  functionName: "getAppsByDeveloper",
5181
6753
  args: [developer, offset, limit]
5182
6754
  });
@@ -5188,7 +6760,7 @@ async function getAppsByDeveloper(publicClient, environmentConfig, developer, of
5188
6760
  async function getBillingType(publicClient, environmentConfig, app) {
5189
6761
  const result = await publicClient.readContract({
5190
6762
  address: environmentConfig.appControllerAddress,
5191
- abi: AppController_default,
6763
+ abi: appControllerAbiFor(environmentConfig),
5192
6764
  functionName: "getBillingType",
5193
6765
  args: [app]
5194
6766
  });
@@ -5197,7 +6769,7 @@ async function getBillingType(publicClient, environmentConfig, app) {
5197
6769
  async function getAppsByBillingAccount(publicClient, environmentConfig, account, offset, limit) {
5198
6770
  const result = await publicClient.readContract({
5199
6771
  address: environmentConfig.appControllerAddress,
5200
- abi: AppController_default,
6772
+ abi: appControllerAbiFor(environmentConfig),
5201
6773
  functionName: "getAppsByBillingAccount",
5202
6774
  args: [account, offset, limit]
5203
6775
  });
@@ -5229,7 +6801,7 @@ async function getAllAppsByDeveloper(publicClient, env, developer, pageSize = 10
5229
6801
  async function suspend(options, logger = noopLogger) {
5230
6802
  const { walletClient, publicClient, environmentConfig, account, apps } = options;
5231
6803
  const suspendData = (0, import_viem5.encodeFunctionData)({
5232
- abi: AppController_default,
6804
+ abi: appControllerAbiFor(environmentConfig),
5233
6805
  functionName: "suspend",
5234
6806
  args: [account, apps]
5235
6807
  });
@@ -5657,6 +7229,7 @@ function getKMSKeysForEnvironment(environment, build = "prod") {
5657
7229
  BillingApiClient,
5658
7230
  BillingSessionError,
5659
7231
  BuildApiClient,
7232
+ EMPTY_CONTAINER_POLICY,
5660
7233
  SessionError,
5661
7234
  UserApiClient,
5662
7235
  addHexPrefix,