Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add peaq support #43

Merged
merged 25 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8972484
feat: define the needed env vars
clauBv23 Feb 16, 2025
f0bf7c0
feat: define needed helper functions
clauBv23 Feb 16, 2025
ac37d74
feat: update the create repo script to get the addresses from the env…
clauBv23 Feb 16, 2025
758e6f2
feat: modify the publish version script to be able to get the needed …
clauBv23 Feb 16, 2025
9588f1f
feat: update the upgrade scripts to be able to get the addresses from…
clauBv23 Feb 16, 2025
472438a
ci: remove not needed log
clauBv23 Feb 16, 2025
3428321
feat: store the plugin repo proxy in the deployments
clauBv23 Feb 16, 2025
633676f
feat: remove the possibility of getting the addresses from commons co…
clauBv23 Feb 17, 2025
4763e4d
feat: add note in the env example files
clauBv23 Feb 17, 2025
8ccf6ca
fix: find repo helper function
clauBv23 Feb 17, 2025
61a2341
fix: remove not needed logs
clauBv23 Feb 17, 2025
a7abfed
feat: define the needed env vars in the workflow
clauBv23 Feb 18, 2025
3e97a65
ci: add comments to the env variables to explain why and when they ar…
clauBv23 Feb 18, 2025
c413eab
add peaq support
Rekard0 Feb 18, 2025
f8522d2
use try in publish skip
Rekard0 Feb 18, 2025
d04a3f0
add peaq rpc
Rekard0 Feb 19, 2025
b6890a3
Merge branch 'main' into feat/add-peaq-support
Rekard0 Feb 19, 2025
6664610
Backporting env var settings from the Multisig PR
brickpop Feb 26, 2025
98042c9
Minor edit
brickpop Feb 26, 2025
0b7b952
Updated verify network details
brickpop Feb 26, 2025
1dd8d16
remove comment
Rekard0 Feb 26, 2025
2d33697
Increasing the timeout of tests
brickpop Feb 26, 2025
556a8ad
Merge remote-tracking branch 'origin/feat/add-peaq-support' into feat…
brickpop Feb 26, 2025
ed7baf2
fix subdomain
Rekard0 Feb 26, 2025
65556cd
Update packages/contracts/deploy/20_new_version/23_publish.ts
Rekard0 Feb 26, 2025
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
28 changes: 16 additions & 12 deletions packages/contracts/deploy/20_new_version/23_publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,20 +254,24 @@ func.skip = async (hre: HardhatRuntimeEnvironment) => {
throw `PluginRepo '${pluginEnsDomain(hre)}' does not exist yet.`;
}

const pastVersions = await getPastVersionCreatedEvents(pluginRepo);
try {
const pastVersions = await getPastVersionCreatedEvents(pluginRepo);

// Check if the version was published already
const filteredLogs = pastVersions.filter(
items =>
items.event.args.release === VERSION.release &&
items.event.args.build === VERSION.build
);

if (filteredLogs.length !== 0) {
console.log(
`Build number ${VERSION.build} has already been published for release ${VERSION.release}. Skipping publication...`
// Check if the version was published already
const filteredLogs = pastVersions.filter(
items =>
items.event.args.release === VERSION.release &&
items.event.args.build === VERSION.build
);
return true;

if (filteredLogs.length !== 0) {
console.log(
`Build number ${VERSION.build} has already been published for release ${VERSION.release}. Skipping publication...`
);
return true;
}
} catch (error) {
console.log(`Error in geting previouse version ${error}.`);
}

return false;
Expand Down
36 changes: 35 additions & 1 deletion packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,18 @@ function getHardhatNetworkAccountsConfig(
}

// Add the accounts specified in the `.env` file to the networks from osx-commons-configs
const networks: {[index: string]: NetworkUserConfig} = osxCommonsConfigNetworks;
const networks: {[index: string]: NetworkUserConfig} = {
...osxCommonsConfigNetworks,
agungTestnet: {
url: 'https://wss-async.agung.peaq.network',
chainId: 9990,
gasPrice: 25000000000,
},
peaq: {
url: 'https://erpc-mpfn1.peaq.network',
chainId: 3338,
},
};
for (const network of Object.keys(networks) as SupportedNetworks[]) {
networks[network].accounts = specifiedAccounts();
}
Expand Down Expand Up @@ -117,6 +128,10 @@ const config: HardhatUserConfig = {
namedAccounts,
networks: {
hardhat: {
forking: {
url: 'https://mpfn1.peaq.network',
blockNumber: 3936303,
},
throwOnTransactionFailures: true,
throwOnCallFailures: true,
blockGasLimit: BigNumber.from(10).pow(6).mul(30).toNumber(), // 30 million, really high to test some things that are only possible with a higher block gas limit
Expand All @@ -136,6 +151,8 @@ const config: HardhatUserConfig = {
polygon: process.env.POLYGONSCAN_API_KEY || '',
base: process.env.BASESCAN_API_KEY || '',
arbitrumOne: process.env.ARBISCAN_API_KEY || '',
peaq: process.env.PEAQ_KEY || '',
agungTestnet: process.env.PEAQ_KEY || '',
},
customChains: [
{
Expand All @@ -154,6 +171,23 @@ const config: HardhatUserConfig = {
browserURL: 'https://basescan.org',
},
},
{
network: 'agungTestnet', // Peaq testnet
chainId: 9990,
urls: {
apiURL:
'https://agung-testnet.subscan.io/api/scan/evm/contract/verify',
browserURL: 'https://agung-testnet.subscan.io/',
},
},
{
network: 'peaq', // Peaq mainnet
chainId: 3338,
urls: {
apiURL: '',
browserURL: 'https://peaq.subscan.io/',
},
},
],
},

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/plugin-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const PLUGIN_CONTRACT_NAME = 'Admin';
export const PLUGIN_SETUP_CONTRACT_NAME = isZkSync(hre.network.name)
? 'AdminSetupZkSync'
: 'AdminSetup';
export const PLUGIN_REPO_ENS_SUBDOMAIN_NAME = 'admin'; // 'admin.plugin.dao.eth'
export const PLUGIN_REPO_ENS_SUBDOMAIN_NAME = 'admin-test2'; // 'admin.plugin.dao.eth'

// Specify the version of your plugin that you are currently working on. The first version is v1.1.
// For more details, visit https://devs.aragon.org/docs/osx/how-it-works/framework/plugin-management/plugin-repo.
Expand Down
Loading