object HalfMixAddress extends App implicit val addrEnc new ErgoAddress

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
object HalfMixAddress extends App {
implicit val addrEnc = new ErgoAddressEncoder(ErgoAddressEncoder.MainnetNetworkPrefix)
val box1 = ErgoBoxSerializer.parseBytes(Base16.decode("80c2d72f100704000e200d4da2084d82ccdfbdd2102d92c6845e10da29b92548ddb7a6315aa0c27d8eb504020402040204020400d807d601b2a5730000d602c1a7d6037301d604e4c672010507d605e4c672010407d606db6a01ddd607e4c6a70407ea02d1edededededed93c17201720293c1b2a5730200720293cbc27201720393cbc2b2a5730300720393e4c6b2a57304000407720493e4c6b2a57305000507720593c5a7c5b2a4730600eb02ce7206720772057204ce7206720772047205c1d90b000107020e557922bd13c96d1c56ed4b7467411ddc9f8ed008bb74588764b47ae9e6aa486417ea46db29f120fdbbad0244df817b27291942808854fb7dc2bb914a59b9ad00").get)
val a1 = Pay2SAddress(box1.ergoTree)
println(a1)
val box2 = ErgoBoxSerializer.parseBytes(Base16.decode("80c2d72f100704000e200d4da2084d82ccdfbdd2102d92c6845e10da29b92548ddb7a6315aa0c27d8eb504020402040204020400d807d601b2a5730000d602c1a7d6037301d604e4c672010507d605e4c672010407d606db6a01ddd607e4c6a70407ea02d1edededededed93c17201720293c1b2a5730200720293cbc27201720393cbc2b2a5730300720393e4c6b2a57304000407720493e4c6b2a57305000507720593c5a7c5b2a4730600eb02ce7206720772057204ce7206720772047205f2d90b000107039e4755e200d409f8d041186820fbb8d50aeba959a82a876b0a2db5d6df30fdb3946c4751fbed935116c543bdfbd62aaf3c70688ef1e1381d6bc73c1271afca7100").get)
val a2 = Pay2SAddress(box2.ergoTree)
println(a2)
println(a1 == a2)
println(Base16.encode(box1.ergoTree.bytes))
//85dxZpqsruAysnTeH6qEPciD1kRtnV9rEypzr3Un5auDVESoiQPvTJYnAcPzs5gVPgyjL7iB9fLzLhrh7St7NqYXTVzBpFsicFf5ZUmLPFWmF7rnCfH5JnYs7LiJH7yjt1nhcmuqeeXAv9sJDZoF6peF2xJm1QxW4amQLmiQJkyzLC7jTb3aYKZykxVgn5WSeqSrFQMKnhLKbAbUrH8oe4PN6gsj1svUZtSxZbFXHgN3boc5gTxdpu2AWKYyMVxc4KZ1ZyK
}