Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.
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
1 change: 1 addition & 0 deletions dapp/src/components/CheckTx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const explorers: { [chainID: string]: string } = {
"5": "https://goerli.etherscan.io",
"137": "https://polygonscan.com",
"80001": "https://mumbai.polygonscan.com",
"1001": "https://baobab.scope.klaytn.com"
};

interface Props {
Expand Down
10 changes: 6 additions & 4 deletions devops/deploy/01_Deploy_PriceConsumerV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ const DeployPriceConsumer: DeployFunction = async ({
const { deploy, log } = deployments;
const { deployer } = await getNamedAccounts();
const chainId = await getChainId();
let ethUsdPriceFeedAddress;
let priceFeedAddress;
if (chainId == "31337") {
const EthUsdAggregator = await deployments.get("EthUsdAggregator");
ethUsdPriceFeedAddress = EthUsdAggregator.address;
priceFeedAddress = EthUsdAggregator.address;
} else if (chainId === "1001") {
priceFeedAddress = networkConfig[chainId]["linkKlayPriceFeed"]
} else {
const networkConfig = getNetworkFromName(chainId);
ethUsdPriceFeedAddress = networkConfig?.ethUsdPriceFeed;
priceFeedAddress = networkConfig?.ethUsdPriceFeed;
}
// Price Feed Address, values can be obtained at https://docs.chain.link/docs/reference-contracts
// Default one below is ETH/USD contract on Kovan
log("----------------------------------------------------");
const priceConsumerV3 = await deploy("PriceConsumerV3", {
from: deployer,
args: [ethUsdPriceFeedAddress],
args: [priceFeedAddress],
log: true,
});
log("Run Price Feed contract with command:");
Expand Down
9 changes: 9 additions & 0 deletions devops/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const POLYGON_RPC_URL =
const MUMBAI_RPC_URL =
process.env.MUMBAI_RPC_URL ||
"https://polygon-mumbai.g.alchemyapi.io/v2/your-api-key";
const BAOBAB_RPC_URL =
process.env.BAOBAB_RPC_URL || "https://api.baobab.klaytn.net:8651/"
const MNEMONIC = process.env.MNEMONIC || "your mnemonic";
const ETHERSCAN_API_KEY =
process.env.ETHERSCAN_API_KEY || "Your etherscan API key";
Expand Down Expand Up @@ -97,6 +99,13 @@ export default {
mnemonic: MNEMONIC,
},
},
baobab: {
url: BAOBAB_RPC_URL,
accounts: {
mnemonic: MNEMONIC,
},
saveDeployments: true,
},
},
etherscan: {
// Your API key for Etherscan
Expand Down
12 changes: 12 additions & 0 deletions devops/helper-hardhat-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface NetworkConfig {
fundAmount?: string;
linkToken?: string;
ethUsdPriceFeed?: string;
linkKlayPriceFeed?: string;
vrfCoordinator?: string;
oracle?: string;
}
Expand Down Expand Up @@ -86,6 +87,17 @@ export const networkConfig: { [key: string]: NetworkConfig } = {
fee: "100000000000000",
fundAmount: "1000000000000000000",
},
"1001": {
name: "baobab",
linkToken: "0x04c5046A1f4E3fFf094c26dFCAA75eF293932f18",
keyHash: "0x9be50e2346ee6abe000e6d3a34245e1d232c669703efc44660a413854427027c",
linkKlayPriceFeed: "0xf49f81b3d2F2a79b706621FA2D5934136352140c",
oracle: "0xfC3BdAbD8a6A73B40010350E2a61716a21c87610",
jobId: "ca98366cc7314957b8c012c72f05aeeb",
vrfCoordinator: "0x771143FcB645128b07E41D79D82BE707ad8bDa1C",
fee: "100000000000000",
fundAmount: "100000000000000",
}
};

export const developmentChains = ["hardhat", "localhost"];
Expand Down
5 changes: 5 additions & 0 deletions plugins/fund-link/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ const networkConfig: {
linkToken: "0x326C977E6efc84E512bB9C30f76E30c160eD06FB",
fundAmount: "0",
},
"1001": {
name: "baobab",
linkToken: "0x04c5046A1f4E3fFf094c26dFCAA75eF293932f18",
fundAmount: "1000000000000000000",
}
};

export const getNetworkIdFromName = async (networkIdName: string) => {
Expand Down