Skip to content

Commit 6b05297

Browse files
committedNov 28, 2023
feat: 🎸 Deployment info for Gnosis Chiado chain
1 parent 47a9dbb commit 6b05297

36 files changed

+28422
-4189
lines changed
 

‎.lintignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cache
2+
node_modules
3+
.github
4+
.husky
5+
dist
6+
lib
7+
coverage
8+
typedoc
9+
temp
10+
OLD_CODEBASE
11+
deployments
12+
artifacts
13+
typechain

‎README.md

+14
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ The WindingTree market protocol smart contracts and utilities
2121
- `STABLE18`: [ERC20, 18 decimals, no permit](https://explorer.public.zkevm-test.net/address/0x4EcB659060Da61D795D777bb21BAe3599b301C66/read-proxy#address-tabs)
2222
- `STABLE18PERMIT`: [ERC20, 18 decimals, with permit](https://explorer.public.zkevm-test.net/address/0xF54784206A53EF19fd3024D8cdc7A6251A4A0d67/read-proxy#address-tabs)
2323

24+
### Gnosis Chiado
25+
26+
- Config ([0x4556d5C1486d799f67FA96c84F1d0552486CAAF4](https://gnosis-chiado.blockscout.com/address/0x4556d5C1486d799f67FA96c84F1d0552486CAAF4?tab=read_proxy)): the protocol configuration smart contract
27+
- EntitiesRegistry ([0x4EcB659060Da61D795D777bb21BAe3599b301C66](https://gnosis-chiado.blockscout.com/address/0x4EcB659060Da61D795D777bb21BAe3599b301C66?tab=read_proxy)): the protocol identity management
28+
- Market ([0xF54784206A53EF19fd3024D8cdc7A6251A4A0d67](https://gnosis-chiado.blockscout.com/address/0xF54784206A53EF19fd3024D8cdc7A6251A4A0d67?tab=read_proxy)): the protocol entry point
29+
- LIF ([0x8CB96383609C56af1Fe44DB7591F94AEE2fa43b2](https://gnosis-chiado.blockscout.com/address/0x8CB96383609C56af1Fe44DB7591F94AEE2fa43b2?tab=read_proxy)): Test version of LIF token
30+
31+
#### Testing tokens
32+
33+
- `STABLE6`: [ERC20, 6 decimals, no permit](https://gnosis-chiado.blockscout.com/address/0xcC28A4e6DEF318A1b88CF34c4F2Eeb2489995513?tab=read_proxy)
34+
- `STABLE6PERMIT`: [ERC20, 6 decimals, with permit](https://gnosis-chiado.blockscout.com/address/0x78F924A7C70213D502E6110567AC556c2EFBBF73?tab=read_proxy)
35+
- `STABLE18`: [ERC20, 18 decimals, no permit](https://gnosis-chiado.blockscout.com/address/0x7067fC74fFCf4096796454747461D098E6bF7241?tab=read_proxy)
36+
- `STABLE18PERMIT`: [ERC20, 18 decimals, with permit](https://gnosis-chiado.blockscout.com/address/0x44947d69A9F06EF48170BD41Da9B27E74ecd0891?tab=read_proxy)
37+
2438
## Install package
2539

2640
```bash

‎deploy/002.ts

+41-32
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ import {
66
DeployOptions,
77
DeployResult,
88
} from "hardhat-deploy/types";
9+
import {
10+
kindsArr,
11+
eip712name,
12+
eip712version,
13+
claimPeriod,
14+
protocolFee,
15+
retailerFee,
16+
minDeposit,
17+
} from "../utils";
918

1019
const setupToken = async (
1120
proxySettings: { owner: string; proxyContract: string },
@@ -20,10 +29,10 @@ const setupToken = async (
2029
contract: contractName,
2130
proxy: {
2231
...proxySettings,
23-
// execute: {
24-
// methodName: "initialize",
25-
// args: [tokenName, tokenSymbol, owner],
26-
// },
32+
execute: {
33+
methodName: "initialize",
34+
args: [tokenName, tokenSymbol, owner],
35+
},
2736
},
2837
from: owner,
2938
log: true,
@@ -44,7 +53,7 @@ const setupToken = async (
4453
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
4554
const { network, deployments, getNamedAccounts } = hre;
4655

47-
if (!["polzktest"].includes(network.name)) {
56+
if (!["polzktest", "chiado"].includes(network.name)) {
4857
return;
4958
}
5059

@@ -119,19 +128,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
119128
const protocolConfig = await deploy("Config", {
120129
proxy: {
121130
...PROXY_SETTINGS_WITH_UPGRADE,
122-
// execute: {
123-
// methodName: "initialize",
124-
// args: [
125-
// owner,
126-
// lif.address,
127-
// claimPeriod,
128-
// protocolFee,
129-
// retailerFee,
130-
// owner,
131-
// kindsArr,
132-
// kindsArr.map(() => minDeposit), // same limit for all
133-
// ],
134-
// },
131+
execute: {
132+
methodName: "initialize",
133+
args: [
134+
owner,
135+
lif.address,
136+
claimPeriod,
137+
protocolFee,
138+
retailerFee,
139+
owner,
140+
kindsArr,
141+
kindsArr.map(() => minDeposit), // same limit for all
142+
],
143+
},
135144
},
136145
from: owner,
137146
log: true,
@@ -149,10 +158,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
149158
const entities = await deploy("EntitiesRegistry", {
150159
proxy: {
151160
...PROXY_SETTINGS_WITH_UPGRADE,
152-
// execute: {
153-
// methodName: "initialize",
154-
// args: [owner, protocolConfig.address],
155-
// },
161+
execute: {
162+
methodName: "initialize",
163+
args: [owner, protocolConfig.address],
164+
},
156165
},
157166
from: owner,
158167
log: true,
@@ -170,16 +179,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
170179
const market = await deploy("Market", {
171180
proxy: {
172181
...PROXY_SETTINGS_WITH_UPGRADE,
173-
// execute: {
174-
// methodName: "initialize",
175-
// args: [
176-
// owner,
177-
// eip712name,
178-
// eip712version,
179-
// protocolConfig.address,
180-
// entities.address,
181-
// ],
182-
// },
182+
execute: {
183+
methodName: "initialize",
184+
args: [
185+
owner,
186+
eip712name,
187+
eip712version,
188+
protocolConfig.address,
189+
entities.address,
190+
],
191+
},
183192
},
184193
from: owner,
185194
log: true,

‎deployments/chiado/.chainId

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10200

‎deployments/chiado/Config.json

+679
Large diffs are not rendered by default.

‎deployments/chiado/Config_Implementation.json

+617
Large diffs are not rendered by default.

‎deployments/chiado/Config_Proxy.json

+345
Large diffs are not rendered by default.

‎deployments/chiado/DefaultProxyAdmin.json

+259
Large diffs are not rendered by default.

‎deployments/chiado/EntitiesRegistry.json

+827
Large diffs are not rendered by default.

‎deployments/chiado/EntitiesRegistry_Implementation.json

+962
Large diffs are not rendered by default.

‎deployments/chiado/EntitiesRegistry_Proxy.json

+261
Large diffs are not rendered by default.

‎deployments/chiado/LIF.json

+805
Large diffs are not rendered by default.

‎deployments/chiado/LIF_Implementation.json

+922
Large diffs are not rendered by default.

‎deployments/chiado/LIF_Proxy.json

+261
Large diffs are not rendered by default.

‎deployments/chiado/Market.json

+1,384
Large diffs are not rendered by default.

‎deployments/chiado/Market_Implementation.json

+2,023
Large diffs are not rendered by default.

‎deployments/chiado/Market_Proxy.json

+261
Large diffs are not rendered by default.

‎deployments/chiado/STABLE18.json

+730
Large diffs are not rendered by default.

‎deployments/chiado/STABLE18PERMIT.json

+805
Large diffs are not rendered by default.

‎deployments/chiado/STABLE18PERMIT_Implementation.json

+922
Large diffs are not rendered by default.

‎deployments/chiado/STABLE18PERMIT_Proxy.json

+261
Large diffs are not rendered by default.

‎deployments/chiado/STABLE18_Implementation.json

+742
Large diffs are not rendered by default.

‎deployments/chiado/STABLE18_Proxy.json

+261
Large diffs are not rendered by default.

‎deployments/chiado/STABLE6.json

+730
Large diffs are not rendered by default.

‎deployments/chiado/STABLE6PERMIT.json

+805
Large diffs are not rendered by default.

‎deployments/chiado/STABLE6PERMIT_Implementation.json

+914
Large diffs are not rendered by default.

‎deployments/chiado/STABLE6PERMIT_Proxy.json

+261
Large diffs are not rendered by default.

‎deployments/chiado/STABLE6_Implementation.json

+742
Large diffs are not rendered by default.

‎deployments/chiado/STABLE6_Proxy.json

+261
Large diffs are not rendered by default.

‎deployments/chiado/solcInputs/0e89febeebc7444140de8e67c9067d2c.json

+80
Large diffs are not rendered by default.

‎deployments/chiado/solcInputs/ddba9953259946465ddf1a9195542df6.json

+161
Large diffs are not rendered by default.

‎hardhat.config.ts

+10
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ const config: HardhatUserConfig = {
5454
},
5555
},
5656
},
57+
chiado: {
58+
url: "https://rpc.chiadochain.net",
59+
gasPrice: 1000000000,
60+
accounts: accounts("chiado"),
61+
verify: {
62+
etherscan: {
63+
apiUrl: "https://blockscout.com/gnosis/chiado",
64+
},
65+
},
66+
},
5767
}),
5868
gasReporter: {
5969
currency: "USD",

‎package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@
6969
"build": "hardhat compile",
7070
"package:update": "rm -rf ./package/typechain ./package/artifacts && pnpm build && cp -r ./artifacts ./package/artifacts && cp ./README.md ./package/README.md && pnpm --dir ./package install && pnpm --dir ./package build",
7171
"test": "hardhat test",
72-
"lint": "solhint . && eslint --ext .ts",
73-
"lint:fix": "eslint --ext .ts --fix && solhint --fix . && prettier --check !network --write .",
72+
"lint": "solhint . && eslint --ignore-path ./.lintignore --ext .ts",
73+
"lint:fix": "eslint --ignore-path ./.lintignore --ext .ts --fix && solhint --fix . && prettier --ignore-path ./.lintignore --check !network --write .",
7474
"coverage": "npx hardhat coverage",
7575
"prepare": "husky install",
7676
"commit": "git-cz -S"
77-
},
78-
"packageManager": "yarn@3.6.1"
77+
}
7978
}

‎package/pnpm-lock.yaml

+4,353-1,492
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-lock.yaml

+6,699-2,659
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tsconfig.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
"./hardhat.config.ts",
2727
"./deploy/**/*.ts",
2828
"./tasks/**/*.ts",
29-
"temp/utils/**/*.ts"
30-
, "package/src/hash.ts", "temp/Hash.test.ts", "utils/index.ts", "utils/network.ts", "utils/types.ts" ]
29+
"temp/utils/**/*.ts",
30+
"package/src/hash.ts",
31+
"temp/Hash.test.ts",
32+
"utils/index.ts",
33+
"utils/network.ts",
34+
"utils/types.ts"
35+
]
3136
}

0 commit comments

Comments
 (0)
Please sign in to comment.