Skip to content

Instantly share code, notes, and snippets.

@greenhat
Created February 27, 2020 12:35
Show Gist options
  • Save greenhat/0c75738edadb9870a2cfb492d6069a57 to your computer and use it in GitHub Desktop.
Save greenhat/0c75738edadb9870a2cfb492d6069a57 to your computer and use it in GitHub Desktop.
dex:BuyOrder output
./ergo-tool dex:BuyOrder storage/secret.json 10000000 "d0105f7469be3ac90f16d943b29133f16c3bf4d85bd754656194cead849baf1e" 3 5000000
Storage password>
Creating prover...SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
 Ok
Loading unspent boxes from at address 3WxrCKgrcmS7oPpWXgwuKNiB1JSNEmpyqaXPM1cBrXiJY1jhk4Ep... Ok
Signing the transaction... Ok
Tx: {
  "id": "cbd2c43f37b58bbaeec44c7f9ba97318bf37a30c06b526454010b32edffc0e23",
  "inputs": [
    {
      "boxId": "dab5cc6bf690499245a78cc0b7e3004a447dd122b27b8dbef8c89010d789dffb",
      "spendingProof": {
        "proofBytes": "4daac146709b331a19a41f90025c28eb1eb2cb4245a68f924145192338fdf2272a55fe192113c691ca7028ca81a1ac3fa1af3d04345c327f",
        "extension": {}
      }
    }
  ],
  "dataInputs": [],
  "outputs": [
    {
      "boxId": "073cda38675aeb6fbb5719c343a1641eba91f167ce8745ee797642b81f3e0d47",
      "value": 15000000,
      "ergoTree": "ErgoTree(16,WrappedArray(ConstantNode(SigmaProp(ProveDlog(ECPoint(27268d,ca2ef2,...))),SSigmaProp), IntConstant(0), IntConstant(0), IntConstant(0), IntConstant(0), IntConstant(0), ConstantNode(Coll(-48,16,95,116,105,-66,58,-55,15,22,-39,67,-78,-111,51,-15,108,59,-12,-40,91,-41,84,101,97,-108,-50,-83,-124,-101,-81,30),Coll[SByte$]), IntConstant(0), LongConstant(3), IntConstant(0), IntConstant(0), ConstantNode(SigmaProp(ProveDlog(ECPoint(27268d,ca2ef2,...))),SSigmaProp)),Right(SigmaOr(WrappedArray(ConstantPlaceholder(0,SSigmaProp), BoolToSigmaProp(BinAnd(BinAnd(GT(SizeOf(Outputs$(165)),ConstantPlaceholder(1,SInt$)),OptionIsDefined(ExtractRegisterAs(ByIndex(Outputs$(165),ConstantPlaceholder(2,SInt$),None),R4,Option[Coll[SByte$]]))),BlockValue(Vector(ValDef(1,List(),ExtractRegisterAs(ByIndex(Outputs$(165),ConstantPlaceholder(3,SInt$),None),R2,Option[Coll[(Coll[SByte$],SLong$)]]).get), ValDef(2,List(),BinAnd(BinAnd(GT(SizeOf(ValUse(1,Coll[(Coll[SByte$],SLong$)])),ConstantPlaceholder(4,SInt$)),EQ(SelectField(ByIndex(ValUse(1,Coll[(Coll[SByte$],SLong$)]),ConstantPlaceholder(5,SInt$),None),1),ConstantPlaceholder(6,Coll[SByte$]))),GE(SelectField(ByIndex(ValUse(1,Coll[(Coll[SByte$],SLong$)]),ConstantPlaceholder(7,SInt$),None),2),ConstantPlaceholder(8,SLong$)))), ValDef(3,List(),EQ(ExtractRegisterAs(ByIndex(Outputs$(165),ConstantPlaceholder(9,SInt$),None),R4,Option[Coll[SByte$]]).get,ExtractId(Self$(167))))),BinAnd(BinAnd(ValUse(2,SBoolean),EQ(ExtractScriptBytes(ByIndex(Outputs$(165),ConstantPlaceholder(10,SInt$),None)),SigmaPropBytes(ConstantPlaceholder(11,SSigmaProp)))),ValUse(3,SBoolean)))))))),19572,[B@1123f5378)",
      "creationHeight": 107551,
      "assets": [],
      "additionalRegisters": {},
      "transactionId": "cbd2c43f37b58bbaeec44c7f9ba97318bf37a30c06b526454010b32edffc0e23",
      "index": 0
    },
    {
      "boxId": "f1e96a48fe6c2e42451d0d85aa7b015b05a0004b5289f28fc5a36d51f873ab8f",
      "value": 1000000,
      "ergoTree": "ErgoTree(16,WrappedArray(IntConstant(0), IntConstant(0), ConstantNode(Coll(16,2,4,-96,11,8,-51,2,121,-66,102,126,-7,-36,-69,-84,85,-96,98,-107,-50,-121,11,7,2,-101,-4,-37,45,-50,40,-39,89,-14,-127,91,22,-8,23,-104,-22,2,-47,-110,-93,-102,-116,-57,-89,1,115,0,115,1),Coll[SByte$]), ConstantNode(Coll(1),Coll[SInt$]), IntConstant(1)),Right(BoolToSigmaProp(AND(ConcreteCollection(WrappedArray(EQ(Height$(163),SelectField(ExtractCreationInfo(ByIndex(Outputs$(165),ConstantPlaceholder(0,SInt$),None)),1)), EQ(ExtractScriptBytes(ByIndex(Outputs$(165),ConstantPlaceholder(1,SInt$),None)),SubstConstants(ConstantPlaceholder(2,Coll[SByte$]),ConstantPlaceholder(3,Coll[SInt$]),ConcreteCollection(WrappedArray(CreateProveDlog(DecodePoint(MinerPubkey$(172)))),SSigmaProp))), EQ(SizeOf(Outputs$(165)),ConstantPlaceholder(4,SInt$))),SBoolean)))),4836,[B@112420820)",
      "creationHeight": 107551,
      "assets": [],
      "additionalRegisters": {},
      "transactionId": "cbd2c43f37b58bbaeec44c7f9ba97318bf37a30c06b526454010b32edffc0e23",
      "index": 1
    },
    {
      "boxId": "eee203ce7535e9d5f524b37148ed184647d158715af8910a8b735a4f4f34b086",
      "value": 9977000000,
      "ergoTree": "ErgoTree(0,WrappedArray(),Right(ConstantNode(SigmaProp(ProveDlog(ECPoint(27268d,ca2ef2,...))),SSigmaProp)),80,[B@112430e90)",
      "creationHeight": 107551,
      "assets": [],
      "additionalRegisters": {},
      "transactionId": "cbd2c43f37b58bbaeec44c7f9ba97318bf37a30c06b526454010b32edffc0e23",
      "index": 2
    }
  ]
}
Sending the transaction... Ok
Server returned tx id: "cbd2c43f37b58bbaeec44c7f9ba97318bf37a30c06b526454010b32edffc0e23"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment