Ether1Project / ethofs-sdk

MIT License
1 stars 3 forks source link

Do we need Lib folder? #10

Closed ghost closed 3 years ago

ghost commented 3 years ago

I have transformed the src folder into a nodeJS friendly files on newCodeRunner branch (no need for web pack - can run as is) on @fallengravity feedback, so I was wondering if we really need to pack everything and then include it in the final node module?

We could just reference the index.js in our src folder, for web users, they are already going to web pack import. for CDN we can compile the web version and host it separately, no need to send to user as part of library, as it does not make sense if users are going to. web pack import after all, they can do it from src/index.js file.

Let me know what you think @Dev-JamesR

and btw, there is something wrong at the backend side, I tested the master branch too (before my accidental commits to this branch), I get the same error as I did on the newCodeRunner branch, which in fact was working in mid-end May on my laptop (hadn't committed the changes, but everything was working, and now end May early, June it broke)

{
  ipfsHash: 'QmReq3ZRtMon5DFtyEyNXFGeYckvShPA7QEjm1kj74D5vk',
  ethoTxHash: '0x97b53c445d8b0d9ac40bae536e6a7aa39332c73b4a3668cc5046e1b39c4024a4',
  uploadCost: 9435885986024,
  initiationBlock: 7245272,
  expirationBlock: 7345272
}
(node:4495) UnhandledPromiseRejectionWarning: Error: Transaction has been reverted by the EVM:
{
  "blockHash": "0x8750b45550960300b8fe567d44aea4c5c0f9a44b29d112b0ed194ccaba57d314",
  "blockNumber": 7245272,
  "contractAddress": null,
  "cumulativeGasUsed": 5928153,
  "from": "0x882e6a365004803a979b126c2389319a87b85f45",
  "gasUsed": 5928153,
  "logs": [],
  "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "status": false,
  "to": "0xc38b47169950d8a28bc77a6fa7467464f25adafc",
  "transactionHash": "0x97b53c445d8b0d9ac40bae536e6a7aa39332c73b4a3668cc5046e1b39c4024a4",
  "transactionIndex": 0,
  "type": "0x0"
}
Dev-JamesR commented 3 years ago

The EVM revert has been fixed, you should be able to run tests now. I agree on all parts. Webpack should be run once by the deploying user. I am testing your branch now, much better design!

Dev-JamesR commented 3 years ago

Doing a bunch of testing, really like how it is setup now. It does look like the pinList function is broken now, can't get it to return anything. I will open a PR and we can continue to build on your branch. I have a few updates that need to go into it as well.

ghost commented 3 years ago

Removed lib folder on the branch