Skip to content

Commit 31c997c

Browse files
committed
feat: 🎸 Added testing STABLE** tokens deployment information
1 parent d90e784 commit 31c997c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+7929
-342
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: 'triage needed'
6-
assignees: ''
4+
title: ""
5+
labels: "triage needed"
6+
assignees: ""
77
---
88

99
**⚠️ CAUTION: Any issue related to trading / price / not related with the code directly within this repository will be closed without comment**

.github/ISSUE_TEMPLATE/feature_request.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: 'triage needed'
6-
assignees: ''
4+
title: ""
5+
labels: "triage needed"
6+
assignees: ""
77
---
88

99
**⚠️ CAUTION: Any issue related to trading / price / not related with the code directly within this repository will be closed without comment**

.solcover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
skipFiles: ['test'],
2+
skipFiles: ["test"],
33
};

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ The WindingTree market protocol smart contracts and utilities
1212
- Config ([0x098b1d12cAfE7315C77b6d308A62ce02806260Ee](https://explorer.public.zkevm-test.net/address/0x098b1d12cAfE7315C77b6d308A62ce02806260Ee/read-proxy#address-tabs)): the protocol configuration smart contract
1313
- EntitiesRegistry ([0x4bB51528C83844b509E1152EEb05260eE1bf60e6](https://explorer.public.zkevm-test.net/address/0x4bB51528C83844b509E1152EEb05260eE1bf60e6/read-proxy#address-tabs)): the protocol identity management
1414
- Market ([0xDd5B6ffB3585E109ECddec5293e31cdc1e9DeD57](https://explorer.public.zkevm-test.net/address/0xDd5B6ffB3585E109ECddec5293e31cdc1e9DeD57/read-proxy#address-tabs)): the protocol entry point
15-
- LIF ([0xba515AB7FfDa899a2e6c8FDbcDf351c8c15f4009](https://explorer.public.zkevm-test.net/address/0xba515AB7FfDa899a2e6c8FDbcDf351c8c15f4009/read-proxy#address-tabs)): Test version of LIF token
15+
- LIF ([0x4d60F4483BaA654CdAF1c5734D9E6B16735efCF8](https://explorer.public.zkevm-test.net/address/0x4d60F4483BaA654CdAF1c5734D9E6B16735efCF8/read-proxy#address-tabs)): Test version of LIF token
16+
17+
#### Testing tokens
18+
19+
- `STABLE6`: [ERC20, 6 decimals, no permit](https://explorer.public.zkevm-test.net/address/0x8CB96383609C56af1Fe44DB7591F94AEE2fa43b2/read-proxy#address-tabs)
20+
- `STABLE6PERMIT`: [ERC20, 6 decimals, with permit](https://explorer.public.zkevm-test.net/address/0x4556d5C1486d799f67FA96c84F1d0552486CAAF4/read-proxy#address-tabs)
21+
- `STABLE18`: [ERC20, 18 decimals, no permit](https://explorer.public.zkevm-test.net/address/0x4EcB659060Da61D795D777bb21BAe3599b301C66/read-proxy#address-tabs)
22+
- `STABLE18PERMIT`: [ERC20, 18 decimals, with permit](https://explorer.public.zkevm-test.net/address/0xF54784206A53EF19fd3024D8cdc7A6251A4A0d67/read-proxy#address-tabs)
1623

1724
## Install package
1825

contracts/test/MockERC20Dec18.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.13;
2+
pragma solidity ^0.8.19;
33

44
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
55
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";

contracts/test/MockERC20Dec18Permit.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.13;
2+
pragma solidity ^0.8.19;
33

44
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol";
55
import "./MockERC20Dec18.sol";

contracts/test/MockERC20Dec6.sol

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.19;
3+
4+
import "./MockERC20Dec18.sol";
5+
6+
/// @custom:security-contact [email protected]
7+
contract MockERC20Dec6 is MockERC20Dec18 {
8+
function decimals() public pure override returns (uint8) {
9+
return 6;
10+
}
11+
}
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.19;
3+
4+
import "./MockERC20Dec18Permit.sol";
5+
6+
/// @custom:security-contact [email protected]
7+
contract MockERC20Dec6Permit is MockERC20Dec18Permit {
8+
function decimals() public pure override returns (uint8) {
9+
return 6;
10+
}
11+
}

deploy/001.ts

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable @typescript-eslint/unbound-method */
2-
import { HardhatRuntimeEnvironment } from 'hardhat/types';
3-
import { DeployFunction } from 'hardhat-deploy/types';
2+
import { HardhatRuntimeEnvironment } from "hardhat/types";
3+
import { DeployFunction } from "hardhat-deploy/types";
44
import {
55
kindsArr,
66
eip712name,
@@ -9,12 +9,12 @@ import {
99
protocolFee,
1010
retailerFee,
1111
minDeposit,
12-
} from '../utils/constants';
12+
} from "../utils/constants";
1313

1414
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
1515
const { network, deployments, getNamedAccounts } = hre;
1616

17-
if (!['hardhat', 'localhost'].includes(network.name)) {
17+
if (!["hardhat", "localhost"].includes(network.name)) {
1818
return;
1919
}
2020

@@ -23,16 +23,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
2323

2424
const PROXY_SETTINGS_WITH_UPGRADE = {
2525
owner,
26-
proxyContract: 'OpenZeppelinTransparentProxy',
26+
proxyContract: "OpenZeppelinTransparentProxy",
2727
};
2828

2929
// Simple ERC20 token
30-
const erc20 = await deploy('MockERC20Dec18', {
30+
const erc20 = await deploy("MockERC20Dec18", {
3131
proxy: {
3232
...PROXY_SETTINGS_WITH_UPGRADE,
3333
execute: {
34-
methodName: 'initialize',
35-
args: ['STABLE', 'STABLE', owner],
34+
methodName: "initialize",
35+
args: ["STABLE", "STABLE", owner],
3636
},
3737
},
3838
from: owner,
@@ -43,17 +43,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
4343
if (erc20.newlyDeployed) {
4444
console.log(
4545
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
46-
`MockERC20Dec18 (erc20) was deployed at: ${erc20.address} using ${erc20.receipt?.gasUsed} gas`,
46+
`MockERC20Dec18 (erc20) was deployed at: ${erc20.address} using ${erc20.receipt?.gasUsed} gas`
4747
);
4848
}
4949

5050
// ERC20 token with permit
51-
const lif = await deploy('MockERC20Dec18Permit', {
51+
const lif = await deploy("MockERC20Dec18Permit", {
5252
proxy: {
5353
...PROXY_SETTINGS_WITH_UPGRADE,
5454
execute: {
55-
methodName: 'initialize',
56-
args: ['LifToken', 'LIF', owner],
55+
methodName: "initialize",
56+
args: ["LifToken", "LIF", owner],
5757
},
5858
},
5959
from: owner,
@@ -64,16 +64,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
6464
if (lif.newlyDeployed) {
6565
console.log(
6666
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
67-
`MockERC20Dec18Permit (lif) was deployed at: ${lif.address} using ${lif.receipt?.gasUsed} gas`,
67+
`MockERC20Dec18Permit (lif) was deployed at: ${lif.address} using ${lif.receipt?.gasUsed} gas`
6868
);
6969
}
7070

7171
// Protocol Config
72-
const protocolConfig = await deploy('Config', {
72+
const protocolConfig = await deploy("Config", {
7373
proxy: {
7474
...PROXY_SETTINGS_WITH_UPGRADE,
7575
execute: {
76-
methodName: 'initialize',
76+
methodName: "initialize",
7777
args: [
7878
owner,
7979
lif.address,
@@ -94,16 +94,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
9494
if (protocolConfig.newlyDeployed) {
9595
console.log(
9696
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
97-
`Config was deployed at: ${protocolConfig.address} using ${protocolConfig.receipt?.gasUsed} gas`,
97+
`Config was deployed at: ${protocolConfig.address} using ${protocolConfig.receipt?.gasUsed} gas`
9898
);
9999
}
100100

101101
// EntitiesRegistry
102-
const entities = await deploy('EntitiesRegistry', {
102+
const entities = await deploy("EntitiesRegistry", {
103103
proxy: {
104104
...PROXY_SETTINGS_WITH_UPGRADE,
105105
execute: {
106-
methodName: 'initialize',
106+
methodName: "initialize",
107107
args: [owner, protocolConfig.address],
108108
},
109109
},
@@ -115,16 +115,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
115115
if (entities.newlyDeployed) {
116116
console.log(
117117
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
118-
`EntitiesRegistry was deployed at: ${entities.address} using ${entities.receipt?.gasUsed} gas`,
118+
`EntitiesRegistry was deployed at: ${entities.address} using ${entities.receipt?.gasUsed} gas`
119119
);
120120
}
121121

122122
// Market
123-
const market = await deploy('Market', {
123+
const market = await deploy("Market", {
124124
proxy: {
125125
...PROXY_SETTINGS_WITH_UPGRADE,
126126
execute: {
127-
methodName: 'initialize',
127+
methodName: "initialize",
128128
args: [
129129
owner,
130130
eip712name,
@@ -142,10 +142,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
142142
if (market.newlyDeployed) {
143143
console.log(
144144
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
145-
`Market was deployed at: ${market.address} using ${market.receipt?.gasUsed} gas`,
145+
`Market was deployed at: ${market.address} using ${market.receipt?.gasUsed} gas`
146146
);
147147
}
148148
};
149149

150150
export default func;
151-
func.tags = ['MockERC20Dec18', 'MockERC20Dec18Permit', 'Market'];
151+
func.tags = ["MockERC20Dec18", "MockERC20Dec18Permit", "Market"];

0 commit comments

Comments
 (0)