@latticexyz/common 2.2.22-fc522a899c932f53675e624805e97a4eeefca9e8 → 2.2.22

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/chains.d.ts CHANGED
@@ -371,15 +371,10 @@ declare const garnet: {
371
371
  readonly webSocket: readonly ["wss://rpc.garnetchain.com"];
372
372
  };
373
373
  };
374
- readonly iconUrls: readonly ["https://redstone.xyz/chain-icons/garnet.png"];
375
- readonly indexerUrl: "https://indexer.mud.garnetchain.com";
376
- readonly blockExplorers: {
377
- readonly default: {
378
- readonly name: "Blockscout";
379
- readonly url: "https://explorer.garnetchain.com";
380
- };
381
- };
382
374
  readonly contracts: {
375
+ readonly quarryPaymaster: {
376
+ readonly address: "0x2d70F1eFFbFD865764CAF19BE2A01a72F3CE774f";
377
+ };
383
378
  readonly multicall3: {
384
379
  readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
385
380
  };
@@ -420,6 +415,14 @@ declare const garnet: {
420
415
  readonly address: "0x4200000000000000000000000000000000000016";
421
416
  };
422
417
  };
418
+ readonly iconUrls: readonly ["https://redstone.xyz/chain-icons/garnet.png"];
419
+ readonly indexerUrl: "https://indexer.mud.garnetchain.com";
420
+ readonly blockExplorers: {
421
+ readonly default: {
422
+ readonly name: "Blockscout";
423
+ readonly url: "https://explorer.garnetchain.com";
424
+ };
425
+ };
423
426
  readonly ensTlds?: readonly string[] | undefined;
424
427
  readonly id: 17069;
425
428
  readonly name: "Garnet Testnet";
@@ -668,310 +671,6 @@ declare const garnet: {
668
671
  };
669
672
  };
670
673
 
671
- declare const rhodolite: {
672
- readonly name: "Rhodolite Devnet";
673
- readonly testnet: true;
674
- readonly id: 17420;
675
- readonly sourceId: 17000;
676
- readonly nativeCurrency: {
677
- readonly name: "Ether";
678
- readonly symbol: "ETH";
679
- readonly decimals: 18;
680
- };
681
- readonly rpcUrls: {
682
- readonly default: {
683
- readonly http: readonly ["https://rpc.rhodolitechain.com"];
684
- readonly webSocket: readonly ["wss://rpc.rhodolitechain.com"];
685
- };
686
- readonly bundler: {
687
- readonly http: readonly ["https://rpc.rhodolitechain.com"];
688
- readonly webSocket: readonly ["wss://rpc.rhodolitechain.com"];
689
- };
690
- readonly quarryPassIssuer: {
691
- readonly http: readonly ["https://rpc.rhodolitechain.com"];
692
- readonly webSocket: readonly ["wss://rpc.rhodolitechain.com"];
693
- };
694
- readonly wiresaw: {
695
- readonly http: readonly ["https://rpc.rhodolitechain.com"];
696
- readonly webSocket: readonly ["wss://rpc.rhodolitechain.com"];
697
- };
698
- };
699
- readonly contracts: {
700
- readonly l1StandardBridge: {
701
- readonly 17000: {
702
- readonly address: "0x6487446e0B9FAEa90F6a9772A6448cFa780E30F9";
703
- };
704
- };
705
- readonly quarryPaymaster: {
706
- readonly address: "0x7ca1b85aca23fccf2fbac14c02b5e8a6432639b9";
707
- };
708
- readonly gasPriceOracle: {
709
- readonly address: "0x420000000000000000000000000000000000000F";
710
- };
711
- readonly l1Block: {
712
- readonly address: "0x4200000000000000000000000000000000000015";
713
- };
714
- readonly l2CrossDomainMessenger: {
715
- readonly address: "0x4200000000000000000000000000000000000007";
716
- };
717
- readonly l2Erc721Bridge: {
718
- readonly address: "0x4200000000000000000000000000000000000014";
719
- };
720
- readonly l2StandardBridge: {
721
- readonly address: "0x4200000000000000000000000000000000000010";
722
- };
723
- readonly l2ToL1MessagePasser: {
724
- readonly address: "0x4200000000000000000000000000000000000016";
725
- };
726
- };
727
- readonly blockExplorers: {
728
- readonly default: {
729
- readonly name: "Blockscout";
730
- readonly url: "https://explorer.rhodolitechain.com";
731
- };
732
- readonly worldsExplorer: {
733
- readonly name: "MUD Worlds Explorer";
734
- readonly url: "https://explorer.mud.dev/rhodolite/worlds";
735
- };
736
- };
737
- readonly iconUrls: readonly ["https://redstone.xyz/chain-icons/rhodolite.png"];
738
- readonly indexerUrl: "https://indexer.mud.rhodolitechain.com";
739
- readonly formatters: {
740
- readonly block: {
741
- exclude: [] | undefined;
742
- format: (args: viem_op_stack.OpStackRpcBlock<viem.BlockTag, boolean>) => {
743
- baseFeePerGas: bigint | null;
744
- blobGasUsed: bigint;
745
- difficulty: bigint;
746
- excessBlobGas: bigint;
747
- extraData: `0x${string}`;
748
- gasLimit: bigint;
749
- gasUsed: bigint;
750
- hash: `0x${string}` | null;
751
- logsBloom: `0x${string}` | null;
752
- miner: `0x${string}`;
753
- mixHash: `0x${string}`;
754
- nonce: `0x${string}` | null;
755
- number: bigint | null;
756
- parentBeaconBlockRoot?: `0x${string}` | undefined;
757
- parentHash: `0x${string}`;
758
- receiptsRoot: `0x${string}`;
759
- sealFields: `0x${string}`[];
760
- sha3Uncles: `0x${string}`;
761
- size: bigint;
762
- stateRoot: `0x${string}`;
763
- timestamp: bigint;
764
- totalDifficulty: bigint | null;
765
- transactions: `0x${string}`[] | viem_op_stack.OpStackTransaction<boolean>[];
766
- transactionsRoot: `0x${string}`;
767
- uncles: `0x${string}`[];
768
- withdrawals?: viem.Withdrawal[] | undefined;
769
- withdrawalsRoot?: `0x${string}` | undefined;
770
- };
771
- type: "block";
772
- };
773
- readonly transaction: {
774
- exclude: [] | undefined;
775
- format: (args: viem_op_stack.OpStackRpcTransaction<boolean>) => {
776
- blockHash: `0x${string}` | null;
777
- blockNumber: bigint | null;
778
- from: `0x${string}`;
779
- gas: bigint;
780
- hash: `0x${string}`;
781
- input: `0x${string}`;
782
- nonce: number;
783
- r: `0x${string}`;
784
- s: `0x${string}`;
785
- to: `0x${string}` | null;
786
- transactionIndex: number | null;
787
- typeHex: `0x${string}` | null;
788
- v: bigint;
789
- value: bigint;
790
- yParity: number;
791
- gasPrice?: undefined;
792
- maxFeePerBlobGas?: undefined;
793
- maxFeePerGas: bigint;
794
- maxPriorityFeePerGas: bigint;
795
- isSystemTx?: boolean | undefined;
796
- mint?: bigint | undefined;
797
- sourceHash: `0x${string}`;
798
- type: "deposit";
799
- } | {
800
- r: `0x${string}`;
801
- s: `0x${string}`;
802
- v: bigint;
803
- to: `0x${string}` | null;
804
- from: `0x${string}`;
805
- gas: bigint;
806
- nonce: number;
807
- value: bigint;
808
- blockHash: `0x${string}` | null;
809
- blockNumber: bigint | null;
810
- hash: `0x${string}`;
811
- input: `0x${string}`;
812
- transactionIndex: number | null;
813
- typeHex: `0x${string}` | null;
814
- accessList?: undefined;
815
- authorizationList?: undefined;
816
- blobVersionedHashes?: undefined;
817
- chainId?: number | undefined;
818
- yParity?: undefined;
819
- type: "legacy";
820
- gasPrice: bigint;
821
- maxFeePerBlobGas?: undefined;
822
- maxFeePerGas?: undefined;
823
- maxPriorityFeePerGas?: undefined;
824
- isSystemTx?: undefined;
825
- mint?: undefined;
826
- sourceHash?: undefined;
827
- } | {
828
- blockHash: `0x${string}` | null;
829
- blockNumber: bigint | null;
830
- from: `0x${string}`;
831
- gas: bigint;
832
- hash: `0x${string}`;
833
- input: `0x${string}`;
834
- nonce: number;
835
- r: `0x${string}`;
836
- s: `0x${string}`;
837
- to: `0x${string}` | null;
838
- transactionIndex: number | null;
839
- typeHex: `0x${string}` | null;
840
- v: bigint;
841
- value: bigint;
842
- yParity: number;
843
- accessList: viem.AccessList;
844
- authorizationList?: undefined;
845
- blobVersionedHashes?: undefined;
846
- chainId: number;
847
- type: "eip2930";
848
- gasPrice: bigint;
849
- maxFeePerBlobGas?: undefined;
850
- maxFeePerGas?: undefined;
851
- maxPriorityFeePerGas?: undefined;
852
- isSystemTx?: undefined;
853
- mint?: undefined;
854
- sourceHash?: undefined;
855
- } | {
856
- blockHash: `0x${string}` | null;
857
- blockNumber: bigint | null;
858
- from: `0x${string}`;
859
- gas: bigint;
860
- hash: `0x${string}`;
861
- input: `0x${string}`;
862
- nonce: number;
863
- r: `0x${string}`;
864
- s: `0x${string}`;
865
- to: `0x${string}` | null;
866
- transactionIndex: number | null;
867
- typeHex: `0x${string}` | null;
868
- v: bigint;
869
- value: bigint;
870
- yParity: number;
871
- accessList: viem.AccessList;
872
- authorizationList?: undefined;
873
- blobVersionedHashes?: undefined;
874
- chainId: number;
875
- type: "eip1559";
876
- gasPrice?: undefined;
877
- maxFeePerBlobGas?: undefined;
878
- maxFeePerGas: bigint;
879
- maxPriorityFeePerGas: bigint;
880
- isSystemTx?: undefined;
881
- mint?: undefined;
882
- sourceHash?: undefined;
883
- } | {
884
- blockHash: `0x${string}` | null;
885
- blockNumber: bigint | null;
886
- from: `0x${string}`;
887
- gas: bigint;
888
- hash: `0x${string}`;
889
- input: `0x${string}`;
890
- nonce: number;
891
- r: `0x${string}`;
892
- s: `0x${string}`;
893
- to: `0x${string}` | null;
894
- transactionIndex: number | null;
895
- typeHex: `0x${string}` | null;
896
- v: bigint;
897
- value: bigint;
898
- yParity: number;
899
- accessList: viem.AccessList;
900
- authorizationList?: undefined;
901
- blobVersionedHashes: readonly `0x${string}`[];
902
- chainId: number;
903
- type: "eip4844";
904
- gasPrice?: undefined;
905
- maxFeePerBlobGas: bigint;
906
- maxFeePerGas: bigint;
907
- maxPriorityFeePerGas: bigint;
908
- isSystemTx?: undefined;
909
- mint?: undefined;
910
- sourceHash?: undefined;
911
- } | {
912
- blockHash: `0x${string}` | null;
913
- blockNumber: bigint | null;
914
- from: `0x${string}`;
915
- gas: bigint;
916
- hash: `0x${string}`;
917
- input: `0x${string}`;
918
- nonce: number;
919
- r: `0x${string}`;
920
- s: `0x${string}`;
921
- to: `0x${string}` | null;
922
- transactionIndex: number | null;
923
- typeHex: `0x${string}` | null;
924
- v: bigint;
925
- value: bigint;
926
- yParity: number;
927
- accessList: viem.AccessList;
928
- authorizationList: viem.SignedAuthorizationList<number>;
929
- blobVersionedHashes?: undefined;
930
- chainId: number;
931
- type: "eip7702";
932
- gasPrice?: undefined;
933
- maxFeePerBlobGas?: undefined;
934
- maxFeePerGas: bigint;
935
- maxPriorityFeePerGas: bigint;
936
- isSystemTx?: undefined;
937
- mint?: undefined;
938
- sourceHash?: undefined;
939
- };
940
- type: "transaction";
941
- };
942
- readonly transactionReceipt: {
943
- exclude: [] | undefined;
944
- format: (args: viem_op_stack.OpStackRpcTransactionReceipt) => {
945
- blobGasPrice?: bigint | undefined;
946
- blobGasUsed?: bigint | undefined;
947
- blockHash: `0x${string}`;
948
- blockNumber: bigint;
949
- contractAddress: `0x${string}` | null | undefined;
950
- cumulativeGasUsed: bigint;
951
- effectiveGasPrice: bigint;
952
- from: `0x${string}`;
953
- gasUsed: bigint;
954
- logs: viem.Log<bigint, number, false, undefined, undefined, undefined, undefined>[];
955
- logsBloom: `0x${string}`;
956
- root?: `0x${string}` | undefined;
957
- status: "success" | "reverted";
958
- to: `0x${string}` | null;
959
- transactionHash: `0x${string}`;
960
- transactionIndex: number;
961
- type: viem.TransactionType;
962
- l1GasPrice: bigint | null;
963
- l1GasUsed: bigint | null;
964
- l1Fee: bigint | null;
965
- l1FeeScalar: number | null;
966
- };
967
- type: "transactionReceipt";
968
- };
969
- };
970
- readonly serializers: {
971
- readonly transaction: typeof viem_op_stack.serializeTransaction;
972
- };
973
- };
974
-
975
674
  declare const pyrope: {
976
675
  readonly name: "Pyrope Testnet";
977
676
  readonly testnet: true;
@@ -998,6 +697,9 @@ declare const pyrope: {
998
697
  readonly address: "0xC24932c31D9621aE9e792576152B7ef010cFC2F8";
999
698
  };
1000
699
  };
700
+ readonly quarryPaymaster: {
701
+ readonly address: "0x2d70F1eFFbFD865764CAF19BE2A01a72F3CE774f";
702
+ };
1001
703
  readonly gasPriceOracle: {
1002
704
  readonly address: "0x420000000000000000000000000000000000000F";
1003
705
  };
@@ -1265,4 +967,4 @@ declare const pyrope: {
1265
967
  };
1266
968
  };
1267
969
 
1268
- export { type MUDChain, garnet, mudFoundry, pyrope, redstone, rhodolite };
970
+ export { type MUDChain, garnet, mudFoundry, pyrope, redstone };
package/dist/chains.js CHANGED
@@ -23,79 +23,43 @@ var garnet = {
23
23
  ...garnetConfig.rpcUrls,
24
24
  bundler: garnetConfig.rpcUrls.default
25
25
  },
26
- iconUrls: ["https://redstone.xyz/chain-icons/garnet.png"],
27
- indexerUrl: "https://indexer.mud.garnetchain.com"
28
- };
29
-
30
- // src/chains/rhodolite.ts
31
- import { chainConfig } from "viem/op-stack";
32
- var sourceId = 17e3;
33
- var defaultRpcUrls = {
34
- http: ["https://rpc.rhodolitechain.com"],
35
- webSocket: ["wss://rpc.rhodolitechain.com"]
36
- };
37
- var rhodolite = {
38
- ...chainConfig,
39
- name: "Rhodolite Devnet",
40
- testnet: true,
41
- id: 17420,
42
- sourceId,
43
- nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
44
- rpcUrls: {
45
- default: defaultRpcUrls,
46
- bundler: defaultRpcUrls,
47
- quarryPassIssuer: defaultRpcUrls,
48
- wiresaw: defaultRpcUrls
49
- },
50
26
  contracts: {
51
- ...chainConfig.contracts,
52
- l1StandardBridge: {
53
- [sourceId]: {
54
- address: "0x6487446e0B9FAEa90F6a9772A6448cFa780E30F9"
55
- }
56
- },
27
+ ...garnetConfig.contracts,
57
28
  quarryPaymaster: {
58
- address: "0x7ca1b85aca23fccf2fbac14c02b5e8a6432639b9"
29
+ address: "0x2d70F1eFFbFD865764CAF19BE2A01a72F3CE774f"
59
30
  }
60
31
  },
61
- blockExplorers: {
62
- default: {
63
- name: "Blockscout",
64
- url: "https://explorer.rhodolitechain.com"
65
- },
66
- worldsExplorer: {
67
- name: "MUD Worlds Explorer",
68
- url: "https://explorer.mud.dev/rhodolite/worlds"
69
- }
70
- },
71
- iconUrls: ["https://redstone.xyz/chain-icons/rhodolite.png"],
72
- indexerUrl: "https://indexer.mud.rhodolitechain.com"
32
+ iconUrls: ["https://redstone.xyz/chain-icons/garnet.png"],
33
+ indexerUrl: "https://indexer.mud.garnetchain.com"
73
34
  };
74
35
 
75
36
  // src/chains/pyrope.ts
76
- import { chainConfig as chainConfig2 } from "viem/op-stack";
77
- var sourceId2 = 11155111;
78
- var defaultRpcUrls2 = {
37
+ import { chainConfig } from "viem/op-stack";
38
+ var sourceId = 11155111;
39
+ var defaultRpcUrls = {
79
40
  http: ["https://rpc.pyropechain.com"],
80
41
  webSocket: ["wss://rpc.pyropechain.com"]
81
42
  };
82
43
  var pyrope = {
83
- ...chainConfig2,
44
+ ...chainConfig,
84
45
  name: "Pyrope Testnet",
85
46
  testnet: true,
86
47
  id: 695569,
87
- sourceId: sourceId2,
48
+ sourceId,
88
49
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
89
50
  rpcUrls: {
90
- default: defaultRpcUrls2,
91
- bundler: defaultRpcUrls2
51
+ default: defaultRpcUrls,
52
+ bundler: defaultRpcUrls
92
53
  },
93
54
  contracts: {
94
- ...chainConfig2.contracts,
55
+ ...chainConfig.contracts,
95
56
  l1StandardBridge: {
96
- [sourceId2]: {
57
+ [sourceId]: {
97
58
  address: "0xC24932c31D9621aE9e792576152B7ef010cFC2F8"
98
59
  }
60
+ },
61
+ quarryPaymaster: {
62
+ address: "0x2d70F1eFFbFD865764CAF19BE2A01a72F3CE774f"
99
63
  }
100
64
  },
101
65
  blockExplorers: {
@@ -115,7 +79,6 @@ export {
115
79
  garnet,
116
80
  mudFoundry,
117
81
  pyrope,
118
- redstone,
119
- rhodolite
82
+ redstone
120
83
  };
121
84
  //# sourceMappingURL=chains.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chains/mudFoundry.ts","../src/chains/redstone.ts","../src/chains/garnet.ts","../src/chains/rhodolite.ts","../src/chains/pyrope.ts"],"sourcesContent":["import { foundry } from \"viem/chains\";\nimport { MUDChain } from \"./types\";\n\nexport const mudFoundry = {\n ...foundry,\n fees: {\n defaultPriorityFee: 0n,\n },\n} as const satisfies MUDChain;\n","import { redstone as redstoneConfig } from \"viem/chains\";\nimport type { MUDChain } from \"./types\";\n\nexport const redstone = {\n ...redstoneConfig,\n iconUrls: [\"https://redstone.xyz/chain-icons/redstone.png\"],\n indexerUrl: \"https://indexer.mud.redstonechain.com\",\n} as const satisfies MUDChain;\n","import { garnet as garnetConfig } from \"viem/chains\";\nimport type { MUDChain } from \"./types\";\n\nexport const garnet = {\n ...garnetConfig,\n rpcUrls: {\n ...garnetConfig.rpcUrls,\n bundler: garnetConfig.rpcUrls.default,\n },\n iconUrls: [\"https://redstone.xyz/chain-icons/garnet.png\"],\n indexerUrl: \"https://indexer.mud.garnetchain.com\",\n} as const satisfies MUDChain;\n","import { chainConfig } from \"viem/op-stack\";\nimport { MUDChain } from \"./types\";\nimport { Chain } from \"viem\";\n\nconst sourceId = 17000;\n\nconst defaultRpcUrls = {\n http: [\"https://rpc.rhodolitechain.com\"],\n webSocket: [\"wss://rpc.rhodolitechain.com\"],\n} as const satisfies Chain[\"rpcUrls\"][\"default\"];\n\nexport const rhodolite = {\n ...chainConfig,\n name: \"Rhodolite Devnet\",\n testnet: true,\n id: 17420,\n sourceId,\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: defaultRpcUrls,\n bundler: defaultRpcUrls,\n quarryPassIssuer: defaultRpcUrls,\n wiresaw: defaultRpcUrls,\n },\n contracts: {\n ...chainConfig.contracts,\n l1StandardBridge: {\n [sourceId]: {\n address: \"0x6487446e0B9FAEa90F6a9772A6448cFa780E30F9\",\n },\n },\n quarryPaymaster: {\n address: \"0x7ca1b85aca23fccf2fbac14c02b5e8a6432639b9\",\n },\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://explorer.rhodolitechain.com\",\n },\n worldsExplorer: {\n name: \"MUD Worlds Explorer\",\n url: \"https://explorer.mud.dev/rhodolite/worlds\",\n },\n },\n iconUrls: [\"https://redstone.xyz/chain-icons/rhodolite.png\"],\n indexerUrl: \"https://indexer.mud.rhodolitechain.com\",\n} as const satisfies MUDChain;\n","import { chainConfig } from \"viem/op-stack\";\nimport { MUDChain } from \"./types\";\nimport { Chain } from \"viem\";\n\nconst sourceId = 11155111;\n\nconst defaultRpcUrls = {\n http: [\"https://rpc.pyropechain.com\"],\n webSocket: [\"wss://rpc.pyropechain.com\"],\n} as const satisfies Chain[\"rpcUrls\"][\"default\"];\n\nexport const pyrope = {\n ...chainConfig,\n name: \"Pyrope Testnet\",\n testnet: true,\n id: 695569,\n sourceId,\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: defaultRpcUrls,\n bundler: defaultRpcUrls,\n },\n contracts: {\n ...chainConfig.contracts,\n l1StandardBridge: {\n [sourceId]: {\n address: \"0xC24932c31D9621aE9e792576152B7ef010cFC2F8\",\n },\n },\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://explorer.pyropechain.com\",\n },\n worldsExplorer: {\n name: \"MUD Worlds Explorer\",\n url: \"https://explorer.mud.dev/pyrope/worlds\",\n },\n },\n iconUrls: [\"https://lattice.xyz/brand/color/pyrope.svg\"],\n indexerUrl: \"https://indexer.mud.pyropechain.com\",\n} as const satisfies MUDChain;\n"],"mappings":";AAAA,SAAS,eAAe;AAGjB,IAAM,aAAa;AAAA,EACxB,GAAG;AAAA,EACH,MAAM;AAAA,IACJ,oBAAoB;AAAA,EACtB;AACF;;;ACRA,SAAS,YAAY,sBAAsB;AAGpC,IAAM,WAAW;AAAA,EACtB,GAAG;AAAA,EACH,UAAU,CAAC,+CAA+C;AAAA,EAC1D,YAAY;AACd;;;ACPA,SAAS,UAAU,oBAAoB;AAGhC,IAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,SAAS;AAAA,IACP,GAAG,aAAa;AAAA,IAChB,SAAS,aAAa,QAAQ;AAAA,EAChC;AAAA,EACA,UAAU,CAAC,6CAA6C;AAAA,EACxD,YAAY;AACd;;;ACXA,SAAS,mBAAmB;AAI5B,IAAM,WAAW;AAEjB,IAAM,iBAAiB;AAAA,EACrB,MAAM,CAAC,gCAAgC;AAAA,EACvC,WAAW,CAAC,8BAA8B;AAC5C;AAEO,IAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AAAA,EACJ;AAAA,EACA,gBAAgB,EAAE,MAAM,SAAS,QAA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EACvD,YAAY;AACd;","names":["chainConfig","sourceId","defaultRpcUrls"]}
1
+ {"version":3,"sources":["../src/chains/mudFoundry.ts","../src/chains/redstone.ts","../src/chains/garnet.ts","../src/chains/pyrope.ts"],"sourcesContent":["import { foundry } from \"viem/chains\";\nimport { MUDChain } from \"./types\";\n\nexport const mudFoundry = {\n ...foundry,\n fees: {\n defaultPriorityFee: 0n,\n },\n} as const satisfies MUDChain;\n","import { redstone as redstoneConfig } from \"viem/chains\";\nimport type { MUDChain } from \"./types\";\n\nexport const redstone = {\n ...redstoneConfig,\n iconUrls: [\"https://redstone.xyz/chain-icons/redstone.png\"],\n indexerUrl: \"https://indexer.mud.redstonechain.com\",\n} as const satisfies MUDChain;\n","import { garnet as garnetConfig } from \"viem/chains\";\nimport type { MUDChain } from \"./types\";\n\nexport const garnet = {\n ...garnetConfig,\n rpcUrls: {\n ...garnetConfig.rpcUrls,\n bundler: garnetConfig.rpcUrls.default,\n },\n contracts: {\n ...garnetConfig.contracts,\n quarryPaymaster: {\n address: \"0x2d70F1eFFbFD865764CAF19BE2A01a72F3CE774f\",\n },\n },\n iconUrls: [\"https://redstone.xyz/chain-icons/garnet.png\"],\n indexerUrl: \"https://indexer.mud.garnetchain.com\",\n} as const satisfies MUDChain;\n","import { chainConfig } from \"viem/op-stack\";\nimport { MUDChain } from \"./types\";\nimport { Chain } from \"viem\";\n\nconst sourceId = 11155111;\n\nconst defaultRpcUrls = {\n http: [\"https://rpc.pyropechain.com\"],\n webSocket: [\"wss://rpc.pyropechain.com\"],\n} as const satisfies Chain[\"rpcUrls\"][\"default\"];\n\nexport const pyrope = {\n ...chainConfig,\n name: \"Pyrope Testnet\",\n testnet: true,\n id: 695569,\n sourceId,\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: defaultRpcUrls,\n bundler: defaultRpcUrls,\n },\n contracts: {\n ...chainConfig.contracts,\n l1StandardBridge: {\n [sourceId]: {\n address: \"0xC24932c31D9621aE9e792576152B7ef010cFC2F8\",\n },\n },\n quarryPaymaster: {\n address: \"0x2d70F1eFFbFD865764CAF19BE2A01a72F3CE774f\",\n },\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://explorer.pyropechain.com\",\n },\n worldsExplorer: {\n name: \"MUD Worlds Explorer\",\n url: \"https://explorer.mud.dev/pyrope/worlds\",\n },\n },\n iconUrls: [\"https://lattice.xyz/brand/color/pyrope.svg\"],\n indexerUrl: \"https://indexer.mud.pyropechain.com\",\n} as const satisfies MUDChain;\n"],"mappings":";AAAA,SAAS,eAAe;AAGjB,IAAM,aAAa;AAAA,EACxB,GAAG;AAAA,EACH,MAAM;AAAA,IACJ,oBAAoB;AAAA,EACtB;AACF;;;ACRA,SAAS,YAAY,sBAAsB;AAGpC,IAAM,WAAW;AAAA,EACtB,GAAG;AAAA,EACH,UAAU,CAAC,+CAA+C;AAAA,EAC1D,YAAY;AACd;;;ACPA,SAAS,UAAU,oBAAoB;AAGhC,IAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,SAAS;AAAA,IACP,GAAG,aAAa;AAAA,IAChB,SAAS,aAAa,QAAQ;AAAA,EAChC;AAAA,EACA,WAAW;AAAA,IACT,GAAG,aAAa;AAAA,IAChB,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,UAAU,CAAC,6CAA6C;AAAA,EACxD,YAAY;AACd;;;ACjBA,SAAS,mBAAmB;AAI5B,IAAM,WAAW;AAEjB,IAAM,iBAAiB;AAAA,EACrB,MAAM,CAAC,6BAA6B;AAAA,EACpC,WAAW,CAAC,2BAA2B;AACzC;AAEO,IAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AAAA,EACJ;AAAA,EACA,gBAAgB,EAAE,MAAM,SAAS,QAAQ,OAAO,UAAU,GAAG;AAAA,EAC7D,SAAS;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,WAAW;AAAA,IACT,GAAG,YAAY;AAAA,IACf,kBAAkB;AAAA,MAChB,CAAC,QAAQ,GAAG;AAAA,QACV,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,KAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,UAAU,CAAC,4CAA4C;AAAA,EACvD,YAAY;AACd;","names":[]}
@@ -82,6 +82,18 @@ function unique(values) {
82
82
  return Array.from(new Set(values));
83
83
  }
84
84
 
85
+ // src/utils/uniqueBy.ts
86
+ function uniqueBy(values, getKey) {
87
+ const map = /* @__PURE__ */ new Map();
88
+ for (const value of values) {
89
+ const key = getKey(value);
90
+ if (!map.has(key)) {
91
+ map.set(key, value);
92
+ }
93
+ }
94
+ return Array.from(map.values());
95
+ }
96
+
85
97
  // src/utils/wait.ts
86
98
  function wait(ms) {
87
99
  return new Promise((resolve) => setTimeout(() => resolve(), ms));
@@ -113,7 +125,8 @@ export {
113
125
  iteratorToArray,
114
126
  mapObject,
115
127
  unique,
128
+ uniqueBy,
116
129
  wait,
117
130
  waitForIdle
118
131
  };
119
- //# sourceMappingURL=chunk-NFWCLD5I.js.map
132
+ //# sourceMappingURL=chunk-ETXWXV5T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/assertExhaustive.ts","../src/utils/bigIntMax.ts","../src/utils/bigIntMin.ts","../src/utils/bigIntSort.ts","../src/utils/chunk.ts","../src/utils/groupBy.ts","../src/utils/identity.ts","../src/utils/includes.ts","../src/utils/indent.ts","../src/utils/isDefined.ts","../src/utils/isNotNull.ts","../src/utils/iteratorToArray.ts","../src/utils/mapObject.ts","../src/utils/unique.ts","../src/utils/uniqueBy.ts","../src/utils/wait.ts","../src/utils/waitForIdle.ts"],"sourcesContent":["export function assertExhaustive(value: never, message?: string): never {\n throw new Error(message ?? `Unexpected value: ${value}`);\n}\n","export function bigIntMax(...args: bigint[]): bigint {\n return args.reduce((m, e) => (e > m ? e : m));\n}\n","export function bigIntMin(...args: bigint[]): bigint {\n return args.reduce((m, e) => (e < m ? e : m));\n}\n","export function bigIntSort(a: bigint, b: bigint): -1 | 0 | 1 {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","export function* chunk<T>(arr: readonly T[], n: number): Generator<readonly T[], void> {\n for (let i = 0; i < arr.length; i += n) {\n yield arr.slice(i, i + n);\n }\n}\n","export function groupBy<value, key>(\n values: readonly value[],\n getKey: (value: value) => key,\n): Map<key, readonly value[]> {\n const map = new Map<key, readonly value[]>();\n for (const value of values) {\n const key = getKey(value);\n if (!map.has(key)) map.set(key, []);\n (map.get(key) as value[]).push(value);\n }\n return map;\n}\n","export function identity<T>(value: T): T {\n return value;\n}\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function includes<item>(items: item[], value: any): value is item {\n return items.includes(value);\n}\n","export function indent(message: string, indentation = \" \"): string {\n return message.replaceAll(/(^|\\n)/g, `$1${indentation}`);\n}\n","export function isDefined<T>(argument: T | undefined): argument is T {\n return argument !== undefined;\n}\n","export function isNotNull<T>(argument: T | null): argument is T {\n return argument !== null;\n}\n","export async function iteratorToArray<T>(iterator: AsyncIterable<T>): Promise<readonly T[]> {\n const items: T[] = [];\n for await (const item of iterator) {\n items.push(item);\n }\n return items;\n}\n","/**\n * Map each key of a source object via a given valueMap function\n */\nexport function mapObject<\n Source extends Record<string | number | symbol, unknown>,\n Target extends { [key in keyof Source]: unknown },\n>(source: Source, valueMap: (value: Source[typeof key], key: keyof Source) => Target[typeof key]): Target {\n return Object.fromEntries(\n Object.entries(source).map(([key, value]) => [key, valueMap(value as Source[keyof Source], key)]),\n ) as Target;\n}\n","export function unique<value>(values: readonly value[]): readonly value[] {\n return Array.from(new Set(values));\n}\n","export function uniqueBy<value, key>(values: readonly value[], getKey: (value: value) => key): readonly value[] {\n const map = new Map<key, value>();\n for (const value of values) {\n const key = getKey(value);\n if (!map.has(key)) {\n map.set(key, value);\n }\n }\n return Array.from(map.values());\n}\n","export function wait(ms: number): Promise<void> {\n return new Promise<void>((resolve) => setTimeout(() => resolve(), ms));\n}\n","export function waitForIdle(): Promise<void> {\n return new Promise<void>((resolve) => {\n if (typeof requestIdleCallback !== \"undefined\") {\n requestIdleCallback(() => resolve());\n } else {\n setTimeout(() => resolve(), 1);\n }\n });\n}\n"],"mappings":";AAAO,SAAS,iBAAiB,OAAc,SAAyB;AACtE,QAAM,IAAI,MAAM,WAAW,qBAAqB,KAAK,EAAE;AACzD;;;ACFO,SAAS,aAAa,MAAwB;AACnD,SAAO,KAAK,OAAO,CAAC,GAAG,MAAO,IAAI,IAAI,IAAI,CAAE;AAC9C;;;ACFO,SAAS,aAAa,MAAwB;AACnD,SAAO,KAAK,OAAO,CAAC,GAAG,MAAO,IAAI,IAAI,IAAI,CAAE;AAC9C;;;ACFO,SAAS,WAAW,GAAW,GAAuB;AAC3D,SAAO,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI;AAClC;;;ACFO,UAAU,MAAS,KAAmB,GAA0C;AACrF,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK,GAAG;AACtC,UAAM,IAAI,MAAM,GAAG,IAAI,CAAC;AAAA,EAC1B;AACF;;;ACJO,SAAS,QACd,QACA,QAC4B;AAC5B,QAAM,MAAM,oBAAI,IAA2B;AAC3C,aAAW,SAAS,QAAQ;AAC1B,UAAM,MAAM,OAAO,KAAK;AACxB,QAAI,CAAC,IAAI,IAAI,GAAG,EAAG,KAAI,IAAI,KAAK,CAAC,CAAC;AAClC,IAAC,IAAI,IAAI,GAAG,EAAc,KAAK,KAAK;AAAA,EACtC;AACA,SAAO;AACT;;;ACXO,SAAS,SAAY,OAAa;AACvC,SAAO;AACT;;;ACDO,SAAS,SAAe,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EACF,CAAC;AACH;","names":[]}
package/dist/codegen.js CHANGED
@@ -10,8 +10,7 @@ import {
10
10
  } from "./chunk-GRGLAPN2.js";
11
11
  import {
12
12
  isDefined
13
- } from "./chunk-NFWCLD5I.js";
14
- import "./chunk-CHXZROA7.js";
13
+ } from "./chunk-ETXWXV5T.js";
15
14
 
16
15
  // src/codegen/render-solidity/abiToInterface.ts
17
16
  import { formatAbiItem, formatAbiParameter } from "abitype";