Skip to content

Commit 669c472

Browse files
authored
Remove the need for runeName for RuneUtxoBalance (#42)
1 parent 2dfb349 commit 669c472

File tree

4 files changed

+2
-38
lines changed

4 files changed

+2
-38
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@magiceden-oss/runestone-lib",
3-
"version": "0.7.0-alpha",
3+
"version": "0.7.1-alpha",
44
"description": "",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

src/indexer/types.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ export type RuneUtxoBalance = {
111111
address?: string;
112112
scriptPubKey: Buffer;
113113
runeId: RuneLocation;
114-
runeName: string;
115114
runeTicker: string;
116115
amount: bigint;
117116
};
@@ -142,8 +141,8 @@ export type RuneEtchingSpec = RuneEtchingBase & { runeName?: string };
142141

143142
export type RuneEtching = ({ valid: false } | ({ valid: true } & RuneEtchingBase)) & {
144143
runeId: RuneLocation;
145-
runeName: string;
146144
runeTicker: string;
145+
runeName: string;
147146
txid: string;
148147
};
149148

src/indexer/updater.ts

-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ export class RuneUpdater implements RuneBlockIndex {
287287
this.utxoBalances.push({
288288
runeId: balance.runeId,
289289
runeTicker: etching.runeTicker,
290-
runeName: etching.runeName,
291290
amount: balance.amount,
292291
scriptPubKey: Buffer.from(output.scriptPubKey.hex),
293292
txid: tx.txid,

test/updater.test.ts

-34
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ describe('mint', () => {
478478
txid: 'txid',
479479
vout: 1,
480480
runeTicker: 'TESTRUNE',
481-
runeName: 'TESTRUNE',
482481
runeId: {
483482
block: 876543,
484483
tx: 21,
@@ -534,7 +533,6 @@ describe('mint', () => {
534533
txid: 'txid',
535534
vout: 1,
536535
runeTicker: 'TESTRUNE',
537-
runeName: 'TESTRUNE',
538536
runeId: {
539537
block: 876543,
540538
tx: 21,
@@ -586,7 +584,6 @@ describe('mint', () => {
586584
txid: 'txid',
587585
vout: 1,
588586
runeTicker: 'TESTRUNE',
589-
runeName: 'TESTRUNE',
590587
runeId: {
591588
block: 876543,
592589
tx: 21,
@@ -639,7 +636,6 @@ describe('mint', () => {
639636
txid: 'txid',
640637
vout: 1,
641638
runeTicker: 'TESTRUNE',
642-
runeName: 'TESTRUNE',
643639
runeId: {
644640
block: 876543,
645641
tx: 21,
@@ -688,7 +684,6 @@ describe('mint', () => {
688684
txid: 'txid',
689685
vout: 1,
690686
runeTicker: 'TESTRUNE',
691-
runeName: 'TESTRUNE',
692687
runeId: {
693688
block: 876543,
694689
tx: 21,
@@ -699,7 +694,6 @@ describe('mint', () => {
699694
txid: 'txid',
700695
vout: 2,
701696
runeTicker: 'TESTRUNE',
702-
runeName: 'TESTRUNE',
703697
runeId: {
704698
block: 876543,
705699
tx: 21,
@@ -793,7 +787,6 @@ describe('edict', () => {
793787
vout: 0,
794788
amount: 400n,
795789
runeTicker: 'TESTRUNE',
796-
runeName: 'TESTRUNE',
797790
runeId: { block: 888, tx: 8 },
798791
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
799792
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -805,7 +798,6 @@ describe('edict', () => {
805798
vout: 1,
806799
amount: 89n,
807800
runeTicker: 'TESTRUNE',
808-
runeName: 'TESTRUNE',
809801
runeId: { block: 888, tx: 8 },
810802
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
811803
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -827,7 +819,6 @@ describe('edict', () => {
827819
txid: 'txid',
828820
vout: 1,
829821
runeTicker: 'TESTRUNE',
830-
runeName: 'TESTRUNE',
831822
runeId: {
832823
block: 888,
833824
tx: 8,
@@ -838,7 +829,6 @@ describe('edict', () => {
838829
txid: 'txid',
839830
vout: 2,
840831
runeTicker: 'TESTRUNE',
841-
runeName: 'TESTRUNE',
842832
runeId: {
843833
block: 888,
844834
tx: 8,
@@ -873,7 +863,6 @@ describe('edict', () => {
873863
vout: 0,
874864
amount: 400n,
875865
runeTicker: 'TESTRUNE',
876-
runeName: 'TESTRUNE',
877866
runeId: { block: 888, tx: 8 },
878867
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
879868
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -897,7 +886,6 @@ describe('edict', () => {
897886
txid: 'txid',
898887
vout: 1,
899888
runeTicker: 'TESTRUNE',
900-
runeName: 'TESTRUNE',
901889
runeId: {
902890
block: 888,
903891
tx: 8,
@@ -908,7 +896,6 @@ describe('edict', () => {
908896
txid: 'childtxid',
909897
vout: 0,
910898
runeTicker: 'TESTRUNE',
911-
runeName: 'TESTRUNE',
912899
runeId: {
913900
block: 888,
914901
tx: 8,
@@ -943,7 +930,6 @@ describe('edict', () => {
943930
vout: 0,
944931
amount: 400n,
945932
runeTicker: 'TESTRUNE',
946-
runeName: 'TESTRUNE',
947933
runeId: { block: 888, tx: 8 },
948934
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
949935
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -992,7 +978,6 @@ describe('edict', () => {
992978
vout: 0,
993979
amount: 400n,
994980
runeTicker: 'TESTRUNE',
995-
runeName: 'TESTRUNE',
996981
runeId: { block: 888, tx: 8 },
997982
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
998983
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1015,7 +1000,6 @@ describe('edict', () => {
10151000
txid: 'txid',
10161001
vout: 1,
10171002
runeTicker: 'TESTRUNE',
1018-
runeName: 'TESTRUNE',
10191003
runeId: {
10201004
block: 888,
10211005
tx: 8,
@@ -1046,7 +1030,6 @@ describe('edict', () => {
10461030
vout: 0,
10471031
amount: 400n,
10481032
runeTicker: 'TESTRUNE',
1049-
runeName: 'TESTRUNE',
10501033
runeId: { block: 888, tx: 8 },
10511034
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
10521035
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1069,7 +1052,6 @@ describe('edict', () => {
10691052
txid: 'txid',
10701053
vout: 2,
10711054
runeTicker: 'TESTRUNE',
1072-
runeName: 'TESTRUNE',
10731055
runeId: {
10741056
block: 888,
10751057
tx: 8,
@@ -1104,7 +1086,6 @@ describe('edict', () => {
11041086
vout: 0,
11051087
amount: 400n,
11061088
runeTicker: 'TESTRUNE',
1107-
runeName: 'TESTRUNE',
11081089
runeId: { block: 888, tx: 8 },
11091090
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
11101091
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1128,7 +1109,6 @@ describe('edict', () => {
11281109
txid: 'txid',
11291110
vout: i + 1,
11301111
runeTicker: 'TESTRUNE',
1131-
runeName: 'TESTRUNE',
11321112
runeId: {
11331113
block: 888,
11341114
tx: 8,
@@ -1164,7 +1144,6 @@ describe('edict', () => {
11641144
vout: 0,
11651145
amount: 402n,
11661146
runeTicker: 'TESTRUNE',
1167-
runeName: 'TESTRUNE',
11681147
runeId: { block: 888, tx: 8 },
11691148
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
11701149
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1188,7 +1167,6 @@ describe('edict', () => {
11881167
txid: 'txid',
11891168
vout: i + 1,
11901169
runeTicker: 'TESTRUNE',
1191-
runeName: 'TESTRUNE',
11921170
runeId: {
11931171
block: 888,
11941172
tx: 8,
@@ -1227,7 +1205,6 @@ describe('edict', () => {
12271205
vout: 0,
12281206
amount: 500n,
12291207
runeTicker: 'TESTRUNE',
1230-
runeName: 'TESTRUNE',
12311208
runeId: { block: 888, tx: 8 },
12321209
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
12331210
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1251,7 +1228,6 @@ describe('edict', () => {
12511228
txid: 'txid',
12521229
vout: i + 1,
12531230
runeTicker: 'TESTRUNE',
1254-
runeName: 'TESTRUNE',
12551231
runeId: {
12561232
block: 888,
12571233
tx: 8,
@@ -1287,7 +1263,6 @@ describe('edict', () => {
12871263
vout: 0,
12881264
amount: 400n,
12891265
runeTicker: 'TESTRUNE',
1290-
runeName: 'TESTRUNE',
12911266
runeId: { block: 888, tx: 8 },
12921267
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
12931268
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1311,7 +1286,6 @@ describe('edict', () => {
13111286
txid: 'txid',
13121287
vout: i + 1,
13131288
runeTicker: 'TESTRUNE',
1314-
runeName: 'TESTRUNE',
13151289
runeId: {
13161290
block: 888,
13171291
tx: 8,
@@ -1347,7 +1321,6 @@ describe('edict', () => {
13471321
vout: 0,
13481322
amount: 400n,
13491323
runeTicker: 'TESTRUNE',
1350-
runeName: 'TESTRUNE',
13511324
runeId: { block: 888, tx: 8 },
13521325
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
13531326
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1371,7 +1344,6 @@ describe('edict', () => {
13711344
txid: 'txid',
13721345
vout: i + 1,
13731346
runeTicker: 'TESTRUNE',
1374-
runeName: 'TESTRUNE',
13751347
runeId: {
13761348
block: 888,
13771349
tx: 8,
@@ -1404,7 +1376,6 @@ describe('no runestone', () => {
14041376
vout: 0,
14051377
amount: 400n,
14061378
runeTicker: 'TESTRUNE',
1407-
runeName: 'TESTRUNE',
14081379
runeId: { block: 888, tx: 8 },
14091380
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
14101381
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1426,7 +1397,6 @@ describe('no runestone', () => {
14261397
txid: 'txid',
14271398
vout: 0,
14281399
runeTicker: 'TESTRUNE',
1429-
runeName: 'TESTRUNE',
14301400
runeId: {
14311401
block: 888,
14321402
tx: 8,
@@ -1456,7 +1426,6 @@ describe('no runestone', () => {
14561426
vout: 0,
14571427
amount: 400n,
14581428
runeTicker: 'TESTRUNE',
1459-
runeName: 'TESTRUNE',
14601429
runeId: { block: 888, tx: 8 },
14611430
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
14621431
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1478,7 +1447,6 @@ describe('no runestone', () => {
14781447
txid: 'txid',
14791448
vout: 1,
14801449
runeTicker: 'TESTRUNE',
1481-
runeName: 'TESTRUNE',
14821450
runeId: {
14831451
block: 888,
14841452
tx: 8,
@@ -1515,7 +1483,6 @@ describe('burning', () => {
15151483
vout: 0,
15161484
amount: 400n,
15171485
runeTicker: 'TESTRUNE',
1518-
runeName: 'TESTRUNE',
15191486
runeId: { block: 888, tx: 8 },
15201487
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
15211488
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -1568,7 +1535,6 @@ describe('burning', () => {
15681535
vout: 0,
15691536
amount: 400n,
15701537
runeTicker: 'TESTRUNE',
1571-
runeName: 'TESTRUNE',
15721538
runeId: { block: 888, tx: 8 },
15731539
scriptPubKey: Buffer.from('a914ea6b832a05c6ca578baa3836f3f25553d41068a587', 'hex'),
15741540
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',

0 commit comments

Comments
 (0)