Skip to content

Instantly share code, notes, and snippets.

@askaaqib
Last active November 6, 2020 05:10
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 askaaqib/22e70227f7a89c1d4ffe65da96023bc0 to your computer and use it in GitHub Desktop.
Save askaaqib/22e70227f7a89c1d4ffe65da96023bc0 to your computer and use it in GitHub Desktop.
RLPObject
<?php
$txBodyObj = new \FurqanSiddiqui\Ethereum\RLP\RLPObject();
$txBodyObj->encodeInteger("39");sh
//$txBodyObj->encodeInteger(2864434397);
$txBodyObj->encodeInteger(845527306194141);
$txBodyObj->encodeInteger(32);
$clause1 = new \FurqanSiddiqui\Ethereum\RLP\RLPObject();
$clause1->encodeHexString("9fdee3753061cc9033f8bcfb9fd81c18cc137f05");
$clause1->encodeInteger(20000);
$clause1->encodeHexString("000000606060");
$clausesObj = new \FurqanSiddiqui\Ethereum\RLP\RLPObject();
$clausesObj->encodeObject($clause1);
$txBodyObj->encodeObject($clausesObj);
$txBodyObj->encodeInteger(39);
$txBodyObj->encodeInteger(21);
$txBodyObj->encodeString("");
$txBodyObj->encodeInteger(101);
$txBodyObj->encodeObject(new \FurqanSiddiqui\Ethereum\RLP\RLPObject());
$txBodyObj->encodeHexString("12bde88206f55f58bd8be180d71d93a0cf41f6a41f83476686ea99acf05fa31635c134bfd4d2468274ccd61cfbed80e0a19c7f42694f20c9d8b483123e27a1e100");
var_dump($txBodyObj->getRLPEncoded($rlp)->toString());
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment