@cloakely/sdk 0.6.0 → 0.7.0

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/abis.js CHANGED
@@ -7596,3 +7596,1659 @@ export const cloakFeeLockerAbi = [
7596
7596
  "inputs": []
7597
7597
  }
7598
7598
  ];
7599
+ export const sharedVaultAbi = [
7600
+ {
7601
+ "type": "constructor",
7602
+ "inputs": [
7603
+ {
7604
+ "name": "config_",
7605
+ "type": "address",
7606
+ "internalType": "contract CloakConfig"
7607
+ },
7608
+ {
7609
+ "name": "hasher2_",
7610
+ "type": "address",
7611
+ "internalType": "contract IPoseidon2"
7612
+ },
7613
+ {
7614
+ "name": "hasher4_",
7615
+ "type": "address",
7616
+ "internalType": "contract IPoseidon4"
7617
+ },
7618
+ {
7619
+ "name": "verifier_",
7620
+ "type": "address",
7621
+ "internalType": "contract IVerifierMA"
7622
+ },
7623
+ {
7624
+ "name": "vaults_",
7625
+ "type": "address",
7626
+ "internalType": "contract IVaultList"
7627
+ }
7628
+ ],
7629
+ "stateMutability": "nonpayable"
7630
+ },
7631
+ {
7632
+ "type": "function",
7633
+ "name": "FIELD_SIZE",
7634
+ "inputs": [],
7635
+ "outputs": [
7636
+ {
7637
+ "name": "",
7638
+ "type": "uint256",
7639
+ "internalType": "uint256"
7640
+ }
7641
+ ],
7642
+ "stateMutability": "view"
7643
+ },
7644
+ {
7645
+ "type": "function",
7646
+ "name": "LEVELS",
7647
+ "inputs": [],
7648
+ "outputs": [
7649
+ {
7650
+ "name": "",
7651
+ "type": "uint32",
7652
+ "internalType": "uint32"
7653
+ }
7654
+ ],
7655
+ "stateMutability": "view"
7656
+ },
7657
+ {
7658
+ "type": "function",
7659
+ "name": "MAX_EXT_AMOUNT",
7660
+ "inputs": [],
7661
+ "outputs": [
7662
+ {
7663
+ "name": "",
7664
+ "type": "int256",
7665
+ "internalType": "int256"
7666
+ }
7667
+ ],
7668
+ "stateMutability": "view"
7669
+ },
7670
+ {
7671
+ "type": "function",
7672
+ "name": "MAX_FEE",
7673
+ "inputs": [],
7674
+ "outputs": [
7675
+ {
7676
+ "name": "",
7677
+ "type": "uint256",
7678
+ "internalType": "uint256"
7679
+ }
7680
+ ],
7681
+ "stateMutability": "view"
7682
+ },
7683
+ {
7684
+ "type": "function",
7685
+ "name": "MAX_NOTE_AMOUNT",
7686
+ "inputs": [],
7687
+ "outputs": [
7688
+ {
7689
+ "name": "",
7690
+ "type": "uint256",
7691
+ "internalType": "uint256"
7692
+ }
7693
+ ],
7694
+ "stateMutability": "view"
7695
+ },
7696
+ {
7697
+ "type": "function",
7698
+ "name": "admit",
7699
+ "inputs": [
7700
+ {
7701
+ "name": "factory",
7702
+ "type": "address",
7703
+ "internalType": "contract ISharedLaunchFactory"
7704
+ },
7705
+ {
7706
+ "name": "launchIndex",
7707
+ "type": "uint256",
7708
+ "internalType": "uint256"
7709
+ }
7710
+ ],
7711
+ "outputs": [],
7712
+ "stateMutability": "nonpayable"
7713
+ },
7714
+ {
7715
+ "type": "function",
7716
+ "name": "admitted",
7717
+ "inputs": [
7718
+ {
7719
+ "name": "",
7720
+ "type": "address",
7721
+ "internalType": "address"
7722
+ }
7723
+ ],
7724
+ "outputs": [
7725
+ {
7726
+ "name": "",
7727
+ "type": "bool",
7728
+ "internalType": "bool"
7729
+ }
7730
+ ],
7731
+ "stateMutability": "view"
7732
+ },
7733
+ {
7734
+ "type": "function",
7735
+ "name": "afterFee",
7736
+ "inputs": [
7737
+ {
7738
+ "name": "amount",
7739
+ "type": "uint256",
7740
+ "internalType": "uint256"
7741
+ }
7742
+ ],
7743
+ "outputs": [
7744
+ {
7745
+ "name": "",
7746
+ "type": "uint256",
7747
+ "internalType": "uint256"
7748
+ }
7749
+ ],
7750
+ "stateMutability": "view"
7751
+ },
7752
+ {
7753
+ "type": "function",
7754
+ "name": "calculatePublicAmount",
7755
+ "inputs": [
7756
+ {
7757
+ "name": "extAmount",
7758
+ "type": "int256",
7759
+ "internalType": "int256"
7760
+ },
7761
+ {
7762
+ "name": "fee",
7763
+ "type": "uint256",
7764
+ "internalType": "uint256"
7765
+ }
7766
+ ],
7767
+ "outputs": [
7768
+ {
7769
+ "name": "",
7770
+ "type": "uint256",
7771
+ "internalType": "uint256"
7772
+ }
7773
+ ],
7774
+ "stateMutability": "pure"
7775
+ },
7776
+ {
7777
+ "type": "function",
7778
+ "name": "collectFees",
7779
+ "inputs": [
7780
+ {
7781
+ "name": "token",
7782
+ "type": "address",
7783
+ "internalType": "address"
7784
+ }
7785
+ ],
7786
+ "outputs": [],
7787
+ "stateMutability": "nonpayable"
7788
+ },
7789
+ {
7790
+ "type": "function",
7791
+ "name": "config",
7792
+ "inputs": [],
7793
+ "outputs": [
7794
+ {
7795
+ "name": "",
7796
+ "type": "address",
7797
+ "internalType": "contract CloakConfig"
7798
+ }
7799
+ ],
7800
+ "stateMutability": "view"
7801
+ },
7802
+ {
7803
+ "type": "function",
7804
+ "name": "currentRoot",
7805
+ "inputs": [],
7806
+ "outputs": [
7807
+ {
7808
+ "name": "",
7809
+ "type": "uint256",
7810
+ "internalType": "uint256"
7811
+ }
7812
+ ],
7813
+ "stateMutability": "view"
7814
+ },
7815
+ {
7816
+ "type": "function",
7817
+ "name": "depositTo",
7818
+ "inputs": [
7819
+ {
7820
+ "name": "token",
7821
+ "type": "address",
7822
+ "internalType": "address"
7823
+ },
7824
+ {
7825
+ "name": "pubKey",
7826
+ "type": "uint256",
7827
+ "internalType": "uint256"
7828
+ },
7829
+ {
7830
+ "name": "amount",
7831
+ "type": "uint256",
7832
+ "internalType": "uint256"
7833
+ },
7834
+ {
7835
+ "name": "blinding",
7836
+ "type": "uint256",
7837
+ "internalType": "uint256"
7838
+ },
7839
+ {
7840
+ "name": "encryptedOutput",
7841
+ "type": "bytes",
7842
+ "internalType": "bytes"
7843
+ }
7844
+ ],
7845
+ "outputs": [
7846
+ {
7847
+ "name": "commitment",
7848
+ "type": "uint256",
7849
+ "internalType": "uint256"
7850
+ },
7851
+ {
7852
+ "name": "index",
7853
+ "type": "uint256",
7854
+ "internalType": "uint256"
7855
+ }
7856
+ ],
7857
+ "stateMutability": "nonpayable"
7858
+ },
7859
+ {
7860
+ "type": "function",
7861
+ "name": "deposited",
7862
+ "inputs": [
7863
+ {
7864
+ "name": "",
7865
+ "type": "address",
7866
+ "internalType": "address"
7867
+ }
7868
+ ],
7869
+ "outputs": [
7870
+ {
7871
+ "name": "",
7872
+ "type": "uint256",
7873
+ "internalType": "uint256"
7874
+ }
7875
+ ],
7876
+ "stateMutability": "view"
7877
+ },
7878
+ {
7879
+ "type": "function",
7880
+ "name": "epoch",
7881
+ "inputs": [],
7882
+ "outputs": [
7883
+ {
7884
+ "name": "",
7885
+ "type": "uint32",
7886
+ "internalType": "uint32"
7887
+ }
7888
+ ],
7889
+ "stateMutability": "view"
7890
+ },
7891
+ {
7892
+ "type": "function",
7893
+ "name": "feesOwed",
7894
+ "inputs": [
7895
+ {
7896
+ "name": "",
7897
+ "type": "address",
7898
+ "internalType": "address"
7899
+ }
7900
+ ],
7901
+ "outputs": [
7902
+ {
7903
+ "name": "",
7904
+ "type": "uint256",
7905
+ "internalType": "uint256"
7906
+ }
7907
+ ],
7908
+ "stateMutability": "view"
7909
+ },
7910
+ {
7911
+ "type": "function",
7912
+ "name": "filledSubtrees",
7913
+ "inputs": [
7914
+ {
7915
+ "name": "",
7916
+ "type": "uint256",
7917
+ "internalType": "uint256"
7918
+ }
7919
+ ],
7920
+ "outputs": [
7921
+ {
7922
+ "name": "",
7923
+ "type": "uint256",
7924
+ "internalType": "uint256"
7925
+ }
7926
+ ],
7927
+ "stateMutability": "view"
7928
+ },
7929
+ {
7930
+ "type": "function",
7931
+ "name": "hashExtData",
7932
+ "inputs": [
7933
+ {
7934
+ "name": "extData",
7935
+ "type": "tuple",
7936
+ "internalType": "struct SharedVault.ExtData",
7937
+ "components": [
7938
+ {
7939
+ "name": "recipient",
7940
+ "type": "address",
7941
+ "internalType": "address"
7942
+ },
7943
+ {
7944
+ "name": "extAmount",
7945
+ "type": "int256",
7946
+ "internalType": "int256"
7947
+ },
7948
+ {
7949
+ "name": "relayer",
7950
+ "type": "address",
7951
+ "internalType": "address"
7952
+ },
7953
+ {
7954
+ "name": "fee",
7955
+ "type": "uint256",
7956
+ "internalType": "uint256"
7957
+ },
7958
+ {
7959
+ "name": "encryptedOutput1",
7960
+ "type": "bytes",
7961
+ "internalType": "bytes"
7962
+ },
7963
+ {
7964
+ "name": "encryptedOutput2",
7965
+ "type": "bytes",
7966
+ "internalType": "bytes"
7967
+ },
7968
+ {
7969
+ "name": "data",
7970
+ "type": "bytes",
7971
+ "internalType": "bytes"
7972
+ }
7973
+ ]
7974
+ }
7975
+ ],
7976
+ "outputs": [
7977
+ {
7978
+ "name": "",
7979
+ "type": "uint256",
7980
+ "internalType": "uint256"
7981
+ }
7982
+ ],
7983
+ "stateMutability": "pure"
7984
+ },
7985
+ {
7986
+ "type": "function",
7987
+ "name": "hashLeftRight",
7988
+ "inputs": [
7989
+ {
7990
+ "name": "left",
7991
+ "type": "uint256",
7992
+ "internalType": "uint256"
7993
+ },
7994
+ {
7995
+ "name": "right",
7996
+ "type": "uint256",
7997
+ "internalType": "uint256"
7998
+ }
7999
+ ],
8000
+ "outputs": [
8001
+ {
8002
+ "name": "",
8003
+ "type": "uint256",
8004
+ "internalType": "uint256"
8005
+ }
8006
+ ],
8007
+ "stateMutability": "view"
8008
+ },
8009
+ {
8010
+ "type": "function",
8011
+ "name": "hasher",
8012
+ "inputs": [],
8013
+ "outputs": [
8014
+ {
8015
+ "name": "",
8016
+ "type": "address",
8017
+ "internalType": "contract IPoseidon2"
8018
+ }
8019
+ ],
8020
+ "stateMutability": "view"
8021
+ },
8022
+ {
8023
+ "type": "function",
8024
+ "name": "hasher4",
8025
+ "inputs": [],
8026
+ "outputs": [
8027
+ {
8028
+ "name": "",
8029
+ "type": "address",
8030
+ "internalType": "contract IPoseidon4"
8031
+ }
8032
+ ],
8033
+ "stateMutability": "view"
8034
+ },
8035
+ {
8036
+ "type": "function",
8037
+ "name": "isKnownRoot",
8038
+ "inputs": [
8039
+ {
8040
+ "name": "root",
8041
+ "type": "uint256",
8042
+ "internalType": "uint256"
8043
+ }
8044
+ ],
8045
+ "outputs": [
8046
+ {
8047
+ "name": "",
8048
+ "type": "bool",
8049
+ "internalType": "bool"
8050
+ }
8051
+ ],
8052
+ "stateMutability": "view"
8053
+ },
8054
+ {
8055
+ "type": "function",
8056
+ "name": "isSpent",
8057
+ "inputs": [
8058
+ {
8059
+ "name": "nullifierHash",
8060
+ "type": "uint256",
8061
+ "internalType": "uint256"
8062
+ }
8063
+ ],
8064
+ "outputs": [
8065
+ {
8066
+ "name": "",
8067
+ "type": "bool",
8068
+ "internalType": "bool"
8069
+ }
8070
+ ],
8071
+ "stateMutability": "view"
8072
+ },
8073
+ {
8074
+ "type": "function",
8075
+ "name": "knownRoots",
8076
+ "inputs": [
8077
+ {
8078
+ "name": "",
8079
+ "type": "uint256",
8080
+ "internalType": "uint256"
8081
+ }
8082
+ ],
8083
+ "outputs": [
8084
+ {
8085
+ "name": "",
8086
+ "type": "bool",
8087
+ "internalType": "bool"
8088
+ }
8089
+ ],
8090
+ "stateMutability": "view"
8091
+ },
8092
+ {
8093
+ "type": "function",
8094
+ "name": "marketOf",
8095
+ "inputs": [
8096
+ {
8097
+ "name": "",
8098
+ "type": "address",
8099
+ "internalType": "address"
8100
+ }
8101
+ ],
8102
+ "outputs": [
8103
+ {
8104
+ "name": "",
8105
+ "type": "address",
8106
+ "internalType": "address"
8107
+ }
8108
+ ],
8109
+ "stateMutability": "view"
8110
+ },
8111
+ {
8112
+ "type": "function",
8113
+ "name": "nextIndex",
8114
+ "inputs": [],
8115
+ "outputs": [
8116
+ {
8117
+ "name": "",
8118
+ "type": "uint32",
8119
+ "internalType": "uint32"
8120
+ }
8121
+ ],
8122
+ "stateMutability": "view"
8123
+ },
8124
+ {
8125
+ "type": "function",
8126
+ "name": "nullifierHashes",
8127
+ "inputs": [
8128
+ {
8129
+ "name": "",
8130
+ "type": "uint256",
8131
+ "internalType": "uint256"
8132
+ }
8133
+ ],
8134
+ "outputs": [
8135
+ {
8136
+ "name": "",
8137
+ "type": "bool",
8138
+ "internalType": "bool"
8139
+ }
8140
+ ],
8141
+ "stateMutability": "view"
8142
+ },
8143
+ {
8144
+ "type": "function",
8145
+ "name": "tokens",
8146
+ "inputs": [
8147
+ {
8148
+ "name": "",
8149
+ "type": "uint256",
8150
+ "internalType": "uint256"
8151
+ }
8152
+ ],
8153
+ "outputs": [
8154
+ {
8155
+ "name": "",
8156
+ "type": "address",
8157
+ "internalType": "address"
8158
+ }
8159
+ ],
8160
+ "stateMutability": "view"
8161
+ },
8162
+ {
8163
+ "type": "function",
8164
+ "name": "tokensCount",
8165
+ "inputs": [],
8166
+ "outputs": [
8167
+ {
8168
+ "name": "",
8169
+ "type": "uint256",
8170
+ "internalType": "uint256"
8171
+ }
8172
+ ],
8173
+ "stateMutability": "view"
8174
+ },
8175
+ {
8176
+ "type": "function",
8177
+ "name": "transact",
8178
+ "inputs": [
8179
+ {
8180
+ "name": "proof",
8181
+ "type": "tuple",
8182
+ "internalType": "struct SharedVault.Proof",
8183
+ "components": [
8184
+ {
8185
+ "name": "a",
8186
+ "type": "uint256[2]",
8187
+ "internalType": "uint256[2]"
8188
+ },
8189
+ {
8190
+ "name": "b",
8191
+ "type": "uint256[2][2]",
8192
+ "internalType": "uint256[2][2]"
8193
+ },
8194
+ {
8195
+ "name": "c",
8196
+ "type": "uint256[2]",
8197
+ "internalType": "uint256[2]"
8198
+ },
8199
+ {
8200
+ "name": "root",
8201
+ "type": "uint256",
8202
+ "internalType": "uint256"
8203
+ },
8204
+ {
8205
+ "name": "publicAmount",
8206
+ "type": "uint256",
8207
+ "internalType": "uint256"
8208
+ },
8209
+ {
8210
+ "name": "extDataHash",
8211
+ "type": "uint256",
8212
+ "internalType": "uint256"
8213
+ },
8214
+ {
8215
+ "name": "publicAsset",
8216
+ "type": "uint256",
8217
+ "internalType": "uint256"
8218
+ },
8219
+ {
8220
+ "name": "inputNullifiers",
8221
+ "type": "uint256[2]",
8222
+ "internalType": "uint256[2]"
8223
+ },
8224
+ {
8225
+ "name": "outputCommitments",
8226
+ "type": "uint256[2]",
8227
+ "internalType": "uint256[2]"
8228
+ }
8229
+ ]
8230
+ },
8231
+ {
8232
+ "name": "extData",
8233
+ "type": "tuple",
8234
+ "internalType": "struct SharedVault.ExtData",
8235
+ "components": [
8236
+ {
8237
+ "name": "recipient",
8238
+ "type": "address",
8239
+ "internalType": "address"
8240
+ },
8241
+ {
8242
+ "name": "extAmount",
8243
+ "type": "int256",
8244
+ "internalType": "int256"
8245
+ },
8246
+ {
8247
+ "name": "relayer",
8248
+ "type": "address",
8249
+ "internalType": "address"
8250
+ },
8251
+ {
8252
+ "name": "fee",
8253
+ "type": "uint256",
8254
+ "internalType": "uint256"
8255
+ },
8256
+ {
8257
+ "name": "encryptedOutput1",
8258
+ "type": "bytes",
8259
+ "internalType": "bytes"
8260
+ },
8261
+ {
8262
+ "name": "encryptedOutput2",
8263
+ "type": "bytes",
8264
+ "internalType": "bytes"
8265
+ },
8266
+ {
8267
+ "name": "data",
8268
+ "type": "bytes",
8269
+ "internalType": "bytes"
8270
+ }
8271
+ ]
8272
+ }
8273
+ ],
8274
+ "outputs": [],
8275
+ "stateMutability": "nonpayable"
8276
+ },
8277
+ {
8278
+ "type": "function",
8279
+ "name": "vaults",
8280
+ "inputs": [],
8281
+ "outputs": [
8282
+ {
8283
+ "name": "",
8284
+ "type": "address",
8285
+ "internalType": "contract IVaultList"
8286
+ }
8287
+ ],
8288
+ "stateMutability": "view"
8289
+ },
8290
+ {
8291
+ "type": "function",
8292
+ "name": "verifier",
8293
+ "inputs": [],
8294
+ "outputs": [
8295
+ {
8296
+ "name": "",
8297
+ "type": "address",
8298
+ "internalType": "contract IVerifierMA"
8299
+ }
8300
+ ],
8301
+ "stateMutability": "view"
8302
+ },
8303
+ {
8304
+ "type": "function",
8305
+ "name": "zeros",
8306
+ "inputs": [
8307
+ {
8308
+ "name": "i",
8309
+ "type": "uint256",
8310
+ "internalType": "uint256"
8311
+ }
8312
+ ],
8313
+ "outputs": [
8314
+ {
8315
+ "name": "",
8316
+ "type": "uint256",
8317
+ "internalType": "uint256"
8318
+ }
8319
+ ],
8320
+ "stateMutability": "pure"
8321
+ },
8322
+ {
8323
+ "type": "event",
8324
+ "name": "Admitted",
8325
+ "inputs": [
8326
+ {
8327
+ "name": "token",
8328
+ "type": "address",
8329
+ "indexed": true,
8330
+ "internalType": "address"
8331
+ },
8332
+ {
8333
+ "name": "market",
8334
+ "type": "address",
8335
+ "indexed": false,
8336
+ "internalType": "address"
8337
+ },
8338
+ {
8339
+ "name": "index",
8340
+ "type": "uint256",
8341
+ "indexed": false,
8342
+ "internalType": "uint256"
8343
+ }
8344
+ ],
8345
+ "anonymous": false
8346
+ },
8347
+ {
8348
+ "type": "event",
8349
+ "name": "Deposit",
8350
+ "inputs": [
8351
+ {
8352
+ "name": "token",
8353
+ "type": "address",
8354
+ "indexed": true,
8355
+ "internalType": "address"
8356
+ },
8357
+ {
8358
+ "name": "amount",
8359
+ "type": "uint256",
8360
+ "indexed": false,
8361
+ "internalType": "uint256"
8362
+ }
8363
+ ],
8364
+ "anonymous": false
8365
+ },
8366
+ {
8367
+ "type": "event",
8368
+ "name": "FeesCollected",
8369
+ "inputs": [
8370
+ {
8371
+ "name": "token",
8372
+ "type": "address",
8373
+ "indexed": true,
8374
+ "internalType": "address"
8375
+ },
8376
+ {
8377
+ "name": "to",
8378
+ "type": "address",
8379
+ "indexed": true,
8380
+ "internalType": "address"
8381
+ },
8382
+ {
8383
+ "name": "amount",
8384
+ "type": "uint256",
8385
+ "indexed": false,
8386
+ "internalType": "uint256"
8387
+ }
8388
+ ],
8389
+ "anonymous": false
8390
+ },
8391
+ {
8392
+ "type": "event",
8393
+ "name": "NewCommitment",
8394
+ "inputs": [
8395
+ {
8396
+ "name": "commitment",
8397
+ "type": "uint256",
8398
+ "indexed": false,
8399
+ "internalType": "uint256"
8400
+ },
8401
+ {
8402
+ "name": "index",
8403
+ "type": "uint256",
8404
+ "indexed": false,
8405
+ "internalType": "uint256"
8406
+ },
8407
+ {
8408
+ "name": "encryptedOutput",
8409
+ "type": "bytes",
8410
+ "indexed": false,
8411
+ "internalType": "bytes"
8412
+ }
8413
+ ],
8414
+ "anonymous": false
8415
+ },
8416
+ {
8417
+ "type": "event",
8418
+ "name": "NewEpoch",
8419
+ "inputs": [
8420
+ {
8421
+ "name": "epoch",
8422
+ "type": "uint32",
8423
+ "indexed": false,
8424
+ "internalType": "uint32"
8425
+ }
8426
+ ],
8427
+ "anonymous": false
8428
+ },
8429
+ {
8430
+ "type": "event",
8431
+ "name": "NewNullifier",
8432
+ "inputs": [
8433
+ {
8434
+ "name": "nullifier",
8435
+ "type": "uint256",
8436
+ "indexed": false,
8437
+ "internalType": "uint256"
8438
+ }
8439
+ ],
8440
+ "anonymous": false
8441
+ },
8442
+ {
8443
+ "type": "event",
8444
+ "name": "WithdrawFee",
8445
+ "inputs": [
8446
+ {
8447
+ "name": "token",
8448
+ "type": "address",
8449
+ "indexed": true,
8450
+ "internalType": "address"
8451
+ },
8452
+ {
8453
+ "name": "fee",
8454
+ "type": "uint256",
8455
+ "indexed": false,
8456
+ "internalType": "uint256"
8457
+ }
8458
+ ],
8459
+ "anonymous": false
8460
+ },
8461
+ {
8462
+ "type": "event",
8463
+ "name": "Withdrawal",
8464
+ "inputs": [
8465
+ {
8466
+ "name": "token",
8467
+ "type": "address",
8468
+ "indexed": true,
8469
+ "internalType": "address"
8470
+ },
8471
+ {
8472
+ "name": "amount",
8473
+ "type": "uint256",
8474
+ "indexed": false,
8475
+ "internalType": "uint256"
8476
+ }
8477
+ ],
8478
+ "anonymous": false
8479
+ },
8480
+ {
8481
+ "type": "error",
8482
+ "name": "AlreadyAdmitted",
8483
+ "inputs": []
8484
+ },
8485
+ {
8486
+ "type": "error",
8487
+ "name": "BadExtDataHash",
8488
+ "inputs": []
8489
+ },
8490
+ {
8491
+ "type": "error",
8492
+ "name": "BadPublicAmount",
8493
+ "inputs": []
8494
+ },
8495
+ {
8496
+ "type": "error",
8497
+ "name": "FeeOnTransferToken",
8498
+ "inputs": []
8499
+ },
8500
+ {
8501
+ "type": "error",
8502
+ "name": "HasOwnVault",
8503
+ "inputs": []
8504
+ },
8505
+ {
8506
+ "type": "error",
8507
+ "name": "HiddenAssetMustBeFree",
8508
+ "inputs": []
8509
+ },
8510
+ {
8511
+ "type": "error",
8512
+ "name": "InvalidExtAmount",
8513
+ "inputs": []
8514
+ },
8515
+ {
8516
+ "type": "error",
8517
+ "name": "InvalidFee",
8518
+ "inputs": []
8519
+ },
8520
+ {
8521
+ "type": "error",
8522
+ "name": "InvalidNote",
8523
+ "inputs": []
8524
+ },
8525
+ {
8526
+ "type": "error",
8527
+ "name": "InvalidProof",
8528
+ "inputs": []
8529
+ },
8530
+ {
8531
+ "type": "error",
8532
+ "name": "NotAdmitted",
8533
+ "inputs": []
8534
+ },
8535
+ {
8536
+ "type": "error",
8537
+ "name": "NotLaunched",
8538
+ "inputs": []
8539
+ },
8540
+ {
8541
+ "type": "error",
8542
+ "name": "NotUniswap",
8543
+ "inputs": []
8544
+ },
8545
+ {
8546
+ "type": "error",
8547
+ "name": "NothingToCollect",
8548
+ "inputs": []
8549
+ },
8550
+ {
8551
+ "type": "error",
8552
+ "name": "NullifierAlreadySpent",
8553
+ "inputs": []
8554
+ },
8555
+ {
8556
+ "type": "error",
8557
+ "name": "OverDepositLimit",
8558
+ "inputs": []
8559
+ },
8560
+ {
8561
+ "type": "error",
8562
+ "name": "Reentrancy",
8563
+ "inputs": []
8564
+ },
8565
+ {
8566
+ "type": "error",
8567
+ "name": "TransferFailed",
8568
+ "inputs": []
8569
+ },
8570
+ {
8571
+ "type": "error",
8572
+ "name": "UnknownFactory",
8573
+ "inputs": []
8574
+ },
8575
+ {
8576
+ "type": "error",
8577
+ "name": "UnknownRoot",
8578
+ "inputs": []
8579
+ },
8580
+ {
8581
+ "type": "error",
8582
+ "name": "ValueOutOfField",
8583
+ "inputs": []
8584
+ },
8585
+ {
8586
+ "type": "error",
8587
+ "name": "ZeroRecipient",
8588
+ "inputs": []
8589
+ },
8590
+ {
8591
+ "type": "error",
8592
+ "name": "ZeroRelayer",
8593
+ "inputs": []
8594
+ }
8595
+ ];
8596
+ export const sharedRouterAbi = [
8597
+ {
8598
+ "type": "constructor",
8599
+ "inputs": [
8600
+ {
8601
+ "name": "shared_",
8602
+ "type": "address",
8603
+ "internalType": "contract SharedVault"
8604
+ },
8605
+ {
8606
+ "name": "hypePool_",
8607
+ "type": "address",
8608
+ "internalType": "contract ShieldedPool"
8609
+ },
8610
+ {
8611
+ "name": "whype_",
8612
+ "type": "address",
8613
+ "internalType": "contract WHYPE"
8614
+ }
8615
+ ],
8616
+ "stateMutability": "nonpayable"
8617
+ },
8618
+ {
8619
+ "type": "receive",
8620
+ "stateMutability": "payable"
8621
+ },
8622
+ {
8623
+ "type": "function",
8624
+ "name": "HYPE_SEND_GAS",
8625
+ "inputs": [],
8626
+ "outputs": [
8627
+ {
8628
+ "name": "",
8629
+ "type": "uint256",
8630
+ "internalType": "uint256"
8631
+ }
8632
+ ],
8633
+ "stateMutability": "view"
8634
+ },
8635
+ {
8636
+ "type": "function",
8637
+ "name": "buy",
8638
+ "inputs": [
8639
+ {
8640
+ "name": "proof",
8641
+ "type": "tuple",
8642
+ "internalType": "struct ShieldedPool.Proof",
8643
+ "components": [
8644
+ {
8645
+ "name": "a",
8646
+ "type": "uint256[2]",
8647
+ "internalType": "uint256[2]"
8648
+ },
8649
+ {
8650
+ "name": "b",
8651
+ "type": "uint256[2][2]",
8652
+ "internalType": "uint256[2][2]"
8653
+ },
8654
+ {
8655
+ "name": "c",
8656
+ "type": "uint256[2]",
8657
+ "internalType": "uint256[2]"
8658
+ },
8659
+ {
8660
+ "name": "root",
8661
+ "type": "uint256",
8662
+ "internalType": "uint256"
8663
+ },
8664
+ {
8665
+ "name": "publicAmount",
8666
+ "type": "uint256",
8667
+ "internalType": "uint256"
8668
+ },
8669
+ {
8670
+ "name": "extDataHash",
8671
+ "type": "uint256",
8672
+ "internalType": "uint256"
8673
+ },
8674
+ {
8675
+ "name": "inputNullifiers",
8676
+ "type": "uint256[2]",
8677
+ "internalType": "uint256[2]"
8678
+ },
8679
+ {
8680
+ "name": "outputCommitments",
8681
+ "type": "uint256[2]",
8682
+ "internalType": "uint256[2]"
8683
+ }
8684
+ ]
8685
+ },
8686
+ {
8687
+ "name": "ext",
8688
+ "type": "tuple",
8689
+ "internalType": "struct ShieldedPool.ExtData",
8690
+ "components": [
8691
+ {
8692
+ "name": "recipient",
8693
+ "type": "address",
8694
+ "internalType": "address"
8695
+ },
8696
+ {
8697
+ "name": "extAmount",
8698
+ "type": "int256",
8699
+ "internalType": "int256"
8700
+ },
8701
+ {
8702
+ "name": "relayer",
8703
+ "type": "address",
8704
+ "internalType": "address"
8705
+ },
8706
+ {
8707
+ "name": "fee",
8708
+ "type": "uint256",
8709
+ "internalType": "uint256"
8710
+ },
8711
+ {
8712
+ "name": "encryptedOutput1",
8713
+ "type": "bytes",
8714
+ "internalType": "bytes"
8715
+ },
8716
+ {
8717
+ "name": "encryptedOutput2",
8718
+ "type": "bytes",
8719
+ "internalType": "bytes"
8720
+ },
8721
+ {
8722
+ "name": "data",
8723
+ "type": "bytes",
8724
+ "internalType": "bytes"
8725
+ }
8726
+ ]
8727
+ }
8728
+ ],
8729
+ "outputs": [
8730
+ {
8731
+ "name": "out",
8732
+ "type": "uint256",
8733
+ "internalType": "uint256"
8734
+ }
8735
+ ],
8736
+ "stateMutability": "nonpayable"
8737
+ },
8738
+ {
8739
+ "type": "function",
8740
+ "name": "hypePool",
8741
+ "inputs": [],
8742
+ "outputs": [
8743
+ {
8744
+ "name": "",
8745
+ "type": "address",
8746
+ "internalType": "contract ShieldedPool"
8747
+ }
8748
+ ],
8749
+ "stateMutability": "view"
8750
+ },
8751
+ {
8752
+ "type": "function",
8753
+ "name": "sell",
8754
+ "inputs": [
8755
+ {
8756
+ "name": "proof",
8757
+ "type": "tuple",
8758
+ "internalType": "struct SharedVault.Proof",
8759
+ "components": [
8760
+ {
8761
+ "name": "a",
8762
+ "type": "uint256[2]",
8763
+ "internalType": "uint256[2]"
8764
+ },
8765
+ {
8766
+ "name": "b",
8767
+ "type": "uint256[2][2]",
8768
+ "internalType": "uint256[2][2]"
8769
+ },
8770
+ {
8771
+ "name": "c",
8772
+ "type": "uint256[2]",
8773
+ "internalType": "uint256[2]"
8774
+ },
8775
+ {
8776
+ "name": "root",
8777
+ "type": "uint256",
8778
+ "internalType": "uint256"
8779
+ },
8780
+ {
8781
+ "name": "publicAmount",
8782
+ "type": "uint256",
8783
+ "internalType": "uint256"
8784
+ },
8785
+ {
8786
+ "name": "extDataHash",
8787
+ "type": "uint256",
8788
+ "internalType": "uint256"
8789
+ },
8790
+ {
8791
+ "name": "publicAsset",
8792
+ "type": "uint256",
8793
+ "internalType": "uint256"
8794
+ },
8795
+ {
8796
+ "name": "inputNullifiers",
8797
+ "type": "uint256[2]",
8798
+ "internalType": "uint256[2]"
8799
+ },
8800
+ {
8801
+ "name": "outputCommitments",
8802
+ "type": "uint256[2]",
8803
+ "internalType": "uint256[2]"
8804
+ }
8805
+ ]
8806
+ },
8807
+ {
8808
+ "name": "ext",
8809
+ "type": "tuple",
8810
+ "internalType": "struct SharedVault.ExtData",
8811
+ "components": [
8812
+ {
8813
+ "name": "recipient",
8814
+ "type": "address",
8815
+ "internalType": "address"
8816
+ },
8817
+ {
8818
+ "name": "extAmount",
8819
+ "type": "int256",
8820
+ "internalType": "int256"
8821
+ },
8822
+ {
8823
+ "name": "relayer",
8824
+ "type": "address",
8825
+ "internalType": "address"
8826
+ },
8827
+ {
8828
+ "name": "fee",
8829
+ "type": "uint256",
8830
+ "internalType": "uint256"
8831
+ },
8832
+ {
8833
+ "name": "encryptedOutput1",
8834
+ "type": "bytes",
8835
+ "internalType": "bytes"
8836
+ },
8837
+ {
8838
+ "name": "encryptedOutput2",
8839
+ "type": "bytes",
8840
+ "internalType": "bytes"
8841
+ },
8842
+ {
8843
+ "name": "data",
8844
+ "type": "bytes",
8845
+ "internalType": "bytes"
8846
+ }
8847
+ ]
8848
+ }
8849
+ ],
8850
+ "outputs": [
8851
+ {
8852
+ "name": "out",
8853
+ "type": "uint256",
8854
+ "internalType": "uint256"
8855
+ }
8856
+ ],
8857
+ "stateMutability": "nonpayable"
8858
+ },
8859
+ {
8860
+ "type": "function",
8861
+ "name": "send",
8862
+ "inputs": [
8863
+ {
8864
+ "name": "sendProof",
8865
+ "type": "tuple",
8866
+ "internalType": "struct SharedVault.Proof",
8867
+ "components": [
8868
+ {
8869
+ "name": "a",
8870
+ "type": "uint256[2]",
8871
+ "internalType": "uint256[2]"
8872
+ },
8873
+ {
8874
+ "name": "b",
8875
+ "type": "uint256[2][2]",
8876
+ "internalType": "uint256[2][2]"
8877
+ },
8878
+ {
8879
+ "name": "c",
8880
+ "type": "uint256[2]",
8881
+ "internalType": "uint256[2]"
8882
+ },
8883
+ {
8884
+ "name": "root",
8885
+ "type": "uint256",
8886
+ "internalType": "uint256"
8887
+ },
8888
+ {
8889
+ "name": "publicAmount",
8890
+ "type": "uint256",
8891
+ "internalType": "uint256"
8892
+ },
8893
+ {
8894
+ "name": "extDataHash",
8895
+ "type": "uint256",
8896
+ "internalType": "uint256"
8897
+ },
8898
+ {
8899
+ "name": "publicAsset",
8900
+ "type": "uint256",
8901
+ "internalType": "uint256"
8902
+ },
8903
+ {
8904
+ "name": "inputNullifiers",
8905
+ "type": "uint256[2]",
8906
+ "internalType": "uint256[2]"
8907
+ },
8908
+ {
8909
+ "name": "outputCommitments",
8910
+ "type": "uint256[2]",
8911
+ "internalType": "uint256[2]"
8912
+ }
8913
+ ]
8914
+ },
8915
+ {
8916
+ "name": "sendExt",
8917
+ "type": "tuple",
8918
+ "internalType": "struct SharedVault.ExtData",
8919
+ "components": [
8920
+ {
8921
+ "name": "recipient",
8922
+ "type": "address",
8923
+ "internalType": "address"
8924
+ },
8925
+ {
8926
+ "name": "extAmount",
8927
+ "type": "int256",
8928
+ "internalType": "int256"
8929
+ },
8930
+ {
8931
+ "name": "relayer",
8932
+ "type": "address",
8933
+ "internalType": "address"
8934
+ },
8935
+ {
8936
+ "name": "fee",
8937
+ "type": "uint256",
8938
+ "internalType": "uint256"
8939
+ },
8940
+ {
8941
+ "name": "encryptedOutput1",
8942
+ "type": "bytes",
8943
+ "internalType": "bytes"
8944
+ },
8945
+ {
8946
+ "name": "encryptedOutput2",
8947
+ "type": "bytes",
8948
+ "internalType": "bytes"
8949
+ },
8950
+ {
8951
+ "name": "data",
8952
+ "type": "bytes",
8953
+ "internalType": "bytes"
8954
+ }
8955
+ ]
8956
+ },
8957
+ {
8958
+ "name": "feeProof",
8959
+ "type": "tuple",
8960
+ "internalType": "struct ShieldedPool.Proof",
8961
+ "components": [
8962
+ {
8963
+ "name": "a",
8964
+ "type": "uint256[2]",
8965
+ "internalType": "uint256[2]"
8966
+ },
8967
+ {
8968
+ "name": "b",
8969
+ "type": "uint256[2][2]",
8970
+ "internalType": "uint256[2][2]"
8971
+ },
8972
+ {
8973
+ "name": "c",
8974
+ "type": "uint256[2]",
8975
+ "internalType": "uint256[2]"
8976
+ },
8977
+ {
8978
+ "name": "root",
8979
+ "type": "uint256",
8980
+ "internalType": "uint256"
8981
+ },
8982
+ {
8983
+ "name": "publicAmount",
8984
+ "type": "uint256",
8985
+ "internalType": "uint256"
8986
+ },
8987
+ {
8988
+ "name": "extDataHash",
8989
+ "type": "uint256",
8990
+ "internalType": "uint256"
8991
+ },
8992
+ {
8993
+ "name": "inputNullifiers",
8994
+ "type": "uint256[2]",
8995
+ "internalType": "uint256[2]"
8996
+ },
8997
+ {
8998
+ "name": "outputCommitments",
8999
+ "type": "uint256[2]",
9000
+ "internalType": "uint256[2]"
9001
+ }
9002
+ ]
9003
+ },
9004
+ {
9005
+ "name": "feeExt",
9006
+ "type": "tuple",
9007
+ "internalType": "struct ShieldedPool.ExtData",
9008
+ "components": [
9009
+ {
9010
+ "name": "recipient",
9011
+ "type": "address",
9012
+ "internalType": "address"
9013
+ },
9014
+ {
9015
+ "name": "extAmount",
9016
+ "type": "int256",
9017
+ "internalType": "int256"
9018
+ },
9019
+ {
9020
+ "name": "relayer",
9021
+ "type": "address",
9022
+ "internalType": "address"
9023
+ },
9024
+ {
9025
+ "name": "fee",
9026
+ "type": "uint256",
9027
+ "internalType": "uint256"
9028
+ },
9029
+ {
9030
+ "name": "encryptedOutput1",
9031
+ "type": "bytes",
9032
+ "internalType": "bytes"
9033
+ },
9034
+ {
9035
+ "name": "encryptedOutput2",
9036
+ "type": "bytes",
9037
+ "internalType": "bytes"
9038
+ },
9039
+ {
9040
+ "name": "data",
9041
+ "type": "bytes",
9042
+ "internalType": "bytes"
9043
+ }
9044
+ ]
9045
+ }
9046
+ ],
9047
+ "outputs": [],
9048
+ "stateMutability": "nonpayable"
9049
+ },
9050
+ {
9051
+ "type": "function",
9052
+ "name": "sendFingerprint",
9053
+ "inputs": [
9054
+ {
9055
+ "name": "p",
9056
+ "type": "tuple",
9057
+ "internalType": "struct SharedVault.Proof",
9058
+ "components": [
9059
+ {
9060
+ "name": "a",
9061
+ "type": "uint256[2]",
9062
+ "internalType": "uint256[2]"
9063
+ },
9064
+ {
9065
+ "name": "b",
9066
+ "type": "uint256[2][2]",
9067
+ "internalType": "uint256[2][2]"
9068
+ },
9069
+ {
9070
+ "name": "c",
9071
+ "type": "uint256[2]",
9072
+ "internalType": "uint256[2]"
9073
+ },
9074
+ {
9075
+ "name": "root",
9076
+ "type": "uint256",
9077
+ "internalType": "uint256"
9078
+ },
9079
+ {
9080
+ "name": "publicAmount",
9081
+ "type": "uint256",
9082
+ "internalType": "uint256"
9083
+ },
9084
+ {
9085
+ "name": "extDataHash",
9086
+ "type": "uint256",
9087
+ "internalType": "uint256"
9088
+ },
9089
+ {
9090
+ "name": "publicAsset",
9091
+ "type": "uint256",
9092
+ "internalType": "uint256"
9093
+ },
9094
+ {
9095
+ "name": "inputNullifiers",
9096
+ "type": "uint256[2]",
9097
+ "internalType": "uint256[2]"
9098
+ },
9099
+ {
9100
+ "name": "outputCommitments",
9101
+ "type": "uint256[2]",
9102
+ "internalType": "uint256[2]"
9103
+ }
9104
+ ]
9105
+ }
9106
+ ],
9107
+ "outputs": [
9108
+ {
9109
+ "name": "",
9110
+ "type": "bytes32",
9111
+ "internalType": "bytes32"
9112
+ }
9113
+ ],
9114
+ "stateMutability": "pure"
9115
+ },
9116
+ {
9117
+ "type": "function",
9118
+ "name": "shared",
9119
+ "inputs": [],
9120
+ "outputs": [
9121
+ {
9122
+ "name": "",
9123
+ "type": "address",
9124
+ "internalType": "contract SharedVault"
9125
+ }
9126
+ ],
9127
+ "stateMutability": "view"
9128
+ },
9129
+ {
9130
+ "type": "function",
9131
+ "name": "whype",
9132
+ "inputs": [],
9133
+ "outputs": [
9134
+ {
9135
+ "name": "",
9136
+ "type": "address",
9137
+ "internalType": "contract WHYPE"
9138
+ }
9139
+ ],
9140
+ "stateMutability": "view"
9141
+ },
9142
+ {
9143
+ "type": "event",
9144
+ "name": "PaidInWhype",
9145
+ "inputs": [
9146
+ {
9147
+ "name": "to",
9148
+ "type": "address",
9149
+ "indexed": true,
9150
+ "internalType": "address"
9151
+ },
9152
+ {
9153
+ "name": "amount",
9154
+ "type": "uint256",
9155
+ "indexed": false,
9156
+ "internalType": "uint256"
9157
+ }
9158
+ ],
9159
+ "anonymous": false
9160
+ },
9161
+ {
9162
+ "type": "event",
9163
+ "name": "PrivateBuy",
9164
+ "inputs": [
9165
+ {
9166
+ "name": "token",
9167
+ "type": "address",
9168
+ "indexed": true,
9169
+ "internalType": "address"
9170
+ },
9171
+ {
9172
+ "name": "hypeIn",
9173
+ "type": "uint256",
9174
+ "indexed": false,
9175
+ "internalType": "uint256"
9176
+ },
9177
+ {
9178
+ "name": "tokensOut",
9179
+ "type": "uint256",
9180
+ "indexed": false,
9181
+ "internalType": "uint256"
9182
+ }
9183
+ ],
9184
+ "anonymous": false
9185
+ },
9186
+ {
9187
+ "type": "event",
9188
+ "name": "PrivateSell",
9189
+ "inputs": [
9190
+ {
9191
+ "name": "token",
9192
+ "type": "address",
9193
+ "indexed": true,
9194
+ "internalType": "address"
9195
+ },
9196
+ {
9197
+ "name": "tokensIn",
9198
+ "type": "uint256",
9199
+ "indexed": false,
9200
+ "internalType": "uint256"
9201
+ },
9202
+ {
9203
+ "name": "hypeOut",
9204
+ "type": "uint256",
9205
+ "indexed": false,
9206
+ "internalType": "uint256"
9207
+ }
9208
+ ],
9209
+ "anonymous": false
9210
+ },
9211
+ {
9212
+ "type": "event",
9213
+ "name": "PrivateSend",
9214
+ "inputs": [
9215
+ {
9216
+ "name": "relayFee",
9217
+ "type": "uint256",
9218
+ "indexed": false,
9219
+ "internalType": "uint256"
9220
+ }
9221
+ ],
9222
+ "anonymous": false
9223
+ },
9224
+ {
9225
+ "type": "error",
9226
+ "name": "BadFeeProof",
9227
+ "inputs": []
9228
+ },
9229
+ {
9230
+ "type": "error",
9231
+ "name": "BadRecipient",
9232
+ "inputs": []
9233
+ },
9234
+ {
9235
+ "type": "error",
9236
+ "name": "Expired",
9237
+ "inputs": []
9238
+ },
9239
+ {
9240
+ "type": "error",
9241
+ "name": "NotAdmitted",
9242
+ "inputs": []
9243
+ },
9244
+ {
9245
+ "type": "error",
9246
+ "name": "NotFree",
9247
+ "inputs": []
9248
+ },
9249
+ {
9250
+ "type": "error",
9251
+ "name": "Reentrancy",
9252
+ "inputs": []
9253
+ }
9254
+ ];