harmony-one / horizon

Horizon - a trustless harmony to ethereum bridge
MIT License
36 stars 29 forks source link

Refactor #38

Closed johnwhitton closed 2 years ago

johnwhitton commented 2 years ago

Refactor to improve solidity tooling using hardhat including testing, deployment, documentation and gas estimation. As well as consolidate all tools, scripts and cli into a src folder.

Migration Strategy

Action Items

Logs and Analysis

johnlaptop horizon (refactor) $ npx hardhat deploy --network hardhat --tags HarmonyLightClient
Nothing to compile
No need to generate any newer typings.
✅ Generated documentation for 46 contracts
(node:62043) UnhandledPromiseRejectionWarning: Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":42,\"error\":{\"code\":-32600,\"message\":\"invalid request\"}}\n", error={"code":-32600}, requestBody="{\"method\":{\"jsonrpc\":\"2.0\",\"method\":\"hmyv2_getFullHeader\",\"params\":[\"0xe\"],\"id\":1654537992451},\"id\":42,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="http://localhost:9500", code=SERVER_ERROR, version=web/5.6.0)
    at Logger.makeError (/Users/john/one-wallet/horizon/node_modules/@ethersproject/logger/src.ts/index.ts:261:28)
    at Logger.throwError (/Users/john/one-wallet/horizon/node_modules/@ethersproject/logger/src.ts/index.ts:273:20)
    at /Users/john/one-wallet/horizon/node_modules/@ethersproject/web/src.ts/index.ts:329:28
    at step (/Users/john/one-wallet/horizon/node_modules/@ethersproject/web/lib/index.js:33:23)
    at Object.next (/Users/john/one-wallet/horizon/node_modules/@ethersproject/web/lib/index.js:14:53)
    at fulfilled (/Users/john/one-wallet/horizon/node_modules/@ethersproject/web/lib/index.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:62043) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:62043) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
polymorpher commented 2 years ago

yarn-error.log should be ignored

polymorpher commented 2 years ago

Can the auto-generated d.ts files be removed? They are more distracting than helpful

polymorpher commented 2 years ago

Can all auto-generated .md files be removed until we manually review and polish them (e.g. by extensively commenting on original .sol file, or adding extra to .md)? The reason is they don't contain useful information, and may discourage a new developer into thinking all our documentations are just boilerplates

polymorpher commented 2 years ago

Can data/abi/* be removed as well? They don't look like abi and they are not referenced elsewhere

polymorpher commented 2 years ago

Lastly, can some template files be removed as well? (e.g. the docs/SOLIDITY.md mentioned in in-line comments). Let's focus on information that is strongly relevant to helping other developers understand and onboard the project

johnwhitton commented 2 years ago

Merged latest upstream/main still have some action items for testing and deployment which can be progressed separately.