Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename library #5

Merged
merged 3 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Deplyoment Log Generator
# Forge Chronicles

The deployment log generator is a tool that generates a json file and a human readable markdown log file with the deployment information about contracts deployed using `forge script`. It can keep track of upgrades for transparent proxies and generates a history of deployments. An example for such a log can be found [here](https://github.com/0xPolygon/pol-token/blob/main/deployments/5.md). Logs are generated by extracting information from the `run-latest.json` file generated by `forge script` in the `broadcast` directory.
The forge chronicles library is a tool that generates a json file and a human readable markdown log file with the deployment information about contracts deployed using `forge script`. It can keep track of upgrades for transparent proxies and generates a history of deployments. An example for such a log can be found [here](https://github.com/0xPolygon/pol-token/blob/main/deployments/5.md). Logs are generated by extracting information from the `run-latest.json` file generated by `forge script` in the `broadcast` directory.

gretzke marked this conversation as resolved.
Show resolved Hide resolved
## Requirements

Expand All @@ -9,15 +9,15 @@ The script utilizes Node.js to run. We recommend the node version defined in the
## Installation

```bash
forge install 0xPolygon/deployment-log-generator
forge install 0xPolygon/forge-chronicles
```

## Usage Example

The following command will create a log for the contracts deployed in the `Deploy.s.sol` script on Ethereum mainnet.

```bash
node lib/deployment-log-generator Deploy.s.sol --chain-id 1 --rpc-url https://mainnet.infura.io/v3/{your-infura-key}
node lib/forge-chronicles Deploy.s.sol --chain-id 1 --rpc-url https://mainnet.infura.io/v3/{your-infura-key}
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function validateAndExtractInputs() {
printHelp();
process.exit(0);
} else if (scriptName === "-v" || scriptName === "--version") {
console.log(JSON.parse(readFileSync("lib/deployment-log-generator/package.json", "utf8")).version);
console.log(JSON.parse(readFileSync("lib/forge-chronicles/package.json", "utf8")).version);
process.exit(0);
}

Expand Down Expand Up @@ -85,7 +85,7 @@ function validateAndExtractInputs() {

const printHelp = () => {
console.log(
"\nUsage: node lib/deployment-log-generator <scriptName> [-c chain-id] [-r rpc-url] [-s skip-json]\n\nCommands:\n -c, --chain-id\tChain id of the network where the script was executed (default: 31337)\n -r, --rpc-url\t\tRPC url used to fetch the version of the contract or verify an upgrade (default: $RPC_URL). If no rpc url is provided, version fetching is skipped.\n -s, --skip-json\tSkips the json generation and creates the markdown file using an existing json file\n\nOptions:\n -h, --help\t\tPrint help\n -v, --version\t\tPrint version\n\nDocumentation can be found at https://github.com/0xPolygon/deployment-log-generator",
"\nUsage: node lib/forge-chronicles <scriptName> [-c chain-id] [-r rpc-url] [-s skip-json]\n\nCommands:\n -c, --chain-id\tChain id of the network where the script was executed (default: 31337)\n -r, --rpc-url\t\tRPC url used to fetch the version of the contract or verify an upgrade (default: $RPC_URL). If no rpc url is provided, version fetching is skipped.\n -s, --skip-json\tSkips the json generation and creates the markdown file using an existing json file\n\nOptions:\n -h, --help\t\tPrint help\n -v, --version\t\tPrint version\n\nDocumentation can be found at https://github.com/0xPolygon/forge-chronicles",
);
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "deployment-log-generator",
"name": "forge-chronicles",
"version": "0.1.0",
"description": "Extracts contract deployment data from run-latest.json (foundry broadcast output) and writes to deployments/json/{chainId}.json & deployments/{chainId}.md",
"main": "index.js",
Expand Down
Loading