Skip to content

Commit

Permalink
taiko deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
tempe-techie committed May 29, 2024
1 parent 0a4af7e commit 0e11616
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 26 deletions.
37 changes: 37 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,20 @@ module.exports = {
gas: "auto", // gas limit
gasPrice: 125000000000, // 125 gwei
},
taiko: { // Taiko mainnet
url: 'https://rpc.taiko.xyz',
chainId: 167000,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
gas: "auto", // gas limit
gasPrice: 20000000, // 0.02 gwei
},
taikoHekla: { // Taiko Hekla testnet (L2)
url: 'https://rpc.hekla.taiko.xyz',
chainId: 167009,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
gas: "auto", // gas limit
gasPrice: 1000000000, // 1 gwei
},
taikoJolnir: { // Taiko Jolnir testnet (L2)
url: 'https://rpc.jolnir.taiko.xyz',
chainId: 167007,
Expand Down Expand Up @@ -273,6 +287,8 @@ module.exports = {
sepolia: process.env.ETHERSCAN_API_KEY,
sokol: "randomstring",
songbird: "randomstring",
taiko: process.env.TAIKOSCAN_API_KEY,
taikoHekla: "42069",
taikoJolnir: "42069",
taikoKatla: "42069",
zkfair: "randomstring"
Expand Down Expand Up @@ -411,6 +427,27 @@ module.exports = {
browserURL: "https://songbird-explorer.flare.network/"
}
},
{
network: "taiko",
chainId: 167000,
urls: {
apiURL: "https://api.w3w.ai/taiko/v1/explorer/command_api/contract",
browserURL: "https://taikoscan.net"
//apiURL: "https://api.routescan.io/v2/network/mainnet/evm/167000/etherscan",
//browserURL: "https://taikoscan.network"
//apiURL: "https://api.taikoscan.io/api",
//browserURL: "https://taikoscan.io"
}
},
{
network: "taikoHekla",
chainId: 167009,
urls: {
//apiURL: "https://api.routescan.io/v2/network/testnet/evm/167009/etherscan",
apiURL: "https://blockscoutapi.hekla.taiko.xyz/api",
browserURL: "https://blockscoutapi.hekla.taiko.xyz/"
}
},
{
network: "taikoJolnir",
chainId: 167007,
Expand Down
6 changes: 3 additions & 3 deletions scripts/launchpad/erc721/4_arguments.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module.exports = [
"0x1EB2Adc19eB3Df26D84427Be11F1eB1887c6631c", // factory address
"0x3Fa0EaC3058828Cc4BA97F51A33597C695bF6F9e", // metadata address
"0x5193877dD31b569Fedf762308aFae70B9091b951", // minting fee receiver address
"NFTdegen Anthem", // collection name
"ANTHEM", // collection symbol
"Fractal Universe", // collection name
"FRACTAL", // collection symbol
"20000000000000000", // minting fee percentage
"6900000000000000000" // ratio
"1000000000000000000000000" // ratio
];
2 changes: 1 addition & 1 deletion scripts/launchpad/erc721/4_verifyNftContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// 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 degen

const contractAddress = "0x09d88b5b33605fD4F072CD105f58F91746DD6F73";
const contractAddress = "0x32cD7BcE5E508A49c791760Fa5006cFF7e0fE888";

async function main() {
console.log("Copy the line below and paste it in your terminal to verify the TLD contract on Etherscan:");
Expand Down
4 changes: 2 additions & 2 deletions scripts/launchpad/erc721/other/calls.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// npx hardhat run scripts/launchpad/erc721/other/calls.js --network zkfair
// npx hardhat run scripts/launchpad/erc721/other/calls.js --network degen

const contractName = "IggyLaunchpad721Bonding";

const apAddress = "0x50045895e1983F39FDC149C9a5AC29C39BEA18fe";
const apAddress = "";

async function main() {
const [caller] = await ethers.getSigners();
Expand Down
84 changes: 84 additions & 0 deletions scripts/launchpad/erc721/other/checkNftData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// npx hardhat run scripts/launchpad/erc721/other/checkNftData.js --network degen

const { ethers } = require("hardhat");

const contractName = "Nft721Bonding";

const contractAddress = "0xA8ba334a61E10afB74D4d7088197d6C9f6002629";
const eoa = "0x8fEaFd5e0FCefdd2624906c0F913D563306aAe17";

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

/*
console.log("Calling functions with the account:", caller.address);
console.log("Account balance:", (await caller.getBalance()).toString());
const contract = await ethers.getContractFactory(contractName);
const instance = await contract.attach(contractAddress);
*/

// check factoryAddress
/*
const factoryAddress = await instance.factoryAddress();
console.log("factoryAddress address:", factoryAddress);
*/

const providerUrl = "https://rpc.degen.tips";
const provider = new ethers.providers.JsonRpcProvider(providerUrl);

const blockNumber = await provider.getBlockNumber();
console.log("blockNumber:", blockNumber);

// get chainId
const chainId = await provider.getNetwork();
console.log("chainId:", chainId);

const nonce = await provider.getTransactionCount(eoa);
console.log("nonce:", nonce);

const pending = await provider.getTransactionCount(eoa, "pending");
console.log("pending:", pending);

const balance = await provider.getBalance(eoa);
// print balance in ether
console.log("balance:", ethers.utils.formatEther(balance));

/*
const intrfc = new ethers.utils.Interface([
"function counter() external view returns (uint256)",
"function highestBid() external view returns (uint256)",
]);
const contract = new ethers.Contract(eoa, intrfc, provider);
const contract2 = new ethers.Contract(contractAddress, intrfc, provider);
// call contract2 function counter
//const counter = await contract2.counter();
//console.log("counter:", counter.toString());
*/

/*
const tokenAddress = "0x2B3006D34359F3C23429167a659b18cC9c6F8bcA";
// read bytecode from contract
const bytecode = await provider.getCode(tokenAddress);
console.log("bytecode:", bytecode);
const tokenInterface = new ethers.utils.Interface([
"function balanceOf(address) external view returns (uint256)",
]);
const tokenContract = new ethers.Contract(tokenAddress, tokenInterface, provider);
const balanceOf = await tokenContract.balanceOf(eoa);
console.log("balanceOf:", ethers.utils.formatUnits(balanceOf, 18));
*/
}

main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
10 changes: 5 additions & 5 deletions scripts/post/IggyPostNft1155/1_metadata.deploy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// 1. Deploy metadata contract
// npx hardhat run scripts/post/IggyPostNft1155/1_metadata.deploy.js --network sepolia
// npx hardhat run scripts/post/IggyPostNft1155/1_metadata.deploy.js --network taiko

const contractName = "IggyPostMetadata";

const mdName = "Iggy Demo Post";
const description = "Iggy Demo is a decentralized chat for the Iggy community. Go visit here: https://demo.iggy.social/";
const url = "https://demo.iggy.social/post/";
const tldAddress = "0x1DD820F4f48eBC2B8e7F666F34fbC5820808074e";
const mdName = "TKO Chat Post";
const description = "TKO Chat is the first decentralized social network on the Taiko network. Go visit here: https://tko.chat/";
const url = "https://tko.chat/post/";
const tldAddress = "0x4087fb91A1fBdef05761C02714335D232a2Bf3a1";

async function main() {
const [deployer] = await ethers.getSigners();
Expand Down
4 changes: 2 additions & 2 deletions scripts/post/IggyPostNft1155/1_metadataStaticColor.deploy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// 1. Deploy metadata contract
// npx hardhat run scripts/post/IggyPostNft1155/1_metadataStaticColor.deploy.js --network arbitrumNova
// npx hardhat run scripts/post/IggyPostNft1155/1_metadataStaticColor.deploy.js --network taikoHekla

const contractName = "IggyPostMetadataStaticColor";

const colorCode = "#ef8220";
const mdName = "Always Liquid Post";
const mdName = "TKO Chat Post";
const description = "Social NFT marketplace where NFTs are always liquid. Go visit here: https://nova.alwaysliquid.com/";
const url = "https://nova.alwaysliquid.com/post/";
const tldAddress = "0x4087fb91A1fBdef05761C02714335D232a2Bf3a1";
Expand Down
10 changes: 5 additions & 5 deletions scripts/post/IggyPostNft1155/2_iggyPostNft1155.deploy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// 2. Deploy NFT contract
// npx hardhat run scripts/post/IggyPostNft1155/2_iggyPostNft1155.deploy.js --network sepolia
// npx hardhat run scripts/post/IggyPostNft1155/2_iggyPostNft1155.deploy.js --network taiko

const contractName = "IggyPostNft1155";

const defaultPrice = ethers.utils.parseEther("0.00006"); // TODO: change price!!!
const metadataAddress = "0xce314209aB485bE222CE85F653Ac918f54532503";
const collectionName = "Iggy Demo Posts";
const collectionSymbol = "IGGYPOST";
const defaultPrice = ethers.utils.parseEther("0.0004"); // TODO: change price!!!
const metadataAddress = "0x633Ae857445cF0cd02B21C6a3033C7CE74fB32c2";
const collectionName = "TKO Chat Posts";
const collectionSymbol = "TKOCHATPOST";

async function main() {
const [deployer] = await ethers.getSigners();
Expand Down
12 changes: 6 additions & 6 deletions scripts/post/IggyPostNft1155/3_minter.deploy.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// 3. Deploy minter contract
// npx hardhat run scripts/post/IggyPostNft1155/3_minter.deploy.js --network sepolia
// npx hardhat run scripts/post/IggyPostNft1155/3_minter.deploy.js --network taiko

const contractName = "IggyPostMinter";

const daoAddress = "0x6771F33Cfd8C6FC0A1766331f715f5d2E1d4E0e2"; // distributor contract
const devAddress = "0x6771F33Cfd8C6FC0A1766331f715f5d2E1d4E0e2"; // iggy address
const postAddress = "0x0BF6333Fc85159663A30Ac89FD02c5031B97c5ee";
const daoAddress = "0xE08033d0bDBcEbE7e619c3aE165E7957Ab577961"; // distributor contract
const devAddress = "0xE08033d0bDBcEbE7e619c3aE165E7957Ab577961"; // iggy address
const postAddress = "0x06A7Ab7Bb68b0ad6eB7688C5781E60BE6AFc658d";

const daoFee = 1000; // 10%
const devFee = 1000; // 10%
const daoFee = 2000; // 10%
const devFee = 0; // 10%
const refFee = 1000; // 10%

const postInterface = new ethers.utils.Interface([
Expand Down
4 changes: 2 additions & 2 deletions scripts/post/IggyPostNft1155/4_stats.deploy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 4. Deploy stats contract
// npx hardhat run scripts/post/IggyPostNft1155/4_stats.deploy.js --network sepolia
// npx hardhat run scripts/post/IggyPostNft1155/4_stats.deploy.js --network taiko

const contractName = "IggyPostStats";

const minterAddress = "0xc486B08Ed47fFe5c1b4b1A2ff5c671EA0083D9bA";
const minterAddress = "0x5e54CebB2612744cB56547bC7CC41466ad7ac557";
const shouldStatsBeEnabled = true;

const minterInterface = new ethers.utils.Interface([
Expand Down

0 comments on commit 0e11616

Please sign in to comment.