{"_id":"@anirudhtx/aave-address-book","_rev":"3-31100859084059f19a0febb0c056ed20","name":"@anirudhtx/aave-address-book","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@anirudhtx/aave-address-book","version":"1.0.0","description":"This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.","directories":{"lib":"lib"},"private":false,"main":"./dist/AaveAddressBook.js","types":"./dist/AaveAddressBook.d.ts","sideEffects":false,"scripts":{"prettier":"prettier --write 'src/**/*.{sol,ts}'","generate":"ts-node scripts/generator.ts && npm run prettier","build:js":"tsc --project tsconfig.json --outDir dist","ci:publish":"npm run build:js && npm publish --access=public"},"repository":{"type":"git","url":"git+https://github.com/bgd-labs/aave-address-book.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/anihamde/aave-address-book/issues"},"homepage":"https://github.com/anihamde/aave-address-book#readme","devDependencies":{"@types/node":"^18.11.18","@types/prettier":"^2.7.2","ethers":"^5.7.2","prettier":"^2.8.3","prettier-plugin-solidity":"^1.1.1","ts-node":"^10.9.1","typescript":"^4.9.4"},"gitHead":"f978994a6e8c060ef675e105dab1b9a463b9c57e","_id":"@anirudhtx/aave-address-book@1.0.0","_nodeVersion":"18.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-vamoCeWTaFo8bnL5fPS0f4k+lRspTfI/CqsWWdHDogEae0MaUjjE1suO3NJZjM/aNx90Gn9sgxbF7IIAXT3sMQ==","shasum":"734e27d825ed23bcfae3ba351c22bdff0a9a204f","tarball":"https://registry.npmjs.org/@anirudhtx/aave-address-book/-/aave-address-book-1.0.0.tgz","fileCount":74,"unpackedSize":523695,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICiuKRS46/ikqnhoJj3676kYW4IgNPfQOFoNYW6FrXorAiBmMEQ5/WckCDa8ilnImuFMkjQELf465kA3moz2+2Jxww=="}]},"_npmUser":{"name":"anirudhtx","email":"anirudhtx@gmail.com"},"maintainers":[{"name":"anirudhtx","email":"anirudhtx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aave-address-book_1.0.0_1684245510556_0.2364438538099396"},"_hasShrinkwrap":false},"1.0.1":{"name":"@anirudhtx/aave-address-book","version":"1.0.1","description":"This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.","directories":{"lib":"lib"},"private":false,"main":"./dist/AaveAddressBook.js","types":"./dist/AaveAddressBook.d.ts","sideEffects":false,"scripts":{"prettier":"prettier --write 'src/**/*.{sol,ts}'","generate":"ts-node scripts/generator.ts && npm run prettier","build:js":"tsc --project tsconfig.json --outDir dist","ci:publish":"npm run build:js && npm publish --access=public"},"repository":{"type":"git","url":"git+https://github.com/bgd-labs/aave-address-book.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/anihamde/aave-address-book/issues"},"homepage":"https://github.com/anihamde/aave-address-book#readme","devDependencies":{"@types/node":"^18.11.18","@types/prettier":"^2.7.2","ethers":"^5.7.2","prettier":"^2.8.3","prettier-plugin-solidity":"^1.1.1","ts-node":"^10.9.1","typescript":"^4.9.4"},"gitHead":"f978994a6e8c060ef675e105dab1b9a463b9c57e","_id":"@anirudhtx/aave-address-book@1.0.1","_nodeVersion":"18.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-UGqzXNZEEOXLKuNfzlKYIUsJW5l6LTXL5bHupfVB0GTUynStHcoqEmrQx8Hm3nNeophBHSS6f9k/RX4EsijZ5w==","shasum":"54bf8503742dc940a9f639e72c30402b13449ea9","tarball":"https://registry.npmjs.org/@anirudhtx/aave-address-book/-/aave-address-book-1.0.1.tgz","fileCount":130,"unpackedSize":621048,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1niU/FqRS5BtLCy3esQZYK0QSmWjYvvS56/Nl5GVV1AiA24IxGrTodFBRPoapCW1EqVdblISLfVmUKzagoa/yQMw=="}]},"_npmUser":{"name":"anirudhtx","email":"anirudhtx@gmail.com"},"maintainers":[{"name":"anirudhtx","email":"anirudhtx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aave-address-book_1.0.1_1684247392855_0.6006777189495378"},"_hasShrinkwrap":false},"1.0.2":{"name":"@anirudhtx/aave-address-book","version":"1.0.2","description":"This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.","directories":{"lib":"lib"},"private":false,"main":"./dist/AaveAddressBook.js","types":"./dist/AaveAddressBook.d.ts","sideEffects":false,"scripts":{"prettier":"prettier --write 'src/**/*.{sol,ts}'","generate":"ts-node scripts/generator.ts && npm run prettier","build:js":"tsc --project tsconfig.json --outDir dist","ci:publish":"npm run build:js && npm publish --access=public"},"repository":{"type":"git","url":"git+https://github.com/bgd-labs/aave-address-book.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/anihamde/aave-address-book/issues"},"homepage":"https://github.com/anihamde/aave-address-book#readme","devDependencies":{"@types/node":"^18.11.18","@types/prettier":"^2.7.2","ethers":"^5.7.2","prettier":"^2.8.3","prettier-plugin-solidity":"^1.1.1","ts-node":"^10.9.1","typescript":"^4.9.4"},"gitHead":"e28863e63ed752e8e692345bc3f04f5cb9fab5aa","_id":"@anirudhtx/aave-address-book@1.0.2","_nodeVersion":"18.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-TDkqeRLE5hFurtvSvSHpKF8SKQJmpNhFfVrKeU9y+yLOqVuVe8aup/pv8on3vhhuK0oreIVHTYGi2cxEtXg6rw==","shasum":"ee6949cfd73d3dafef14deb56cc274273757cc2e","tarball":"https://registry.npmjs.org/@anirudhtx/aave-address-book/-/aave-address-book-1.0.2.tgz","fileCount":130,"unpackedSize":621145,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNFonXm0pcFcjyHgJqu27tQv6uxTCcrDbXB70ijXOhvgIgSig/WIZ55muKchFpWmvON4IPh2UAm0TQiQ4KD7/xaIo="}]},"_npmUser":{"name":"anirudhtx","email":"anirudhtx@gmail.com"},"maintainers":[{"name":"anirudhtx","email":"anirudhtx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aave-address-book_1.0.2_1684252941339_0.7387490606215743"},"_hasShrinkwrap":false},"1.0.3":{"name":"@anirudhtx/aave-address-book","version":"1.0.3","description":"This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.","directories":{"lib":"lib"},"private":false,"main":"./dist/AaveAddressBook.js","types":"./dist/AaveAddressBook.d.ts","sideEffects":false,"scripts":{"prettier":"prettier --write 'src/**/*.{sol,ts}'","generate":"ts-node scripts/generator.ts && npm run prettier","build:js":"tsc --project tsconfig.json --outDir dist","ci:publish":"npm run build:js && npm publish --access=public"},"repository":{"type":"git","url":"git+https://github.com/bgd-labs/aave-address-book.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/anihamde/aave-address-book/issues"},"homepage":"https://github.com/anihamde/aave-address-book#readme","devDependencies":{"@types/node":"^18.11.18","@types/prettier":"^2.7.2","ethers":"^5.7.2","prettier":"^2.8.3","prettier-plugin-solidity":"^1.1.1","ts-node":"^10.9.1","typescript":"^4.9.4"},"gitHead":"e28863e63ed752e8e692345bc3f04f5cb9fab5aa","_id":"@anirudhtx/aave-address-book@1.0.3","_nodeVersion":"18.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-x4P3wsHxqpw8nKpyjAW5ldRQQhWW20F9V9cHqfhqXAP1Qhj/4Fgdy4bV+zLAcCgX5e3NdMUkpXvBRMWeWBG1nA==","shasum":"243bda32aa26903e03e078f211169c5a546f02c0","tarball":"https://registry.npmjs.org/@anirudhtx/aave-address-book/-/aave-address-book-1.0.3.tgz","fileCount":130,"unpackedSize":622965,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCR6NXSA89TKjLYer9uy+c+k12/dWxasdp/ogZ2keElAiEAup56WpOHKgBAHZCC2sxyGzhXJaCGpt1hJg3fmTb+zsY="}]},"_npmUser":{"name":"anirudhtx","email":"anirudhtx@gmail.com"},"maintainers":[{"name":"anirudhtx","email":"anirudhtx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aave-address-book_1.0.3_1684257358724_0.8471932769747601"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-16T13:58:30.505Z","1.0.0":"2023-05-16T13:58:30.789Z","modified":"2023-05-16T17:15:59.196Z","1.0.1":"2023-05-16T14:29:53.144Z","1.0.2":"2023-05-16T16:02:21.517Z","1.0.3":"2023-05-16T17:15:59.085Z"},"maintainers":[{"name":"anirudhtx","email":"anirudhtx@gmail.com"}],"description":"This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.","homepage":"https://github.com/anihamde/aave-address-book#readme","repository":{"type":"git","url":"git+https://github.com/bgd-labs/aave-address-book.git"},"bugs":{"url":"https://github.com/anihamde/aave-address-book/issues"},"license":"MIT","readme":"<p align=\"center\"><img width=\"200\" src=\"./addressbook_logo.png\" alt=\"Address book logo\"></a></p>\n\n# Aave Address Book :book:\n\nThis repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases. To update the dist and publish, run `npm run ci:publish`, which runs `build` and then `publish`.\n\nThe goal is for Solidity developers to have the most integrated environment possible when they want to develop on top of Aave, by just importing a package with all the necessary addresses to interact with.\n\n## Usage with foundry\n\nWith Foundry installed and being in a Git repository:\n\n```sh\nforge install bgd-labs/aave-address-book\n```\n\n**Import a pool specific collection of addresses & interfaces:**\n\n```sh\nimport {AaveV2Ethereum} from \"aave-address-book/AaveV2Ethereum.sol\";\nimport {AaveV3Avalanche} from \"aave-address-book/AaveV3Avalanche.sol\";\n```\n\nIncluded addresses:\n\n```sh\n// v2 libraries\nILendingPoolAddressesProvider POOL_ADDRESSES_PROVIDER;\nILendingPool POOL;\nILendingPoolConfigurator POOL_CONFIGURATOR;\nIAaveOracle ORACLE;\nIAaveProtocolDataProvider AAVE_PROTOCOL_DATA_PROVIDER;\naddress POOL_ADMIN;\naddress EMERGENCY_ADMIN;\nICollector COLLECTOR;\n\n// v3 libraries\nIPoolAddressesProvider POOL_ADDRESSES_PROVIDER;\nIPool POOL;\nIPoolConfigurator POOL_CONFIGURATOR;\nIAaveOracle ORACLE;\nIAaveProtocolDataProvider AAVE_PROTOCOL_DATA_PROVIDER;\nIACLManager ACL_MANAGER;\naddress ACL_ADMIN;\nICollector COLLECTOR;\naddress DEFAULT_INCENTIVES_CONTROLLER;\naddress DEFAULT_A_TOKEN_IMPL_REV_1;\naddress DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1;\naddress DEFAULT_STABLE_DEBT_TOKEN_IMPL_REV_1;\n```\n\n**Import addresses and interfaces to interact with Governance:**\n\n```sh\nimport {AaveGovernanceV2} from \"aave-address-book/AaveGovernanceV2.sol\";\n```\n\nIncluded addresses:\n\n```sh\nIAaveGovernanceV2 GOV;\naddress SHORT_EXECUTOR;\naddress LONG_EXECUTOR;\naddress ARC_TIMELOCK;\n```\n\n**Import miscellaneous addresses and interfaces relevant to the aave protocol:**\n\n```sh\nimport {AaveMisc} from \"aave-address-book/AaveMisc.sol\";\n```\n\nIncluded addresses:\n\n```sh\nIAaveEcosystemReserveController AAVE_ECOSYSTEM_RESERVE_CONTROLLER;\naddress ECOSYSTEM_RESERVE;\n```\n\n### Production Recommendations\n\nWhile there is a index import available in \"aave-address-book/AaveAddressBook.sol\", we only recommend using it in tests.\nFoundry currently does not eliminate unused code for [verification](https://github.com/foundry-rs/foundry/issues/2266).\nThis results in rather gigantic verifications when using the index file import from [aave-address-book/AaveAddressBook.sol](./src/AaveAddressBook.sol).\nFor production code we therefore recommend to use pool specific libraries (`Aave[Version][Network][?SubPool]`) exported from `aave-address-book` like `AaveV2Ethereum` for the `V2` `Ethereum` pool.\n\n## Usage with node\n\n### Install\n\n```sh\nnpm i @bgd-labs/aave-address-book\n```\n\n### Usage\n\n```js\nimport * as pools from \"@bgd-labs/aave-address-book\"; // wildcard import\nimport { AaveV2Avalanche } from \"@bgd-labs/aave-address-book\"; // import specific pool\n\n// all variables available on solidity version are available in javascript as well\nconsole.log(AaveV2Avalanche.POOL_ADDRESSES_PROVIDER);\n// \"0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb\"\n\n// in addition the chainId of the respecitve addresses is exported alongside\nconsole.log(AaveV2Avalanche.CHAIN_ID);\n// 43114\n```\n\n## Running this repository\n\n### Generate files\n\nThe library is generated based on the config file located in `scripts/config.ts`. You can regenerate the files by running `yarn generate`.\n\n### Dependencies\n\n```sh\nforge update\n```\n\n### Compilation\n\n```sh\nforge build\n```\n\n### Testing\n\n```sh\nforge test\n```\n\n### Adding a new Pool\n\nTo list a new pool in the address book, you simply need to add a new pool in the [pools config](./scripts/config.ts) and run `yarn generate`.\n\n### Adding new Addresses\n\na) Adding an address that **can be optained via onchain calls** so it doesn't need to be hardcoded on the configs:\n\nTo achieve an addition here you need to add the address to the respective [v2 type](https://github.com/bgd-labs/aave-address-book/blob/main/scripts/generator_v2.ts#L11) and/or [v3 type](https://github.com/bgd-labs/aave-address-book/blob/main/scripts/generator_v3.ts#L11) and adjust the generator scripts accordingly. New types should be added to the [AaveV2](https://github.com/bgd-labs/aave-address-book/blob/main/src/AaveV2.sol) and [AaveV3](https://github.com/bgd-labs/aave-address-book/blob/main/src/AaveV3.sol) files.\n\nb) Adding an address that **cannot be optained via onchain calls** so it needs to be manually maintained:\n\nTo achieve an addition here, you need to alter the [additionalAddresses section](https://github.com/bgd-labs/aave-address-book/blob/main/scripts/config.ts#L46) on the pool type and add your address to the respecive pools. Additional addresses will currently be exported as type `address`. There's currently no possibility to define a custom type.\n\nIn any case you need to run `yarn generate` afterwards and commit the altered artifacts.\n\n## Sample projects\n\n- [aave v2 asset listing template](https://github.com/bgd-labs/example-aave-v2-listing)\n","readmeFilename":"README.md"}