Post
Topic
Board Development & Technical Discussion
Topic OP
How to change a signed transaction's version and sign again and broadcast?
by
msg768
on 21/02/2021, 09:59:32 UTC
The following transaction is made by an atomic swap wallet and the tx version is 2. This would work if it was for Bitcoin but it's for an altcoin with older code base where tx version is 1. Is it possible to change the version and sign again and broadcast? I tried changing the first bit from 02 to 01 and signed again but got an error. The transaction is trying to spend a BIP65 input and I don't have the redeem script for the script hash so I have no idea how to make it from scratch. Otherwise making it from scratch would do the trick too. Please HELP!

0200000001da71b26747a3e4e0675d8ea8263f225b1f0683990257f383b4b2860d43a2673400000 000c4483045022100bbcd0996e5853c67f11a6b7f805ee7a0c0d37073ae5834053c2e2929f68440 a30220447191f2101e0095767e344a9e6bb638bac49c5fc067ed475b638bb490a957b4012103fb7 1f0aa52c77429ea35a27f5a058bb1d82f41a03cc3f711450e2c4529f66aaf514c56630342bd00b1 7576a9144c3585912cb3a4e00f8f7f54ea9dc0b7150ec52e88ac6776a9141c2761c25a8a42612bd 14256e1029561401b2ba088ad82012188a914307cb10e26e3a630137510bc4f0d3b68cf25a53887 68feffffff0101e87648170000001976a9147badc271955146556b6076ea7e3d6f277f85507c88a c42bd0000


The coin is known as SwiftCash and its core is pretty much a fork of the older versions of Bitcoin.

This is the decoded version of the transaction:

<code>
{
  "txid": "da75786145ad7b9e33b44a02295715074efeac9d3b224edb186b4ff42c9f1078",
  "size": 281,
  "version": 2,
  "locktime": 48450,
  "vin": [
    {
      "txid": "3467a2430d86b2b483f357029983061f5b223f26a88e5d67e0e4a34767b271da",
      "vout": 0,
      "scriptSig": {
        "asm": "3045022100bbcd0996e5853c67f11a6b7f805ee7a0c0d37073ae5834053c2e2929f68440a302204 47191f2101e0095767e344a9e6bb638bac49c5fc067ed475b638bb490a957b401 03fb71f0aa52c77429ea35a27f5a058bb1d82f41a03cc3f711450e2c4529f66aaf 1 630342bd00b17576a9144c3585912cb3a4e00f8f7f54ea9dc0b7150ec52e88ac6776a9141c2761c 25a8a42612bd14256e1029561401b2ba088ad82012188a914307cb10e26e3a630137510bc4f0d3b 68cf25a5388768",
        "hex": "483045022100bbcd0996e5853c67f11a6b7f805ee7a0c0d37073ae5834053c2e2929f68440a3022 0447191f2101e0095767e344a9e6bb638bac49c5fc067ed475b638bb490a957b4012103fb71f0aa 52c77429ea35a27f5a058bb1d82f41a03cc3f711450e2c4529f66aaf514c56630342bd00b17576a 9144c3585912cb3a4e00f8f7f54ea9dc0b7150ec52e88ac6776a9141c2761c25a8a42612bd14256 e1029561401b2ba088ad82012188a914307cb10e26e3a630137510bc4f0d3b68cf25a5388768"
      },
      "sequence": 4294967294
    }
  ],
  "vout": [
    {
      "value": 1000.00000001,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 7badc271955146556b6076ea7e3d6f277f85507c OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a9147badc271955146556b6076ea7e3d6f277f85507c88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "SYZxJTjvVEDwdRDPD8VemTu3Pc6BXWrjJt"
        ]
      }
    }
  ]
}
</code>