diff --git a/src/main/resources/bifrost-plutus-min.json b/src/main/resources/bifrost-plutus-min.json index 25e5129..efd322b 100644 --- a/src/main/resources/bifrost-plutus-min.json +++ b/src/main/resources/bifrost-plutus-min.json @@ -18,7 +18,7 @@ }, { "title": "bitcoin/config.config.mint", - "compiledCode": "590ae30101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0039bad00248888888896600330013005375401523009300a300a0019b87480026e952000918049805180518051805000c88c8c8cc004004010896600200300389919912cc004cdc8803801456600266e3c01c00a2003006402d1330050053011004402c6eb8c028004dd598058009806800a01614bd6f7b6304dc3a4009370e90034dc3a400523009300a0019b87480066e952002488888888888a6002602a019301400c9112cc004c0340062602e00519800801cc06000a66e012001001400c809244646600200200644b30010018a6103d87a80008992cc004c0100062601c6603000297ae0899801801980d00120283018001405922329800800ccc02800c00a9000200222259800801440062653001004980d801cc8cdc01bad3018002003375c602c0028020c064009017488c966002601a00313259800980c800c4c8c96600260200031323259800980e801401e2c80d0dd7180d800980b9baa0028acc004c02800626464b3001301d002803c5901a1bae301b001301737540051598009806000c4c8c966002603a0050078b2034375c6036002602e6ea800a2b3001300b001899192cc004c07400a00f1640686eb8c06c004c05cdd5001456600266e1d20080018991919912cc004c07c00e0131640706eb8c070004dd7180e001180e000980b9baa0028b202a405480a9015202a30153754002603000316405860286ea800e2b300130070018acc004c050dd5001c00a2c80aa2c809101218091baa00291119199119801001000912cc00400600713233225980099b910070028acc004cdc78038014400600c80c226600a00a603c00880c0dd7180b8009bad3018001301a00140606601600800629000244444453001301b007980d980e003cc014016446600c004466ebcc078c06cdd5000801244446644b30013017002899192cc004cdc424000003159800980c980f9baa330053758604660406ea8038c060cc088dd480e998111ba801c4bd7044c8c966002602e60426ea8006264b3001301c30223754003132323232323232323232323298009bae30320019819005cdd718190054dd71819004cdd718190044dd71819003cdd718190034dd71819002cdd718190024dd71819001cdd71819001244444444444b3001303e00c899812181e80b8acc004c0ccc0e4dd500544c8c8c8c8c8c8c8ca60026eb4c1140066eb4c11401e6eb4c11401a6eb4c1140166eb4c1140126eb4c11400e6eb4c114009222222259800982680444c966002608660926ea80062646464646464646464653001375a60ae003375a60ae015375a60ae013375a60ae011375a60ae00f375a60ae00d375a60ae00b375a60ae009375a60ae007375a60ae00491111111112cc004c18802e2b30013375e60c260bc6ea8c184c178dd501f1827198301ba90404bd70456600260a207f1598009828cc004dd5982a982f1baa04c820522010642494643464700411d1305198009bab3050305e375407d040a450642494643464700411d14a082e2294105c452820b88b20be182b800982b000982a800982a0009829800982900098288009828000982780098251baa0018b2090304c00f8b2094182280098220009821800982100098208009820000981f800981d1baa00a8b20708b20761819000981880098180009817800981700098168009816000981580098150009814800981400098119baa0018b2042302530223754003164080603660426ea8004cc00cdd6180d18101baa00e480022c80f22b3001301100189808cc004dd5980b98101baa00e80152210642494643464700402514a080f101e198051bab3016301f375401a0026eb8c084c078dd5002c56600260220051323322332259800980e000c56600260466ea802e005164091159800980b000c56600260466ea802e0051640911640848108566002603460406ea8006264b3001301b302137540031332259800980e98119baa001899192cc004c064c094dd5000c4c9660026040604c6ea803e264b3001302c0018992cc004c078c0a0dd5181198149baa0018acc00401e2b30013375e605860526ea8004c0b0c0a4dd5180d98149baa0058acc004c8cdd79ba630013756603860546ea8008dd318009bab301c302a3754603860546ea80188c8cc004004008896600200314bd6f7b63044ca60026eb8c0b00066eacc0b400660620049112cc004cdc8a45000038acc004cdc7a441000038800c401502e44cc0c8cdd81ba9003374c0046600c00c0028170605e002816a2b3001301c98009bab301b30293754003003a441064249464346470040491301c330143756603660526ea800400e29410274528204e8a50409d14a0813a2c8138c0ac0062c8148c8cc004004dd6181118141baa0162259800800c52f5c1133225980099baf302e302b3754605c60566ea8008c06ccc0b4dd4802a5eb8226605a0046600800800313300400400140a46058002605a00281522b30010058acc004c060cc048dd5980f18139baa0150018980c4c004dd5980f18139baa015800d22010642494643464700404114a0812a2941025204a375c6052604c6ea80062c8120c0a0c094dd5181418129baa301730253754002604e60486ea80062c8110ca6002003222001cc004c098c08cdd50014dd6181318119baa0119bac3015302337540233756604c604e604e604e604e604e604e60466ea8045222232598009810800c4c080cc0a8c0acc0a0dd50029981518159816181618161816181618161816181618141baa0164bd7045660026036003130183302a302b3028375400a660546e9c0112f5c1159800980e800c4cdd2a400866054605660506ea8014cc0a8dd300125eb822b3001301c001899ba548018cc0a8c0acc0a0dd500299815180f98141baa0164bd7044c8cdd2a4010660566058002660566058605a002660566e9c014cc0acdd3802198159ba60034bd7018141baa00540988131026204c30263754008400445300122259800980d18131baa0038992cc006600200d22200199ba548010cc0a8dd4800998151ba60034bd70200c8a518cc00401a44400330183302a3752002660546e9c0092f5c080310261bae302a30273754007164095222223259800981198149baa0018cc004022444007302d302a3754605a60546ea8c0b4c0b8c0a8dd5181698151baa001801400d008452820503301500323371290014c004dd5980e18151baa301c302a3754003006802a0269192cc004c07c0062646464660020026eb0c0b0c0b400c896600200314a115980099b8f375c605a00200714a3133002002302e00140a08158dd7181500098131baa0028acc004c0640062646464660020026eb0c0b0c0b400c896600200314a115980099baf302d302a3754605a60546ea8c0b4c0b8c0a8dd51816800801c528c4cc008008c0b80050282056301733029302a0014bd7018131baa0028acc004c06c0062646464660020026eacc0b0c0b400c896600200314a115980099baf0033029302d0018a518998010011817000a05040ac602e66052605400297ae030263754005159800980d000c4ca600260406eb4c09cc0a8cc074dd5981518158009bae302a001a50a514094604c6ea800a26464646530010089110014dd718168024dd71816801cdd61816800cdd618168014dd598169817000a010302d001302c001302b0013026375400481210242048409060486ea8005001198039bac302530223754020007164080646601800220026600860426ea8c090c084dd5000a400116407c60406ea8024c088004c088c08c004c078dd5002c5901c2038301b375400644b3001337129000000c4cc0100080062c80e0452689b2b200601" + "compiledCode": "590b4f0101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0039bad00248888888896600330013005375401523009300a300a0019b87480026e952000918049805180518051805000c88c8c8cc004004010896600200300389919912cc004cdc8803801456600266e3c01c00a2003006402d1330050053011004402c6eb8c028004dd598058009806800a01614bd6f7b6304dc3a4009370e90034dc3a400523009300a0019b87480066e952002488888888888a6002602a019301400c9112cc004c0340062602e00519800801cc06000a66e012001001400c809244646600200200644b30010018a6103d87a80008992cc004c0100062601c6603000297ae0899801801980d00120283018001405922329800800ccc02800c00a9000200222259800801440062653001004980d801cc8cdc01bad3018002003375c602c0028020c064009017488c966002601a00313259800980c800c4c8c96600260200031323259800980e801401e2c80d0dd7180d800980b9baa0028acc004c02800626464b3001301d002803c5901a1bae301b001301737540051598009806000c4c8c966002603a0050078b2034375c6036002602e6ea800a2b3001300b001899192cc004c07400a00f1640686eb8c06c004c05cdd5001456600266e1d20080018991919912cc004c07c00e0131640706eb8c070004dd7180e001180e000980b9baa0028b202a405480a9015202a30153754002603000316405860286ea800e2b300130070018acc004c050dd5001c00a2c80aa2c809101218091baa00291119199119801001000912cc00400600713233225980099b910070028acc004cdc78038014400600c80c226600a00a603c00880c0dd7180b8009bad3018001301a00140606601600800629000244444453001301b007980d980e003cc014016446600c004466ebcc078c06cdd5000801244446644b30013017002899192cc004cdc424000003159800980c980f9baa330053758604660406ea8038c060cc088dd480e998111ba801c4bd7044c8c966002602e60426ea8006264b3001301c3022375400313232323232323232323232323298009819800cc0cc0326eb8c0cc02e6eb8c0cc02a6eb8c0cc0266eb8c0cc0226eb8c0cc01e6eb8c0cc01a6eb8c0cc0166eb8c0cc0126eb8c0cc00e6eb8c0cc009222222222222598009820006c4cc098c0fc064566002606a60766ea802e26464646464646464653001375a6090003375a6090011375a609000f375a609000d375a609000b375a6090009375a6090007375a6090004911111112cc004c144026264b30013047304d375400313232323232323232323298009bad305b0019bad305b00a9bad305b0099bad305b0089bad305b0079bad305b0069bad305b0059bad305b0049bad305b0039bad305b002488888888896600260cc017159800982d98309baa0328991919912cc004c1a800e2b30013375e60d260cc6ea8c1a4c198dd5023182b198341ba90484bd70456600260b208f159800982ccc004dd5982e98331baa05482452210642494643464700413d1305998009bab30583066375408d048a450642494643464700413d14a083222941064452820c88b20ce375a60ce0026eb8c19c008c19c004c188dd50194590604590630c16c004c168004c164004c160004c15c004c158004c154004c150004c14c004c138dd5000c5904c1828008c5904e0c120004c11c004c118004c114004c110004c10c004c108004c104004c0f0dd5005c5903a45903d0c0cc004c0c8004c0c4004c0c0004c0bc004c0b8004c0b4004c0b0004c0ac004c0a8004c0a4004c0a0004c08cdd5000c59021181298111baa0018b2040301b30213754002660066eb0c068c080dd5007240011640791598009808800c4c04660026eacc05cc080dd5007400a91010642494643464700402514a080f101e198051bab3016301f375401a0026eb8c084c078dd5002c56600260220051323322332259800980e000c56600260466ea802e005164091159800980b000c56600260466ea802e0051640911640848108566002603460406ea800626464b3001301c302237540031332259800980f18121baa001899192cc004c068c098dd5000c4c9660026042604e6ea8042264b3001302d0018992cc004c07cc0a4dd5181218151baa0018acc00401e2b30013375e605a60546ea8004c0b4c0a8dd5180e18151baa0058acc004c8cdd79ba630013756603a60566ea8008dd318009bab301d302b3754603a60566ea80188c8cc004004008896600200314bd6f7b63044ca60026eb8c0b40066eacc0b800660640049112cc004cdc8a45000038acc004cdc7a441000038800c401502f44cc0cccdd81ba9003374c0046600c00c0028178606000281722b3001301d98009bab301c302a3754003003a4410642494643464700404d1301d330153756603860546ea800400e2941028452820508a5040a114a081422c8140c0b00062c8150c8cc004004dd6181198149baa0172259800800c52f5c1133225980099baf302f302c3754605e60586ea8008c070cc0b8dd4802a5eb8226605c0046600800800313300400400140a8605a002605c002815a2b30010058acc004c064cc04cdd5980f98141baa0160018acc004c06660026eacc07cc0a0dd500b4006911064249464346470040451301998009bab301f3028375402d375c6601600e900a52210642465254525900404514a0813229410264528204c40986eb8c0a8c09cdd5000c59025181498131baa3029302637546030604c6ea8004c0a0c094dd5000c59023194c0040064440039800981398121baa0029bac3027302437540253758602c60486ea804a6eacc09cc0a0c0a0c0a0c0a0c0a0c0a0c090dd50092444464b300130220018981099815981618149baa0053302b302c302d302d302d302d302d302d302d302d3029375402e97ae08acc004c0700062603266056605860526ea8014cc0acdd380225eb822b3001301e001899ba548010cc0acc0b0c0a4dd5002998159ba60024bd704566002603a00313374a900319815981618149baa0053302b30203029375402e97ae089919ba548020cc0b0c0b4004cc0b0c0b4c0b8004cc0b0dd3802998161ba70043302c374c00697ae03029375400a8139027204e409c604e6ea801080088a6002444b3001301b3027375400713259800cc00401a4440033374a9002198159ba90013302b374c00697ae0401914a31980080348880066032660566ea4004cc0acdd380125eb81006204e375c605660506ea800e2c81324444464b30013024302a375400319800804488800e605c60566ea8c0b8c0acdd51817181798159baa302e302b3754003002801a0108a5040a46602c006466e25200298009bab301d302b3754603a60566ea800600d0054051232598009810000c4c8c8c8cc004004dd618169817001912cc00400629422b30013371e6eb8c0b800400e2946266004004605e002814902c1bae302b00130273754005159800980d000c4c8c8c8cc004004dd618169817001912cc00400629422b30013375e605c60566ea8c0b8c0acdd51817181798159baa302e0010038a518998010011817800a05240b0603066054605600297ae030273754005159800980e000c4c8c8c8cc004004dd598169817001912cc00400629422b30013375e0066054605c00314a3133002002302f00140a48160c060cc0a8c0ac0052f5c0604e6ea800a2b3001301b0018994c004c084dd6981418159980f1bab302b302c001375c60560034a14a28130c09cdd500144c8c8c8ca60020112220029bae302e0049bae302e0039bac302e0019bac302e0029bab302e302f0014020605c002605a0026058002604e6ea8009025204a40948128c094dd5000a002330083758604c60466ea80440122c8108c8cc0340044004cc014005200030213754604860426ea80062c80f8c080dd5004981100098111811800980f1baa0058b2038407060366ea800c896600266e252000001899802001000c5901c08a4d13656400c1" }, { "title": "bitcoin/fault_verifier_equivocation.fault_verifier_equivocation.mint", @@ -50,7 +50,7 @@ }, { "title": "bitcoin/treasury.treasury_info.mint", - "compiledCode": "59082701010022229800aba2aba1aba0aab9faab9eaab9dab9a9bae0049bad0039bae0024888888888966003300130063754017370e9000488c8cc00400400c896600200314bd7044cc8966002600a00513300e00233004004001899802002000a014300d001300e001402d374a900048c028c02cc02cc02cc02c0064464646600200200844b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803201889980280298090022018375c60160026eacc030004c03800500c0a5eb7bdb1824601460160032300a300b300b0019b874800a6e1d20019b87481026e1d20049ba54800922222222222229800980b806cc05803644b3001300e3014375400513232332259800980e801c0162c80d0dd7180d0009bae301a002301a0013015375400516404d2232330010010032259800800c5300103d87a80008992cc004cdd7980d980c1baa001004898079980d000a5eb82266006006603800480b0c068005018488ca60020033300b003002a400080088896600200510018994c004012603a00732337006eb4c06800800cdd7180c000a008301b0024065222323322330020020012259800800c00e2646644b30013372200e00515980099b8f0070028800c01901a44cc014014c08001101a1bae3019001375a6034002603800280d0cc03001000c520004888888c8cc8966002602a005132325980099b88480000062b30013017301d3754660106eb0c084c078dd5005180a998101ba901b33020375003497ae08992cc004c08c00626464b300130250018991919912cc004c05cdd698141814801c4c966002602a604a6ea8006264660240022b3001301900a8acc004c06660026eacc074c09cdd5009c02e91010642465254525900403d15980099b8f00300b8acc004cdc7a44106424652545259000048acc004cdd7981518139baa008301e33029301533029375201697ae0330294c0103d87a80004bd704566002602e6e34dd7181518139baa0018980b9b8d375c6036604e6ea800629410254528204a8a50409514a0812a29410254528204a3029302637540031640906030604a6ea801a2c8118dd718130009bae3026002302600137586048003164088646600200264660020026eacc058c088dd5001912cc004006297adef6c608994c004dd71811800cdd59812000cc0a00092225980099b91489000038acc004cdc7a441000038800c401502544cc0a4cdd81ba9003374c0046600c00c0028128604c0028120896600200314bd7044c8cc88cc88cc00800800489660020031003899198151ba73302a375200a66054604e00266054605000297ae033003003302c002302a00140a06eacc09400cdd718110009980180198138011812800a04630220018b20403301637586022603c6ea80288cdd79811180f9baa3022301f3754002601a660426ea400d2f5c11640711598009807800c4c03e60026eacc050c078dd5005400a91010642465254525900401914a080e101c198031bab3013301d37540120026eb8c07cc070dd5001c566002601c0051323322332259800980d000c4c8c966002604e0050048b2048375a604a00260426ea801a2b3001301300189919194c004dd69813800cdd69813801cdd718138012444b3001302b0048044590280c09c004c098004c084dd50034566002602000315980098109baa00680145902245901f203e407c264b30013019301f37540031323259800980a18109baa0018992cc004c070c088dd5002c4c966002602d30013756603060486ea8c060c090dd5002400a9110642465254525900403113232329800911192cc004cdc42400130013756603e60566ea8c07cc0acdd5000c00e9110642494643464700404d13259800980d98159baa001898161baa302f302c37540031640a8603c60566ea8c07cc0acdd5000c59029198021bac301e302a37540060033026375401922232598009817800c4c96600266ebcc0bcc0b0dd5000981798161baa3020302c375400715980099baf3020302c3754002604060586ea8c080c0b0dd5001c4c966002603860586ea80062646603200220026060605a6ea80062c8158c07cc0b0dd5000c5902a45902a1817000c5902c198111bac301d302a3754006466ebcc0b8c0acdd5181718159baa00130193302d375200697ae04889660026032005159800980dcc004dd5981018151baa016812d2201064249464346470040491301b98009bab3020302a375402d008a450642465254525900404914a081422b300130230028acc00660026046660266eacc080c0a8dd500b1bae33004980080b40966eb4c0b4c0a8dd5007a0064804a94294502844cdc79bae301e302a3755300101680440290011bae301e302a375400f14a0814226645300130300029bad302f0029bae3020302c375400291119912cc004c084dc6801c56600266e3cdd7181a18189baa006375c606860626ea803a2b300198009bae30253031375401d0018012ed514a3198009bae3300b980080ec0b26eb4c0d0c0d401500a2402d0018012ed4817a294102f4528205e375c60640066e48cdc519b8a3371466e2922110626966726f73742d7570646174652d7900375c6064605e6ea804a600294290044dd6981198179baa0125e4a60029469008400979200118151baa00f980080b402201480090282050112cc004cdc4a40000031330030020018b204c3001001222598009810000c4c0a800a3300100398158014cdc0240020028019025459022181318119baa0058b2042375c604a60446ea80062c8100c090c084dd5181218109baa301530213754002604660406ea80062c80f0cc024dd61811180f9baa00b002301e375400860400026040604200260386ea800e294101a203430193754002603a00e6038603a00c452689b2b200801" + "compiledCode": "59086401010022229800aba2aba1aba0aab9faab9eaab9dab9a9bae0049bad0039bae0024888888888966003300130063754017370e9000488c8cc00400400c896600200314bd7044cc8966002600a00513300e00233004004001899802002000a014300d001300e001402d374a900048c028c02cc02cc02cc02c0064464646600200200844b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803201889980280298090022018375c60160026eacc030004c03800500c0a5eb7bdb1824601460160032300a300b300b0019b874800a6e1d20019b87481026e1d20049ba54800922222222222229800980b806cc05803644b3001300e3014375400513232332259800980e801c0162c80d0dd7180d0009bae301a002301a0013015375400516404d2232330010010032259800800c5300103d87a80008992cc004cdd7980d980c1baa001004898079980d000a5eb82266006006603800480b0c068005018488ca60020033300b003002a400080088896600200510018994c004012603a00732337006eb4c06800800cdd7180c000a008301b0024065222323322330020020012259800800c00e2646644b30013372200e00515980099b8f0070028800c01901a44cc014014c08001101a1bae3019001375a6034002603800280d0cc03001000c520004888888c8cc8966002602a005132325980099b88480000062b30013017301d3754660106eb0c084c078dd5005180a998101ba901b33020375003497ae08992cc004c08c00626464b300130250018991919912cc004c05cdd698141814801c4c966002602a604a6ea8006264660240022b3001301900a8acc004c06660026eacc074c09cdd5009c02e91010642465254525900403d15980099b8f00300b8acc004cdc7a44106424652545259000048acc004cdd7981518139baa008301e33029301533029375201697ae0330294c0103d87a80004bd704566002602e6e34dd7181518139baa0018980b9b8d375c6036604e6ea800629410254528204a8a50409514a0812a29410254528204a3029302637540031640906030604a6ea801a2c8118dd718130009bae3026002302600137586048003164088646600200264660020026eacc058c088dd5001912cc004006297adef6c608994c004dd71811800cdd59812000cc0a00092225980099b91489000038acc004cdc7a441000038800c401502544cc0a4cdd81ba9003374c0046600c00c0028128604c0028120896600200314bd7044c8cc88cc88cc00800800489660020031003899198151ba73302a375200a66054604e00266054605000297ae033003003302c002302a00140a06eacc09400cdd718110009980180198138011812800a04630220018b20403301637586022603c6ea80288cdd79811180f9baa3022301f3754002601a660426ea400d2f5c11640711598009807800c4c03e60026eacc050c078dd5005400a91010642465254525900401914a080e101c198031bab3013301d37540120026eb8c07cc070dd5001c566002601c0051323322332259800980d000c4c8c966002604e0050048b2048375a604a00260426ea801a2b3001301300189919194c004dd69813800cdd69813801cdd718138012444b3001302b0048044590280c09c004c098004c084dd50034566002602000315980098109baa00680145902245901f203e407c264b30013019301f37540031323259800980a18109baa0018992cc004c070c088dd5002c4c966002602d30013756603060486ea8c060c090dd5002400a9110642465254525900403113232329800911192cc004cdc42400130013756603e60566ea8c07cc0acdd5000c00e9110642494643464700404d13259800980d98159baa001898161baa302f302c37540031640a8603c60566ea8c07cc0acdd5000c59029198021bac301e302a37540060033026375401922232598009817800c4c96600266ebcc0bcc0b0dd5000981798161baa3020302c375400715980099baf3020302c3754002604060586ea8c080c0b0dd5001c4c966002603860586ea80062646603200220026060605a6ea80062c8158c07cc0b0dd5000c5902a45902a1817000c5902c198111bac301d302a3754006466ebcc0b8c0acdd5181718159baa00130193302d375200697ae04889660026032005159800980dcc004dd5981018151baa016812d2201064249464346470040491301b98009bab3020302a375402d008a450642465254525900404914a081422b30013023002899912cc0066002604a6602a6eacc088c0b0dd500c000d28528a0548acc004c09660026eacc088c0b0dd500c4006911087265672d726f6f74004051159800980e1b8d375c605e60586ea800a266e3cdd7181018161baa002375c604060586ea8026294102a452820548a5040a9300101680440290011bae33004980080b40966eb4c0b4c0a8dd5007a0064804a26645300130300029bad302f0029bae3020302c375400291119912cc004c084dc6801c56600266e3cdd7181a18189baa006375c606860626ea803a2b300198009bae30253031375401d0018012ed514a3198009bae3300b980080ec0b26eb4c0d0c0d401500a2402d0018012ed4817a294102f4528205e375c60640066e48cdc519b8a3371466e2922110626966726f73742d7570646174652d7900375c6064605e6ea804a600294290044dd6981198179baa0125e4a60029469008400979200118151baa00f980080b402201480090282050112cc004cdc4a40000031330030020018b204c3001001222598009810000c4c0a800a3300100398158014cdc0240020028019025459022181318119baa0058b2042375c604a60446ea80062c8100c090c084dd5181218109baa301530213754002604660406ea80062c80f0cc024dd61811180f9baa00b002301e375400860400026040604200260386ea800e294101a203430193754002603a00e6038603a00c452689b2b200801" } ] } diff --git a/src/main/scala/binocular/cli/commands/DeployBridgeCommand.scala b/src/main/scala/binocular/cli/commands/DeployBridgeCommand.scala index 25b1c8a..6a3c124 100644 --- a/src/main/scala/binocular/cli/commands/DeployBridgeCommand.scala +++ b/src/main/scala/binocular/cli/commands/DeployBridgeCommand.scala @@ -415,7 +415,7 @@ case class DeployBridgeCommand( tmScriptHash = tmNftPolicy, pegInScriptHash = pegInWithdrawHash, pegOutScriptHash = pegOutWithdrawHash, - // Federation identity (config #8-11; publishing these is what lets an SPO join this + // Federation identity (config #8-12; publishing these is what lets an SPO join this // bridge with NO ban or registry configuration, spec [CFG-3]). spoBansPolicyId = ByteString.fromArray(spoBansContract.policyId.bytes), sposRegistryPolicyId = registryPolicy, @@ -423,7 +423,12 @@ case class DeployBridgeCommand( // #11: read ON-CHAIN by treasury.ak's Update-Y federation branch ([UY-5]). Every SPO // also rebuilds the treasury Taproot tree from it, so a wrong value derives a // well-formed address holding nothing. - yFederation = yFederation + yFederation = yFederation, + // #12: the outpoint the three ids above were derived FROM — the same value printed + // below as `federation-one-shot-ref` and as heimdall's registry/treasury bootstrap. + // Publishing it is what removes the last hand-copied build input from an SPO's config: + // ids identify a script, this rebuilds it. + federationOneShot = federationRef ) Console.info("Oracle policy", oraclePolicyId.toHex) diff --git a/src/main/scala/binocular/cli/commands/DeployScriptRefsCommand.scala b/src/main/scala/binocular/cli/commands/DeployScriptRefsCommand.scala index 2410691..841b6fa 100644 --- a/src/main/scala/binocular/cli/commands/DeployScriptRefsCommand.scala +++ b/src/main/scala/binocular/cli/commands/DeployScriptRefsCommand.scala @@ -121,74 +121,86 @@ case class DeployScriptRefsCommand(dryRun: Boolean = false) extends Command { // // `register_spo` would otherwise carry the ~6.7 kB registry script twice and miss the 16 kB // limit, and `apply-ban` carries spo_bans plus a fault verifier. Their scripts cannot be - // rebuilt from the Config, which publishes only the finished policy ids, so this needs the - // federation one-shot — and the ban schedule, which is an INPUT to the ban policy id and is - // therefore read back from the deployed Config rather than from local config. - val federationScripts: List[(String, Script.PlutusV3)] = - config.bridge.federationOneShotRef.map(_.trim).filter(_.nonEmpty) match { - case None => - Console.warn( - "bridge.federation-one-shot-ref is not set — publishing the completion half " + - "only. The SPO half (spos_registry, spo_bans, 3 fault verifiers) needs " + - "it; set it to the outpoint deploy-bridge printed and re-run." - ) - Nil - case Some(refStr) => - val fedInput = parseRef("federation-one-shot-ref", refStr) - val configAddress = - Address( - network, - Credential.ScriptHash(ScriptHash.fromHex(cfg.configNftPolicyId)) - ) - val (_, deployed) = BridgeSweepSetup - .loadConfig( - provider, - configAddress, - ScriptHash.fromHex(cfg.configNftPolicyId), - AssetName(configNftAsset), - timeout - ) - .valueOr { err => - Console.error(err); break(1) - } - val federation = FederationScripts.derive( - blueprint, - ByteString.fromArray(fedInput.transactionId.bytes), - BigInt(fedInput.index), - configNftPolicy, - ( - deployed.params.baseBanDurationMs, - deployed.params.maxFaultsBeforePermanent, - deployed.params.maxValidityWindowMs - ) + // rebuilt from a policy id, so this needs the federation one-shot — which the Config now + // publishes at #12, alongside the ban schedule (an INPUT to the ban policy id) it already + // published. Both come from the deployed Config, so this half is no longer conditional on + // an operator having set a local key: it used to default to OFF, which meant a default + // deployment published no registry reference script at all and every SPO deployed their + // own copy. + val federationScripts: List[(String, Script.PlutusV3)] = { + val configAddress = + Address( + network, + Credential.ScriptHash(ScriptHash.fromHex(cfg.configNftPolicyId)) + ) + val (_, deployed) = BridgeSweepSetup + .loadConfig( + provider, + configAddress, + ScriptHash.fromHex(cfg.configNftPolicyId), + AssetName(configNftAsset), + timeout + ) + .valueOr { err => + Console.error(err); break(1) + } + val fedInput = deployed.federationOneShot + // The local key is retired but still parsed, so a stale one is caught rather + // than ignored: it used to be the only source, and silently preferring the + // chain over a value someone deliberately typed would hide a real + // disagreement about which bridge this is. + config.bridge.federationOneShotRef.map(_.trim).filter(_.nonEmpty).foreach { refStr => + val local = parseRef("bridge.federation-one-shot-ref", refStr) + val same = local.transactionId.bytes.sameElements( + fedInput.id.hash.bytes + ) && BigInt(local.index) == fedInput.idx + if !same then { + Console.error( + s"bridge.federation-one-shot-ref = $refStr disagrees with the " + + s"deployed Config #12 = ${fedInput.id.hash.toHex}#${fedInput.idx}. " + + "The Config is authoritative; unset the local key." ) - FederationScripts - .verifyAgainstConfig(federation, deployed) - .valueOr { err => - Console.error(err); break(1) - } - Console.info("spos_registry script hash", federation.registry.policyId.toHex) - Console.info("spo_bans script hash", federation.bans.policyId.toHex) - Console.info("(verified against the deployed Config)", "#8 / #9 / #10") - println() - // treasury_info is NOT published: nothing ever spends it with the script - // inlined at size — its spend paths are small, and the state UTxO is read as a - // reference input everywhere else. - ("spos_registry", federation.registry.script) :: - ("spo_bans", federation.bans.script) :: - FaultVerifierContract.Titles.zipWithIndex.map { case (title, i) => - val label = - List("fault_round1", "fault_round2", "fault_equivocation")(i) - ( - label, - FaultVerifierContract( - blueprint, - title, - ByteString.fromArray(federation.registry.policyId.bytes) - ).script - ) - } + break(1) + } } + val federation = FederationScripts.derive( + blueprint, + fedInput.id.hash, + fedInput.idx, + configNftPolicy, + ( + deployed.params.baseBanDurationMs, + deployed.params.maxFaultsBeforePermanent, + deployed.params.maxValidityWindowMs + ) + ) + FederationScripts + .verifyAgainstConfig(federation, deployed) + .valueOr { err => + Console.error(err); break(1) + } + Console.info("spos_registry script hash", federation.registry.policyId.toHex) + Console.info("spo_bans script hash", federation.bans.policyId.toHex) + Console.info("(verified against the deployed Config)", "#8 / #9 / #10 / #12") + println() + // treasury_info is NOT published: nothing ever spends it with the script + // inlined at size — its spend paths are small, and the state UTxO is read as a + // reference input everywhere else. + ("spos_registry", federation.registry.script) :: + ("spo_bans", federation.bans.script) :: + FaultVerifierContract.Titles.zipWithIndex.map { case (title, i) => + val label = + List("fault_round1", "fault_round2", "fault_equivocation")(i) + ( + label, + FaultVerifierContract( + blueprint, + title, + ByteString.fromArray(federation.registry.policyId.bytes) + ).script + ) + } + } if dryRun then { Console.success("Dry-run complete (computed hashes, not submitting)") diff --git a/src/main/scala/binocular/cli/commands/UpdateConfigCommand.scala b/src/main/scala/binocular/cli/commands/UpdateConfigCommand.scala index 3e0aebd..ba2a80b 100644 --- a/src/main/scala/binocular/cli/commands/UpdateConfigCommand.scala +++ b/src/main/scala/binocular/cli/commands/UpdateConfigCommand.scala @@ -306,7 +306,7 @@ object UpdateConfigCommand { } /** Field count of the rev-5.5 Config datum (spec §Config datum). */ - val ConfigFieldCount = 12 + val ConfigFieldCount = 13 /** Decode the deployed Config datum for an UPDATE, refusing any Constr arity other than * [[ConfigFieldCount]]. Appends are the legal datum evolution and read-only consumers ignore @@ -358,7 +358,8 @@ object UpdateConfigCommand { "spo_bans_policy_id", "spos_registry_policy_id", "treasury_info_policy_id", - "y_federation" + "y_federation", + "federation_one_shot" ) /** The governed parameter edits (config fields 7-10 and inside field 14). All optional: `None` diff --git a/src/main/scala/binocular/watchtower/ConfigTypes.scala b/src/main/scala/binocular/watchtower/ConfigTypes.scala index d07d4a6..b71b801 100644 --- a/src/main/scala/binocular/watchtower/ConfigTypes.scala +++ b/src/main/scala/binocular/watchtower/ConfigTypes.scala @@ -1,5 +1,6 @@ package binocular.watchtower +import scalus.cardano.onchain.plutus.v3.TxOutRef import scalus.uplc.builtin.* import scalus.uplc.builtin.Data.{FromData, ToData} @@ -35,7 +36,7 @@ import scalus.uplc.builtin.Data.{FromData, ToData} // Gone in rev 5.5: treasuryInfoAssetName — the Treasury state NFT name is the [CFG-4] constant // [[ConfigDatum.TreasuryInfoAssetName]]. // -// Must mirror ft `config.ak::ConfigDatum` (12 fields), because `config.config`'s genesis path +// Must mirror ft `config.ak::ConfigDatum` (13 fields), because `config.config`'s genesis path // full-casts the datum, so deploy-bridge must write all of them. case class ConfigDatum( updateAuth: scalus.cardano.onchain.plutus.prelude.Option[AuthorizationMethod], @@ -49,7 +50,16 @@ case class ConfigDatum( spoBansPolicyId: ByteString, sposRegistryPolicyId: ByteString, treasuryInfoPolicyId: ByteString, - yFederation: ByteString + yFederation: ByteString, + // #12: the one-shot outpoint every federation script is compile-parameterized by, so the three + // policy ids above are FUNCTIONS of it. The ids serve a node that only READS the bridge; + // producing script bytes needs the inputs behind them, and a hash cannot be inverted. Without + // this field every operator hand-copied the outpoint from the deployer's terminal into their + // own config — to deploy a reference script, or to spend treasury_info, which is embedded + // rather than referenced. NO on-chain reader; the UTxO was consumed at genesis and is gone, + // only its identity matters. Encodes as Constr(0, [B(txId), I(idx)]) — Aiken's V3 + // OutputReference, the same shape `banBootstrapRedeemer` writes by hand. + federationOneShot: TxOutRef ) derives FromData, ToData diff --git a/src/test/scala/binocular/BifrostContractsTest.scala b/src/test/scala/binocular/BifrostContractsTest.scala index 99ee793..a69fecb 100644 --- a/src/test/scala/binocular/BifrostContractsTest.scala +++ b/src/test/scala/binocular/BifrostContractsTest.scala @@ -38,6 +38,11 @@ import java.nio.file.{Files, Path, Paths} * `tm_nft_policy_id` param (3 params now). `completed_peg_outs_merkle_tree_validator` is WITHDRAWN * in the ft tree (replaced by `bridge-state.ak`); the min-json keeps its LAST published * compiledCode for the interim TM Confirm trie flow, so its pin did not move. + * + * Refreshed again for WI-090 (2026-08-14): ConfigDatum gained #12 `federation_one_shot`, and the + * genesis full cast moved `config.config` once more, cascading through the config policy into all + * five pins below. The min-json re-vendor also absorbed `treasury_info`'s pre-existing build + * drift, which is why [[RebuildDrift]] could go empty in the same commit. */ class BifrostContractsTest extends AnyFunSuite { @@ -79,20 +84,20 @@ class BifrostContractsTest extends AnyFunSuite { test("config NFT policy matches the deployed value") { assert( - hex(configContract.policyId) == "1e442c11fa84a722a5c9a4e59b23a72945124399fb6c4090744a24dd" + hex(configContract.policyId) == "c4402d1ada1c5db4af451082f8ef2caf214097dd919148c5efe4c909" ) } test("bridged_token policy matches the deployed value") { val bt = BridgedTokenContract(blueprint, configPolicy) - assert(hex(bt.policyId) == "231e3baf3e8921534c1bb59fe70fa69947ff970fe1187b8d60a83330") + assert(hex(bt.policyId) == "84c085c4fa43eec1de31a7f459fa12d18f857e4bb671bf0bb0ed665b") } test("completed-peg-ins policy + asset name match the Variant B rebuild") { // policyId regression lock over the Variant B rebuild. The asset name is now the constant // "CPI" (bytes 435049), independent of the one-shot ref and the compiledCode. val cpi = CompletedPegInsContract(blueprint, configPolicy, cpiRef) - assert(hex(cpi.policyId) == "7567b9ff44e7c51dea69683da0f45accffd3b9ea0903b37cc20e6a86") + assert(hex(cpi.policyId) == "fa4698345161667fe72decbc075e2be8325f458069d2205455cc9026") assert(CompletedPegInsContract.assetName == ByteString.fromString("CPI")) } @@ -111,7 +116,7 @@ class BifrostContractsTest extends AnyFunSuite { // hash moved; ConfigDatum field 5 must name the new one at deployment. val pegIn = PegInContract(blueprint, oraclePolicy, configPolicy) - assert(hex(pegIn.policyId) == "1510d62783c1f3511d009162aa5bef425f8e1f895f7aca80bd66e035") + assert(hex(pegIn.policyId) == "aa767109f00f937fae6299315bae9a98de6a4406765f94fe3425b42c") } test("peg_out policy (= withdraw hash) is stable for the trie-v2 2-param encoding") { @@ -126,7 +131,7 @@ class BifrostContractsTest extends AnyFunSuite { // [[PegOutCompleteCekTest]] runs them — so the stale copy would have made every completion // fail on-chain. No other validator's compiledCode changed, so no other pin moved. val pegOut = PegOutContract(blueprint, configPolicy) - assert(hex(pegOut.policyId) == "a5a39919b3a0fb699e0f44d98a6039825c21d317f4cbe24fd54cf143") + assert(hex(pegOut.policyId) == "0fc35057187dccea740a3f6f5742e85ac89854eec3f8066b274eaa89") } // --- determinism + parameter-sensitivity --- @@ -233,28 +238,27 @@ class BifrostContractsTest extends AnyFunSuite { ).map(Paths.get(_)).find(Files.isReadable) } - /** Validators whose vendored bytes are allowed to differ from ft's committed `plutus.json`, - * because the difference is BUILD DRIFT and not a source change. + /** Validators exempt from the freshness check below. EMPTY, and that is the point. * - * ft's `plutus.json` does not reproduce from its own source: the committed copy was built by a - * local `aiken v1.1.23+unknown` while CI installs `v1.1.23+8949565`, and the two emit - * different bytes for the same validators. So every ft commit that rebuilds the blueprint - * moves `config` and `treasury` whether or not anything in `config.ak` / `treasury.ak` changed - * — WI-073 is the case in point: `git diff ad04ecb..ft-main -- onchain/` touches only - * `bitcoin.ak` and `peg-in.ak`, yet both these hashes moved with it. + * It used to hold `config` and `treasury`, because ft's `plutus.json` did not reproduce from + * its own source — the committed copy came from a local `aiken v1.1.23+unknown` while CI + * installs `v1.1.23+8949565`, so every ft commit that rebuilt the blueprint moved those two + * whether or not their `.ak` changed. Carrying the deployed bytes and exempting them here was + * the honest position while that held, since `config`'s hash IS the config NFT policy id and + * absorbing a rebuild-only change re-identifies the whole bridge for no semantic reason. * - * Taking those bytes anyway is not free. `config`'s hash IS the config NFT policy id, and that - * id parameterizes bridged_token, completed_peg_ins, peg_in and peg_out, so vendoring a - * rebuild-only change re-identifies the entire bridge and forces a redeploy for no semantic - * reason. Until ft's blueprint builds deterministically, the honest position is to carry the - * bytes we deployed against and exempt them HERE, in the open, rather than let the check go - * green by accident. + * Measured 2026-08-14 and no longer true: a pristine rebuild at the pinned `compiler = + * "v1.1.23"` (local `v1.1.23+8949565`, the version CI installs) reproduces ft's committed + * blueprint byte for byte — only the validator actually edited moves. The exemption is + * therefore removed as its own comment asked, and a difference here is real again. * - * REMOVE both entries the moment ft pins its aiken build — at that point a difference here is - * real again. + * The one-time cost of removing it was absorbed by the WI-090 re-vendor: `treasury_info` was + * carrying pre-existing drift, which re-identifies its policy id. That is free HERE only + * because `treasury_info` is parameterized by the config policy id, which the WI-090 datum + * append moves regardless — a new bridge instance either way. Do not read it as a precedent + * for absorbing drift cheaply. */ - private val RebuildDrift: Set[String] = - Set("bitcoin/config.config.mint", "bitcoin/treasury.treasury_info.mint") + private val RebuildDrift: Set[String] = Set.empty test("every vendored compiledCode is ft's current one") { // Freshness against ft, for the WHOLE vendored set — a stale peg_in or peg_out is just diff --git a/src/test/scala/binocular/ConfigDatumEncodingTest.scala b/src/test/scala/binocular/ConfigDatumEncodingTest.scala index 6a69e43..29a802b 100644 --- a/src/test/scala/binocular/ConfigDatumEncodingTest.scala +++ b/src/test/scala/binocular/ConfigDatumEncodingTest.scala @@ -4,15 +4,17 @@ import binocular.watchtower.* import org.scalatest.funsuite.AnyFunSuite import scalus.cardano.onchain.plutus.prelude.{List as PList, Option as POption} +import scalus.cardano.onchain.plutus.v3.{TxId, TxOutRef} import scalus.uplc.builtin.{ByteString, Data} import scalus.uplc.builtin.Data.toData /** Pins the Scala mirror of `lib/bifrost/types/config.ak::ConfigDatum` to the on-chain positional - * encoding (rev 5.4, spec §Config datum): 8 Constr-0 fields — 0 `update_auth` (Aiken `Option`: - * Some = Constr 0 [v], None = Constr 1 []), 1 `bridged_token_policy`, 2 - * `completed_peg_ins_policy`, 3 `bridge_state_policy`, 4 `tm_script_hash` ([CFG-2]), 5 - * `peg_in_script_hash`, 6 `peg_out_script_hash`, 7 `params` (nested ConfigParams: 3 Ints then the - * nested ScheduleParams Constr). + * encoding (rev 5.5, spec §Config datum): 13 Constr-0 fields — 0 `update_auth` (Aiken `Option`: + * Some = Constr 0 [v], None = Constr 1 []), 1 `params` (nested ConfigParams, frozen at index 1 by + * [CFG-5] so an append can never move it), 2 `bridged_token_policy`, 3 `completed_peg_ins_policy`, + * 4 `bridge_state_policy`, 5 `tm_script_hash` ([CFG-2]), 6 `peg_in_script_hash`, 7 + * `peg_out_script_hash`, then the federation identity 8-12: `spo_bans_policy_id`, + * `spos_registry_policy_id`, `treasury_info_policy_id`, `y_federation`, `federation_one_shot`. */ class ConfigDatumEncodingTest extends AnyFunSuite { @@ -27,7 +29,7 @@ class ConfigDatumEncodingTest extends AnyFunSuite { assert(none.toData == Data.Constr(1, PList())) } - test("ConfigDatum has 8 positional fields; update_auth is 0, tm_script_hash 4, params 7") { + test("ConfigDatum has 13 positional fields; update_auth is 0, params 1, one-shot 12") { val sched = ScheduleParams( dkgR1Deadline = BigInt(3600), dkgR2Deadline = BigInt(7200), @@ -64,12 +66,13 @@ class ConfigDatumEncodingTest extends AnyFunSuite { spoBansPolicyId = ByteString.fromHex("bb" * 28), sposRegistryPolicyId = ByteString.fromHex("c1" * 28), treasuryInfoPolicyId = ByteString.fromHex("c2" * 28), - yFederation = ByteString.fromHex("f9" * 32) + yFederation = ByteString.fromHex("f9" * 32), + federationOneShot = TxOutRef(TxId(ByteString.fromHex("c3" * 32)), BigInt(7)) ) d.toData match { case Data.Constr(0, fields) => val fs = fields.asScala.toIndexedSeq - assert(fs.size == 12) + assert(fs.size == 13) assert(fs(0) == Data.Constr(1, PList())) // params at index 1 ([CFG-5]), so an append can never move it. assert(fs(1) == params.toData) @@ -80,11 +83,22 @@ class ConfigDatumEncodingTest extends AnyFunSuite { assert(fs(4) == Data.B(ByteString.fromHex("cc" * 28))) assert(fs(5) == Data.B(tmHash)) assert(fs(7) == Data.B(ByteString.fromHex("ff" * 28))) - // Federation identity, #8-11 (spec [CFG-3]). + // Federation identity, #8-12 (spec [CFG-3]). assert(fs(8) == Data.B(ByteString.fromHex("bb" * 28))) assert(fs(9) == Data.B(ByteString.fromHex("c1" * 28))) assert(fs(10) == Data.B(ByteString.fromHex("c2" * 28))) assert(fs(11) == Data.B(ByteString.fromHex("f9" * 32))) + // #12 the federation one-shot. Written out by hand rather than as + // `.toData`, because this is the assertion that the Scalus TxOutRef mirror + // agrees with Aiken's V3 OutputReference — Constr(0, [B(txid), I(idx)]), + // the tx id as BARE bytes with no TxId wrapper constructor. The same shape + // BifrostContracts.banBootstrapRedeemer builds literally. + assert( + fs(12) == Data.Constr( + 0, + PList(Data.B(ByteString.fromHex("c3" * 32)), Data.I(BigInt(7))) + ) + ) case other => fail(s"expected Constr 0, got $other") } } diff --git a/src/test/scala/binocular/FederationContractsTest.scala b/src/test/scala/binocular/FederationContractsTest.scala index 759a9e6..57297ac 100644 --- a/src/test/scala/binocular/FederationContractsTest.scala +++ b/src/test/scala/binocular/FederationContractsTest.scala @@ -4,6 +4,7 @@ import binocular.watchtower.* import org.scalatest.funsuite.AnyFunSuite import scalus.uplc.builtin.ByteString +import scalus.cardano.onchain.plutus.v3.{TxId, TxOutRef} /** Cross-implementation lock on the federation policy ids. * @@ -41,16 +42,16 @@ class FederationContractsTest extends AnyFunSuite { test("spos_registry policy matches heimdall's derivation") { assert( - registry.policyId.toHex == "1ea9b8e092ae17f7de3d7bfbe477e89df7c72caccbd338c027fa933b" + registry.policyId.toHex == "b208953ab15d79539e36ea4362216af379dfeb00de73a918f2460740" ) } test("the three fault verifiers match heimdall's derivation, in spo_bans order") { assert( FaultVerifierContract.all(blueprint, registryPolicy).map(_.toHex) == List( - "64b5d7226741b0fa8ee739f61486dd61c8f2ba7c6be389e9391f949d", - "1da48632d6cf405ec035097aa505820f75e3a4b4cb51de9c62af8286", - "f36deb1861a374943c4ef43172d968c1cdead2ac62d3f1c127f8f505" + "f30a8f540b0f8e808186b63fab3d5da57149448addbdbccdb3298769", + "a16e1d3b5859825d40e08c93d0d0465d907487fade7b5b1519ccc184", + "c437d0fdf2790631761e7cda563e90e3063bfa5c7d81521ffd9c249f" ) ) } @@ -60,7 +61,7 @@ class FederationContractsTest extends AnyFunSuite { // at all — that parameter made the dependency a cycle and so made the [REG-6] pin // impossible — so the pinned hash moved with it. val ti = treasuryInfo - assert(ti.policyId.toHex == "f7ccdddf9f4e4bb4c75064cd4b454223e012f086a56a50181320a10b") + assert(ti.policyId.toHex == "935993611500f483c71ef16964698ebfc4f4f2ae5f92719331418db5") } // The seven-parameter application, including the indefinite-array List. @@ -75,7 +76,7 @@ class FederationContractsTest extends AnyFunSuite { bootstrapTxId = oneShot, bootstrapIndex = oneShotIndex ) - assert(bans.policyId.toHex == "3dda71f07642ae9864c693295bbe896f4bfed2b0643b0dbd13a09301") + assert(bans.policyId.toHex == "73980c165a6643d22daffa4f851352b8540d22112d26e7cff1234b4a") } // The fault-policy list is baked in UNSORTED, so a permutation is a different bridge. Worth a @@ -194,12 +195,12 @@ class FederationContractsTest extends AnyFunSuite { test("FederationScripts.derive reproduces every pinned policy id") { val f = derived assert( - f.treasury.policyId.toHex == "f7ccdddf9f4e4bb4c75064cd4b454223e012f086a56a50181320a10b" + f.treasury.policyId.toHex == "935993611500f483c71ef16964698ebfc4f4f2ae5f92719331418db5" ) assert( - f.registry.policyId.toHex == "1ea9b8e092ae17f7de3d7bfbe477e89df7c72caccbd338c027fa933b" + f.registry.policyId.toHex == "b208953ab15d79539e36ea4362216af379dfeb00de73a918f2460740" ) - assert(f.bans.policyId.toHex == "3dda71f07642ae9864c693295bbe896f4bfed2b0643b0dbd13a09301") + assert(f.bans.policyId.toHex == "73980c165a6643d22daffa4f851352b8540d22112d26e7cff1234b4a") assert(f.faultPolicies == FaultVerifierContract.all(blueprint, registryPolicy)) } @@ -237,7 +238,8 @@ class FederationContractsTest extends AnyFunSuite { spoBansPolicyId = ByteString.fromArray(f.bans.policyId.bytes), sposRegistryPolicyId = ByteString.fromArray(f.registry.policyId.bytes), treasuryInfoPolicyId = ByteString.fromArray(f.treasury.policyId.bytes), - yFederation = ByteString.empty + yFederation = ByteString.empty, + federationOneShot = TxOutRef(TxId(ByteString.fromHex("c3" * 32)), BigInt(0)) ) test("verifyAgainstConfig accepts the derivation the Config was deployed from") { diff --git a/src/test/scala/binocular/PegOutCompleteCekTest.scala b/src/test/scala/binocular/PegOutCompleteCekTest.scala index 0f06ff7..a906278 100644 --- a/src/test/scala/binocular/PegOutCompleteCekTest.scala +++ b/src/test/scala/binocular/PegOutCompleteCekTest.scala @@ -101,6 +101,7 @@ class PegOutCompleteCekTest extends AnyFunSuite { sposRegistryPolicyId = ByteString.empty, treasuryInfoPolicyId = ByteString.empty, yFederation = ByteString.fromHex("f9" * 32), + federationOneShot = TxOutRef(TxId(ByteString.fromHex("c3" * 32)), BigInt(0)), params = ConfigParams( baseBanDurationMs = BigInt(0), maxFaultsBeforePermanent = BigInt(0), diff --git a/src/test/scala/binocular/PorSweeperTest.scala b/src/test/scala/binocular/PorSweeperTest.scala index 08874aa..539e484 100644 --- a/src/test/scala/binocular/PorSweeperTest.scala +++ b/src/test/scala/binocular/PorSweeperTest.scala @@ -10,6 +10,7 @@ import scalus.uplc.builtin.{ByteString, Data} import scalus.uplc.builtin.Data.toData import java.nio.file.Files +import scalus.cardano.onchain.plutus.v3.{TxId, TxOutRef} /** Tests for the sweeper's PURE decisions: which peg-out requests a sweep submits a Complete for, * and whether the derived scripts match the deployed Config. @@ -195,7 +196,8 @@ class PorSweeperTest extends AnyFunSuite { spoBansPolicyId = ByteString.empty, sposRegistryPolicyId = ByteString.empty, treasuryInfoPolicyId = ByteString.empty, - yFederation = ByteString.empty + yFederation = ByteString.empty, + federationOneShot = TxOutRef(TxId(ByteString.fromHex("c3" * 32)), BigInt(0)) ).toData Utxo( TransactionInput(TransactionHash.fromHex("c0" * 32), 0), diff --git a/src/test/scala/binocular/TreasuryMovementValidatorTest.scala b/src/test/scala/binocular/TreasuryMovementValidatorTest.scala index 0258740..bacfd8b 100644 --- a/src/test/scala/binocular/TreasuryMovementValidatorTest.scala +++ b/src/test/scala/binocular/TreasuryMovementValidatorTest.scala @@ -423,6 +423,7 @@ class TreasuryMovementValidatorTest extends AnyFunSuite { sposRegistryPolicyId = ByteString.empty, treasuryInfoPolicyId = ByteString.empty, yFederation = ByteString.fromHex("f9" * 32), + federationOneShot = TxOutRef(TxId(ByteString.fromHex("c3" * 32)), BigInt(0)), params = ConfigParams( baseBanDurationMs = BigInt(0), maxFaultsBeforePermanent = BigInt(0), diff --git a/src/test/scala/binocular/cli/UpdateConfigCommandTest.scala b/src/test/scala/binocular/cli/UpdateConfigCommandTest.scala index a5fddf1..2aadb96 100644 --- a/src/test/scala/binocular/cli/UpdateConfigCommandTest.scala +++ b/src/test/scala/binocular/cli/UpdateConfigCommandTest.scala @@ -8,6 +8,7 @@ import org.scalatest.funsuite.AnyFunSuite import scalus.cardano.onchain.plutus.prelude.{List as PList, Option as SOption} import scalus.uplc.builtin.{ByteString, Data} import scalus.uplc.builtin.Data.toData +import scalus.cardano.onchain.plutus.v3.{TxId, TxOutRef} class UpdateConfigCommandTest extends AnyFunSuite { @@ -39,6 +40,7 @@ class UpdateConfigCommandTest extends AnyFunSuite { sposRegistryPolicyId = ByteString.fromHex("11"), treasuryInfoPolicyId = ByteString.fromHex("12"), yFederation = ByteString.fromHex("f9" * 32), + federationOneShot = TxOutRef(TxId(ByteString.fromHex("c3" * 32)), BigInt(0)), params = ConfigParams( baseBanDurationMs = BigInt(0), maxFaultsBeforePermanent = BigInt(0), @@ -147,7 +149,10 @@ class UpdateConfigCommandTest extends AnyFunSuite { } val out = UpdateConfigCommand.decodeDeployed(grown) assert(out.isLeft) - assert(out.swap.toOption.get.contains("13 fields")) + // Names both counts: the arity FOUND on chain and the one this build knows, so the + // operator can tell "binocular is behind the bridge" from "this is the wrong bridge". + assert(out.swap.toOption.get.contains("14 fields")) + assert(out.swap.toOption.get.contains(s"${UpdateConfigCommand.ConfigFieldCount}-field")) } test("decodeDeployed refuses short and non-record datums") {