Skip to content

Commit

Permalink
deployment and minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tempe-techie committed Mar 12, 2024
1 parent 2c5a5c9 commit 826dc8c
Show file tree
Hide file tree
Showing 10 changed files with 743 additions and 24 deletions.
660 changes: 660 additions & 0 deletions contracts/swap/IggySwapRouterFeeOnTransfer.sol

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/activity-points/activityPoints.deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const contractName = "ActivityPoints";
const statsAddress = "0xabf9960132818049340253C3Ca0551F92Db856d7"; // stats contract
const mintedPostsStatsAddress = "0xF40284a811c82b4B9ab22E94Bb909Df6d2c66C08";
const tldStatsAddress = ethers.constants.AddressZero;
const multiplier = 100000; // 1 wei = 100 points
const multiplier = 1_000_000; // 1 eth = 1M points

async function main() {
const [deployer] = await ethers.getSigners();
Expand Down
2 changes: 1 addition & 1 deletion scripts/activity-points/activityPointsAlt.deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const contractName = "ActivityPointsAlt";
const statsAddress = "0xabf9960132818049340253C3Ca0551F92Db856d7"; // stats contract
const mintedPostsStatsAddress = "0xF40284a811c82b4B9ab22E94Bb909Df6d2c66C08";
const tldAddress = "0x4087fb91A1fBdef05761C02714335D232a2Bf3a1";
const multiplier = 100000; // 1 wei = 1000 points
const multiplier = 1_000_000; // 1 eth = 1M points

async function main() {
const [deployer] = await ethers.getSigners();
Expand Down
2 changes: 1 addition & 1 deletion scripts/launchpad/erc721/3_launchpadBonding.deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const mintingFeeReceiver = "0x0E66249733DDFe422F7A127B0b9E906601F23E06"; // reve
const directoryAddress = "0xD48e9b2D25CEe123be1d01c09645A0a355174db0";
const statsMiddlewareAddress = ethers.constants.AddressZero;
const mintingFeePercentage = ethers.utils.parseEther("0.02");
const price = ethers.utils.parseEther("0.002"); // price for creating a new NFT collection
const price = ethers.utils.parseEther("0.00069"); // price for creating a new NFT collection

async function main() {
const [deployer] = await ethers.getSigners();
Expand Down
12 changes: 6 additions & 6 deletions scripts/launchpad/erc721/4_arguments.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = [
"0x498e0e6B245898c5E2dD0299d0456a8928F58ECC", // factory address
"0x4A82158ff4B0504F3DB4c7555FfB6298452985E2", // metadata address
"0x6771F33Cfd8C6FC0A1766331f715f5d2E1d4E0e2", // minting fee receiver address
"Always Liquid on Polygon", // collection name
"ALPOLY", // collection symbol
"0x072F6683DA7F71b9E52bAC7867488F18058Cb410", // factory address
"0xCF171dD6563Fc6e84EC16c40FB964Dcf0C2e6d05", // metadata address
"0x0E66249733DDFe422F7A127B0b9E906601F23E06", // minting fee receiver address
"Scrolly's Journey", // collection name
"SCROLLYJOURNEY", // collection symbol
"20000000000000000", // minting fee percentage
"100000000000000000" // ratio
"10000000000000000000" // ratio
];
7 changes: 3 additions & 4 deletions scripts/launchpad/erc721/4_verifyNftContract.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// TODO:
// 1. Create the first NFT collection through the factory.
// 2. Verify the contract on block explorer using this script (run the command below).
// Run: npx hardhat run scripts/launchpad/erc721/4_verifyNftContract.js --network polygon
// Run: npx hardhat run scripts/launchpad/erc721/4_verifyNftContract.js --network scroll

const networkName = "polygon";
const contractAddress = "0x73Bf93b294AF8514a7E2dEf4E37877AeaE854a90";
const contractAddress = "0x0E1ABbd03aeCDd832F7baA29E91085b7a8f2dFad";

async function main() {
console.log("Copy the line below and paste it in your terminal to verify the TLD contract on Etherscan:");
console.log("");
console.log("npx hardhat verify --network " + networkName + " --constructor-args scripts/launchpad/erc721/4_arguments.js " + contractAddress);
console.log("npx hardhat verify --network " + network.name + " --constructor-args scripts/launchpad/erc721/4_arguments.js " + contractAddress);
}

main()
Expand Down
2 changes: 1 addition & 1 deletion scripts/stats/1_stats.deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// 1. Deploy LaunchpadStats contract.
// npx hardhat run scripts/stats/1_stats.deploy.js --network arbitrumNova
// npx hardhat run scripts/stats/1_stats.deploy.js --network scroll

const contractName = "Stats";

Expand Down
4 changes: 2 additions & 2 deletions scripts/stats/2_statsMiddleware.deploy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 2. Deploy StatsMiddleware contract.
// npx hardhat run scripts/stats/2_statsMiddleware.deploy.js --network arbitrumNova
// npx hardhat run scripts/stats/2_statsMiddleware.deploy.js --network scroll

const contractName = "StatsMiddleware";

const statsAddress = "0xabf9960132818049340253C3Ca0551F92Db856d7";
const statsAddress = "0x8A6d7926Db502Bb5b9Ffbcc2FF195623f52040C8";

async function main() {
const [deployer] = await ethers.getSigners();
Expand Down
16 changes: 8 additions & 8 deletions scripts/stats/calls.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// npx hardhat run scripts/stats/calls.js --network zkfair
// npx hardhat run scripts/stats/calls.js --network scroll

const statsMiddlewareAddress = "0x3Fa0EaC3058828Cc4BA97F51A33597C695bF6F9e";
const statsMiddlewareAddress = "0xb61bed21a502519bF49DA543f84cEEFe0196dD2b";

async function main() {
const [deployer] = await ethers.getSigners();
Expand All @@ -18,17 +18,17 @@ async function main() {
// create stats contract
const statsContract = await ethers.getContractAt("Stats", statsAddress);

// Check if this address is a writer
const swapAddress = "0xe69FD53b8C0F2F764cFe5929CAb5e213c0328b42";
const isWriter = await statsMiddlewareContract.writers(swapAddress);
// Check if this contract address is a writer
const contractAddr = "0x0E1ABbd03aeCDd832F7baA29E91085b7a8f2dFad";
const isWriter = await statsMiddlewareContract.writers(contractAddr);
console.log("Is writer: ", isWriter);

// Add this address to the Stats middleware contract
/*
/**/
console.log("Adding this address to the stats middleware contract:");
const tx1 = await statsMiddlewareContract.addWriter(swapAddress);
const tx1 = await statsMiddlewareContract.addWriter(contractAddr);
await tx1.wait();
*/


console.log("Done!");

Expand Down
60 changes: 60 additions & 0 deletions scripts/swap/IggySwapRouterFeeOnTransfer.deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// npx hardhat run scripts/swap/IggySwapRouterFeeOnTransfer.deploy.js --network taikoKatla

const contractName = "IggySwapRouterFeeOnTransfer";

const iggyAddress = ""; // mandatory
const routerAddress = ""; // mandatory
const frontendAddress = ethers.constants.AddressZero; // optional
const stakingAddress = ethers.constants.AddressZero; // optional
const statsAddress = ""; // stats middleware address (optional)

const swapFee = 80; // 0.8%
const stakingShare = 4000; // bps
const frontendShare = 4000; // bps

async function main() {
const [deployer] = await ethers.getSigners();

console.log("Deploying contracts with the account:", deployer.address);
console.log("Account balance:", (await deployer.getBalance()).toString());

// deploy contract
const contract = await ethers.getContractFactory(contractName);
const instance = await contract.deploy(
frontendAddress,
iggyAddress,
routerAddress,
stakingAddress,
statsAddress,
swapFee,
stakingShare,
frontendShare
);

await instance.deployed();

console.log(contractName + " contract address:", instance.address);

// add this address to the Stats middleware contract
if (statsAddress != ethers.constants.AddressZero) {
console.log("Adding this address to the stats middleware contract:");
const statsContract = await ethers.getContractFactory("StatsMiddleware");
const statsInstance = await statsContract.attach(statsAddress);
const tx1 = await statsInstance.addWriter(instance.address);
await tx1.wait();
console.log("Done!");
}

console.log("Wait a minute and then run this command to verify contracts on block explorer:");
console.log(
"npx hardhat verify --network " + network.name + " " + instance.address + " " + frontendAddress + " " +
iggyAddress + " " + routerAddress + " " + stakingAddress + " " + statsAddress + ' "' + swapFee + '" "' + stakingShare + '" "' + frontendShare + '"'
);
}

main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});

0 comments on commit 826dc8c

Please sign in to comment.