Created
October 4, 2018 07:09
-
-
Save Perseverance/fc7c9117ff81ae8a37f70df4698a9168 to your computer and use it in GitHub Desktop.
This file contains 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
_counterfactualizeSignedTransaction(signedTransaction) { | |
const signedTransNoRSV = signedTransaction.substring(0, signedTransaction.length - 134); | |
let randomS = utils.keccak256(utils.randomBytes(3)); | |
randomS = '0' + randomS.substring(3, randomS.length); | |
const counterfactualMagic = `1ba079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798a0`; | |
return `${signedTransNoRSV}${counterfactualMagic}${randomS}`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment