Skip to content

Commit

Permalink
fixed review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajeetkolhapure committed Nov 15, 2024
1 parent c16d93d commit b497da5
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 62 deletions.
2 changes: 1 addition & 1 deletion sdk/doc/cli-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

pnpm portal isPortalRegistered '{\"portalAddress\":\"0x8b833796869b5debb9b06370d6d47016f0d7973b\"}'

pnpm portal getPortalsCount
pnpm portal getPortalsNumber
```

</details>
Expand Down
4 changes: 4 additions & 0 deletions sdk/examples/portal/portalExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ export default class PortalExamples {
console.log(await this.veraxSdk.portal.getPortalByAddress(portalAddress));
}

if (methodName.toLowerCase() == "getPortalsNumber".toLowerCase() || methodName == "") {
console.log(await this.veraxSdk.portal.getPortalsNumber());
}

if (methodName.toLowerCase() == "isPortalRegistered".toLowerCase() || methodName == "") {
let params;
if (argv !== "") params = JSON.parse(argv);
Expand Down
2 changes: 1 addition & 1 deletion sdk/examples/utils/countUniqueSubjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const fetchSubjectsFromFile = async (fileSuffix: number): Promise<string[]> => {

async function main() {
const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_MAINNET);
const attestationNumber = await veraxSdk.utils.getAttestationIdCounter();
const attestationNumber = await veraxSdk.attestation.getAttestationIdCounter();
const filesNumber = Math.ceil(Number(attestationNumber) / BATCH_SIZE);

const allSubjects: string[][] = [];
Expand Down
2 changes: 1 addition & 1 deletion sdk/examples/utils/getAllAttestations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const fetchAllAttestations = async (batchNumber: number, veraxSdk: VeraxSdk) =>

async function main() {
const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_MAINNET);
const attestationNumber = await veraxSdk.utils.getAttestationIdCounter();
const attestationNumber = await veraxSdk.attestation.getAttestationIdCounter();
const batchesNumber = Math.ceil(Number(attestationNumber) / BATCH_SIZE);

console.log(`Creating ${batchesNumber} batches of ${BATCH_SIZE} items to get all ${attestationNumber} attestations.`);
Expand Down
5 changes: 0 additions & 5 deletions sdk/examples/utils/getAttestationIdCounter.ts

This file was deleted.

5 changes: 0 additions & 5 deletions sdk/examples/utils/getModulesNumber.ts

This file was deleted.

5 changes: 0 additions & 5 deletions sdk/examples/utils/getPortalsCount.ts

This file was deleted.

5 changes: 0 additions & 5 deletions sdk/examples/utils/getSchemasNumber.ts

This file was deleted.

13 changes: 0 additions & 13 deletions subgraph/abis/ModuleRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getModulesNumber",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
Expand Down
13 changes: 0 additions & 13 deletions subgraph/abis/PortalRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,19 +234,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPortalsCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
Expand Down
13 changes: 0 additions & 13 deletions subgraph/abis/SchemaRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getSchemasNumber",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
Expand Down

0 comments on commit b497da5

Please sign in to comment.