Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. import { default as Eth} from 'web3-eth';
  2. import { default as Contract } from 'truffle-contract';
  3. import myContract_artifacts from '../../build/contracts/myContract.json';
  4. ...
  5. var eth = new Eth(Eth.givenProvider || "http://localhost:8545");
  6. var myContractDef = Contract(rates_artifacts);
  7. myContractDef.setProvider( eth.currentProvider);
  8. var myContractInstance = await myContractDef.deployed();
  9.  
  10. Uncaught (in promise) TypeError: Cannot read property 'apply' of undefined
  11. at Provider.sendAsync (bundle.js:113598)
  12. at RequestManager.sendAsync (bundle.js:121952)
  13. at Object.get [as getNetwork] (bundle.js:23150)
  14. at bundle.js:114052
  15. at Promise (<anonymous>)
  16. at Function.detectNetwork (bundle.js:114043)
  17. at Function.deployed (bundle.js:113991)
  18. at App.componentDidMount (bundle.js:60259)
  19. at bundle.js:68136
  20. at measureLifeCyclePerf (bundle.js:67947)
  21. at bundle.js:68135
  22. at CallbackQueue.notifyAll (bundle.js:39530)
  23. at ReactReconcileTransaction.close (bundle.js:70093)
  24. at ReactReconcileTransaction.closeAll (bundle.js:26044)
  25. at ReactReconcileTransaction.perform (bundle.js:25991)
  26. at batchedMountComponentIntoNode (bundle.js:41397)
  27. at ReactDefaultBatchingStrategyTransaction.perform (bundle.js:25978)
  28. at Object.batchedUpdates (bundle.js:69759)
  29. at Object.batchedUpdates (bundle.js:13827)
  30. at Object._renderNewRootComponent (bundle.js:41590)
  31. at Object._renderSubtreeIntoContainer (bundle.js:41672)
  32. at render (bundle.js:41693)
  33.  
  34. Uncaught (in promise) Error: MetamaskInpageProvider - sendAsync not overwritten
  35. at MetamaskInpageProvider.sendAsync (inpage.js:219)
  36. at Provider.sendAsync (bundle.js:113598)
  37. at RequestManager.sendAsync (bundle.js:121952)
  38. at Object.get [as getNetwork] (bundle.js:23150)
  39. at bundle.js:114052
  40. at Promise (<anonymous>)
  41. at Function.detectNetwork (bundle.js:114043)
  42. at Function.deployed (bundle.js:113991)
  43. at App.componentDidMount (bundle.js:60259)
  44. at bundle.js:68136
  45. at measureLifeCyclePerf (bundle.js:67947)
  46. at bundle.js:68135
  47. at CallbackQueue.notifyAll (bundle.js:39530)
  48. at ReactReconcileTransaction.close (bundle.js:70093)
  49. at ReactReconcileTransaction.closeAll (bundle.js:26044)
  50. at ReactReconcileTransaction.perform (bundle.js:25991)
  51. at batchedMountComponentIntoNode (bundle.js:41397)
  52. at ReactDefaultBatchingStrategyTransaction.perform (bundle.js:25978)
  53. at Object.batchedUpdates (bundle.js:69759)
  54. at Object.batchedUpdates (bundle.js:13827)
  55. at Object._renderNewRootComponent (bundle.js:41590)
  56. at Object._renderSubtreeIntoContainer (bundle.js:41672)
  57.  
  58. myContractDef.deployed().then( function( error, result) { ... } )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement