Skip to content

Commit

Permalink
Merge pull request #235 from OriginTrail/fix/cme
Browse files Browse the repository at this point in the history
Removed indexed args from CommitManagerV2, redeployed CommitManagerV2…
  • Loading branch information
0xbraindevd authored Feb 12, 2024
2 parents 258f011 + 6e1ec3d commit 27dd74e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
6 changes: 3 additions & 3 deletions abi/CommitManagerV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,13 @@
"anonymous": false,
"inputs": [
{
"indexed": true,
"indexed": false,
"internalType": "address",
"name": "assetContract",
"type": "address"
},
{
"indexed": true,
"indexed": false,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
Expand All @@ -452,7 +452,7 @@
"type": "uint16"
},
{
"indexed": true,
"indexed": false,
"internalType": "uint72",
"name": "identityId",
"type": "uint72"
Expand Down
6 changes: 3 additions & 3 deletions contracts/v2/CommitManagerV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import {ServiceAgreementErrorsV2} from "./errors/ServiceAgreementErrorsV2.sol";

contract CommitManagerV2 is Named, Versioned, ContractStatus, Initializable {
event CommitSubmitted(
address indexed assetContract,
uint256 indexed tokenId,
address assetContract,
uint256 tokenId,
bytes keyword,
uint8 hashFunctionId,
uint16 epoch,
uint72 indexed identityId,
uint72 identityId,
uint40 score
);

Expand Down
7 changes: 4 additions & 3 deletions deployments/gnosis_chiado_test_contracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,12 @@
"deployed": true
},
"CommitManagerV1": {
"evmAddress": "0xc936B57e7f45cbC1Dde0802037F51FCDf7E40Dab",
"evmAddress": "0x1869a2155c1F5f7AfE5ac2C27595c04AA250D0B7",
"version": "2.0.0",
"gitBranch": "main",
"gitCommitHash": "06afb8b08c1f5afb779d1c89157021bc70f2fe98",
"deploymentTimestamp": 1707489017673,
"gitCommitHash": "4ae423f802d917c185c9ad846d6cc0f0c1af4513",
"deploymentBlock": 8197803,
"deploymentTimestamp": 1707731717431,
"deployed": true
},
"CommitManagerV1U1": {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dkg-evm-module",
"version": "4.2.3",
"version": "4.2.4",
"description": "Smart contracts for OriginTrail V6",
"main": "index.ts",
"files": [
Expand Down
7 changes: 5 additions & 2 deletions utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type ContractDeployments = {
version: string;
gitBranch: string;
gitCommitHash: string;
deploymentBlock: number;
deploymentTimestamp: number;
deployed: boolean;
};
Expand Down Expand Up @@ -211,7 +212,8 @@ export class Helpers {
this.contractsForReinitialization.push(newContract.address);
}

await this.updateDeploymentsJson(nameInHub, newContract.address);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
await this.updateDeploymentsJson(nameInHub, newContract.address, newContract.receipt!.blockNumber);

return await this.hre.ethers.getContractAt(this.getAbi(newContractName), newContract.address, deployer);
}
Expand Down Expand Up @@ -316,7 +318,7 @@ export class Helpers {
this.contractDeployments = { contracts: {} };
}

public async updateDeploymentsJson(newContractName: string, newContractAddress: string) {
public async updateDeploymentsJson(newContractName: string, newContractAddress: string, deploymentBlock: number) {
const contractABI = this.getAbi(newContractName);
const isVersionedContract = contractABI.some(
(abiEntry) => abiEntry.type === 'function' && abiEntry.name === 'version',
Expand All @@ -337,6 +339,7 @@ export class Helpers {
version: contractVersion,
gitBranch: this.getCurrentGitBranch(),
gitCommitHash: this.getCurrentGitCommitHash(),
deploymentBlock: deploymentBlock,
deploymentTimestamp: Date.now(),
deployed: true,
};
Expand Down

0 comments on commit 27dd74e

Please sign in to comment.