Skip to content

Commit

Permalink
Version bump @vocdoni/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed May 9, 2024
1 parent 7e460b4 commit 4643c90
Show file tree
Hide file tree
Showing 24 changed files with 16,329 additions and 34 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ packages/subgraph/deploy-output.txt
packages/subgraph/subgraph.yaml
packages/subgraph/tests/.latest.json
packages/subgraph/tests/helpers/extended-schema.ts
packages/contracts/deployments/goerli/solcInputs/af52a48cb67cbd24248d16b22497e373.json
packages/contracts/deployments/goerli/solcInputs/b2279dada67c121f2d874fd99ecb76db.json
packages/contracts/deployments/goerli/solcInputs/e0ca05a4dfd1a72d0c554e34354d2f35.json
packages/contracts/deployments/polygonMumbai/solcInputs/b2279dada67c121f2d874fd99ecb76db.json
packages/contracts/deployments/polygonMumbai/VocdoniVotingSetup.json
packages/contracts/deployments/sepolia/VocdoniVotingSetup.json
packages/contracts/deployments/sepolia/solcInputs/b2279dada67c121f2d874fd99ecb76db.json
.vscode/settings.json
.vscode/settings.json
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"solidity.formatter": "prettier",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"GitHooks.hooksDirectory": "/home/user/Projects/aragon/aragon-offchain-voting-sdk/.git/hooks"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 17 additions & 1 deletion packages/contracts/deploy/01_repo/10_create_repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,29 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
network.name
);

console.log(1);

const pluginRepoFactory = PluginRepoFactory__factory.connect(
pluginRepoFactoryAddr,
deployer
);

console.log(2);

const feeData = await hre.ethers.provider.getFeeData();

// Create the PluginRepo
const tx = await pluginRepoFactory.createPluginRepo(
PLUGIN_REPO_ENS_NAME,
deployer.address
deployer.address,
{
maxFeePerGas: feeData.maxFeePerGas ?? 0,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas ?? 0,
}
);

console.log(3);

const eventLog = await findEventTopicLog(
tx,
PluginRepoRegistry__factory.createInterface(),
Expand All @@ -48,8 +60,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
deployer
);

console.log(4);

const blockNumberOfDeployment = (await tx.wait()).blockNumber;

console.log(5);

console.log(
`"${PLUGIN_REPO_ENS_NAME}" PluginRepo deployed at: ${pluginRepo.address} at block ${blockNumberOfDeployment}.`
);
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/deploy/02_setup/10_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
addresses[1], // GovernanceWrappedERC20
],
log: true,
skipIfAlreadyDeployed: false,
});
};

Expand Down
2 changes: 2 additions & 0 deletions packages/contracts/deploy/02_setup/11_setup_conclude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, network} = hre;

const setupDeployment = await deployments.get(PLUGIN_SETUP_CONTRACT_NAME);
console.log(setupDeployment.address);

const setup = VocdoniVotingSetup__factory.connect(
setupDeployment.address,
deployer
Expand Down
12 changes: 11 additions & 1 deletion packages/contracts/deploy/02_setup/12_publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

// Check release number
const latestRelease = await pluginRepo.latestRelease();
console.log(`latestRelease: ${latestRelease}`);

if (VERSION.release > latestRelease + 1) {
throw Error(
`Publishing with release number ${VERSION.release} is not possible.
Expand All @@ -54,6 +56,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

// Check build number
const latestBuild = (await pluginRepo.buildCount(VERSION.release)).toNumber();
console.log(`latestBuild: ${latestBuild}`);
console.log(`setup address: ${setup.address}`);

if (VERSION.build <= latestBuild) {
throw Error(
`Publishing with build number ${VERSION.build} is not possible.
Expand All @@ -69,12 +74,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
);
}

const feeData = await hre.ethers.provider.getFeeData();
// Create Version
const tx = await pluginRepo.createVersion(
VERSION.release,
setup.address,
toHex(buildMetadataURI),
toHex(releaseMetadataURI)
toHex(releaseMetadataURI),
{
maxFeePerGas: feeData.maxFeePerGas ?? 0,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas ?? 0,
}
);

const blockNumberOfPublication = (await tx.wait()).blockNumber;
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/deployments/polygonMumbai/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
80001
1 change: 1 addition & 0 deletions packages/contracts/deployments/sepolia/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11155111

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export const networks: {[index: string]: NetworkUserConfig} = {
},
sepolia: {
chainId: 11155111,
gasPrice: 100000000,
// gasPrice: 800000000,
// gasPrice: 8628806601
// blockGasLimit: 30000000,
url: `${apiUrls.sepolia}${process.env.INFURA_API_KEY}`,
},
Expand Down
32 changes: 4 additions & 28 deletions packages/contracts/plugin-info-testing.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,9 @@
}
},
"sepolia": {
"repo": "vocdoni-gasless-voting-poc-vanilla-erc20",
"address": "0xb663C36d6fd959beeF2b82Bb40823660FEAaa55f",
"repo": "vocdoni-gasless-voting",
"address": "0x6eE8f07D9F49d073834563A775326C37B4444943",
"args": [],
"blockNumberOfDeployment": 5288754,
"releases": {
"1": {
"builds": {
"1": {
"setup": {
"name": "VocdoniVotingSetup",
"address": "0x5A6E29875cCa6eb7a9c39938720e6096468a8917",
"args": [],
"blockNumberOfDeployment": 5288947
},
"implementation": {
"name": "VocdoniVoting",
"address": "0xa28A89Dcf2A94a751FE094C794624cB101EB460a",
"args": [],
"blockNumberOfDeployment": 5288947
},
"helpers": [],
"buildMetadataURI": "ipfs://QmSH3MLwaKV4SH4r4RdrqFQUoSjk97H2Z4VjMewXvu7yLT",
"blockNumberOfPublication": 5288969
}
},
"releaseMetadataURI": "ipfs://QmcuUcHeFcQe4LhLyXBkLCxU61Asy6nYi1WRYZ6C4Ui42V"
}
}
"blockNumberOfDeployment": 5810344
}
}
}
2 changes: 1 addition & 1 deletion packages/contracts/plugin-settings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import buildMetadata from './src/build-metadata.json';
import releaseMetadata from './src/release-metadata.json';

export const PLUGIN_REPO_ENS_NAME = 'vocdoni-gasless-voting-poc-vanilla-erc20';
export const PLUGIN_REPO_ENS_NAME = 'vocdoni-gasless-voting';
export const PLUGIN_CONTRACT_NAME = 'VocdoniVoting';
export const PLUGIN_SETUP_CONTRACT_NAME = 'VocdoniVotingSetup';

Expand Down
6 changes: 6 additions & 0 deletions packages/contracts/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,14 @@ export async function findEventTopicLog<T>(
iface: Interface,
eventName: string
): Promise<LogDescription & (T | LogDescription)> {
console.log('log0');

const receipt = await tx.wait();
console.log('log1');

const topic = iface.getEventTopic(eventName);
console.log('log2');

const log = receipt.logs.find(x => x.topics[0] === topic);
if (!log) {
throw new Error(`No logs found for the topic of event "${eventName}".`);
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/subgraph/manifest/data/mumbai.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "PluginSetupProcessor",
"address": "0x9227b311C5cecB416707F1C8B7Ca1b52649AabEc",
"startBlock": 33633157
"startBlock": 46457348
}
]
}
Expand Down
20 changes: 20 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"removeComments": true,
"resolveJsonModule": true,
"sourceMap": true,
"strict": true,
"target": "es6"
},
"exclude": ["node_modules"]
}
Binary file added vocdoni-gasless-voting-ethers-v0.0.1-rc2-3.tgz
Binary file not shown.
Binary file added vocdoni-sdk-v0.7.5-census3-2.tgz
Binary file not shown.
Binary file added vocdoni-sdk-v0.7.5-census3.tgz
Binary file not shown.
Loading

0 comments on commit 4643c90

Please sign in to comment.