Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ PredToken.sol
BEP20.sol
.env
.env.development
.env.production
.env.production
.env.staging
10 changes: 10 additions & 0 deletions .openzeppelin/unknown-56.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
"address": "0x5D83EF52661Baa67c9a7d60BF61b8339622603B6",
"txHash": "0x2f7023960034bb5cef7906cbd3c0f7c1e1eeebf089910d1ff8aa8f5d3ccc92d3",
"kind": "uups"
},
{
"address": "0xDe3a1Ab5a741819d672B3b24Ba2F1154179CF0B1",
"txHash": "0x9069923a4767d2173ac4859ad2e77b3143e52e259b85fd7aec7402a0e9dd3bf2",
"kind": "uups"
},
{
"address": "0xf7D256f46593c4695D11858d8D4089417652A86f",
"txHash": "0x6cd170d93abfa15f7feb4b25d85eae9fbc5e07e69898395c82691dd057b25409",
"kind": "uups"
}
],
"impls": {
Expand Down
31 changes: 0 additions & 31 deletions scripts/deploy.testnet.ts

This file was deleted.

File renamed without changes.
32 changes: 0 additions & 32 deletions scripts/deployPool.ts

This file was deleted.

14 changes: 14 additions & 0 deletions scripts/deployWallet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ethers } from "hardhat"

async function main() {
const predAddress = process.env.PRED_ADDRESS;
const Wallet = await ethers.getContractFactory("PredictionWallet")
await Wallet.deploy(predAddress);
}

main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
13 changes: 5 additions & 8 deletions scripts/deploy.mainnet.ts → scripts/deployWinnerPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ async function main() {
const predAddress = process.env.PRED_ADDRESS;
const operator = process.env.OPERATOR;
const predPerBlock = 3750000000;
const bnbPerBlock = 10000000;

const Wallet = await ethers.getContractFactory("PredictionWallet")
const wallet = await Wallet.deploy(predAddress);
const LoserFarm = await ethers.getContractFactory("LoserPredictionPool");
const wallet = await ethers.getContractAt(
"PredictionWallet",
process.env.WALLET_ADDRESS || "",
);

const WinnerFarm = await ethers.getContractFactory("WinnerPredictionPool");
const loserFarm = await upgrades.deployProxy(LoserFarm, [operator, predAddress, bnbPerBlock, 0, ethers.utils.parseEther("100"), wallet.address,
process.env.PREDICTION_CONTRACT_ADDRESS], {kind: "uups"})
const winnerFarm = await upgrades.deployProxy(WinnerFarm, [operator, predAddress, predPerBlock, 0, ethers.utils.parseEther("100"), wallet.address,
process.env.PREDICTION_CONTRACT_ADDRESS], {kind: "uups"})
await wallet.grantRole(ethers.utils.formatBytes32String("loserPredictionPool"), loserFarm.address);
await wallet.grantRole(ethers.utils.formatBytes32String("winnerPredictionPool"), winnerFarm.address);

console.log(`
LoserPredictionPool deployed to: ${loserFarm.address}
WinnerPrediction Pool deployed to: ${winnerFarm.address}
Wallet deployed to: ${wallet.address}`);
};
Expand Down