Skip to content

Commit

Permalink
feat: added getErcTokenInfo() to retrieve detailed token informatio…
Browse files Browse the repository at this point in the history
…n in the ERC Registry project. (#1064)

* dep: installed ethersjs

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: added new schemas

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: prepare items for contract calls requests

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: added contractCallRequest() to send contract call request to MN

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: added `getErcTokenInfo()` to retrieve token information for ERC contracts.

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

---------

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
  • Loading branch information
quiet-node authored Dec 10, 2024
1 parent 32b2b69 commit af82723
Show file tree
Hide file tree
Showing 10 changed files with 650 additions and 46 deletions.
107 changes: 107 additions & 0 deletions tools/erc-repository-indexer/erc-contract-indexer/package-lock.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
"license": "Apache-2.0",
"description": "ERC Contracts Indexer",
"devDependencies": {
"@types/node": "^22.10.1",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.1",
"jest": "^29.7.0",
"ts-jest": "^29.2.5"
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
},
"dependencies": {
"dotenv": "^16.4.5",
"ethers": "^6.13.4",
"sevm": "^0.7.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,21 @@ export interface ERCOutputInterface {
address: string;
contractId: string;
}

export interface ERC20OutputInterface extends ERCOutputInterface {
name: string;
symbol: string;
decimals: number;
totalSupply: number;
}

export interface ERC721OutputInterface extends ERCOutputInterface {
name: string;
symbol: string;
}

export interface ERCTokenInfoSelectors {
type: string;
field: string;
sighash: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ export interface MirrorNodeContractResponse extends MirrorNodeContract {
export interface Links {
next: string | null;
}

export interface ContractCallData {
data: string;
to: string;
}
Loading

0 comments on commit af82723

Please sign in to comment.