Skip to content

Commit

Permalink
add support for peaq
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekard0 committed Dec 18, 2024
1 parent 89aeb96 commit 22aed93
Show file tree
Hide file tree
Showing 10 changed files with 224 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {network} = hre;

hre.placeholderBuildCIDPath = await uploadToIPFS(
hre.placeholderBuildCIDPath = 'CID//';
/*
await uploadToIPFS(
JSON.stringify(placeholderBuildMetadata),
network.name
);
*/
};

export default func;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {network} = hre;

const addresslistReleaseCIDPath = await uploadToIPFS(
const addresslistReleaseCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(addresslistReleaseMetadata),
network.name
);
const addresslistBuildCIDPath = await uploadToIPFS(
*/
const addresslistBuildCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(addresslistBuildMetadata),
network.name
);
);*/

const addresslistVotingSetupContract = await getContractAddress(
'AddresslistVotingSetup',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {network} = hre;

const tokenVotingReleaseCIDPath = await uploadToIPFS(
const tokenVotingReleaseCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(tokenVotingReleaseMetadata),
network.name
);
const tokenVotingBuildCIDPath = await uploadToIPFS(
);*/
const tokenVotingBuildCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(tokenVotingBuildMetadata),
network.name
);
);*/

const tokenVotingSetupContract = await getTokenVotingSetupAddress(hre);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {network} = hre;

const adminReleaseCIDPath = await uploadToIPFS(
const adminReleaseCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(adminReleaseMetadata),
network.name
);
const adminBuildCIDPath = await uploadToIPFS(
);*/
const adminBuildCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(adminBuildMetadata),
network.name
);
);*/

const adminSetupContract = await getContractAddress('AdminSetup', hre);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

const {network} = hre;

const multisigReleaseCIDPath = await uploadToIPFS(
const multisigReleaseCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(multisigReleaseMetadata),
network.name
);
const multisigBuildCIDPath = await uploadToIPFS(
);*/
const multisigBuildCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(multisigBuildMetadata),
network.name
);
);*/

const multisigSetupContract = await getContractAddress('MultisigSetup', hre);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
managingDAOAddress,
deployer
);
const metadataCIDPath = await uploadToIPFS(
const metadataCIDPath = 'CID//';
/*await uploadToIPFS(
JSON.stringify(MANAGING_DAO_METADATA),
network.name
);
);*/

const hasMetadataPermission = await managingDaoContract.hasPermission(
managingDaoContract.address,
Expand Down
22 changes: 20 additions & 2 deletions packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ const config: HardhatUserConfig = {
networks: {
hardhat: {
forking: {
url: 'https://linea-mainnet.g.alchemy.com/v2/FWqy_q0diVe4Nwb7_tOwxRLgjI3rBLFT',
blockNumber: 12640744,
url: 'https://mpfn1.peaq.network',
blockNumber: 3110000,
},
},
// hardhat: {
Expand Down Expand Up @@ -212,6 +212,8 @@ const config: HardhatUserConfig = {
},
etherscan: {
apiKey: {
peaq: process.env.PEAQ_KEY || '',
agungTestnet: process.env.PEAQ_KEY || '',
lineaSepolia: process.env.LINEASCAN_KEY || '',
linea: process.env.LINEASCAN_KEY || '',
modeTestnet: 'modeTestnet',
Expand Down Expand Up @@ -305,6 +307,22 @@ const config: HardhatUserConfig = {
browserURL: 'https://lineascan.build',
},
},
{
network: 'agungTestnet',
chainId: networks.agungTestnet.chainId,
urls: {
apiURL: 'agung-testnet.api.subscan.io',
browserURL: 'https://agung-testnet.subscan.io/',
},
},
{
network: 'peaq',
chainId: networks.peaq.chainId,
urls: {
apiURL: 'peaq.api.subscan.io',
browserURL: 'https://peaq.subscan.io/',
},
},
],
},
namedAccounts: {
Expand Down
14 changes: 14 additions & 0 deletions packages/contracts/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,19 @@
"isTestnet": true,
"chainId": 421614,
"deploy": ["./deploy/new", "./deploy/verification"]
},
"agungTestnet": {
"url": "https://wss-async.agung.peaq.network",
"chainId": 9990,
"deploy": ["./deploy/new", "./deploy/verification"],
"timeout": 300000,
"gasPrice": 30000000000
},
"peaq": {
"url": "https://erpc-mpfn1.peaq.network",
"chainId": 3338,
"deploy": ["./deploy/new", "./deploy/verification"],
"timeout": 300000,
"gasPrice": 30000000000
}
}
2 changes: 1 addition & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"eslint-plugin-promise": "^5.1.1",
"ethereumjs-util": "^7.1.4",
"ethers": "^5.7.2",
"hardhat": "^2.12.4",
"hardhat": "^2.18.1",
"hardhat-deploy": "0.12.4",
"hardhat-gas-reporter": "^1.0.4",
"ipfs-http-client": "51.0.0",
Expand Down
Loading

0 comments on commit 22aed93

Please sign in to comment.