Skip to content

Commit

Permalink
Create contractAddresses.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Oct 31, 2024
1 parent 67077d0 commit a328327
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions blockchain_integration/pi_network/config/contractAddresses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// config/contractAddresses.js

const contractAddresses = {
mainnet: {
Token: "0xYourMainnetTokenAddress",
InvestmentPortfolio: "0xYourMainnetInvestmentPortfolioAddress",
},
ropsten: {
Token: "0xYourRopstenTokenAddress",
InvestmentPortfolio: "0xYourRopstenInvestmentPortfolioAddress",
},
rinkeby: {
Token: "0xYourRinkebyTokenAddress",
InvestmentPortfolio: "0xYourRinkebyInvestmentPortfolioAddress",
},
kovan: {
Token: "0xYourKovanTokenAddress",
InvestmentPortfolio: "0xYourKovanInvestmentPortfolioAddress",
},
localhost: {
Token: "0xYourLocalhostTokenAddress",
InvestmentPortfolio: "0xYourLocalhostInvestmentPortfolioAddress",
},
};

const getContractAddress = (network, contractName) => {
return contractAddresses[network]?.[contractName] || null;
};

module.exports = {
contractAddresses,
getContractAddress,
};

0 comments on commit a328327

Please sign in to comment.