Skip to content

Instantly share code, notes, and snippets.

@dexX7
Last active March 18, 2020 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dexX7/13423547751eebffaebb3493d32ab2af to your computer and use it in GitHub Desktop.
Save dexX7/13423547751eebffaebb3493d32ab2af to your computer and use it in GitHub Desktop.
Activation of unrestricted traditional DEx

UTXO

{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":0,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}
{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":1,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}

Feature Id: 15 (fast signing)

1) Create base transaction
createrawtransaction '[{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":0,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}]' '{}'
0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370000000000ffffffff0000000000
2) Add payload
omni_createrawtx_opreturn 0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370000000000ffffffff0000000000 fffffffe000f0009923204c4b400
0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370000000000ffffffff010000000000000000146a126f6d6e69fffffffe000f0009923204c4b40000000000
3) Verify
omni_decodetransaction 0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370000000000ffffffff010000000000000000146a126f6d6e69fffffffe000f0009923204c4b40000000000 '[{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":0,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}]' 617915
{
    "txid": "db4dea702a8ec88d9413aa6438f3e5e4f0a54e4554fa2dc386998f5d062993d9",
    "fee": "0.00050000",
    "sendingaddress": "33jx18123xJS59hnHwCgsr6zvYPfiCussh",
    "ismine": false,
    "version": 65535,
    "type_int": 65534,
    "type": "Feature Activation",
    "featureid": 15,
    "activationblock": 627250,
    "minimumversion": 80000000,
    "confirmations": 0
}

Feature Id: 15 (emergency)

1) Create base transaction
createrawtransaction '[{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":1,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}]' '{}'
0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370100000000ffffffff0000000000
2) Add payload
omni_createrawtx_opreturn 0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370100000000ffffffff0000000000 fffffffe000f0009a5ba04c4b400
0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370100000000ffffffff010000000000000000146a126f6d6e69fffffffe000f0009a5ba04c4b40000000000
3) Verify
omni_decodetransaction 0200000001d9481f9dee762c92ca6c7ec147237033a49166c6931532ef8228366434519d370100000000ffffffff010000000000000000146a126f6d6e69fffffffe000f0009a5ba04c4b40000000000 '[{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":1,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}]' 617915
{
    "txid": "cbaf52200e09ae799e8a826efff3bb45b62d17cc53d18aecde2fbd077c9c769e",
    "fee": "0.00050000",
    "sendingaddress": "33jx18123xJS59hnHwCgsr6zvYPfiCussh",
    "ismine": false,
    "version": 65535,
    "type_int": 65534,
    "type": "Feature Activation",
    "featureid": 15,
    "activationblock": 632250,
    "minimumversion": 80000000,
    "confirmations": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment