Skip to content
Snippets Groups Projects
Commit f4095a98 authored by Anthony GRAIGNIC's avatar Anthony GRAIGNIC
Browse files

Add note on Behavior RLP encoding

parent 0e516951
Branches main
No related tags found
No related merge requests found
Pipeline #6516 passed
......@@ -3,6 +3,8 @@ import type { BehaviorRequest } from '../EmcJsonRpcProvider';
import { Signature, hexlify } from 'ethers';
export function encodeBehavior(bx: BehaviorRequest): string {
// Set signature params (v,r,s) to 0 before signature
// https://medium.com/mycrypto/the-magic-of-digital-signatures-on-ethereum-98fe184dc9c7
let encoded = RLP.encode([bx.chainId, bx.quantity, bx.timestamp, bx.input, 0, 0]);
return hexlify(encoded);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment