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

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/compute.cjs CHANGED
@@ -1275,6 +1275,13 @@ function extractRegistryNameNoDocker(imageRef) {
1275
1275
  var import_viem = require("viem");
1276
1276
 
1277
1277
  // src/client/common/types/index.ts
1278
+ var EMPTY_CONTAINER_POLICY = {
1279
+ args: [],
1280
+ cmdOverride: [],
1281
+ env: [],
1282
+ envOverride: [],
1283
+ restartPolicy: ""
1284
+ };
1278
1285
  var noopLogger = {
1279
1286
  debug: () => {
1280
1287
  },
@@ -2677,6 +2684,19 @@ var AppController_default = [
2677
2684
  ],
2678
2685
  stateMutability: "view"
2679
2686
  },
2687
+ {
2688
+ type: "function",
2689
+ name: "confirmUpgrade",
2690
+ inputs: [
2691
+ {
2692
+ name: "app",
2693
+ type: "address",
2694
+ internalType: "contractIApp"
2695
+ }
2696
+ ],
2697
+ outputs: [],
2698
+ stateMutability: "nonpayable"
2699
+ },
2680
2700
  {
2681
2701
  type: "function",
2682
2702
  name: "createApp",
@@ -2729,6 +2749,62 @@ var AppController_default = [
2729
2749
  name: "encryptedEnv",
2730
2750
  type: "bytes",
2731
2751
  internalType: "bytes"
2752
+ },
2753
+ {
2754
+ name: "containerPolicy",
2755
+ type: "tuple",
2756
+ internalType: "structIAppController.ContainerPolicy",
2757
+ components: [
2758
+ {
2759
+ name: "args",
2760
+ type: "string[]",
2761
+ internalType: "string[]"
2762
+ },
2763
+ {
2764
+ name: "cmdOverride",
2765
+ type: "string[]",
2766
+ internalType: "string[]"
2767
+ },
2768
+ {
2769
+ name: "env",
2770
+ type: "tuple[]",
2771
+ internalType: "structIAppController.EnvVar[]",
2772
+ components: [
2773
+ {
2774
+ name: "key",
2775
+ type: "string",
2776
+ internalType: "string"
2777
+ },
2778
+ {
2779
+ name: "value",
2780
+ type: "string",
2781
+ internalType: "string"
2782
+ }
2783
+ ]
2784
+ },
2785
+ {
2786
+ name: "envOverride",
2787
+ type: "tuple[]",
2788
+ internalType: "structIAppController.EnvVar[]",
2789
+ components: [
2790
+ {
2791
+ name: "key",
2792
+ type: "string",
2793
+ internalType: "string"
2794
+ },
2795
+ {
2796
+ name: "value",
2797
+ type: "string",
2798
+ internalType: "string"
2799
+ }
2800
+ ]
2801
+ },
2802
+ {
2803
+ name: "restartPolicy",
2804
+ type: "string",
2805
+ internalType: "string"
2806
+ }
2807
+ ]
2732
2808
  }
2733
2809
  ]
2734
2810
  }
@@ -2794,6 +2870,62 @@ var AppController_default = [
2794
2870
  name: "encryptedEnv",
2795
2871
  type: "bytes",
2796
2872
  internalType: "bytes"
2873
+ },
2874
+ {
2875
+ name: "containerPolicy",
2876
+ type: "tuple",
2877
+ internalType: "structIAppController.ContainerPolicy",
2878
+ components: [
2879
+ {
2880
+ name: "args",
2881
+ type: "string[]",
2882
+ internalType: "string[]"
2883
+ },
2884
+ {
2885
+ name: "cmdOverride",
2886
+ type: "string[]",
2887
+ internalType: "string[]"
2888
+ },
2889
+ {
2890
+ name: "env",
2891
+ type: "tuple[]",
2892
+ internalType: "structIAppController.EnvVar[]",
2893
+ components: [
2894
+ {
2895
+ name: "key",
2896
+ type: "string",
2897
+ internalType: "string"
2898
+ },
2899
+ {
2900
+ name: "value",
2901
+ type: "string",
2902
+ internalType: "string"
2903
+ }
2904
+ ]
2905
+ },
2906
+ {
2907
+ name: "envOverride",
2908
+ type: "tuple[]",
2909
+ internalType: "structIAppController.EnvVar[]",
2910
+ components: [
2911
+ {
2912
+ name: "key",
2913
+ type: "string",
2914
+ internalType: "string"
2915
+ },
2916
+ {
2917
+ name: "value",
2918
+ type: "string",
2919
+ internalType: "string"
2920
+ }
2921
+ ]
2922
+ },
2923
+ {
2924
+ name: "restartPolicy",
2925
+ type: "string",
2926
+ internalType: "string"
2927
+ }
2928
+ ]
2797
2929
  }
2798
2930
  ]
2799
2931
  }
@@ -2807,6 +2939,44 @@ var AppController_default = [
2807
2939
  ],
2808
2940
  stateMutability: "nonpayable"
2809
2941
  },
2942
+ {
2943
+ type: "function",
2944
+ name: "createEmptyApp",
2945
+ inputs: [
2946
+ {
2947
+ name: "salt",
2948
+ type: "bytes32",
2949
+ internalType: "bytes32"
2950
+ }
2951
+ ],
2952
+ outputs: [
2953
+ {
2954
+ name: "app",
2955
+ type: "address",
2956
+ internalType: "contractIApp"
2957
+ }
2958
+ ],
2959
+ stateMutability: "nonpayable"
2960
+ },
2961
+ {
2962
+ type: "function",
2963
+ name: "createEmptyAppWithIsolatedBilling",
2964
+ inputs: [
2965
+ {
2966
+ name: "salt",
2967
+ type: "bytes32",
2968
+ internalType: "bytes32"
2969
+ }
2970
+ ],
2971
+ outputs: [
2972
+ {
2973
+ name: "app",
2974
+ type: "address",
2975
+ internalType: "contractIApp"
2976
+ }
2977
+ ],
2978
+ stateMutability: "nonpayable"
2979
+ },
2810
2980
  {
2811
2981
  type: "function",
2812
2982
  name: "domainSeparator",
@@ -2841,26 +3011,26 @@ var AppController_default = [
2841
3011
  },
2842
3012
  {
2843
3013
  type: "function",
2844
- name: "getBillingType",
3014
+ name: "getAppCreator",
2845
3015
  inputs: [
2846
3016
  {
2847
3017
  name: "app",
2848
3018
  type: "address",
2849
- internalType: "address"
3019
+ internalType: "contractIApp"
2850
3020
  }
2851
3021
  ],
2852
3022
  outputs: [
2853
3023
  {
2854
3024
  name: "",
2855
- type: "uint8",
2856
- internalType: "uint8"
3025
+ type: "address",
3026
+ internalType: "address"
2857
3027
  }
2858
3028
  ],
2859
3029
  stateMutability: "view"
2860
3030
  },
2861
3031
  {
2862
3032
  type: "function",
2863
- name: "getAppCreator",
3033
+ name: "getAppLatestReleaseBlockNumber",
2864
3034
  inputs: [
2865
3035
  {
2866
3036
  name: "app",
@@ -2871,15 +3041,15 @@ var AppController_default = [
2871
3041
  outputs: [
2872
3042
  {
2873
3043
  name: "",
2874
- type: "address",
2875
- internalType: "address"
3044
+ type: "uint32",
3045
+ internalType: "uint32"
2876
3046
  }
2877
3047
  ],
2878
3048
  stateMutability: "view"
2879
3049
  },
2880
3050
  {
2881
3051
  type: "function",
2882
- name: "getAppLatestReleaseBlockNumber",
3052
+ name: "getAppOperatorSetId",
2883
3053
  inputs: [
2884
3054
  {
2885
3055
  name: "app",
@@ -2898,7 +3068,7 @@ var AppController_default = [
2898
3068
  },
2899
3069
  {
2900
3070
  type: "function",
2901
- name: "getAppOperatorSetId",
3071
+ name: "getAppPendingReleaseBlockNumber",
2902
3072
  inputs: [
2903
3073
  {
2904
3074
  name: "app",
@@ -2975,6 +3145,11 @@ var AppController_default = [
2975
3145
  type: "uint32",
2976
3146
  internalType: "uint32"
2977
3147
  },
3148
+ {
3149
+ name: "pendingReleaseBlockNumber",
3150
+ type: "uint32",
3151
+ internalType: "uint32"
3152
+ },
2978
3153
  {
2979
3154
  name: "status",
2980
3155
  type: "uint8",
@@ -3031,6 +3206,11 @@ var AppController_default = [
3031
3206
  type: "uint32",
3032
3207
  internalType: "uint32"
3033
3208
  },
3209
+ {
3210
+ name: "pendingReleaseBlockNumber",
3211
+ type: "uint32",
3212
+ internalType: "uint32"
3213
+ },
3034
3214
  {
3035
3215
  name: "status",
3036
3216
  type: "uint8",
@@ -3087,6 +3267,11 @@ var AppController_default = [
3087
3267
  type: "uint32",
3088
3268
  internalType: "uint32"
3089
3269
  },
3270
+ {
3271
+ name: "pendingReleaseBlockNumber",
3272
+ type: "uint32",
3273
+ internalType: "uint32"
3274
+ },
3090
3275
  {
3091
3276
  name: "status",
3092
3277
  type: "uint8",
@@ -3143,6 +3328,11 @@ var AppController_default = [
3143
3328
  type: "uint32",
3144
3329
  internalType: "uint32"
3145
3330
  },
3331
+ {
3332
+ name: "pendingReleaseBlockNumber",
3333
+ type: "uint32",
3334
+ internalType: "uint32"
3335
+ },
3146
3336
  {
3147
3337
  name: "status",
3148
3338
  type: "uint8",
@@ -3153,6 +3343,44 @@ var AppController_default = [
3153
3343
  ],
3154
3344
  stateMutability: "view"
3155
3345
  },
3346
+ {
3347
+ type: "function",
3348
+ name: "getBillingAccount",
3349
+ inputs: [
3350
+ {
3351
+ name: "app",
3352
+ type: "address",
3353
+ internalType: "contractIApp"
3354
+ }
3355
+ ],
3356
+ outputs: [
3357
+ {
3358
+ name: "",
3359
+ type: "address",
3360
+ internalType: "address"
3361
+ }
3362
+ ],
3363
+ stateMutability: "view"
3364
+ },
3365
+ {
3366
+ type: "function",
3367
+ name: "getBillingType",
3368
+ inputs: [
3369
+ {
3370
+ name: "app",
3371
+ type: "address",
3372
+ internalType: "contractIApp"
3373
+ }
3374
+ ],
3375
+ outputs: [
3376
+ {
3377
+ name: "",
3378
+ type: "uint8",
3379
+ internalType: "enumIAppController.BillingType"
3380
+ }
3381
+ ],
3382
+ stateMutability: "view"
3383
+ },
3156
3384
  {
3157
3385
  type: "function",
3158
3386
  name: "getMaxActiveAppsPerUser",
@@ -3408,6 +3636,62 @@ var AppController_default = [
3408
3636
  name: "encryptedEnv",
3409
3637
  type: "bytes",
3410
3638
  internalType: "bytes"
3639
+ },
3640
+ {
3641
+ name: "containerPolicy",
3642
+ type: "tuple",
3643
+ internalType: "structIAppController.ContainerPolicy",
3644
+ components: [
3645
+ {
3646
+ name: "args",
3647
+ type: "string[]",
3648
+ internalType: "string[]"
3649
+ },
3650
+ {
3651
+ name: "cmdOverride",
3652
+ type: "string[]",
3653
+ internalType: "string[]"
3654
+ },
3655
+ {
3656
+ name: "env",
3657
+ type: "tuple[]",
3658
+ internalType: "structIAppController.EnvVar[]",
3659
+ components: [
3660
+ {
3661
+ name: "key",
3662
+ type: "string",
3663
+ internalType: "string"
3664
+ },
3665
+ {
3666
+ name: "value",
3667
+ type: "string",
3668
+ internalType: "string"
3669
+ }
3670
+ ]
3671
+ },
3672
+ {
3673
+ name: "envOverride",
3674
+ type: "tuple[]",
3675
+ internalType: "structIAppController.EnvVar[]",
3676
+ components: [
3677
+ {
3678
+ name: "key",
3679
+ type: "string",
3680
+ internalType: "string"
3681
+ },
3682
+ {
3683
+ name: "value",
3684
+ type: "string",
3685
+ internalType: "string"
3686
+ }
3687
+ ]
3688
+ },
3689
+ {
3690
+ name: "restartPolicy",
3691
+ type: "string",
3692
+ internalType: "string"
3693
+ }
3694
+ ]
3411
3695
  }
3412
3696
  ]
3413
3697
  }
@@ -3603,30 +3887,1298 @@ var AppController_default = [
3603
3887
  name: "encryptedEnv",
3604
3888
  type: "bytes",
3605
3889
  internalType: "bytes"
3606
- }
3607
- ]
3608
- }
3609
- ],
3610
- anonymous: false
3611
- },
3612
- {
3613
- type: "event",
3614
- name: "GlobalMaxActiveAppsSet",
3615
- inputs: [
3616
- {
3617
- name: "limit",
3618
- type: "uint32",
3619
- indexed: false,
3620
- internalType: "uint32"
3621
- }
3622
- ],
3623
- anonymous: false
3624
- },
3625
- {
3626
- type: "event",
3627
- name: "Initialized",
3628
- inputs: [
3629
- {
3890
+ },
3891
+ {
3892
+ name: "containerPolicy",
3893
+ type: "tuple",
3894
+ internalType: "structIAppController.ContainerPolicy",
3895
+ components: [
3896
+ {
3897
+ name: "args",
3898
+ type: "string[]",
3899
+ internalType: "string[]"
3900
+ },
3901
+ {
3902
+ name: "cmdOverride",
3903
+ type: "string[]",
3904
+ internalType: "string[]"
3905
+ },
3906
+ {
3907
+ name: "env",
3908
+ type: "tuple[]",
3909
+ internalType: "structIAppController.EnvVar[]",
3910
+ components: [
3911
+ {
3912
+ name: "key",
3913
+ type: "string",
3914
+ internalType: "string"
3915
+ },
3916
+ {
3917
+ name: "value",
3918
+ type: "string",
3919
+ internalType: "string"
3920
+ }
3921
+ ]
3922
+ },
3923
+ {
3924
+ name: "envOverride",
3925
+ type: "tuple[]",
3926
+ internalType: "structIAppController.EnvVar[]",
3927
+ components: [
3928
+ {
3929
+ name: "key",
3930
+ type: "string",
3931
+ internalType: "string"
3932
+ },
3933
+ {
3934
+ name: "value",
3935
+ type: "string",
3936
+ internalType: "string"
3937
+ }
3938
+ ]
3939
+ },
3940
+ {
3941
+ name: "restartPolicy",
3942
+ type: "string",
3943
+ internalType: "string"
3944
+ }
3945
+ ]
3946
+ }
3947
+ ]
3948
+ }
3949
+ ],
3950
+ anonymous: false
3951
+ },
3952
+ {
3953
+ type: "event",
3954
+ name: "GlobalMaxActiveAppsSet",
3955
+ inputs: [
3956
+ {
3957
+ name: "limit",
3958
+ type: "uint32",
3959
+ indexed: false,
3960
+ internalType: "uint32"
3961
+ }
3962
+ ],
3963
+ anonymous: false
3964
+ },
3965
+ {
3966
+ type: "event",
3967
+ name: "Initialized",
3968
+ inputs: [
3969
+ {
3970
+ name: "version",
3971
+ type: "uint8",
3972
+ indexed: false,
3973
+ internalType: "uint8"
3974
+ }
3975
+ ],
3976
+ anonymous: false
3977
+ },
3978
+ {
3979
+ type: "event",
3980
+ name: "MaxActiveAppsSet",
3981
+ inputs: [
3982
+ {
3983
+ name: "user",
3984
+ type: "address",
3985
+ indexed: true,
3986
+ internalType: "address"
3987
+ },
3988
+ {
3989
+ name: "limit",
3990
+ type: "uint32",
3991
+ indexed: false,
3992
+ internalType: "uint32"
3993
+ }
3994
+ ],
3995
+ anonymous: false
3996
+ },
3997
+ {
3998
+ type: "event",
3999
+ name: "UpgradeConfirmed",
4000
+ inputs: [
4001
+ {
4002
+ name: "app",
4003
+ type: "address",
4004
+ indexed: true,
4005
+ internalType: "contractIApp"
4006
+ },
4007
+ {
4008
+ name: "pendingReleaseBlockNumber",
4009
+ type: "uint32",
4010
+ indexed: false,
4011
+ internalType: "uint32"
4012
+ }
4013
+ ],
4014
+ anonymous: false
4015
+ },
4016
+ {
4017
+ type: "error",
4018
+ name: "AccountHasActiveApps",
4019
+ inputs: []
4020
+ },
4021
+ {
4022
+ type: "error",
4023
+ name: "AppAlreadyExists",
4024
+ inputs: []
4025
+ },
4026
+ {
4027
+ type: "error",
4028
+ name: "AppDoesNotExist",
4029
+ inputs: []
4030
+ },
4031
+ {
4032
+ type: "error",
4033
+ name: "GlobalMaxActiveAppsExceeded",
4034
+ inputs: []
4035
+ },
4036
+ {
4037
+ type: "error",
4038
+ name: "InvalidAppStatus",
4039
+ inputs: []
4040
+ },
4041
+ {
4042
+ type: "error",
4043
+ name: "InvalidPermissions",
4044
+ inputs: []
4045
+ },
4046
+ {
4047
+ type: "error",
4048
+ name: "InvalidReleaseMetadataURI",
4049
+ inputs: []
4050
+ },
4051
+ {
4052
+ type: "error",
4053
+ name: "InvalidShortString",
4054
+ inputs: []
4055
+ },
4056
+ {
4057
+ type: "error",
4058
+ name: "InvalidSignature",
4059
+ inputs: []
4060
+ },
4061
+ {
4062
+ type: "error",
4063
+ name: "MaxActiveAppsExceeded",
4064
+ inputs: []
4065
+ },
4066
+ {
4067
+ type: "error",
4068
+ name: "MoreThanOneArtifact",
4069
+ inputs: []
4070
+ },
4071
+ {
4072
+ type: "error",
4073
+ name: "NoPendingUpgrade",
4074
+ inputs: []
4075
+ },
4076
+ {
4077
+ type: "error",
4078
+ name: "SignatureExpired",
4079
+ inputs: []
4080
+ },
4081
+ {
4082
+ type: "error",
4083
+ name: "StringTooLong",
4084
+ inputs: [
4085
+ {
4086
+ name: "str",
4087
+ type: "string",
4088
+ internalType: "string"
4089
+ }
4090
+ ]
4091
+ }
4092
+ ];
4093
+
4094
+ // src/client/common/abis/AppController.v1_4.json
4095
+ var AppController_v1_4_default = [
4096
+ {
4097
+ type: "constructor",
4098
+ inputs: [
4099
+ {
4100
+ name: "_version",
4101
+ type: "string",
4102
+ internalType: "string"
4103
+ },
4104
+ {
4105
+ name: "_permissionController",
4106
+ type: "address",
4107
+ internalType: "contractIPermissionController"
4108
+ },
4109
+ {
4110
+ name: "_releaseManager",
4111
+ type: "address",
4112
+ internalType: "contractIReleaseManager"
4113
+ },
4114
+ {
4115
+ name: "_computeAVSRegistrar",
4116
+ type: "address",
4117
+ internalType: "contractIComputeAVSRegistrar"
4118
+ },
4119
+ {
4120
+ name: "_computeOperator",
4121
+ type: "address",
4122
+ internalType: "contractIComputeOperator"
4123
+ },
4124
+ {
4125
+ name: "_appBeacon",
4126
+ type: "address",
4127
+ internalType: "contractIBeacon"
4128
+ }
4129
+ ],
4130
+ stateMutability: "nonpayable"
4131
+ },
4132
+ {
4133
+ type: "function",
4134
+ name: "API_PERMISSION_TYPEHASH",
4135
+ inputs: [],
4136
+ outputs: [
4137
+ {
4138
+ name: "",
4139
+ type: "bytes32",
4140
+ internalType: "bytes32"
4141
+ }
4142
+ ],
4143
+ stateMutability: "view"
4144
+ },
4145
+ {
4146
+ type: "function",
4147
+ name: "appBeacon",
4148
+ inputs: [],
4149
+ outputs: [
4150
+ {
4151
+ name: "",
4152
+ type: "address",
4153
+ internalType: "contractIBeacon"
4154
+ }
4155
+ ],
4156
+ stateMutability: "view"
4157
+ },
4158
+ {
4159
+ type: "function",
4160
+ name: "calculateApiPermissionDigestHash",
4161
+ inputs: [
4162
+ {
4163
+ name: "permission",
4164
+ type: "bytes4",
4165
+ internalType: "bytes4"
4166
+ },
4167
+ {
4168
+ name: "expiry",
4169
+ type: "uint256",
4170
+ internalType: "uint256"
4171
+ }
4172
+ ],
4173
+ outputs: [
4174
+ {
4175
+ name: "",
4176
+ type: "bytes32",
4177
+ internalType: "bytes32"
4178
+ }
4179
+ ],
4180
+ stateMutability: "view"
4181
+ },
4182
+ {
4183
+ type: "function",
4184
+ name: "calculateAppId",
4185
+ inputs: [
4186
+ {
4187
+ name: "deployer",
4188
+ type: "address",
4189
+ internalType: "address"
4190
+ },
4191
+ {
4192
+ name: "salt",
4193
+ type: "bytes32",
4194
+ internalType: "bytes32"
4195
+ }
4196
+ ],
4197
+ outputs: [
4198
+ {
4199
+ name: "",
4200
+ type: "address",
4201
+ internalType: "contractIApp"
4202
+ }
4203
+ ],
4204
+ stateMutability: "view"
4205
+ },
4206
+ {
4207
+ type: "function",
4208
+ name: "computeAVSRegistrar",
4209
+ inputs: [],
4210
+ outputs: [
4211
+ {
4212
+ name: "",
4213
+ type: "address",
4214
+ internalType: "contractIComputeAVSRegistrar"
4215
+ }
4216
+ ],
4217
+ stateMutability: "view"
4218
+ },
4219
+ {
4220
+ type: "function",
4221
+ name: "computeOperator",
4222
+ inputs: [],
4223
+ outputs: [
4224
+ {
4225
+ name: "",
4226
+ type: "address",
4227
+ internalType: "contractIComputeOperator"
4228
+ }
4229
+ ],
4230
+ stateMutability: "view"
4231
+ },
4232
+ {
4233
+ type: "function",
4234
+ name: "createApp",
4235
+ inputs: [
4236
+ {
4237
+ name: "salt",
4238
+ type: "bytes32",
4239
+ internalType: "bytes32"
4240
+ },
4241
+ {
4242
+ name: "release",
4243
+ type: "tuple",
4244
+ internalType: "structIAppController.Release",
4245
+ components: [
4246
+ {
4247
+ name: "rmsRelease",
4248
+ type: "tuple",
4249
+ internalType: "structIReleaseManagerTypes.Release",
4250
+ components: [
4251
+ {
4252
+ name: "artifacts",
4253
+ type: "tuple[]",
4254
+ internalType: "structIReleaseManagerTypes.Artifact[]",
4255
+ components: [
4256
+ {
4257
+ name: "digest",
4258
+ type: "bytes32",
4259
+ internalType: "bytes32"
4260
+ },
4261
+ {
4262
+ name: "registry",
4263
+ type: "string",
4264
+ internalType: "string"
4265
+ }
4266
+ ]
4267
+ },
4268
+ {
4269
+ name: "upgradeByTime",
4270
+ type: "uint32",
4271
+ internalType: "uint32"
4272
+ }
4273
+ ]
4274
+ },
4275
+ {
4276
+ name: "publicEnv",
4277
+ type: "bytes",
4278
+ internalType: "bytes"
4279
+ },
4280
+ {
4281
+ name: "encryptedEnv",
4282
+ type: "bytes",
4283
+ internalType: "bytes"
4284
+ }
4285
+ ]
4286
+ }
4287
+ ],
4288
+ outputs: [
4289
+ {
4290
+ name: "app",
4291
+ type: "address",
4292
+ internalType: "contractIApp"
4293
+ }
4294
+ ],
4295
+ stateMutability: "nonpayable"
4296
+ },
4297
+ {
4298
+ type: "function",
4299
+ name: "createAppWithIsolatedBilling",
4300
+ inputs: [
4301
+ {
4302
+ name: "salt",
4303
+ type: "bytes32",
4304
+ internalType: "bytes32"
4305
+ },
4306
+ {
4307
+ name: "release",
4308
+ type: "tuple",
4309
+ internalType: "structIAppController.Release",
4310
+ components: [
4311
+ {
4312
+ name: "rmsRelease",
4313
+ type: "tuple",
4314
+ internalType: "structIReleaseManagerTypes.Release",
4315
+ components: [
4316
+ {
4317
+ name: "artifacts",
4318
+ type: "tuple[]",
4319
+ internalType: "structIReleaseManagerTypes.Artifact[]",
4320
+ components: [
4321
+ {
4322
+ name: "digest",
4323
+ type: "bytes32",
4324
+ internalType: "bytes32"
4325
+ },
4326
+ {
4327
+ name: "registry",
4328
+ type: "string",
4329
+ internalType: "string"
4330
+ }
4331
+ ]
4332
+ },
4333
+ {
4334
+ name: "upgradeByTime",
4335
+ type: "uint32",
4336
+ internalType: "uint32"
4337
+ }
4338
+ ]
4339
+ },
4340
+ {
4341
+ name: "publicEnv",
4342
+ type: "bytes",
4343
+ internalType: "bytes"
4344
+ },
4345
+ {
4346
+ name: "encryptedEnv",
4347
+ type: "bytes",
4348
+ internalType: "bytes"
4349
+ }
4350
+ ]
4351
+ }
4352
+ ],
4353
+ outputs: [
4354
+ {
4355
+ name: "app",
4356
+ type: "address",
4357
+ internalType: "contractIApp"
4358
+ }
4359
+ ],
4360
+ stateMutability: "nonpayable"
4361
+ },
4362
+ {
4363
+ type: "function",
4364
+ name: "domainSeparator",
4365
+ inputs: [],
4366
+ outputs: [
4367
+ {
4368
+ name: "",
4369
+ type: "bytes32",
4370
+ internalType: "bytes32"
4371
+ }
4372
+ ],
4373
+ stateMutability: "view"
4374
+ },
4375
+ {
4376
+ type: "function",
4377
+ name: "getActiveAppCount",
4378
+ inputs: [
4379
+ {
4380
+ name: "user",
4381
+ type: "address",
4382
+ internalType: "address"
4383
+ }
4384
+ ],
4385
+ outputs: [
4386
+ {
4387
+ name: "",
4388
+ type: "uint32",
4389
+ internalType: "uint32"
4390
+ }
4391
+ ],
4392
+ stateMutability: "view"
4393
+ },
4394
+ {
4395
+ type: "function",
4396
+ name: "getBillingType",
4397
+ inputs: [
4398
+ {
4399
+ name: "app",
4400
+ type: "address",
4401
+ internalType: "address"
4402
+ }
4403
+ ],
4404
+ outputs: [
4405
+ {
4406
+ name: "",
4407
+ type: "uint8",
4408
+ internalType: "uint8"
4409
+ }
4410
+ ],
4411
+ stateMutability: "view"
4412
+ },
4413
+ {
4414
+ type: "function",
4415
+ name: "getAppCreator",
4416
+ inputs: [
4417
+ {
4418
+ name: "app",
4419
+ type: "address",
4420
+ internalType: "contractIApp"
4421
+ }
4422
+ ],
4423
+ outputs: [
4424
+ {
4425
+ name: "",
4426
+ type: "address",
4427
+ internalType: "address"
4428
+ }
4429
+ ],
4430
+ stateMutability: "view"
4431
+ },
4432
+ {
4433
+ type: "function",
4434
+ name: "getAppLatestReleaseBlockNumber",
4435
+ inputs: [
4436
+ {
4437
+ name: "app",
4438
+ type: "address",
4439
+ internalType: "contractIApp"
4440
+ }
4441
+ ],
4442
+ outputs: [
4443
+ {
4444
+ name: "",
4445
+ type: "uint32",
4446
+ internalType: "uint32"
4447
+ }
4448
+ ],
4449
+ stateMutability: "view"
4450
+ },
4451
+ {
4452
+ type: "function",
4453
+ name: "getAppOperatorSetId",
4454
+ inputs: [
4455
+ {
4456
+ name: "app",
4457
+ type: "address",
4458
+ internalType: "contractIApp"
4459
+ }
4460
+ ],
4461
+ outputs: [
4462
+ {
4463
+ name: "",
4464
+ type: "uint32",
4465
+ internalType: "uint32"
4466
+ }
4467
+ ],
4468
+ stateMutability: "view"
4469
+ },
4470
+ {
4471
+ type: "function",
4472
+ name: "getAppStatus",
4473
+ inputs: [
4474
+ {
4475
+ name: "app",
4476
+ type: "address",
4477
+ internalType: "contractIApp"
4478
+ }
4479
+ ],
4480
+ outputs: [
4481
+ {
4482
+ name: "",
4483
+ type: "uint8",
4484
+ internalType: "enumIAppController.AppStatus"
4485
+ }
4486
+ ],
4487
+ stateMutability: "view"
4488
+ },
4489
+ {
4490
+ type: "function",
4491
+ name: "getApps",
4492
+ inputs: [
4493
+ {
4494
+ name: "offset",
4495
+ type: "uint256",
4496
+ internalType: "uint256"
4497
+ },
4498
+ {
4499
+ name: "limit",
4500
+ type: "uint256",
4501
+ internalType: "uint256"
4502
+ }
4503
+ ],
4504
+ outputs: [
4505
+ {
4506
+ name: "apps",
4507
+ type: "address[]",
4508
+ internalType: "contractIApp[]"
4509
+ },
4510
+ {
4511
+ name: "appConfigsMem",
4512
+ type: "tuple[]",
4513
+ internalType: "structIAppController.AppConfig[]",
4514
+ components: [
4515
+ {
4516
+ name: "creator",
4517
+ type: "address",
4518
+ internalType: "address"
4519
+ },
4520
+ {
4521
+ name: "operatorSetId",
4522
+ type: "uint32",
4523
+ internalType: "uint32"
4524
+ },
4525
+ {
4526
+ name: "latestReleaseBlockNumber",
4527
+ type: "uint32",
4528
+ internalType: "uint32"
4529
+ },
4530
+ {
4531
+ name: "status",
4532
+ type: "uint8",
4533
+ internalType: "enumIAppController.AppStatus"
4534
+ }
4535
+ ]
4536
+ }
4537
+ ],
4538
+ stateMutability: "view"
4539
+ },
4540
+ {
4541
+ type: "function",
4542
+ name: "getAppsByBillingAccount",
4543
+ inputs: [
4544
+ {
4545
+ name: "account",
4546
+ type: "address",
4547
+ internalType: "address"
4548
+ },
4549
+ {
4550
+ name: "offset",
4551
+ type: "uint256",
4552
+ internalType: "uint256"
4553
+ },
4554
+ {
4555
+ name: "limit",
4556
+ type: "uint256",
4557
+ internalType: "uint256"
4558
+ }
4559
+ ],
4560
+ outputs: [
4561
+ {
4562
+ name: "apps",
4563
+ type: "address[]",
4564
+ internalType: "contractIApp[]"
4565
+ },
4566
+ {
4567
+ name: "appConfigsMem",
4568
+ type: "tuple[]",
4569
+ internalType: "structIAppController.AppConfig[]",
4570
+ components: [
4571
+ {
4572
+ name: "creator",
4573
+ type: "address",
4574
+ internalType: "address"
4575
+ },
4576
+ {
4577
+ name: "operatorSetId",
4578
+ type: "uint32",
4579
+ internalType: "uint32"
4580
+ },
4581
+ {
4582
+ name: "latestReleaseBlockNumber",
4583
+ type: "uint32",
4584
+ internalType: "uint32"
4585
+ },
4586
+ {
4587
+ name: "status",
4588
+ type: "uint8",
4589
+ internalType: "enumIAppController.AppStatus"
4590
+ }
4591
+ ]
4592
+ }
4593
+ ],
4594
+ stateMutability: "view"
4595
+ },
4596
+ {
4597
+ type: "function",
4598
+ name: "getAppsByCreator",
4599
+ inputs: [
4600
+ {
4601
+ name: "creator",
4602
+ type: "address",
4603
+ internalType: "address"
4604
+ },
4605
+ {
4606
+ name: "offset",
4607
+ type: "uint256",
4608
+ internalType: "uint256"
4609
+ },
4610
+ {
4611
+ name: "limit",
4612
+ type: "uint256",
4613
+ internalType: "uint256"
4614
+ }
4615
+ ],
4616
+ outputs: [
4617
+ {
4618
+ name: "apps",
4619
+ type: "address[]",
4620
+ internalType: "contractIApp[]"
4621
+ },
4622
+ {
4623
+ name: "appConfigsMem",
4624
+ type: "tuple[]",
4625
+ internalType: "structIAppController.AppConfig[]",
4626
+ components: [
4627
+ {
4628
+ name: "creator",
4629
+ type: "address",
4630
+ internalType: "address"
4631
+ },
4632
+ {
4633
+ name: "operatorSetId",
4634
+ type: "uint32",
4635
+ internalType: "uint32"
4636
+ },
4637
+ {
4638
+ name: "latestReleaseBlockNumber",
4639
+ type: "uint32",
4640
+ internalType: "uint32"
4641
+ },
4642
+ {
4643
+ name: "status",
4644
+ type: "uint8",
4645
+ internalType: "enumIAppController.AppStatus"
4646
+ }
4647
+ ]
4648
+ }
4649
+ ],
4650
+ stateMutability: "view"
4651
+ },
4652
+ {
4653
+ type: "function",
4654
+ name: "getAppsByDeveloper",
4655
+ inputs: [
4656
+ {
4657
+ name: "developer",
4658
+ type: "address",
4659
+ internalType: "address"
4660
+ },
4661
+ {
4662
+ name: "offset",
4663
+ type: "uint256",
4664
+ internalType: "uint256"
4665
+ },
4666
+ {
4667
+ name: "limit",
4668
+ type: "uint256",
4669
+ internalType: "uint256"
4670
+ }
4671
+ ],
4672
+ outputs: [
4673
+ {
4674
+ name: "apps",
4675
+ type: "address[]",
4676
+ internalType: "contractIApp[]"
4677
+ },
4678
+ {
4679
+ name: "appConfigsMem",
4680
+ type: "tuple[]",
4681
+ internalType: "structIAppController.AppConfig[]",
4682
+ components: [
4683
+ {
4684
+ name: "creator",
4685
+ type: "address",
4686
+ internalType: "address"
4687
+ },
4688
+ {
4689
+ name: "operatorSetId",
4690
+ type: "uint32",
4691
+ internalType: "uint32"
4692
+ },
4693
+ {
4694
+ name: "latestReleaseBlockNumber",
4695
+ type: "uint32",
4696
+ internalType: "uint32"
4697
+ },
4698
+ {
4699
+ name: "status",
4700
+ type: "uint8",
4701
+ internalType: "enumIAppController.AppStatus"
4702
+ }
4703
+ ]
4704
+ }
4705
+ ],
4706
+ stateMutability: "view"
4707
+ },
4708
+ {
4709
+ type: "function",
4710
+ name: "getMaxActiveAppsPerUser",
4711
+ inputs: [
4712
+ {
4713
+ name: "user",
4714
+ type: "address",
4715
+ internalType: "address"
4716
+ }
4717
+ ],
4718
+ outputs: [
4719
+ {
4720
+ name: "",
4721
+ type: "uint32",
4722
+ internalType: "uint32"
4723
+ }
4724
+ ],
4725
+ stateMutability: "view"
4726
+ },
4727
+ {
4728
+ type: "function",
4729
+ name: "globalActiveAppCount",
4730
+ inputs: [],
4731
+ outputs: [
4732
+ {
4733
+ name: "",
4734
+ type: "uint32",
4735
+ internalType: "uint32"
4736
+ }
4737
+ ],
4738
+ stateMutability: "view"
4739
+ },
4740
+ {
4741
+ type: "function",
4742
+ name: "initialize",
4743
+ inputs: [
4744
+ {
4745
+ name: "admin",
4746
+ type: "address",
4747
+ internalType: "address"
4748
+ }
4749
+ ],
4750
+ outputs: [],
4751
+ stateMutability: "nonpayable"
4752
+ },
4753
+ {
4754
+ type: "function",
4755
+ name: "maxGlobalActiveApps",
4756
+ inputs: [],
4757
+ outputs: [
4758
+ {
4759
+ name: "",
4760
+ type: "uint32",
4761
+ internalType: "uint32"
4762
+ }
4763
+ ],
4764
+ stateMutability: "view"
4765
+ },
4766
+ {
4767
+ type: "function",
4768
+ name: "permissionController",
4769
+ inputs: [],
4770
+ outputs: [
4771
+ {
4772
+ name: "",
4773
+ type: "address",
4774
+ internalType: "contractIPermissionController"
4775
+ }
4776
+ ],
4777
+ stateMutability: "view"
4778
+ },
4779
+ {
4780
+ type: "function",
4781
+ name: "releaseManager",
4782
+ inputs: [],
4783
+ outputs: [
4784
+ {
4785
+ name: "",
4786
+ type: "address",
4787
+ internalType: "contractIReleaseManager"
4788
+ }
4789
+ ],
4790
+ stateMutability: "view"
4791
+ },
4792
+ {
4793
+ type: "function",
4794
+ name: "setMaxActiveAppsPerUser",
4795
+ inputs: [
4796
+ {
4797
+ name: "user",
4798
+ type: "address",
4799
+ internalType: "address"
4800
+ },
4801
+ {
4802
+ name: "limit",
4803
+ type: "uint32",
4804
+ internalType: "uint32"
4805
+ }
4806
+ ],
4807
+ outputs: [],
4808
+ stateMutability: "nonpayable"
4809
+ },
4810
+ {
4811
+ type: "function",
4812
+ name: "setMaxGlobalActiveApps",
4813
+ inputs: [
4814
+ {
4815
+ name: "limit",
4816
+ type: "uint32",
4817
+ internalType: "uint32"
4818
+ }
4819
+ ],
4820
+ outputs: [],
4821
+ stateMutability: "nonpayable"
4822
+ },
4823
+ {
4824
+ type: "function",
4825
+ name: "startApp",
4826
+ inputs: [
4827
+ {
4828
+ name: "app",
4829
+ type: "address",
4830
+ internalType: "contractIApp"
4831
+ }
4832
+ ],
4833
+ outputs: [],
4834
+ stateMutability: "nonpayable"
4835
+ },
4836
+ {
4837
+ type: "function",
4838
+ name: "stopApp",
4839
+ inputs: [
4840
+ {
4841
+ name: "app",
4842
+ type: "address",
4843
+ internalType: "contractIApp"
4844
+ }
4845
+ ],
4846
+ outputs: [],
4847
+ stateMutability: "nonpayable"
4848
+ },
4849
+ {
4850
+ type: "function",
4851
+ name: "suspend",
4852
+ inputs: [
4853
+ {
4854
+ name: "account",
4855
+ type: "address",
4856
+ internalType: "address"
4857
+ },
4858
+ {
4859
+ name: "apps",
4860
+ type: "address[]",
4861
+ internalType: "contractIApp[]"
4862
+ }
4863
+ ],
4864
+ outputs: [],
4865
+ stateMutability: "nonpayable"
4866
+ },
4867
+ {
4868
+ type: "function",
4869
+ name: "terminateApp",
4870
+ inputs: [
4871
+ {
4872
+ name: "app",
4873
+ type: "address",
4874
+ internalType: "contractIApp"
4875
+ }
4876
+ ],
4877
+ outputs: [],
4878
+ stateMutability: "nonpayable"
4879
+ },
4880
+ {
4881
+ type: "function",
4882
+ name: "terminateAppByAdmin",
4883
+ inputs: [
4884
+ {
4885
+ name: "app",
4886
+ type: "address",
4887
+ internalType: "contractIApp"
4888
+ }
4889
+ ],
4890
+ outputs: [],
4891
+ stateMutability: "nonpayable"
4892
+ },
4893
+ {
4894
+ type: "function",
4895
+ name: "updateAppMetadataURI",
4896
+ inputs: [
4897
+ {
4898
+ name: "app",
4899
+ type: "address",
4900
+ internalType: "contractIApp"
4901
+ },
4902
+ {
4903
+ name: "metadataURI",
4904
+ type: "string",
4905
+ internalType: "string"
4906
+ }
4907
+ ],
4908
+ outputs: [],
4909
+ stateMutability: "nonpayable"
4910
+ },
4911
+ {
4912
+ type: "function",
4913
+ name: "upgradeApp",
4914
+ inputs: [
4915
+ {
4916
+ name: "app",
4917
+ type: "address",
4918
+ internalType: "contractIApp"
4919
+ },
4920
+ {
4921
+ name: "release",
4922
+ type: "tuple",
4923
+ internalType: "structIAppController.Release",
4924
+ components: [
4925
+ {
4926
+ name: "rmsRelease",
4927
+ type: "tuple",
4928
+ internalType: "structIReleaseManagerTypes.Release",
4929
+ components: [
4930
+ {
4931
+ name: "artifacts",
4932
+ type: "tuple[]",
4933
+ internalType: "structIReleaseManagerTypes.Artifact[]",
4934
+ components: [
4935
+ {
4936
+ name: "digest",
4937
+ type: "bytes32",
4938
+ internalType: "bytes32"
4939
+ },
4940
+ {
4941
+ name: "registry",
4942
+ type: "string",
4943
+ internalType: "string"
4944
+ }
4945
+ ]
4946
+ },
4947
+ {
4948
+ name: "upgradeByTime",
4949
+ type: "uint32",
4950
+ internalType: "uint32"
4951
+ }
4952
+ ]
4953
+ },
4954
+ {
4955
+ name: "publicEnv",
4956
+ type: "bytes",
4957
+ internalType: "bytes"
4958
+ },
4959
+ {
4960
+ name: "encryptedEnv",
4961
+ type: "bytes",
4962
+ internalType: "bytes"
4963
+ }
4964
+ ]
4965
+ }
4966
+ ],
4967
+ outputs: [
4968
+ {
4969
+ name: "",
4970
+ type: "uint256",
4971
+ internalType: "uint256"
4972
+ }
4973
+ ],
4974
+ stateMutability: "nonpayable"
4975
+ },
4976
+ {
4977
+ type: "function",
4978
+ name: "version",
4979
+ inputs: [],
4980
+ outputs: [
4981
+ {
4982
+ name: "",
4983
+ type: "string",
4984
+ internalType: "string"
4985
+ }
4986
+ ],
4987
+ stateMutability: "view"
4988
+ },
4989
+ {
4990
+ type: "event",
4991
+ name: "AppCreated",
4992
+ inputs: [
4993
+ {
4994
+ name: "creator",
4995
+ type: "address",
4996
+ indexed: true,
4997
+ internalType: "address"
4998
+ },
4999
+ {
5000
+ name: "app",
5001
+ type: "address",
5002
+ indexed: true,
5003
+ internalType: "contractIApp"
5004
+ },
5005
+ {
5006
+ name: "operatorSetId",
5007
+ type: "uint32",
5008
+ indexed: false,
5009
+ internalType: "uint32"
5010
+ }
5011
+ ],
5012
+ anonymous: false
5013
+ },
5014
+ {
5015
+ type: "event",
5016
+ name: "AppMetadataURIUpdated",
5017
+ inputs: [
5018
+ {
5019
+ name: "app",
5020
+ type: "address",
5021
+ indexed: true,
5022
+ internalType: "contractIApp"
5023
+ },
5024
+ {
5025
+ name: "metadataURI",
5026
+ type: "string",
5027
+ indexed: false,
5028
+ internalType: "string"
5029
+ }
5030
+ ],
5031
+ anonymous: false
5032
+ },
5033
+ {
5034
+ type: "event",
5035
+ name: "AppStarted",
5036
+ inputs: [
5037
+ {
5038
+ name: "app",
5039
+ type: "address",
5040
+ indexed: true,
5041
+ internalType: "contractIApp"
5042
+ }
5043
+ ],
5044
+ anonymous: false
5045
+ },
5046
+ {
5047
+ type: "event",
5048
+ name: "AppStopped",
5049
+ inputs: [
5050
+ {
5051
+ name: "app",
5052
+ type: "address",
5053
+ indexed: true,
5054
+ internalType: "contractIApp"
5055
+ }
5056
+ ],
5057
+ anonymous: false
5058
+ },
5059
+ {
5060
+ type: "event",
5061
+ name: "AppSuspended",
5062
+ inputs: [
5063
+ {
5064
+ name: "app",
5065
+ type: "address",
5066
+ indexed: true,
5067
+ internalType: "contractIApp"
5068
+ }
5069
+ ],
5070
+ anonymous: false
5071
+ },
5072
+ {
5073
+ type: "event",
5074
+ name: "AppTerminated",
5075
+ inputs: [
5076
+ {
5077
+ name: "app",
5078
+ type: "address",
5079
+ indexed: true,
5080
+ internalType: "contractIApp"
5081
+ }
5082
+ ],
5083
+ anonymous: false
5084
+ },
5085
+ {
5086
+ type: "event",
5087
+ name: "AppTerminatedByAdmin",
5088
+ inputs: [
5089
+ {
5090
+ name: "app",
5091
+ type: "address",
5092
+ indexed: true,
5093
+ internalType: "contractIApp"
5094
+ }
5095
+ ],
5096
+ anonymous: false
5097
+ },
5098
+ {
5099
+ type: "event",
5100
+ name: "AppUpgraded",
5101
+ inputs: [
5102
+ {
5103
+ name: "app",
5104
+ type: "address",
5105
+ indexed: true,
5106
+ internalType: "contractIApp"
5107
+ },
5108
+ {
5109
+ name: "rmsReleaseId",
5110
+ type: "uint256",
5111
+ indexed: false,
5112
+ internalType: "uint256"
5113
+ },
5114
+ {
5115
+ name: "release",
5116
+ type: "tuple",
5117
+ indexed: false,
5118
+ internalType: "structIAppController.Release",
5119
+ components: [
5120
+ {
5121
+ name: "rmsRelease",
5122
+ type: "tuple",
5123
+ internalType: "structIReleaseManagerTypes.Release",
5124
+ components: [
5125
+ {
5126
+ name: "artifacts",
5127
+ type: "tuple[]",
5128
+ internalType: "structIReleaseManagerTypes.Artifact[]",
5129
+ components: [
5130
+ {
5131
+ name: "digest",
5132
+ type: "bytes32",
5133
+ internalType: "bytes32"
5134
+ },
5135
+ {
5136
+ name: "registry",
5137
+ type: "string",
5138
+ internalType: "string"
5139
+ }
5140
+ ]
5141
+ },
5142
+ {
5143
+ name: "upgradeByTime",
5144
+ type: "uint32",
5145
+ internalType: "uint32"
5146
+ }
5147
+ ]
5148
+ },
5149
+ {
5150
+ name: "publicEnv",
5151
+ type: "bytes",
5152
+ internalType: "bytes"
5153
+ },
5154
+ {
5155
+ name: "encryptedEnv",
5156
+ type: "bytes",
5157
+ internalType: "bytes"
5158
+ }
5159
+ ]
5160
+ }
5161
+ ],
5162
+ anonymous: false
5163
+ },
5164
+ {
5165
+ type: "event",
5166
+ name: "GlobalMaxActiveAppsSet",
5167
+ inputs: [
5168
+ {
5169
+ name: "limit",
5170
+ type: "uint32",
5171
+ indexed: false,
5172
+ internalType: "uint32"
5173
+ }
5174
+ ],
5175
+ anonymous: false
5176
+ },
5177
+ {
5178
+ type: "event",
5179
+ name: "Initialized",
5180
+ inputs: [
5181
+ {
3630
5182
  name: "version",
3631
5183
  type: "uint8",
3632
5184
  indexed: false,
@@ -4224,6 +5776,38 @@ var PermissionController_default = [
4224
5776
  ];
4225
5777
 
4226
5778
  // src/client/common/contract/caller.ts
5779
+ function appControllerAbiFor(environmentConfig) {
5780
+ return environmentConfig.releaseAbiVersion === "v1.4" ? AppController_v1_4_default : AppController_default;
5781
+ }
5782
+ function supportsContainerPolicy(environmentConfig) {
5783
+ return environmentConfig.releaseAbiVersion !== "v1.4";
5784
+ }
5785
+ function containerPolicyForViem(policy = EMPTY_CONTAINER_POLICY) {
5786
+ return {
5787
+ args: policy.args,
5788
+ cmdOverride: policy.cmdOverride,
5789
+ env: policy.env.map((e) => ({ key: e.key, value: e.value })),
5790
+ envOverride: policy.envOverride.map((e) => ({ key: e.key, value: e.value })),
5791
+ restartPolicy: policy.restartPolicy
5792
+ };
5793
+ }
5794
+ function releaseForViem(release, environmentConfig) {
5795
+ const base = {
5796
+ rmsRelease: {
5797
+ artifacts: release.rmsRelease.artifacts.map((artifact) => ({
5798
+ digest: `0x${(0, import_viem3.bytesToHex)(artifact.digest).slice(2).padStart(64, "0")}`,
5799
+ registry: artifact.registry
5800
+ })),
5801
+ upgradeByTime: release.rmsRelease.upgradeByTime
5802
+ },
5803
+ publicEnv: (0, import_viem3.bytesToHex)(release.publicEnv),
5804
+ encryptedEnv: (0, import_viem3.bytesToHex)(release.encryptedEnv)
5805
+ };
5806
+ if (!supportsContainerPolicy(environmentConfig)) {
5807
+ return base;
5808
+ }
5809
+ return { ...base, containerPolicy: containerPolicyForViem(release.containerPolicy) };
5810
+ }
4227
5811
  function formatETH(wei) {
4228
5812
  const eth = Number(wei) / 1e18;
4229
5813
  const costStr = eth.toFixed(6);
@@ -4240,7 +5824,7 @@ async function calculateAppID(options) {
4240
5824
  const saltHex = `0x${paddedSaltHex}`;
4241
5825
  const appID = await publicClient.readContract({
4242
5826
  address: environmentConfig.appControllerAddress,
4243
- abi: AppController_default,
5827
+ abi: appControllerAbiFor(environmentConfig),
4244
5828
  functionName: "calculateAppId",
4245
5829
  args: [ownerAddress, saltHex]
4246
5830
  });
@@ -4264,22 +5848,12 @@ async function prepareDeployBatch(options, logger = noopLogger) {
4264
5848
  const saltHexString = (0, import_viem3.bytesToHex)(salt).slice(2);
4265
5849
  const paddedSaltHex = saltHexString.padStart(64, "0");
4266
5850
  const saltHex = `0x${paddedSaltHex}`;
4267
- const releaseForViem = {
4268
- rmsRelease: {
4269
- artifacts: release.rmsRelease.artifacts.map((artifact) => ({
4270
- digest: `0x${(0, import_viem3.bytesToHex)(artifact.digest).slice(2).padStart(64, "0")}`,
4271
- registry: artifact.registry
4272
- })),
4273
- upgradeByTime: release.rmsRelease.upgradeByTime
4274
- },
4275
- publicEnv: (0, import_viem3.bytesToHex)(release.publicEnv),
4276
- encryptedEnv: (0, import_viem3.bytesToHex)(release.encryptedEnv)
4277
- };
5851
+ const release_ = releaseForViem(release, environmentConfig);
4278
5852
  const functionName = options.billTo === "app" ? "createAppWithIsolatedBilling" : "createApp";
4279
5853
  const createData = (0, import_viem3.encodeFunctionData)({
4280
- abi: AppController_default,
5854
+ abi: appControllerAbiFor(environmentConfig),
4281
5855
  functionName,
4282
- args: [saltHex, releaseForViem]
5856
+ args: [saltHex, release_]
4283
5857
  });
4284
5858
  const acceptAdminData = (0, import_viem3.encodeFunctionData)({
4285
5859
  abi: PermissionController_default,
@@ -4367,21 +5941,11 @@ async function prepareUpgradeBatch(options) {
4367
5941
  publicLogs,
4368
5942
  needsPermissionChange
4369
5943
  } = options;
4370
- const releaseForViem = {
4371
- rmsRelease: {
4372
- artifacts: release.rmsRelease.artifacts.map((artifact) => ({
4373
- digest: `0x${(0, import_viem3.bytesToHex)(artifact.digest).slice(2).padStart(64, "0")}`,
4374
- registry: artifact.registry
4375
- })),
4376
- upgradeByTime: release.rmsRelease.upgradeByTime
4377
- },
4378
- publicEnv: (0, import_viem3.bytesToHex)(release.publicEnv),
4379
- encryptedEnv: (0, import_viem3.bytesToHex)(release.encryptedEnv)
4380
- };
5944
+ const release_ = releaseForViem(release, environmentConfig);
4381
5945
  const upgradeData = (0, import_viem3.encodeFunctionData)({
4382
- abi: AppController_default,
5946
+ abi: appControllerAbiFor(environmentConfig),
4383
5947
  functionName: "upgradeApp",
4384
- args: [appID, releaseForViem]
5948
+ args: [appID, release_]
4385
5949
  });
4386
5950
  const executions = [
4387
5951
  {
@@ -4515,7 +6079,7 @@ ${pendingMessage}`);
4515
6079
  if (callError.data) {
4516
6080
  try {
4517
6081
  const decoded = (0, import_viem3.decodeErrorResult)({
4518
- abi: AppController_default,
6082
+ abi: appControllerAbiFor(environmentConfig),
4519
6083
  data: callError.data
4520
6084
  });
4521
6085
  const formattedError = formatAppControllerError(decoded);
@@ -4568,7 +6132,7 @@ function formatAppControllerError(decoded) {
4568
6132
  async function getActiveAppCount(publicClient, environmentConfig, user) {
4569
6133
  const count = await publicClient.readContract({
4570
6134
  address: environmentConfig.appControllerAddress,
4571
- abi: AppController_default,
6135
+ abi: appControllerAbiFor(environmentConfig),
4572
6136
  functionName: "getActiveAppCount",
4573
6137
  args: [user]
4574
6138
  });
@@ -4577,7 +6141,7 @@ async function getActiveAppCount(publicClient, environmentConfig, user) {
4577
6141
  async function getMaxActiveAppsPerUser(publicClient, environmentConfig, user) {
4578
6142
  const quota = await publicClient.readContract({
4579
6143
  address: environmentConfig.appControllerAddress,
4580
- abi: AppController_default,
6144
+ abi: appControllerAbiFor(environmentConfig),
4581
6145
  functionName: "getMaxActiveAppsPerUser",
4582
6146
  args: [user]
4583
6147
  });
@@ -4586,7 +6150,7 @@ async function getMaxActiveAppsPerUser(publicClient, environmentConfig, user) {
4586
6150
  async function getBillingType(publicClient, environmentConfig, app) {
4587
6151
  const result = await publicClient.readContract({
4588
6152
  address: environmentConfig.appControllerAddress,
4589
- abi: AppController_default,
6153
+ abi: appControllerAbiFor(environmentConfig),
4590
6154
  functionName: "getBillingType",
4591
6155
  args: [app]
4592
6156
  });
@@ -4595,7 +6159,7 @@ async function getBillingType(publicClient, environmentConfig, app) {
4595
6159
  async function getAppsByBillingAccount(publicClient, environmentConfig, account, offset, limit) {
4596
6160
  const result = await publicClient.readContract({
4597
6161
  address: environmentConfig.appControllerAddress,
4598
- abi: AppController_default,
6162
+ abi: appControllerAbiFor(environmentConfig),
4599
6163
  functionName: "getAppsByBillingAccount",
4600
6164
  args: [account, offset, limit]
4601
6165
  });
@@ -4729,7 +6293,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
4729
6293
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
4730
6294
  var CanUpdateAppProfilePermission = "0x036fef61";
4731
6295
  function getDefaultClientId() {
4732
- const version = true ? "1.0.0-dev.6" : "0.0.0";
6296
+ const version = true ? "1.0.0-dev.7" : "0.0.0";
4733
6297
  return `ecloud-sdk/v${version}`;
4734
6298
  }
4735
6299
  var UserApiClient = class {
@@ -5293,6 +6857,8 @@ var ENVIRONMENTS = {
5293
6857
  name: "sepolia",
5294
6858
  build: "dev",
5295
6859
  appControllerAddress: "0xa86DC1C47cb2518327fB4f9A1627F51966c83B92",
6860
+ releaseAbiVersion: "v1.5",
6861
+ // AppController upgraded to v1.5.x (containerPolicy)
5296
6862
  permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
5297
6863
  erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
5298
6864
  kmsServerURL: "http://10.128.0.57:8080",
@@ -5306,6 +6872,8 @@ var ENVIRONMENTS = {
5306
6872
  name: "sepolia",
5307
6873
  build: "prod",
5308
6874
  appControllerAddress: "0x0dd810a6ffba6a9820a10d97b659f07d8d23d4E2",
6875
+ releaseAbiVersion: "v1.4",
6876
+ // prod still on AppController v1.4.0 (3-field Release)
5309
6877
  permissionControllerAddress: ChainAddresses[SEPOLIA_CHAIN_ID].PermissionController,
5310
6878
  erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
5311
6879
  kmsServerURL: "http://10.128.15.203:8080",
@@ -5320,6 +6888,8 @@ var ENVIRONMENTS = {
5320
6888
  name: "mainnet-alpha",
5321
6889
  build: "prod",
5322
6890
  appControllerAddress: "0xc38d35Fc995e75342A21CBd6D770305b142Fbe67",
6891
+ releaseAbiVersion: "v1.4",
6892
+ // prod still on AppController v1.4.0 (3-field Release)
5323
6893
  permissionControllerAddress: ChainAddresses[MAINNET_CHAIN_ID].PermissionController,
5324
6894
  erc7702DelegatorAddress: CommonAddresses.ERC7702Delegator,
5325
6895
  kmsServerURL: "http://10.128.0.2:8080",