Created
June 6, 2021 21:15
-
-
Save kushti/cda32aad01ae02ff9a76bd9992bf8215 to your computer and use it in GitHub Desktop.
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 ValueEncoder extends App { | |
| val pd = ErgoAddressEncoder | |
| .apply(ErgoAddressEncoder.MainnetNetworkPrefix) | |
| .fromString("9gmNsqrqdSppLUBqg2UzREmmivgqh1r3jmNcLAc53hk3YCvAGWE") | |
| .get | |
| .asInstanceOf[P2PKAddress] | |
| .pubkey | |
| val s = SigmaPropConstant(pd) | |
| val bs = ValueSerializer.serialize(s) | |
| println("script: " + Base16.encode(bs)) | |
| val deadline = 602000 | |
| println(Base16.encode(ValueSerializer.serialize(IntConstant(deadline)))) | |
| val amount = 2000000000L | |
| println(Base16.encode(ValueSerializer.serialize(LongConstant(amount)))) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment