Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. Warning! Error encountered during contract execution [Bad jump destination]
  2.  
  3. function start(address seller, address thirdParty) returns (uint escrowId) {
  4. escrowId = numEscrows;
  5. numEscrows++;
  6. escrow e;
  7. e.thirdParty = thirdParty;
  8. e.seller = seller;
  9. e.buyer = msg.sender;
  10. e.amount = msg.value;
  11. e.recipient = seller;
  12. e.status = 1; // started
  13.  
  14. escrows[escrowId] = e;
  15.  
  16. return escrowId;
  17. }
  18.  
  19. pragma solidity ^0.4.0;
  20. contract Ballot {
  21. struct Escrow {
  22. address thirdParty;
  23. address seller;
  24. address buyer;
  25. uint amount;
  26. address recipient;
  27. uint status;
  28. }
  29. uint numEscrows;
  30. mapping (uint => Escrow) escrows;
  31.  
  32. function start(address seller, address thirdParty) returns (uint escrowId) {
  33. escrowId = numEscrows;
  34. numEscrows++;
  35. Escrow memory e;
  36. e.thirdParty = thirdParty;
  37. e.seller = seller;
  38. e.buyer = msg.sender;
  39. e.amount = msg.value;
  40. e.recipient = seller;
  41. e.status = 1; // started
  42.  
  43. escrows[escrowId] = e;
  44.  
  45. return escrowId;
  46. }
  47.  
  48. function start1(address seller, address thirdParty) returns (uint escrowId) {
  49. escrows[numEscrows].thirdParty = thirdParty;
  50. escrows[numEscrows].seller = seller;
  51. escrows[numEscrows].buyer = msg.sender;
  52. escrows[numEscrows].amount = msg.value;
  53. escrows[numEscrows].recipient = seller;
  54. escrows[numEscrows].status = 1; // started
  55. numEscrows++;
  56. return numEscrows;
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement