Skip to content

Commit

Permalink
Merge pull request #54 from windingtree/gnosis-chiado
Browse files Browse the repository at this point in the history
feat: 🎸 Deployment info for Gnosis Chiado chain
  • Loading branch information
kostysh authored Nov 28, 2023
2 parents 47a9dbb + 6b05297 commit 88ae2ed
Show file tree
Hide file tree
Showing 36 changed files with 28,422 additions and 4,189 deletions.
13 changes: 13 additions & 0 deletions .lintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cache
node_modules
.github
.husky
dist
lib
coverage
typedoc
temp
OLD_CODEBASE
deployments
artifacts
typechain
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ The WindingTree market protocol smart contracts and utilities
- `STABLE18`: [ERC20, 18 decimals, no permit](https://explorer.public.zkevm-test.net/address/0x4EcB659060Da61D795D777bb21BAe3599b301C66/read-proxy#address-tabs)
- `STABLE18PERMIT`: [ERC20, 18 decimals, with permit](https://explorer.public.zkevm-test.net/address/0xF54784206A53EF19fd3024D8cdc7A6251A4A0d67/read-proxy#address-tabs)

### Gnosis Chiado

- Config ([0x4556d5C1486d799f67FA96c84F1d0552486CAAF4](https://gnosis-chiado.blockscout.com/address/0x4556d5C1486d799f67FA96c84F1d0552486CAAF4?tab=read_proxy)): the protocol configuration smart contract
- EntitiesRegistry ([0x4EcB659060Da61D795D777bb21BAe3599b301C66](https://gnosis-chiado.blockscout.com/address/0x4EcB659060Da61D795D777bb21BAe3599b301C66?tab=read_proxy)): the protocol identity management
- Market ([0xF54784206A53EF19fd3024D8cdc7A6251A4A0d67](https://gnosis-chiado.blockscout.com/address/0xF54784206A53EF19fd3024D8cdc7A6251A4A0d67?tab=read_proxy)): the protocol entry point
- LIF ([0x8CB96383609C56af1Fe44DB7591F94AEE2fa43b2](https://gnosis-chiado.blockscout.com/address/0x8CB96383609C56af1Fe44DB7591F94AEE2fa43b2?tab=read_proxy)): Test version of LIF token

#### Testing tokens

- `STABLE6`: [ERC20, 6 decimals, no permit](https://gnosis-chiado.blockscout.com/address/0xcC28A4e6DEF318A1b88CF34c4F2Eeb2489995513?tab=read_proxy)
- `STABLE6PERMIT`: [ERC20, 6 decimals, with permit](https://gnosis-chiado.blockscout.com/address/0x78F924A7C70213D502E6110567AC556c2EFBBF73?tab=read_proxy)
- `STABLE18`: [ERC20, 18 decimals, no permit](https://gnosis-chiado.blockscout.com/address/0x7067fC74fFCf4096796454747461D098E6bF7241?tab=read_proxy)
- `STABLE18PERMIT`: [ERC20, 18 decimals, with permit](https://gnosis-chiado.blockscout.com/address/0x44947d69A9F06EF48170BD41Da9B27E74ecd0891?tab=read_proxy)

## Install package

```bash
Expand Down
73 changes: 41 additions & 32 deletions deploy/002.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ import {
DeployOptions,
DeployResult,
} from "hardhat-deploy/types";
import {
kindsArr,
eip712name,
eip712version,
claimPeriod,
protocolFee,
retailerFee,
minDeposit,
} from "../utils";

const setupToken = async (
proxySettings: { owner: string; proxyContract: string },
Expand All @@ -20,10 +29,10 @@ const setupToken = async (
contract: contractName,
proxy: {
...proxySettings,
// execute: {
// methodName: "initialize",
// args: [tokenName, tokenSymbol, owner],
// },
execute: {
methodName: "initialize",
args: [tokenName, tokenSymbol, owner],
},
},
from: owner,
log: true,
Expand All @@ -44,7 +53,7 @@ const setupToken = async (
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { network, deployments, getNamedAccounts } = hre;

if (!["polzktest"].includes(network.name)) {
if (!["polzktest", "chiado"].includes(network.name)) {
return;
}

Expand Down Expand Up @@ -119,19 +128,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const protocolConfig = await deploy("Config", {
proxy: {
...PROXY_SETTINGS_WITH_UPGRADE,
// execute: {
// methodName: "initialize",
// args: [
// owner,
// lif.address,
// claimPeriod,
// protocolFee,
// retailerFee,
// owner,
// kindsArr,
// kindsArr.map(() => minDeposit), // same limit for all
// ],
// },
execute: {
methodName: "initialize",
args: [
owner,
lif.address,
claimPeriod,
protocolFee,
retailerFee,
owner,
kindsArr,
kindsArr.map(() => minDeposit), // same limit for all
],
},
},
from: owner,
log: true,
Expand All @@ -149,10 +158,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const entities = await deploy("EntitiesRegistry", {
proxy: {
...PROXY_SETTINGS_WITH_UPGRADE,
// execute: {
// methodName: "initialize",
// args: [owner, protocolConfig.address],
// },
execute: {
methodName: "initialize",
args: [owner, protocolConfig.address],
},
},
from: owner,
log: true,
Expand All @@ -170,16 +179,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const market = await deploy("Market", {
proxy: {
...PROXY_SETTINGS_WITH_UPGRADE,
// execute: {
// methodName: "initialize",
// args: [
// owner,
// eip712name,
// eip712version,
// protocolConfig.address,
// entities.address,
// ],
// },
execute: {
methodName: "initialize",
args: [
owner,
eip712name,
eip712version,
protocolConfig.address,
entities.address,
],
},
},
from: owner,
log: true,
Expand Down
1 change: 1 addition & 0 deletions deployments/chiado/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10200
Loading

0 comments on commit 88ae2ed

Please sign in to comment.