fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5.  
  6.  
  7. int main () {
  8.  
  9. // INPUT
  10. void txParams() {
  11. char nonce = "0x00" ;
  12. char gasPrice = "0x09184e72a000" ;
  13. char gasLimit = "0x2710" ;
  14. char to = "0x0000000000000000000000000000000000000000" ;
  15. char value = "0x00" ;
  16. char data = "0x7f7465737432000000000000000000000000000000000000000000000000000000600057" ;
  17. }
  18.  
  19. // HARDCODED TEST PRIVATE KEY
  20. char PRIVATE_KEY = "c5fb190353355defc6b03d2b173513cb46b43831730a882f6a2233b3862245a6" ; // without 0x
  21.  
  22. void common()
  23. {
  24. char chain = "mainnet";
  25. scanf("%S", chain);
  26. }
  27.  
  28. void tx() {
  29. txParams() ;
  30. common() ;
  31. }
  32.  
  33. void privateKey() {
  34. PRIVATE_KEY ;
  35. printf("hex") ;
  36. }
  37.  
  38. void signedTx() {
  39. tx() ;
  40. privateKey() ;
  41. }
  42.  
  43. void serializedTx() {
  44. signedTx();
  45. }
  46. // OUTPUT
  47. printf("hex");
  48. // f889808609184e72a00082271094000000000000000000000000000000000000000080a47f746573743200000000000000000000000000000000000000000000000000000060005725a0f4c235d4dff3cfb4ca8eccb1bfa2a42f6fa2b7c4d55d0711550c59859f95e87fa00e02b27191c648a95f9a9a04c0463d4f0ff4ca83a2b7cc723c333b156eaeb18c
  49.  
  50.  
  51. }
Success #stdin #stdout 0s 5576KB
stdin
Standard input is empty
stdout
hex