Deployment scripts updated
This commit is contained in:
parent
8310e013f6
commit
55fc45fc73
18
README.md
18
README.md
|
@ -50,19 +50,21 @@
|
|||
|
||||
### V2
|
||||
|
||||
| Testnet | Token Address | P2pix Address | Reputation Address |
|
||||
| ------- | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| Goerli | 0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00 | 0xefa5cE4351cda51192509cf8De7d8881ADAE95DD | 0x939d3c357dc7017cDbDE681BF8e552b54595318A |
|
||||
| Mumbai | 0xC86042E9F2977C62Da8c9dDF7F9c40fde4796A29 | 0xA9258eBb157E4cf5e756b77FDD0DF09C2F73240b | 0x1fd30b94f20d2f73e9630261342ba68f244da92b |
|
||||
| Testnet | Token Address | P2pix Address | Reputation Address | Multicall Address |
|
||||
| ------- | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
|
||||
| Goerli | 0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00 | 0x2414817FF64A114d91eCFA16a834d3fCf69103d4 | 0x2CFD9354Ec7614fEf036EFd6A730dA1d5fC2762A | 0x8FE009992d96A86c7f0Bccdaf1eC3471E302a8a6 |
|
||||
| Mumbai | 0xC86042E9F2977C62Da8c9dDF7F9c40fde4796A29 | 0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00 | 0x570445E3eF413bCDb5De79ed27B1c3840683e385 | 0x718B2C4DE4F9654E1349F610ff561249bfe1c418 |
|
||||
|
||||
<!-- All contracts deployed by 0x8dC06F985C131166570825F52447E8c88d64aE20 -->
|
||||
<!-- https://goerli.etherscan.io/address/0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00#code -->
|
||||
<!-- https://goerli.etherscan.io/address/0xefa5cE4351cda51192509cf8De7d8881ADAE95DD#code -->
|
||||
<!-- https://goerli.etherscan.io/address/0x939d3c357dc7017cDbDE681BF8e552b54595318A#code -->
|
||||
<!-- https://goerli.etherscan.io/address/0x2414817FF64A114d91eCFA16a834d3fCf69103d4#code -->
|
||||
<!-- https://goerli.etherscan.io/address/0x2CFD9354Ec7614fEf036EFd6A730dA1d5fC2762A#code -->
|
||||
<!-- https://goerli.etherscan.io/address/0x8FE009992d96A86c7f0Bccdaf1eC3471E302a8a6#code -->
|
||||
|
||||
<!-- https://mumbai.polygonscan.com/address/0xC86042E9F2977C62Da8c9dDF7F9c40fde4796A29#code -->
|
||||
<!-- https://mumbai.polygonscan.com/address/0xA9258eBb157E4cf5e756b77FDD0DF09C2F73240b#code -->
|
||||
<!-- https://mumbai.polygonscan.com/address/0x1fd30b94f20d2f73e9630261342ba68f244da92b#code -->
|
||||
<!-- https://mumbai.polygonscan.com/address/0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00#code -->
|
||||
<!-- https://mumbai.polygonscan.com/address/0x570445e3ef413bcdb5de79ed27b1c3840683e385#code -->
|
||||
<!-- https://mumbai.polygonscan.com/address/0x718B2C4DE4F9654E1349F610ff561249bfe1c418#code -->
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/666cc6ce6bd689a930692ddaa3c0f679.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/b4d8e73fede96cca1403a1884959873e.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../../../build-info/666cc6ce6bd689a930692ddaa3c0f679.json"
|
||||
"buildInfo": "../../../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../build-info/666cc6ce6bd689a930692ddaa3c0f679.json"
|
||||
"buildInfo": "../../build-info/901b067f80b6616939e558d795c555e5.json"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
|
||||
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
||||
],
|
||||
"p2pix": "0xefa5cE4351cda51192509cf8De7d8881ADAE95DD",
|
||||
"p2pix": "0x2414817FF64A114d91eCFA16a834d3fCf69103d4",
|
||||
"token": "0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00"
|
||||
}
|
||||
}
|
|
@ -3,6 +3,6 @@
|
|||
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
|
||||
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
||||
],
|
||||
"p2pix": "0xA9258eBb157E4cf5e756b77FDD0DF09C2F73240b",
|
||||
"p2pix": "0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00",
|
||||
"token": "0xC86042E9F2977C62Da8c9dDF7F9c40fde4796A29"
|
||||
}
|
||||
}
|
|
@ -26,8 +26,13 @@ const main = async () => {
|
|||
const Reputation = await ethers.getContractFactory(
|
||||
"Reputation",
|
||||
);
|
||||
const Multicall = await ethers.getContractFactory(
|
||||
"Multicall",
|
||||
);
|
||||
const reputation = await Reputation.deploy();
|
||||
await reputation.deployed();
|
||||
const mutlicall = await Multicall.deploy();
|
||||
await mutlicall.deployed();
|
||||
|
||||
const P2PIX = await ethers.getContractFactory("P2PIX");
|
||||
const p2pix = await P2PIX.deploy(
|
||||
|
@ -41,6 +46,8 @@ const main = async () => {
|
|||
|
||||
deploysJson.p2pix = p2pix.address;
|
||||
console.log("🚀 P2PIX Deployed:", p2pix.address);
|
||||
console.log("🌠 Reputation Deployed:", reputation.address);
|
||||
console.log("🛰 Multicall Deployed:", mutlicall.address);
|
||||
await p2pix.deployTransaction.wait(6);
|
||||
|
||||
fs.writeFileSync(
|
||||
|
@ -64,6 +71,10 @@ const main = async () => {
|
|||
address: reputation.address,
|
||||
constructorArguments: [],
|
||||
});
|
||||
await hre.run("verify:verify", {
|
||||
address: mutlicall.address,
|
||||
constructorArguments: [],
|
||||
});
|
||||
};
|
||||
|
||||
main()
|
||||
|
|
|
@ -7,7 +7,6 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
|
|||
import { expect } from "chai";
|
||||
import {
|
||||
BigNumber,
|
||||
Bytes,
|
||||
BytesLike,
|
||||
ContractReceipt,
|
||||
ContractTransaction,
|
||||
|
@ -554,42 +553,6 @@ describe("P2PIX", () => {
|
|||
expect(tx3).to.be.ok;
|
||||
expect(tx4).to.be.ok;
|
||||
|
||||
// await expect(tx)
|
||||
// .to.emit(p2pix, "DepositAdded")
|
||||
// .withArgs(owner.address, erc20.address, price);
|
||||
// await expect(tx).to.changeTokenBalances(
|
||||
// erc20,
|
||||
// [owner.address, p2pix.address],
|
||||
// ["-100000000000000000000", price],
|
||||
// );
|
||||
|
||||
// await expect(tx2)
|
||||
// .to.emit(p2pix, "DepositAdded")
|
||||
// .withArgs(acc01.address, erc20.address, price2);
|
||||
// await expect(tx2).to.changeTokenBalances(
|
||||
// erc20,
|
||||
// [acc01.address, p2pix.address],
|
||||
// ["-200000000000000000000", price2],
|
||||
// );
|
||||
|
||||
// await expect(tx3)
|
||||
// .to.emit(p2pix, "DepositAdded")
|
||||
// .withArgs(acc02.address, erc20.address, price3);
|
||||
// await expect(tx3).to.changeTokenBalances(
|
||||
// erc20,
|
||||
// [acc02.address, p2pix.address],
|
||||
// ["-300000000000000000000", price3],
|
||||
// );
|
||||
|
||||
// await expect(tx4)
|
||||
// .to.emit(p2pix, "DepositAdded")
|
||||
// .withArgs(acc03.address, erc20.address, price4);
|
||||
// await expect(tx4).to.changeTokenBalances(
|
||||
// erc20,
|
||||
// [acc03.address, p2pix.address],
|
||||
// ["-400000000000000000000", price4],
|
||||
// );
|
||||
|
||||
const transactions = [tx, tx2, tx3, tx4];
|
||||
const addresses = [
|
||||
owner.address,
|
||||
|
@ -713,36 +676,7 @@ describe("P2PIX", () => {
|
|||
P2PixErrors.NotEnoughTokens,
|
||||
);
|
||||
});
|
||||
// test invalid since lockID has been replaced by a counter.
|
||||
// it.only("should revert if a non expired lock has the same ID encoded", async () => {
|
||||
// const pTarget = ethers.BigNumber.from(1337);
|
||||
// await erc20.approve(p2pix.address, price);
|
||||
// await p2pix.deposit(
|
||||
// erc20.address,
|
||||
// price,
|
||||
// pTarget,
|
||||
// true,
|
||||
// ethers.constants.HashZero,
|
||||
// );
|
||||
// await p2pix
|
||||
// .connect(acc03)
|
||||
// .lock(
|
||||
// owner.address,
|
||||
// erc20.address,
|
||||
// acc02.address,
|
||||
// acc03.address,
|
||||
// 0, 1, [], []);
|
||||
|
||||
// console.log(await p2pix.callStatic.getValid(owner.address,erc20.address))
|
||||
// const fail = p2pix
|
||||
// .connect(acc03)
|
||||
// .lock(owner.address, erc20.address, acc02.address, acc03.address, 0, 1, [], []);
|
||||
|
||||
// await expect(fail).to.be.revertedWithCustomError(
|
||||
// p2pix,
|
||||
// P2PixErrors.NotExpired,
|
||||
// );
|
||||
// });
|
||||
it("should revert if an invalid allowlist merkleproof is provided", async () => {
|
||||
await erc20.approve(p2pix.address, price);
|
||||
await p2pix.deposit(
|
||||
|
@ -1906,37 +1840,6 @@ describe("P2PIX", () => {
|
|||
expect(acc01Record2).to.eq(6); // 0 + 6
|
||||
expect(acc03Record2).to.eq(185); // 100 + 50 + 25 + 10
|
||||
|
||||
// await expect(tx).to.changeTokenBalances(
|
||||
// erc20,
|
||||
// [
|
||||
// acc01.address,
|
||||
// acc02.address,
|
||||
// acc03.address,
|
||||
// p2pix.address,
|
||||
// ],
|
||||
// [0, 100, 0, "-100"],
|
||||
// );
|
||||
// await expect(tx1).to.changeTokenBalances(
|
||||
// erc20,
|
||||
// [
|
||||
// acc01.address,
|
||||
// acc02.address,
|
||||
// acc03.address,
|
||||
// p2pix.address,
|
||||
// ],
|
||||
// [0, 47, 3, "-50"],
|
||||
// );
|
||||
// await expect(tx2).to.changeTokenBalances(
|
||||
// erc20,
|
||||
// [
|
||||
// acc01.address,
|
||||
// acc02.address,
|
||||
// acc03.address,
|
||||
// p2pix.address,
|
||||
// ],
|
||||
// [0, 20, 5, "-25"],
|
||||
// );
|
||||
|
||||
const addresses = [
|
||||
acc01.address,
|
||||
acc02.address,
|
||||
|
|
Loading…
Reference in New Issue