{"id":30064678,"url":"https://github.com/celo-org/web3-plugin-transaction-types","last_synced_at":"2025-08-08T05:17:32.385Z","repository":{"id":257813520,"uuid":"835165442","full_name":"celo-org/web3-plugin-transaction-types","owner":"celo-org","description":"Fee Abstraction with Web3","archived":false,"fork":false,"pushed_at":"2024-10-30T10:05:03.000Z","size":276,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-29T05:47:07.445Z","etag":null,"topics":["celo","fee-abstraction","plugin","web3js"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/celo-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-29T09:41:14.000Z","updated_at":"2024-10-30T10:05:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f856345-3512-41b5-a13f-0090a93fb538","html_url":"https://github.com/celo-org/web3-plugin-transaction-types","commit_stats":null,"previous_names":["celo-org/web3-plugin-transaction-types"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/celo-org/web3-plugin-transaction-types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fweb3-plugin-transaction-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fweb3-plugin-transaction-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fweb3-plugin-transaction-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fweb3-plugin-transaction-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/celo-org","download_url":"https://codeload.github.com/celo-org/web3-plugin-transaction-types/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celo-org%2Fweb3-plugin-transaction-types/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269367098,"owners_count":24405317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celo","fee-abstraction","plugin","web3js"],"created_at":"2025-08-08T05:17:27.358Z","updated_at":"2025-08-08T05:17:32.321Z","avatar_url":"https://github.com/celo-org.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @celo/web3-plugin-transaction-types\n\n## Installation\n\n```bash\nnpm install --save @celo/web3-plugin-transaction-types web3@4.13.1\n```\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e `web3` is a peer dependency and MUST be installed alongside this library.\n\n## Usage\n\n### Setup\n\n```ts\nimport { Web3 } from \"web3\";\nimport { CeloTransactionTypesPlugin } from \"@celo/web3-plugin-transaction-types\";\n\nconst web3 = new Web3(\"http://127.0.0.1:8545\");\nweb3.registerPlugin(new CeloTransactionTypesPlugin());\n\n// Now `web3.celo` is available and `celo.eth` is celo-aware\n\nconst cEUR = await web3.celo.getCoreContractAddress(\"StableTokenEUR\");\nconst txData = {\n  from: \"0x123...\",\n  to: \"0x456...\",\n  value: 123n,\n  feeCurrency: cEUR, // optional\n};\nawait web3.celo.populateTransaction(txData);\nconst tx = await web3.eth.sendTransaction(txData);\n```\n\n### Utilities\n\n```ts\n// `isValidFeeCurrency`\n// Check if an address is a whitelisted feeCurrency\nconst valid: boolean = await web3.celo.isValidFeeCurrency(\"0x1234...\");\n\n// `getCoreContractAddress`\n// Fetch from the celo Registry contract the address of a given human readable name\nconst cEUR: Address = await web3.celo.getCoreContractAddress(\"StableTokenEUR\");\nconst governance: Address = await web3.celo.getCoreContractAddress(\n  \"Governance\"\n);\n```\n\n### Celo Contract interaction\n\n```bash\nnpm install --save @celo/abis\n```\n\n```ts\nimport { stableTokenEurABI } from \"@celo/abis\";\nimport { CeloContract } from \"@celo/web3-plugin-transaction-types\";\n\nconst cEUR = await web3.celo.getCoreContractAddress(\"StableTokenEUR\");\nconst cEURContract = new CeloContract(stableTokenEurABI, cEUR, web3);\n\nconst to = \"0x123...\";\nconst amount = 123n;\n\nconst tx = await cEURContract.methods.transfer(to, amount).send({\n  from: web3.eth.defaultAccount,\n  feeCurrency: stableAddress, // optional\n});\n\nconst balance = BigInt(\n  await cEURContract.methods.balanceOf(account2.address).call()\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelo-org%2Fweb3-plugin-transaction-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcelo-org%2Fweb3-plugin-transaction-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelo-org%2Fweb3-plugin-transaction-types/lists"}