Skip to content

Commit

Permalink
Merge branch 'dev' into feat/emission-adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke authored Oct 17, 2023
2 parents afd29dd + 6f4638f commit c64c2e6
Show file tree
Hide file tree
Showing 20 changed files with 3,143 additions and 209 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
lcov.info
.DS_Store
.vscode
broadcast/
.env

output/31337.json
broadcast/*/31337
deployments/31337.md
deployments/json/31337.json
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
"singleQuote": false,
"bracketSpacing": false
}
},
{
"files": "*.json",
"options": {
"tabWidth": 4
}
}
]
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ A default implementation is included and this contract will be proxy upgradable

### Setup

- [Install foundry](https://book.getfoundry.sh/getting-started/installation)
- Install Dependencies: `forge install`
- Build: `forge build`
- Test: `forge test`
- [Install foundry](https://book.getfoundry.sh/getting-started/installation)
- Install Dependencies: `forge install`
- Build: `forge build`
- Test: `forge test`

### Deployment

1. Ensure .env file is set, `cp .env.example`
2. Populate Enviornment variables: `source .env`
3. We use a forge script to deploy the contracts, and have an additional extract.js script to store a JSON file with coalesced deployment information. (see [output](./output/))
3. We use a forge script to deploy the contracts, and have an additional extract.js script to store a JSON file with coalesced deployment information. (see [deployments](./deployments/))

- (mainnet): `forge script script/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --etherscan-api-key $ETHERSCAN_API_KEY`
- (testnet, goerli for example): `forge script script/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --verifier-url https://api-goerli.etherscan.io/api --chain-id 5`
- (mainnet): `forge script scripts/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --etherscan-api-key $ETHERSCAN_API_KEY`
- (testnet, goerli for example): `forge script scripts/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --verifier-url https://api-goerli.etherscan.io/api --chain-id 5`

4. Run `node script/util/extract.js <chainId>` to extract deployment information from forge broadcast output (broadcast/latest-run.json).
4. Run `node scripts/util/extract.js <chainId> [version = 1.0.0] [scriptName = Deploy.s.sol]` to extract deployment information from forge broadcast output (broadcast/latest-run.json).

## Reference Deployments

Expand Down
238 changes: 238 additions & 0 deletions broadcast/Deploy.s.sol/5/run-1696415718.json

Large diffs are not rendered by default.

685 changes: 685 additions & 0 deletions broadcast/Deploy.s.sol/5/run-1696415725.json

Large diffs are not rendered by default.

685 changes: 685 additions & 0 deletions broadcast/Deploy.s.sol/5/run-1696415816.json

Large diffs are not rendered by default.

685 changes: 685 additions & 0 deletions broadcast/Deploy.s.sol/5/run-latest.json

Large diffs are not rendered by default.

219 changes: 219 additions & 0 deletions deployments/5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# Polygon Ecosystem Token


### Table of Contents
- [Summary](#summary)
- [Contracts](#contracts)
- [Polygon Migration](#polygon-migration)
- [Default Emission Manager](#default-emission-manager)
- [Proxy Admin](#proxy-admin)
- [Polygon Ecosystem Token](#polygon-ecosystem-token)
- [Deployment History](#deployment-history)
- [1.0.0](#100)

## Summary
<table>
<tr>
<th>Contract</th>
<th>Address</th>
<th>Version</th>
</tr><tr>
<td>PolygonMigration</td>
<td><a href="https://goerli.etherscan.io/address/0x5c5589fca76237Ed00BA024e19b6C077a108f687" target="_blank">0x5c5589fca76237Ed00BA024e19b6C077a108f687</a></td>
<td>1.0.0</td>
</tr>
<tr>
<td>DefaultEmissionManager</td>
<td><a href="https://goerli.etherscan.io/address/0x0e481cfeB712d37A0C6cd4e2801cA01E09Bc1A9d" target="_blank">0x0e481cfeB712d37A0C6cd4e2801cA01E09Bc1A9d</a></td>
<td>1.0.0</td>
</tr>
<tr>
<td>ProxyAdmin</td>
<td><a href="https://goerli.etherscan.io/address/0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2" target="_blank">0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2</a></td>
<td>N/A</td>
</tr>
<tr>
<td>PolygonEcosystemToken</td>
<td><a href="https://goerli.etherscan.io/address/0x4f34BF3352A701AEc924CE34d6CfC373eABb186c" target="_blank">0x4f34BF3352A701AEc924CE34d6CfC373eABb186c</a></td>
<td>1.0.0</td>
</tr></table>

## Contracts

### Polygon Migration

Address: [0x5c5589fca76237Ed00BA024e19b6C077a108f687](https://goerli.etherscan.io/address/0x5c5589fca76237Ed00BA024e19b6C077a108f687)

Deployment Txn: [0xe0786d27a0f9ae581cabfcab6edf6a0fd261f0143e4a52cbd6c383cb87c5b4a4](https://goerli.etherscan.io/tx/0xe0786d27a0f9ae581cabfcab6edf6a0fd261f0143e4a52cbd6c383cb87c5b4a4)

Version: [1.0.0](https://github.com/0xPolygon/pol-token/releases/tag/1.0.0)

Commit Hash: [9af97e8](https://github.com/0xPolygon/pol-token/commit/9af97e84fca5f31e7351cb91b85ac7dd5f40f563)

Wed, 04 Oct 2023 10:36:56 UTC


_Proxy Information_



Proxy Type: TransparentUpgradeableProxy



Implementation: [0x41E44496AfE9FE59004b9d166eFa5A31245746b5](https://goerli.etherscan.io/address/0x41E44496AfE9FE59004b9d166eFa5A31245746b5)



Proxy Admin: [0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2](https://goerli.etherscan.io/address/0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2)



<details>
<summary>Implementation History</sumamry>
<table>
<tr>
<th>Version</th>
<th>Address</th>
<th>Commit Hash</th>
</tr>
<tr>
<td><a href="https://github.com/0xPolygon/pol-token/releases/tag/1.0.0" target="_blank">1.0.0</a></td>
<td><a href="https://goerli.etherscan.io/address/0x41E44496AfE9FE59004b9d166eFa5A31245746b5" target="_blank">0x41E44496AfE9FE59004b9d166eFa5A31245746b5</a></td>
<td><a href="https://github.com/0xPolygon/pol-token/commit/9af97e84fca5f31e7351cb91b85ac7dd5f40f563" target="_blank">9af97e8</a></td>
</tr>
</table>
</details>


---

### Default Emission Manager

Address: [0x0e481cfeB712d37A0C6cd4e2801cA01E09Bc1A9d](https://goerli.etherscan.io/address/0x0e481cfeB712d37A0C6cd4e2801cA01E09Bc1A9d)

Deployment Txn: [0xff69667f86a1050432a4d07f93d6202b9141bad1d0e73da42675e1fdf9b1ce02](https://goerli.etherscan.io/tx/0xff69667f86a1050432a4d07f93d6202b9141bad1d0e73da42675e1fdf9b1ce02)

Version: [1.0.0](https://github.com/0xPolygon/pol-token/releases/tag/1.0.0)

Commit Hash: [9af97e8](https://github.com/0xPolygon/pol-token/commit/9af97e84fca5f31e7351cb91b85ac7dd5f40f563)

Wed, 04 Oct 2023 10:36:56 UTC


_Proxy Information_



Proxy Type: TransparentUpgradeableProxy



Implementation: [0xe76193f2107bF7Cc9C6A0de6af63D3C74b936393](https://goerli.etherscan.io/address/0xe76193f2107bF7Cc9C6A0de6af63D3C74b936393)



Proxy Admin: [0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2](https://goerli.etherscan.io/address/0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2)



<details>
<summary>Implementation History</sumamry>
<table>
<tr>
<th>Version</th>
<th>Address</th>
<th>Commit Hash</th>
</tr>
<tr>
<td><a href="https://github.com/0xPolygon/pol-token/releases/tag/1.0.0" target="_blank">1.0.0</a></td>
<td><a href="https://goerli.etherscan.io/address/0xe76193f2107bF7Cc9C6A0de6af63D3C74b936393" target="_blank">0xe76193f2107bF7Cc9C6A0de6af63D3C74b936393</a></td>
<td><a href="https://github.com/0xPolygon/pol-token/commit/9af97e84fca5f31e7351cb91b85ac7dd5f40f563" target="_blank">9af97e8</a></td>
</tr>
</table>
</details>


---

### Proxy Admin

Address: [0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2](https://goerli.etherscan.io/address/0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2)

Deployment Txn: [0xcc62464cf4ef11bb1d03a0f898eb22feb335286a5c3b546942b03d34e960213d](https://goerli.etherscan.io/tx/0xcc62464cf4ef11bb1d03a0f898eb22feb335286a5c3b546942b03d34e960213d)



Commit Hash: [9af97e8](https://github.com/0xPolygon/pol-token/commit/9af97e84fca5f31e7351cb91b85ac7dd5f40f563)

Wed, 04 Oct 2023 10:36:56 UTC


---

### Polygon Ecosystem Token

Address: [0x4f34BF3352A701AEc924CE34d6CfC373eABb186c](https://goerli.etherscan.io/address/0x4f34BF3352A701AEc924CE34d6CfC373eABb186c)

Deployment Txn: [0x69ee54fefe2d7902a4de228f8f6b19bb3e1308013f10e47cecf07066ecd57fa1](https://goerli.etherscan.io/tx/0x69ee54fefe2d7902a4de228f8f6b19bb3e1308013f10e47cecf07066ecd57fa1)

Version: [1.0.0](https://github.com/0xPolygon/pol-token/releases/tag/1.0.0)

Commit Hash: [9af97e8](https://github.com/0xPolygon/pol-token/commit/9af97e84fca5f31e7351cb91b85ac7dd5f40f563)

Wed, 04 Oct 2023 10:36:56 UTC


----


### Deployment History


### [1.0.0](https://github.com/0xPolygon/pol-token/releases/tag/1.0.0)

Wed, 04 Oct 2023 10:36:56 UTC

Commit Hash: [9af97e8](https://github.com/0xPolygon/pol-token/commit/9af97e84fca5f31e7351cb91b85ac7dd5f40f563)

Deployed contracts:

- [Polygon Migration](https://goerli.etherscan.io/address/0x5c5589fca76237Ed00BA024e19b6C077a108f687) ([Implementation](https://goerli.etherscan.io/address/0x41E44496AfE9FE59004b9d166eFa5A31245746b5))
- [Default Emission Manager](https://goerli.etherscan.io/address/0x0e481cfeB712d37A0C6cd4e2801cA01E09Bc1A9d) ([Implementation](https://goerli.etherscan.io/address/0xe76193f2107bF7Cc9C6A0de6af63D3C74b936393))
- [Polygon Ecosystem Token](https://goerli.etherscan.io/address/0x4f34BF3352A701AEc924CE34d6CfC373eABb186c)

<details>
<summary>Inputs</summary>
<table>
<tr>
<th>Parameter</th>
<th>Value</th>
</tr>

<tr>
<td>matic</td>
<td>0x499d11E0b6eAC7c0593d8Fb292DCBbF815Fb29Ae</td>
</tr>

<tr>
<td>governance</td>
<td>0x531c7Befe78B6496e5753815ab3d3Cc024c1E842</td>
</tr>

<tr>
<td>treasury</td>
<td>0x531c7Befe78B6496e5753815ab3d3Cc024c1E842</td>
</tr>

<tr>
<td>stakeManager</td>
<td>0x00200eA4Ee292E253E6Ca07dBA5EdC07c8Aa37A3</td>
</tr>

<tr>
<td>permit2revoker</td>
<td>0x531c7Befe78B6496e5753815ab3d3Cc024c1E842</td>
</tr>
</table>
</details>

86 changes: 86 additions & 0 deletions deployments/json/5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"chainId": "5",
"latest": {
"PolygonMigration": {
"implementation": "0x41E44496AfE9FE59004b9d166eFa5A31245746b5",
"proxyAdmin": "0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2",
"address": "0x5c5589fca76237Ed00BA024e19b6C077a108f687",
"proxy": true,
"version": "1.0.0",
"proxyType": "TransparentUpgradeableProxy",
"timestamp": 1696415816,
"deploymentTxn": "0xe0786d27a0f9ae581cabfcab6edf6a0fd261f0143e4a52cbd6c383cb87c5b4a4",
"commitHash": "9af97e84fca5f31e7351cb91b85ac7dd5f40f563"
},
"DefaultEmissionManager": {
"implementation": "0xe76193f2107bF7Cc9C6A0de6af63D3C74b936393",
"proxyAdmin": "0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2",
"address": "0x0e481cfeB712d37A0C6cd4e2801cA01E09Bc1A9d",
"proxy": true,
"version": "1.0.0",
"proxyType": "TransparentUpgradeableProxy",
"timestamp": 1696415816,
"deploymentTxn": "0xff69667f86a1050432a4d07f93d6202b9141bad1d0e73da42675e1fdf9b1ce02",
"commitHash": "9af97e84fca5f31e7351cb91b85ac7dd5f40f563"
},
"ProxyAdmin": {
"address": "0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2",
"proxy": false,
"timestamp": 1696415816,
"deploymentTxn": "0xcc62464cf4ef11bb1d03a0f898eb22feb335286a5c3b546942b03d34e960213d",
"commitHash": "9af97e84fca5f31e7351cb91b85ac7dd5f40f563"
},
"PolygonEcosystemToken": {
"address": "0x4f34BF3352A701AEc924CE34d6CfC373eABb186c",
"proxy": false,
"version": "1.0.0",
"timestamp": 1696415816,
"deploymentTxn": "0x69ee54fefe2d7902a4de228f8f6b19bb3e1308013f10e47cecf07066ecd57fa1",
"commitHash": "9af97e84fca5f31e7351cb91b85ac7dd5f40f563"
}
},
"history": [
{
"contracts": {
"PolygonMigration": {
"implementation": "0x41E44496AfE9FE59004b9d166eFa5A31245746b5",
"proxyAdmin": "0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2",
"address": "0x5c5589fca76237Ed00BA024e19b6C077a108f687",
"proxy": true,
"version": "1.0.0",
"proxyType": "TransparentUpgradeableProxy",
"deploymentTxn": "0xe0786d27a0f9ae581cabfcab6edf6a0fd261f0143e4a52cbd6c383cb87c5b4a4"
},
"DefaultEmissionManager": {
"implementation": "0xe76193f2107bF7Cc9C6A0de6af63D3C74b936393",
"proxyAdmin": "0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2",
"address": "0x0e481cfeB712d37A0C6cd4e2801cA01E09Bc1A9d",
"proxy": true,
"version": "1.0.0",
"proxyType": "TransparentUpgradeableProxy",
"deploymentTxn": "0xff69667f86a1050432a4d07f93d6202b9141bad1d0e73da42675e1fdf9b1ce02"
},
"ProxyAdmin": {
"address": "0x9Ed32fDC7E4600E1F733dbCEA750C19E7830FBc2",
"proxy": false,
"deploymentTxn": "0xcc62464cf4ef11bb1d03a0f898eb22feb335286a5c3b546942b03d34e960213d"
},
"PolygonEcosystemToken": {
"address": "0x4f34BF3352A701AEc924CE34d6CfC373eABb186c",
"proxy": false,
"version": "1.0.0",
"deploymentTxn": "0x69ee54fefe2d7902a4de228f8f6b19bb3e1308013f10e47cecf07066ecd57fa1"
}
},
"input": {
"matic": "0x499d11E0b6eAC7c0593d8Fb292DCBbF815Fb29Ae",
"governance": "0x531c7Befe78B6496e5753815ab3d3Cc024c1E842",
"treasury": "0x531c7Befe78B6496e5753815ab3d3Cc024c1E842",
"stakeManager": "0x00200eA4Ee292E253E6Ca07dBA5EdC07c8Aa37A3",
"permit2revoker": "0x531c7Befe78B6496e5753815ab3d3Cc024c1E842"
},
"timestamp": 1696415816,
"commitHash": "9af97e84fca5f31e7351cb91b85ac7dd5f40f563"
}
]
}
16 changes: 8 additions & 8 deletions docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ A default implementation is included and this contract will be proxy upgradable

### Setup

- [Install foundry](https://book.getfoundry.sh/getting-started/installation)
- Install Dependencies: `forge install`
- Build: `forge build`
- Test: `forge test`
- [Install foundry](https://book.getfoundry.sh/getting-started/installation)
- Install Dependencies: `forge install`
- Build: `forge build`
- Test: `forge test`

### Deployment

1. Ensure .env file is set, `cp .env.example`
2. Populate Enviornment variables: `source .env`
3. We use a forge script to deploy the contracts, and have an additional extract.js script to store a JSON file with coalesced deployment information. (see [output](./output/))
3. We use a forge script to deploy the contracts, and have an additional extract.js script to store a JSON file with coalesced deployment information. (see [deployments](./deployments/))

- (mainnet): `forge script script/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --etherscan-api-key $ETHERSCAN_API_KEY`
- (testnet, goerli for example): `forge script script/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --verifier-url https://api-goerli.etherscan.io/api --chain-id 5`
- (mainnet): `forge script scripts/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --etherscan-api-key $ETHERSCAN_API_KEY`
- (testnet, goerli for example): `forge script scripts/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --private-key $PRIVATE_KEY --verifier-url https://api-goerli.etherscan.io/api --chain-id 5`

4. Run `node script/util/extract.js <chainId>` to extract deployment information from forge broadcast output (broadcast/latest-run.json).
4. Run `node scripts/util/extract.js <chainId>` to extract deployment information from forge broadcast output (broadcast/latest-run.json).

---

Expand Down
Loading

0 comments on commit c64c2e6

Please sign in to comment.