From 3f0ccc62442dfa1acdf13194bf5805b5a1b202c2 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Tue, 3 Jun 2025 18:02:08 +0530 Subject: [PATCH] Accept csv files instead of xlsx --- csvAllocation.csv | 89 +++++ data/distribution.json | 404 ++++++++++++++++++++++ scripts/generate-lps-distribution-json.py | 64 ++-- 3 files changed, 530 insertions(+), 27 deletions(-) create mode 100644 csvAllocation.csv create mode 100644 data/distribution.json diff --git a/csvAllocation.csv b/csvAllocation.csv new file mode 100644 index 0000000..b768d93 --- /dev/null +++ b/csvAllocation.csv @@ -0,0 +1,89 @@ +Category/Group,Placeholder,Entity,Email,Laconic Address,Total LPS Allocation,Percent Allocation,Lock (months),Vest (months),Multisig?,Testnet 1 Allocation,Testnet 2 Allocation,SLA Allocation +,,,,,,,,,,,, +Seed Investors,,,,,20801,16.05%,,,,,, +,Seed Investor 1,Atomic Form,,foundation1,6480,5%,12,,Yes,,, +,Seed Investor 2,Incredulous,,foundation1,6480,5%,12,,Yes,,, +,Seed Investor 3,Lemniscap,,foundation1,6480,5%,12,,Yes,,, +,Seed Investor 4,Chris H.,,foundation1,1361,1.05%,6,,,,, +,,,,,,,,,,,, +Laconic Ltd,,,,,,,,,,,, +,Team,Eleusian,,ltd1,25920,20%,,36,Yes,,, +,,,,,,,,,,,, +Early Supporters,,,,,,,,,,,, +,For sale,Foundation,,foundation2,,18.95%,,,,,, +,,,,,,,,,,,, +Community Pool,,,,,,,,,,,, +,Community Module,N/A,,autogenerated,38880,30%,,,,,, +,,,,,,,,,,,, +Non-testnet Service Providers,,,,,6480,5%,,,,,, +,Autonomous,,,TBD,,0.10%,,,,,, +,Mito,ZACHARY RAMSAY,,TBD,,,,,,,, +,Owen,,,TBD,,,,,,,, +,Mark,,,TBD,,,,,,,, +,Zee,,,TBD,,,,,,,, +,Remainder (marketing),Foundation,,foundation3,TBD,,,,Yes,,, +,,,,,,,,,,,, +Testnet,,,,,12960,10%,,,,,, +,Remainder (marketing),Foundation,,foundation3,9863.895212481530000,,,,Yes,,, +Ongoing Service Providers,,,,,,,,,,,bonuses + https://github.com/LaconicNetwork/loro-testnet/pull/60, +,BlackBlocks,EDUARDO WILLIAM HERZOG,info@blackblocks.io,laconic128vt4we3s044zycwydz9f6amzrlp7r6lnputdg,437.568163257075000,,,,,169.568163257075000,100,168 +,rxpwnz,DENISS VASILENKO,paladinlolwto@gmail.com,laconic19h70dln5ktxpc8mcam5nm22glr7h9qtlzvvrtq,366.236759056674000,,,,,98.236759056674200,100,168 +,MekongLabs,NGUYỄN THỂ NGUYÊN,nguyen@mekonglabs.tech,laconic195s2w429xuxqagkz54n55dcpfz4nwl0k62qnet,347.478327502243000,,,,,79.478327502243400,100,168 +,Silent,LYU PENG,silentvalidator@gmail.com,laconic1256aqyag45x84usd6xj053musfcql74j4j3ll3,143.558393240641000,,,,,118.558393240641000,25,0 +,Barg Systems,BRANDON YOUNG,beezy@barg.systems,laconic1mjzrgc8ucspjz98g76c8pce026l5newrujetx0,152.988072312237000,,,,,102.988072312237000,50,0 +,Dream Gallery,HUI ZHAO,infinite.virtual.reality.43@gmail.com,laconic1f9j8n9rqsekzp0rffe3298pytms4hfz20khge3,117.107359272441000,,,,,92.107359272441300,25,0 +,,,,,,,,,,,, +Testnet 2 Bonus Service Providers,Ellipfra,MARC-ANDRE DUMAS,ma@ellipfra.com,laconic1axg567nvu92un33z6z547n7klkeq6ud37pwz35,114.304453473952000,,,,,104.304453473952000,10,0 +,High Stakes,THOMAS CHRISTOPHE LAFAILLE,contact@highstakes.ch,laconic1vy8tnar3w7zxusnwhp5jdzw97rusr2d6n8ch5c,83.616317641483800,,,,,73.616317641483800,10,0 +,Cosmos Spaces,TBD,mrtn.ogrady@gmail.com,laconic1qsvrehuchjquanwm7gsx7cvze8t959l7zf0zpw,21.097359439554500,,,,,16.097359439554500,5,0 +,,,,,,,,,,,, +Testnet 1 (only) Service Providers,,,,,,,,,,,, +,Hypha,Lexa,,laconic1s03twj8fedmcn04kzt2z35mwy34e7hxnm423sh,161.45,,,,,161.45,0,0 +,KenZ,QUANG TUYEN TRAN,quangtuyenpdu@gmail.com,laconic16v0lazxvmccs0893g58fqa65m6344dlcpxrvs0,103.440578336577000,,,,,103.440578336577000,0,0 +,spidey,ASHISH SHARMA,andyroddick6600@gmail.com,laconic1a2h0eck0dra2fu9xcama9rrygncjc30ex35ly5,101.548280416612000,,,,,101.548280416612000,0,0 +,Wavefive,JAMES JOSEPH COUSINS,jim@wavefive.co,laconic1dx3jyjfpcwdwufj5uuufk84f5ugm5h4wf3jsl2,93.279761244593200,,,,,93.279761244593200,0,0 +,DragonZ,XUAN HUAN NGUYEN,kenz4788@gmail.com,laconic1f7tursd29yrk3mnys3javqngraj5ls7k5h3vvv,84.167935390851100,,,,,84.167935390851100,0,0 +,yandc,DECHEN YAN,dechenyan@gmail.com,laconic14vzrlac5zte5nju9fm0ktzfz7e4zss74f6lpzx,81.103235498734600,,,,,81.103235498734600,0,0 +,CalvinJoe,KOSTIANTYN KONSTANTINOV,dvadcatodinpilot@hotmail.com,laconic1nmuxuz3z2xj5fqf2sz5nn0u2r2al7mutsl8pm7,76.681017533600200,,,,,76.681017533600200,0,0 +,Nodeify,VINCENT PETOSCIA,vince@nodeify.net,laconic18uc9h349nd0w62vnleu8ywu3sur7ly0kdsgmg3,75.488047105796500,,,,,75.488047105796500,0,0 +,Twaltoner,VALERIIA IVANENKO,aciessnull@hotmail.com,laconic1360txwdlk4z0604vd22dcarxt9w3ddj8d8mz8m,74.870993436242800,,,,,74.870993436242800,0,0 +,AndreasV,VALERIIA MIKAELIAN,mohadeseshakiba3@gmail.com,laconic1wrwl5557yxgqkwq4djlrz33x5nd5f0j9vh42jg,74.634456196247300,,,,,74.634456196247300,0,0 +,Elf,ZIQI ZHANG,zzq8556489@outlook.com,laconic1ka6xtcejersljsmslc6tw9uxvfmans476v98r0,73.194664300622100,,,,,73.194664300622100,0,0 +,twelly8,VITALII HRYNOV,tanousbronella@gmail.com,laconic1ljwtpta6xfgtnk0e03h4t77chjygv399pr6utz,73.122674705840800,,,,,73.122674705840800,0,0 +,Quitlantarah,LARYSA GVOZDARYOVA,soulynhaphommalangsy@gmail.com,laconic1vfs90x57ufs87tn9h6zs3xylnzh97f03qy0ggz,73.040400883233700,,,,,73.040400883233700,0,0 +,,,,,,,,,,,, +Testnet 1 App Publishers,,,,,,,,,,,, +,,SEBASTIAN VOUTAT,info@swiss-staking.ch,laconic1qw26grwct7xtjdrlseurh9v6g8wu2x3vded63g,15.744925453565700,,,,,,, +,,Nguyễn Thị Thu Phương,choioff@gmail.com,laconic1r70vhqwvf7dw2twy6m77f34fzeshp9fqxtxace,11.594036285252400,,,,,,, +,,TRỊNH NGỌC ĐOAN,trinhdoanqh@gmail.com,laconic1nezjpcfflf8nc5yt2hx5yd20ry6ka066tth38w,11.594036285252400,,,,,,, +,,VADYM KUSHNIR,88vgk88@gmail.com,laconic1xwwy9944lgu3djvgmk4l4x59x5cjzczcxuj9f5,11.378659960481400,,,,,,, +,,DINH DUNG DANG,dangdinhdung@gmail.com,laconic1kkv020aj5z8es9shrylvlcjfextm2srg0085ml,9.831866355308070,,,,,,, +,,PATRICK HOFMEISTER,pathrock@protonmail.com,laconic1qrss36gx7rx58uffn60lx99fr0d929566mpafj,9.831866355308070,,,,,,, +,,Pablo Alexandro Lema Diez de Medina,pablo@nodesoda.com,laconic1g3dugtdlardfg28teljfzftzfeynjheae07ytr,8.265493084246450,,,,,,, +,,Azmy Rachman K,orang3club@gmail.com,laconic1rcssfrp47s0xmg2vahshmf6zcaadqamjel2a7r,6.072570504760190,,,,,,, +,,CHUKWUDALU EMMANUEL IFEDIORA,chukwudaluemmanuel7@gmail.com,laconic1jeylpuu59d4a5qynj8xm99ssgmk7w5w95n6q00,4.153763247709720,,,,,,, +,,VICTOR SOMTOCHUKWU OKOLI,foroncecomeandseeme@gmail.com,laconic17njvfpqxv6nc6ky5yvkk5g2r35tlvkqk4x0as9,4.153763247709720,,,,,,, +,,CHINEDU ANTHONY AGUDE,dalupython@gmail.com,laconic1hw5vr47nl4876nd728vcy4m44j57un67guldlv,4.153763247709720,,,,,,, +,,ABUCHI COLUMBUS NDIBE,dyingifeellike@gmail.com,laconic1nthmxgdtf58mntuukz4r5v0ry6zctl2ve9aqpe,4.153763247709720,,,,,,, +,,WISDOM CHUKWUBUIKEM NWAUBANI,chimdioligarchy@gmail.com,laconic17zcxj4fyaef42da7pk0ccqxz2a8fns5fxs2qlr,4.153763247709720,,,,,,, +,,Azeez Adebowale Adekanbi,kentmererashida@gmail.com,laconic1l7tc37faxf9knl9rxmkfzc26dchnrtzvderurf,4.153763247709720,,,,,,, +,,Ikenna Ozigbo,shareladyboss@gmail.com,laconic1aahpp8vknsq72vamrfgnn86m4ple5xqnd5dydz,4.153763247709720,,,,,,, +,,VICTOR EZECHUKWU NZENWA,pushinmoni@gmail.com,laconic12wrfzczt0qgknjv9nle4uczujpqxrkj7p4v9uj,4.153763247709720,,,,,,, +,,IFEANYI EMMANUEL EJIM,eejim399@gmail.com,laconic1z3syuquq0gdhvhtjs75lcsrpplm79ycxjtdge6,3.957966588827020,,,,,,, +,,Charles Ekeigbo,preciousuwem83@gmail.com,laconic122mal2jwd9x2vfxrpxtd9vdz85ksggeq0tlle5,3.957966588827020,,,,,,, +,,CHIMEZIE CHRISTOPHER IFEDIORA,ethskytrixsmartcontract@gmail.com,laconic15y76s0ml2dfzef3y07x6hmcngtcaw59d8y2sls,3.605532602838150,,,,,,, +,,TARAS GRUZHEVSKIY,office@noders.team,laconic1yavpc0fjk3ze33kfuuc5fra5x3nzs20ajhpef5,3.292257948625830,,,,,,, +,,Olusola Adebesin,olusolaadebesin0@gmail.com,laconic1qzwl52vns3gecngsh59y5yvg9a8m345dz2qv8x,3.292257948625830,,,,,,, +,,ENIOLA OLUWAFEMI OLATUNDE,olatenny@gmail.com,laconic1nr6z78gkf6swk9m02qtdazde7jr9csetv402wr,2.783186635530810,,,,,,, +,,DANIEL OLUMIDE OLATUNDE,reabumble@gmail.com,laconic17uukytqarpu6wsmjcqgfcs2tjhwhfu6eq72cpw,2.783186635530810,,,,,,, +,,OLUWASEUN JOSEPH-AYOTUNDE OLATUNDE,ecares4mee@gmail.com,laconic17g9ytaauphqv5lawthk2hj9n04eardz28yvnfk,2.783186635530810,,,,,,, +,,Temiloluwa Olasiwale,enny4wise@gmail.com,laconic16pxr8lupfcswatynedc76ynw5f74jpcmjt28vs,2.783186635530810,,,,,,, +,,David Akinyemi,f333miola@gmail.com,laconic1xnvd8fdr5zwfa2thdlr2pg22ndg4e0dptqfav9,2.783186635530810,,,,,,, +,,JUWON SIMON OLATUNDE,enny4bea@gmail.com,laconic1qykx88yyy3a6udmqfu3aej40rymklnynfr5cq8,2.783186635530810,,,,,,, +,,JULIET CHINECHEREM OKEIFUFE,richardjuliet1996@gmail.com,laconic1qjjvdwlt2u5cgmaxn6l66nwnqw9fs4vl7g045h,2.783186635530810,,,,,,, +,,OLUWATOBI DANIEL OLAYANJU,barthenry41@gmail.com,laconic1mdzgqw7re2fuws0uycpm90nt07d6ntsk5alt4j,2.783186635530810,,,,,,, +,,IFEOLUWA JOSEPH ADELABU,danieelleexx@gmail.com,laconic157jy998f0x2m0kms8r6mmfs3zazljpd0svd9ne,2.783186635530810,,,,,,, +,,EMEKA OBI,kobi6542@gmail.com,laconic1rdtz32xsgw7yrjfrue36pglevpymc5aflu4cfy,2.783186635530810,,,,,,, +,,Vladimir Skopintsev,posthuman.validator@gmail.com,laconic14dzwrzdfgln6z2vuu0jncvwjt2l7e4yl7slmjq,2.646128974312920,,,,,,, +,,,,,,,,,,,, +,,,,Total testnet allocation,3096.104787518470000,,,,,,, \ No newline at end of file diff --git a/data/distribution.json b/data/distribution.json new file mode 100644 index 0000000..aa4ed23 --- /dev/null +++ b/data/distribution.json @@ -0,0 +1,404 @@ +{ + "Seed Investor 1": { + "total_lps_allocation": 6480.0, + "lock_months": 12.0, + "vest_months": null, + "laconic_address": "foundation1" + }, + "Seed Investor 2": { + "total_lps_allocation": 6480.0, + "lock_months": 12.0, + "vest_months": null, + "laconic_address": "foundation1" + }, + "Seed Investor 3": { + "total_lps_allocation": 6480.0, + "lock_months": 12.0, + "vest_months": null, + "laconic_address": "foundation1" + }, + "Seed Investor 4": { + "total_lps_allocation": 1361.0, + "lock_months": 6.0, + "vest_months": null, + "laconic_address": "foundation1" + }, + "Team": { + "total_lps_allocation": 25920.0, + "lock_months": null, + "vest_months": 36.0, + "laconic_address": "ltd1" + }, + "For sale": { + "total_lps_allocation": null, + "lock_months": null, + "vest_months": null, + "laconic_address": "foundation2" + }, + "Community Module": { + "total_lps_allocation": 38880.0, + "lock_months": null, + "vest_months": null, + "laconic_address": "autogenerated" + }, + "Autonomous": { + "total_lps_allocation": null, + "lock_months": null, + "vest_months": null, + "laconic_address": "TBD" + }, + "Mito": { + "total_lps_allocation": null, + "lock_months": null, + "vest_months": null, + "laconic_address": "TBD" + }, + "Owen": { + "total_lps_allocation": null, + "lock_months": null, + "vest_months": null, + "laconic_address": "TBD" + }, + "Mark": { + "total_lps_allocation": null, + "lock_months": null, + "vest_months": null, + "laconic_address": "TBD" + }, + "Zee": { + "total_lps_allocation": null, + "lock_months": null, + "vest_months": null, + "laconic_address": "TBD" + }, + "Remainder (marketing)": { + "total_lps_allocation": 9863.89521248153, + "lock_months": null, + "vest_months": null, + "laconic_address": "foundation3" + }, + "BlackBlocks": { + "total_lps_allocation": 437.568163257075, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic128vt4we3s044zycwydz9f6amzrlp7r6lnputdg" + }, + "rxpwnz": { + "total_lps_allocation": 366.236759056674, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic19h70dln5ktxpc8mcam5nm22glr7h9qtlzvvrtq" + }, + "MekongLabs": { + "total_lps_allocation": 347.478327502243, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic195s2w429xuxqagkz54n55dcpfz4nwl0k62qnet" + }, + "Silent": { + "total_lps_allocation": 143.558393240641, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1256aqyag45x84usd6xj053musfcql74j4j3ll3" + }, + "Barg Systems": { + "total_lps_allocation": 152.988072312237, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1mjzrgc8ucspjz98g76c8pce026l5newrujetx0" + }, + "Dream Gallery": { + "total_lps_allocation": 117.107359272441, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1f9j8n9rqsekzp0rffe3298pytms4hfz20khge3" + }, + "Ellipfra": { + "total_lps_allocation": 114.304453473952, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1axg567nvu92un33z6z547n7klkeq6ud37pwz35" + }, + "High Stakes": { + "total_lps_allocation": 83.6163176414838, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1vy8tnar3w7zxusnwhp5jdzw97rusr2d6n8ch5c" + }, + "Cosmos Spaces": { + "total_lps_allocation": 21.0973594395545, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1qsvrehuchjquanwm7gsx7cvze8t959l7zf0zpw" + }, + "Hypha": { + "total_lps_allocation": 161.45, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1s03twj8fedmcn04kzt2z35mwy34e7hxnm423sh" + }, + "KenZ": { + "total_lps_allocation": 103.440578336577, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic16v0lazxvmccs0893g58fqa65m6344dlcpxrvs0" + }, + "spidey": { + "total_lps_allocation": 101.548280416612, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1a2h0eck0dra2fu9xcama9rrygncjc30ex35ly5" + }, + "Wavefive": { + "total_lps_allocation": 93.2797612445932, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1dx3jyjfpcwdwufj5uuufk84f5ugm5h4wf3jsl2" + }, + "DragonZ": { + "total_lps_allocation": 84.1679353908511, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1f7tursd29yrk3mnys3javqngraj5ls7k5h3vvv" + }, + "yandc": { + "total_lps_allocation": 81.1032354987346, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic14vzrlac5zte5nju9fm0ktzfz7e4zss74f6lpzx" + }, + "CalvinJoe": { + "total_lps_allocation": 76.6810175336002, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1nmuxuz3z2xj5fqf2sz5nn0u2r2al7mutsl8pm7" + }, + "Nodeify": { + "total_lps_allocation": 75.4880471057965, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic18uc9h349nd0w62vnleu8ywu3sur7ly0kdsgmg3" + }, + "Twaltoner": { + "total_lps_allocation": 74.8709934362428, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1360txwdlk4z0604vd22dcarxt9w3ddj8d8mz8m" + }, + "AndreasV": { + "total_lps_allocation": 74.6344561962473, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1wrwl5557yxgqkwq4djlrz33x5nd5f0j9vh42jg" + }, + "Elf": { + "total_lps_allocation": 73.1946643006221, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1ka6xtcejersljsmslc6tw9uxvfmans476v98r0" + }, + "twelly8": { + "total_lps_allocation": 73.1226747058408, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1ljwtpta6xfgtnk0e03h4t77chjygv399pr6utz" + }, + "Quitlantarah": { + "total_lps_allocation": 73.0404008832337, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1vfs90x57ufs87tn9h6zs3xylnzh97f03qy0ggz" + }, + "laconic1qw26grwct7xtjdrlseurh9v6g8wu2x3vded63g": { + "total_lps_allocation": 15.7449254535657, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1qw26grwct7xtjdrlseurh9v6g8wu2x3vded63g" + }, + "laconic1r70vhqwvf7dw2twy6m77f34fzeshp9fqxtxace": { + "total_lps_allocation": 11.5940362852524, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1r70vhqwvf7dw2twy6m77f34fzeshp9fqxtxace" + }, + "laconic1nezjpcfflf8nc5yt2hx5yd20ry6ka066tth38w": { + "total_lps_allocation": 11.5940362852524, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1nezjpcfflf8nc5yt2hx5yd20ry6ka066tth38w" + }, + "laconic1xwwy9944lgu3djvgmk4l4x59x5cjzczcxuj9f5": { + "total_lps_allocation": 11.3786599604814, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1xwwy9944lgu3djvgmk4l4x59x5cjzczcxuj9f5" + }, + "laconic1kkv020aj5z8es9shrylvlcjfextm2srg0085ml": { + "total_lps_allocation": 9.83186635530807, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1kkv020aj5z8es9shrylvlcjfextm2srg0085ml" + }, + "laconic1qrss36gx7rx58uffn60lx99fr0d929566mpafj": { + "total_lps_allocation": 9.83186635530807, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1qrss36gx7rx58uffn60lx99fr0d929566mpafj" + }, + "laconic1g3dugtdlardfg28teljfzftzfeynjheae07ytr": { + "total_lps_allocation": 8.26549308424645, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1g3dugtdlardfg28teljfzftzfeynjheae07ytr" + }, + "laconic1rcssfrp47s0xmg2vahshmf6zcaadqamjel2a7r": { + "total_lps_allocation": 6.07257050476019, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1rcssfrp47s0xmg2vahshmf6zcaadqamjel2a7r" + }, + "laconic1jeylpuu59d4a5qynj8xm99ssgmk7w5w95n6q00": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1jeylpuu59d4a5qynj8xm99ssgmk7w5w95n6q00" + }, + "laconic17njvfpqxv6nc6ky5yvkk5g2r35tlvkqk4x0as9": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic17njvfpqxv6nc6ky5yvkk5g2r35tlvkqk4x0as9" + }, + "laconic1hw5vr47nl4876nd728vcy4m44j57un67guldlv": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1hw5vr47nl4876nd728vcy4m44j57un67guldlv" + }, + "laconic1nthmxgdtf58mntuukz4r5v0ry6zctl2ve9aqpe": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1nthmxgdtf58mntuukz4r5v0ry6zctl2ve9aqpe" + }, + "laconic17zcxj4fyaef42da7pk0ccqxz2a8fns5fxs2qlr": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic17zcxj4fyaef42da7pk0ccqxz2a8fns5fxs2qlr" + }, + "laconic1l7tc37faxf9knl9rxmkfzc26dchnrtzvderurf": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1l7tc37faxf9knl9rxmkfzc26dchnrtzvderurf" + }, + "laconic1aahpp8vknsq72vamrfgnn86m4ple5xqnd5dydz": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1aahpp8vknsq72vamrfgnn86m4ple5xqnd5dydz" + }, + "laconic12wrfzczt0qgknjv9nle4uczujpqxrkj7p4v9uj": { + "total_lps_allocation": 4.15376324770972, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic12wrfzczt0qgknjv9nle4uczujpqxrkj7p4v9uj" + }, + "laconic1z3syuquq0gdhvhtjs75lcsrpplm79ycxjtdge6": { + "total_lps_allocation": 3.95796658882702, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1z3syuquq0gdhvhtjs75lcsrpplm79ycxjtdge6" + }, + "laconic122mal2jwd9x2vfxrpxtd9vdz85ksggeq0tlle5": { + "total_lps_allocation": 3.95796658882702, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic122mal2jwd9x2vfxrpxtd9vdz85ksggeq0tlle5" + }, + "laconic15y76s0ml2dfzef3y07x6hmcngtcaw59d8y2sls": { + "total_lps_allocation": 3.60553260283815, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic15y76s0ml2dfzef3y07x6hmcngtcaw59d8y2sls" + }, + "laconic1yavpc0fjk3ze33kfuuc5fra5x3nzs20ajhpef5": { + "total_lps_allocation": 3.29225794862583, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1yavpc0fjk3ze33kfuuc5fra5x3nzs20ajhpef5" + }, + "laconic1qzwl52vns3gecngsh59y5yvg9a8m345dz2qv8x": { + "total_lps_allocation": 3.29225794862583, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1qzwl52vns3gecngsh59y5yvg9a8m345dz2qv8x" + }, + "laconic1nr6z78gkf6swk9m02qtdazde7jr9csetv402wr": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1nr6z78gkf6swk9m02qtdazde7jr9csetv402wr" + }, + "laconic17uukytqarpu6wsmjcqgfcs2tjhwhfu6eq72cpw": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic17uukytqarpu6wsmjcqgfcs2tjhwhfu6eq72cpw" + }, + "laconic17g9ytaauphqv5lawthk2hj9n04eardz28yvnfk": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic17g9ytaauphqv5lawthk2hj9n04eardz28yvnfk" + }, + "laconic16pxr8lupfcswatynedc76ynw5f74jpcmjt28vs": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic16pxr8lupfcswatynedc76ynw5f74jpcmjt28vs" + }, + "laconic1xnvd8fdr5zwfa2thdlr2pg22ndg4e0dptqfav9": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1xnvd8fdr5zwfa2thdlr2pg22ndg4e0dptqfav9" + }, + "laconic1qykx88yyy3a6udmqfu3aej40rymklnynfr5cq8": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1qykx88yyy3a6udmqfu3aej40rymklnynfr5cq8" + }, + "laconic1qjjvdwlt2u5cgmaxn6l66nwnqw9fs4vl7g045h": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1qjjvdwlt2u5cgmaxn6l66nwnqw9fs4vl7g045h" + }, + "laconic1mdzgqw7re2fuws0uycpm90nt07d6ntsk5alt4j": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1mdzgqw7re2fuws0uycpm90nt07d6ntsk5alt4j" + }, + "laconic157jy998f0x2m0kms8r6mmfs3zazljpd0svd9ne": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic157jy998f0x2m0kms8r6mmfs3zazljpd0svd9ne" + }, + "laconic1rdtz32xsgw7yrjfrue36pglevpymc5aflu4cfy": { + "total_lps_allocation": 2.78318663553081, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic1rdtz32xsgw7yrjfrue36pglevpymc5aflu4cfy" + }, + "laconic14dzwrzdfgln6z2vuu0jncvwjt2l7e4yl7slmjq": { + "total_lps_allocation": 2.64612897431292, + "lock_months": null, + "vest_months": null, + "laconic_address": "laconic14dzwrzdfgln6z2vuu0jncvwjt2l7e4yl7slmjq" + } +} \ No newline at end of file diff --git a/scripts/generate-lps-distribution-json.py b/scripts/generate-lps-distribution-json.py index ba78dcd..fc4cfbe 100644 --- a/scripts/generate-lps-distribution-json.py +++ b/scripts/generate-lps-distribution-json.py @@ -4,23 +4,31 @@ import pandas as pd import json import re import argparse +import urllib.parse from bech32 import bech32_decode -def get_excel_download_url(google_sheet_url): +def get_csv_download_url(google_sheet_url): """ - Convert a Google Sheets URL to its Excel export URL. + Convert a full Google Sheets URL to a CSV export URL using the `gid` in the query string. """ - # Extract the Sheet ID to construct the download URL + # Extract the sheet ID match = re.search(r'/d/([a-zA-Z0-9-_]+)', google_sheet_url) if not match: raise ValueError('Invalid Google Sheets URL') sheet_id = match.group(1) - # Export the entire spreadsheet as an Excel file (includes all sheets) - return f'https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=xlsx&id={sheet_id}' -def download_excel(url, output_path): + # Extract gid from query params + gid_match = re.search(r'[?&]gid=([0-9]+)', google_sheet_url) + if not gid_match: + raise ValueError('Missing gid in Google Sheets URL') + gid = gid_match.group(1) + + # Build export URL + return f'https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv&gid={gid}' + +def download_csv(url, output_path): """ - Download the Excel file from the given URL. + Download the CSV file from the given URL. """ response = requests.get(url) if response.status_code != 200: @@ -28,12 +36,11 @@ def download_excel(url, output_path): with open(output_path, 'wb') as f: f.write(response.content) -def convert_excel_to_json(excel_path, json_path, sheet_name): +def convert_csv_to_json(csv_path, json_path): """ - Read the Excel file, extract columns from the specified sheet, and save as JSON. + Read the CSV file, extract columns, and save as JSON. """ - df = pd.read_excel(excel_path, sheet_name=sheet_name) - # Ensure columns exist + df = pd.read_csv(csv_path) required_columns = [ 'Placeholder', 'Laconic Address', @@ -48,25 +55,28 @@ def convert_excel_to_json(excel_path, json_path, sheet_name): result = {} for _, row in df.iterrows(): placeholder = str(row['Placeholder']) if not pd.isna(row['Placeholder']) else '' - laconic_address = str(row['Laconic Address']) if not pd.isna(row['Laconic Address']) else '' - - # Use laconic_address as key if placeholder is missing or empty key = placeholder if placeholder and placeholder.lower() != 'nan' else laconic_address - # Skip the row if both 'Placeholder' and 'Laconic Address' are missing or invalid if not key or key.lower() == 'nan': continue - # If key is the laconic address, validate that it's a valid bech32 address if key == laconic_address: hrp, data = bech32_decode(laconic_address) if hrp is None or data is None or not hrp.startswith("laconic"): print(f"Skipping invalid Laconic address: {laconic_address}") continue + def to_number(val): + if pd.isna(val) or str(val).strip() == '': + return None + try: + return float(val) + except (ValueError, TypeError): + return None + entry = { - 'total_lps_allocation': row['Total LPS Allocation'] if not pd.isna(row['Total LPS Allocation']) else None, + 'total_lps_allocation': to_number(row['Total LPS Allocation']), 'lock_months': row['Lock (months)'] if not pd.isna(row['Lock (months)']) else None, 'vest_months': row['Vest (months)'] if not pd.isna(row['Vest (months)']) else None, 'laconic_address': row['Laconic Address'] if not pd.isna(row['Laconic Address']) else None @@ -78,24 +88,24 @@ def convert_excel_to_json(excel_path, json_path, sheet_name): json.dump(result, f, indent=2) def main(): - parser = argparse.ArgumentParser(description='Generate LPS distribution JSON from Excel or Google Sheet') - parser.add_argument('--input', '-i', required=True, help='Input: Google Sheet URL or local Excel file path') + parser = argparse.ArgumentParser(description='Generate LPS distribution JSON from CSV or Google Sheet') + parser.add_argument('--input', '-i', required=True, help='Input: Google Sheet URL or local CSV file path') parser.add_argument('--output', '-o', default='distribution.json', help='Output JSON file path (default: distribution.json)') parser.add_argument('--sheet', '-s', default='Genesis Allocation', help='Sheet name to read (default: Genesis Allocation)') args = parser.parse_args() if args.input.startswith('https://'): - excel_url = get_excel_download_url(args.input) - excel_path = 'sheet.xlsx' - print(f'Downloading Excel file from: {excel_url}') - download_excel(excel_url, excel_path) + csv_url = get_csv_download_url(args.input) + csv_path = 'sheet.csv' + print(f'Downloading CSV file from: {csv_url}') + download_csv(csv_url, csv_path) else: - excel_path = args.input - print(f'Using Excel file at path: {excel_path}') + csv_path = args.input + print(f'Using CSV file at path: {csv_path}') - print(f'Converting Excel to JSON (sheet: {args.sheet})...') - convert_excel_to_json(excel_path, args.output, args.sheet) + print('Converting CSV to JSON...') + convert_csv_to_json(csv_path, args.output) print(f'JSON saved to {args.output}') if __name__ == '__main__':