This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update_contract_parameters: | |
| ergo_tree_bytes: 100f0400040004000402040204020e203c45f29a5165b030fdb5eaf5d81f8108f9d8f507b31487dd51f4ae08fe07cf4a0400040004000e2019ccf4c9950e9c370c694f5781d37da182c84d871cee27389b434100ec859b290100050004000420d80ad601b2a4730000d602db63087201d603b27202730100d604b2a5730200d605db63087204d606b2a5730300d607b27205730400d6088c720701d6098c720702d60ab27202730500d1ededed938c7203017306edededed937203b2720573070093c17201c1720493c672010405c67204040593c672010504c672040504efe6c672040661edededed93db63087206db6308a793c27206c2a792c17206c1a7918cc77206018cc7a701efe6c67206046192b0b5a4d9010b63d801d60ddb6308720b9591b1720d7308d801d60ec6720b070eededed938cb2720d73090001730a93e4c6720b05048cc7a70193e4c6720b060ecbc2720495ede6720ee6c6720b0805ed93e4720e720893e4c6720b08057209ed938c720a017208938c720a027209730b730cd9010b41639a8c720b018cb2db63088c720b02730d00027e730e05 | |
| pool_nft_index: 6 | |
| ballot_token_index: 10 | |
| min_votes_index: 14 | |
| min_votes: 2 | |
| tokens_to_mint: | |
| pool_nft: ~ | |
| refresh_nft: ~ | |
| update_nft: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Tester extends App with ApiCodecs { | |
| val s = "0e1631393039303063646462363930366462363530336665" | |
| val et = ErgoTreeSerializer.DefaultSerializer.deserializeErgoTree(Base16.decode(s).get) | |
| println(et) | |
| val jsonString = | |
| """ | |
| |{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.google.common.primitives.{Ints, Longs} | |
| import org.ergoplatform.mining.difficulty.DifficultySerializer | |
| object NBitsTester extends App { | |
| val nb = 118012349L | |
| val diff = DifficultySerializer.decodeCompactBits(nb) | |
| println(nb.toBinaryString) | |
| println(diff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object SigmaBoolean extends App { | |
| val addr = "9hUzb5RvSgDqJdtyCN9Ke496Yy63mpcUJKbRq4swzQ5EQKgygKT" | |
| val eae = ErgoAddressEncoder.Mainnet | |
| val script = eae.fromString("9hUzb5RvSgDqJdtyCN9Ke496Yy63mpcUJKbRq4swzQ5EQKgygKT").get.asInstanceOf[P2PKAddress].pubkey | |
| val bsRaw = Base58.decode("9hUzb5RvSgDqJdtyCN9Ke496Yy63mpcUJKbRq4swzQ5EQKgygKT").get | |
| val bs = bsRaw.tail.dropRight(4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data_point_source: NanoErgXau | |
| oracle_contract_parameters: | |
| ergo_tree_bytes: 100a040004000580dac409040004000e203c45f29a5165b030fdb5eaf5d81f8108f9d8f507b31487dd51f4ae08fe07cf4a0402040204020402d804d601b2a5e4e3000400d602db63087201d603db6308a7d604e4c6a70407ea02d1ededed93b27202730000b2720373010093c27201c2a7e6c67201040792c172017302eb02cd7204d1ededededed938cb2db6308b2a4730300730400017305938cb27202730600018cb2720373070001918cb27202730800028cb272037309000293e4c672010407720492c17201c1a7efe6c672010561 | |
| pool_nft_index: 5 | |
| min_storage_rent_index: 2 | |
| min_storage_rent: 10000000 | |
| pool_contract_parameters: | |
| ergo_tree_bytes: 1004040204000e2005fd350e60df5f35c1ca457687abf54e2f03b92f8e2c1ebbba912fc42acfeda40e20de408c789d16fb663f1daa87ce94bf38bf527ca067379308393f2a82ae1cafc5d801d6018cb2db6308b2a473000073010001d1ec93720173029372017303 | |
| refresh_nft_index: 2 | |
| update_nft_index: 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data_point_source: NanoErgXau | |
| oracle_contract_parameters: | |
| ergo_tree_bytes: 100a040004000580dac409040004000e20472b4b6250655368566d597133743677397a24432646294a404d635166546a570402040204020402d804d601b2a5e4e3000400d602db63087201d603db6308a7d604e4c6a70407ea02d1ededed93b27202730000b2720373010093c27201c2a7e6c67201040792c172017302eb02cd7204d1ededededed938cb2db6308b2a4730300730400017305938cb27202730600018cb2720373070001918cb27202730800028cb272037309000293e4c672010407720492c17201c1a7efe6c672010561 | |
| pool_nft_index: 5 | |
| min_storage_rent_index: 2 | |
| min_storage_rent: 10000000 | |
| refresh_contract_parameters: | |
| ergo_tree_bytes: 1016043c040004000e202a472d4a614e645267556b58703273357638792f423f4528482b4d625065536801000502010105000400040004020402040204080400040a05c8010e20472b4b6250655368566d597133743677397a24432646294a404d635166546a570400040404020408d80ed60199a37300d602b2a4730100d603b5a4d901036395e6c672030605eded928cc77203017201938cb2db6308720373020001730393e4c672030504e4c6720205047304d604b17203d605b0720386027305860273067307d90 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object p2shTester extends App { | |
| val p2shaddr = "4MQyML64GnzMxZgm" | |
| val ae = ErgoAddressEncoder.Mainnet | |
| val prop = ae.fromString(p2shaddr).get.script.toProposition(true) | |
| val bs = ValueSerializer.serialize(prop) | |
| val bac = ByteArrayConstant(bs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ErgoTree(16,WrappedArray(IntConstant(1), IntConstant(0), IntConstant(1), IntConstant(0), IntConstant(0), LongConstant(1), LongConstant(0), LongConstant(1000), IntConstant(2), ConstantNode(Coll(-62,41,-52,18,-61,-101,120,-5,-103,-33,58,-128,51,40,-14,-71,-74,-25,-2,66,-80,-46,95,54,-45,-4,9,32,121,-50,-116,1),Coll[SByte$])),Right(BlockValue(WrappedArray(ValDef(1,WrappedArray(),MethodCall(Self$(167),SMethod(SBox,tokens,(SBox) => Coll[(Coll[SByte$],SLong$)],8,FixedCost(JitCost(15)),MethodIRInfo(Some(<function1>),None,None),Some(OperationInfo(Some(PropertyCall$(219)),Secondary tokens,ArrayBuffer(ArgInfo(this,this instance)))),None),WrappedArray(),Map())), ValDef(2,WrappedArray(),ByIndex(ValUse(1,Coll[(Coll[SByte$],SLong$)]),ConstantPlaceholder(0,SInt$),None)), ValDef(3,WrappedArray(),SelectField(ValUse(2,(Coll[SByte$],SLong$)),2)), ValDef(4,WrappedArray(),ByIndex(Outputs$(165),ConstantPlaceholder(1,SInt$),None)), ValDef(5,WrappedArray(),MethodCall(ValUse(4,SBox),SMethod(SBox,tokens,(SBox) => Coll[(Coll[SByte$],SL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // ===== Contract Information ===== // | |
| // Name: Phoenix HodlCoin Bank | |
| // Description: Contract for the bank box of the HodlCoin protocol. | |
| // Version: 1.0.0 | |
| // Author: Luca D'Angelo (ldgaetano@protonmail.com), MGPai | |
| // ===== Box Contents ===== // | |
| // Tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ergoplatform.tools | |
| import org.ergoplatform.mining.difficulty.{DifficultyAdjustment, RequiredDifficulty} | |
| import org.ergoplatform.modifiers.history.header.Header | |
| import org.ergoplatform.settings.{Args, ErgoSettings, NetworkType} | |
| import java.util.concurrent.TimeUnit | |
| import scala.collection.mutable | |
| import scala.concurrent.duration.FiniteDuration | |
| import scala.util.Random |