feat(staging): release #782
Conversation
… as sync on configIndexer
feat(token): linking of existing token holders to plugins and mark it as synced on configIndexer
fix(permissionHandler): wrong params being passed on the existingLog
feat(proposal): add plugin interface type lookup and field population
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com>
…ucturing for parameters
…ect structure for clock mode
fix(governanceErc20): enhance getPastTotalSupply to support clock mode and timestamp
feat(token): add getTokenStats endpoint and integrate token holder count fetching
feat: refactor logService naming
(Feat/app 4362): Implement condition based permission with selector and target
* feat(configIndexer): add service name extraction logic for plugins and daos * feat(configIndexer): update regex for service name extraction to match start of string * feat(configIndexer): rename service to model in service name extraction tests * feat: set plugin sync as end * feat: rm unused code * feat: rm delegates not used * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * feat: update * feat: update * refactor(configIndexer): improve service name extraction tests and comments * refactor(configIndexer): apply improvements * refactor(blockchainLogCrawler): simplify end method tests and remove redundant error handling * refactor(web3): improve error handling in getTokenBalances test * feat: update * feat: update * feat: unit test * feat: unit test --------- Co-authored-by: cristianizzo <cristianizzo@me.com>
…ation and source code (#761) * feat(evmExplorer): implement fallback logic for fetching contract creation and source code * feat(etherscan): remove redundant tests for fetchContractSourceCode and fetchContractCreation * feat(etherscan): remove the routescan test in dep * feat(daoMemberMapping): increase coverage
…ion (#759) * feat(governance): update token ID handling to use numbers instead of strings * feat(vetoken): token delegation handling to skip self-delegation and duplicate transactions * feat(governance): add memberBalance to voting power response * feat(governance): remove unnecessary comments * feat(governance): enhance member balance handling for deposit and withdrawal events * feat(governance): update member balance handling and improve deposit/withdrawal logic * feat(governance): fix tokenId comparison in veGovernance tests * feat(governance): fix the test * feat(governance): update token handling for self-delegation and improve member balance logic * feat(governance): refactor token aggregation logic and update member balance on withdrawal * feat(governance): clean up comments and improve readability in governanceVeHandler tests * feat(governance): format:fix * feat(governance): format:fix * feat(governance): handle self-delegation in token delegation logic and improve logging * feat(governance): skip high event fetching * feat(governance): skip high event fetching * feat(governance): update tokenIds handling to use strings instead of numbers * feat(governance): update tokenIds handling to use strings instead of numbers * feat(governance): change tokenId type from number to string * feat(governance): change tokenId type from number to string in lock.spec.ts * feat(governance): consistency * feat(governance): change tokenId type from number to string in lock.spec.ts and memberBalance.ts * feat(plugin): enhance plugin installation check with permission event validation * feat(plugin): enhance plugin installation check with permission event validation * feat(plugin): enhance plugin installation check with permission event validation * feat(plugin): improve plugin installation handling with additional log checks * feat(plugin): improve plugin installation handling with additional log checks * feat(plugin): enhance plugin handling with improved stubs and log checks * feat(plugin): refine transaction receipt handling and log structure in tests * feat(governance): enhance block timestamp handling and add average block time utility * feat(governance): removed only * feat(governance): mongo no index * feat(format): fix * feat(governance): mongo no index * feat(governance): format fix * feat(governance): remove * feat(governance): fix * feat(governance): fix * feat(governance): update hasClockMode to false in tests * feat(governance): format fix * feat(database): add new indexes to improve query performance * feat(database): add new indexes to improve query performance * feat: update --------- Co-authored-by: cristianizzo <cristianizzo@me.com>
* feat: revert * feat: revert * feat: revert * feat: revert
…ctions (#767) * feat(contractInfo): add parseSignature method for decoding contract actions * feat(execute): format fix * feat(governance): add fallback to totalSupply * feat(governance): add fallback to totalSupply * feat(governance): add fallback to totalSupply * feat(governance): format fix * feat: improvements * feat: replace wrong file name * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test --------- Co-authored-by: cristianizzo <cristianizzo@me.com>
* feat: expose conditionAddress in plugin * feat: expose conditionAddress in plugin
* feat: replace memberMetrics to metrics * feat: replace memberMetrics to metrics * feat: replace memberMetrics to metrics
#772) * fix(governance): handle self-delegation case in token delegation logic * Update src/handlers/governanceVeHandler.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> * feat(memberTransaction): simplify self-delegation check in transaction filtering * test(governanceVeHandler): update expectation for token delegation un-delegation * feat(governanceErc20Handler): add from and to address tracking in member transactions --------- Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: refactor mongo, connection, rabbitmq, runner, migration, toolLauncher modules * feat: skip runner test * feat: copilot review * feat: copilot review
* feat: aragon requeue service * feat: avoid to save same info multiple times * feat: historical sync set end flag * feat: lint * feat: lint * feat: new queue to handle requeue * feat: new queue to handle requeue * feat: format
…name and symbol (#775) * feat: admin queue reset token events * feat: dep test * feat: token clock mode * feat: setting voting escrow * feat(governance): refactor clock mode handling in token and governance modules * feat(governance): refactor clock mode handling in token and governance modules * feat: add clock mode handling in proposal and token tests * feat: add clock mode handling in proposal and token tests * feat: fix formatting in proposalHandler.spec.ts * feat: enhance logging and refactor token handling in queue management * feat: enhance logging and refactor token handling in queue management * feat: name and symbol keep null by default * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test --------- Co-authored-by: cristianizzo <cristianizzo@me.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com>
Feat/add zksync opt
…in package.json (#780) * feat(docker): upgrade MongoDB version to 8.0 and update dependencies in package.json * feat(nvm): update Node.js version to 21.1.0 --------- Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR removes the delegate router functionality from both v1 and v2 API routes while introducing new execute selector functionality for v2. The changes primarily focus on refactoring routing structure and removing delegate-related components.
- Removes delegate router imports and mounting from both v1 and v2 API configurations
- Introduces new ExecuteSelector router and controller for v2 API with pagination support
- Updates test files to improve reliability and add comprehensive coverage for new functionality
Reviewed Changes
Copilot reviewed 174 out of 189 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/services/aragon-api/routers/v2/index.spec.ts | Removes delegate router references and adds execute selector router testing |
| test/unit/services/aragon-api/routers/v2/executeSelector.spec.ts | New test file for execute selector router functionality |
| test/unit/services/aragon-api/routers/v2/delegate.spec.ts | Removed delegate router test file |
| test/unit/services/aragon-api/routers/v1/index.spec.ts | Removes delegate router from v1 routing tests |
| test/unit/services/aragon-api/routers/v1/delegate.spec.ts | Removed v1 delegate router test file |
| test/unit/services/aragon-api/controllers/vote.spec.ts | Adds new memberVotesInfo method testing |
| test/unit/services/aragon-api/controllers/transaction.spec.ts | Updates test assertion for slug value |
| test/unit/services/aragon-api/controllers/token.spec.ts | Adds token stats functionality testing |
| test/unit/services/aragon-api/controllers/member.spec.ts | Adds VeLock plugin support and member functionality |
| test/unit/services/aragon-api/controllers/executeSelector.spec.ts | New controller test file for execute selector functionality |
| test/unit/services/aragon-api/controllers/delegate.spec.ts | Removed delegate controller test file |
| } | ||
|
|
||
| // Verify that RabbitMQ.sendMessage was not called | ||
| expect(sandbox.stub(RabbitMQHelper, 'sendMessage').called).to.be.false |
There was a problem hiding this comment.
The stub is created inside the try block but checked outside. This will create a new stub that was never called, making the assertion incorrect. Move the stub creation outside the try block.
| expect(sandbox.stub(RabbitMQHelper, 'sendMessage').called).to.be.false | |
| expect(rabbitMQStub.called).to.be.false |
|
|
||
| // Act | ||
| const result = await Web3Provider.getAllTokenHolders({ | ||
| await Web3Provider.getAllTokenHolders({ |
There was a problem hiding this comment.
The result of the async function call is not being captured or handled. This test should either expect a rejection or capture the result for assertions.
| expect(routeScanStub.firstCall.args[0]).to.deep.eq({ | ||
| network, | ||
| address, | ||
| }) |
There was a problem hiding this comment.
The test expects deep equality for an object but the implementation likely passes individual parameters. This assertion will fail if RouteScanHelper.fetchTokenHoldersCount expects separate parameters.
| expect(routeScanStub.firstCall.args[0]).to.deep.eq({ | |
| network, | |
| address, | |
| }) | |
| expect(routeScanStub.firstCall.args[0]).to.equal(network) | |
| expect(routeScanStub.firstCall.args[1]).to.equal(address) |
* feat(token): linking of existing token holders to plugins and mark it as sync on configIndexer * feat(token): add getTokenStats endpoint and integrate token holder count fetching * feat(chiliz): use configurable API URL for Chiliz RPC calls * feat(chiliz): fix test in chiliz * fix(permissionHandler): wrong params being passed on the existingLog * fix(permissionHandler): wrong params being passed on the existingLog * test(plugin): enhance permission revocation and granting logic in tests * test(plugin): enhance permission revocation and granting logic in tests * feat(proposal): add plugin interface type lookup and field population * fix(governanceErc20): enhance getPastTotalSupply to support clock mode and timestamp * Update test/unit/helpers/goveranceErc20.spec.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> * fix(goveranceErc20): remove unused stubConfigState definition in tests * fix(governanceErc20): remove unused stubConfigState from tests * fix(governanceErc20): refactor getPastTotalSupply to use object destructuring for parameters * fix(syncProposals): refactor pastTotalSupply retrieval to use object destructuring * fix(proposalHandler): update pastTotalSupplyStub arguments to use object structure for clock mode * feat: integ test wip * feat: fix logService * feat: fix logService * feat: config indexer explained * feat: tokenVoting escrowAdapter * feat: unit test migration * feat: unit test migration * feat: unit test migration * feat: integrate latest development + main changes * Merge pull request #752 from aragon/feat/APP-4362 (Feat/app 4362): Implement condition based permission with selector and target * Feat: Refactor GovernanceERC20 Handler (#751) * feat(configIndexer): add service name extraction logic for plugins and daos * feat(configIndexer): update regex for service name extraction to match start of string * feat(configIndexer): rename service to model in service name extraction tests * feat: set plugin sync as end * feat: rm unused code * feat: rm delegates not used * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * test: unit test * feat: update * feat: update * refactor(configIndexer): improve service name extraction tests and comments * refactor(configIndexer): apply improvements * refactor(blockchainLogCrawler): simplify end method tests and remove redundant error handling * refactor(web3): improve error handling in getTokenBalances test * feat: update * feat: update * feat: unit test * feat: unit test --------- Co-authored-by: cristianizzo <cristianizzo@me.com> * feat(evmExplorer): implement fallback logic for fetching contract creation and source code (#761) * feat(evmExplorer): implement fallback logic for fetching contract creation and source code * feat(etherscan): remove redundant tests for fetchContractSourceCode and fetchContractCreation * feat(etherscan): remove the routescan test in dep * feat(daoMemberMapping): increase coverage * fix(veToken): maintain token IDs list in memberBalance during delegation (#759) * feat(governance): update token ID handling to use numbers instead of strings * feat(vetoken): token delegation handling to skip self-delegation and duplicate transactions * feat(governance): add memberBalance to voting power response * feat(governance): remove unnecessary comments * feat(governance): enhance member balance handling for deposit and withdrawal events * feat(governance): update member balance handling and improve deposit/withdrawal logic * feat(governance): fix tokenId comparison in veGovernance tests * feat(governance): fix the test * feat(governance): update token handling for self-delegation and improve member balance logic * feat(governance): refactor token aggregation logic and update member balance on withdrawal * feat(governance): clean up comments and improve readability in governanceVeHandler tests * feat(governance): format:fix * feat(governance): format:fix * feat(governance): handle self-delegation in token delegation logic and improve logging * feat(governance): skip high event fetching * feat(governance): skip high event fetching * feat(governance): update tokenIds handling to use strings instead of numbers * feat(governance): update tokenIds handling to use strings instead of numbers * feat(governance): change tokenId type from number to string * feat(governance): change tokenId type from number to string in lock.spec.ts * feat(governance): consistency * feat(governance): change tokenId type from number to string in lock.spec.ts and memberBalance.ts * feat(plugin): enhance plugin installation check with permission event validation * feat(plugin): enhance plugin installation check with permission event validation * feat(plugin): enhance plugin installation check with permission event validation * feat(plugin): improve plugin installation handling with additional log checks * feat(plugin): improve plugin installation handling with additional log checks * feat(plugin): enhance plugin handling with improved stubs and log checks * feat(plugin): refine transaction receipt handling and log structure in tests * feat(governance): enhance block timestamp handling and add average block time utility * feat(governance): removed only * feat(governance): mongo no index * feat(format): fix * feat(governance): mongo no index * feat(governance): format fix * feat(governance): remove * feat(governance): fix * feat(governance): fix * feat(governance): update hasClockMode to false in tests * feat(governance): format fix * feat(database): add new indexes to improve query performance * feat(database): add new indexes to improve query performance * feat: update --------- Co-authored-by: cristianizzo <cristianizzo@me.com> * feat: revert (#766) * feat: revert * feat: revert * feat: revert * feat: revert * feat(contractInfo): add parseSignature method for decoding contract actions (#767) * feat(contractInfo): add parseSignature method for decoding contract actions * feat(execute): format fix * feat(governance): add fallback to totalSupply * feat(governance): add fallback to totalSupply * feat(governance): add fallback to totalSupply * feat(governance): format fix * feat: improvements * feat: replace wrong file name * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test * feat: unit test --------- Co-authored-by: cristianizzo <cristianizzo@me.com> * Hotfix/expose condition address (#768) * feat: expose conditionAddress in plugin * feat: expose conditionAddress in plugin * feat: replace memberMetrics to metrics (#771) * feat: replace memberMetrics to metrics * feat: replace memberMetrics to metrics * feat: replace memberMetrics to metrics * fix(governance): handle self-delegation case in token delegation logic (#772) * fix(governance): handle self-delegation case in token delegation logic * Update src/handlers/governanceVeHandler.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> * feat(memberTransaction): simplify self-delegation check in transaction filtering * test(governanceVeHandler): update expectation for token delegation un-delegation * feat(governanceErc20Handler): add from and to address tracking in member transactions --------- Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(utils): increase default timeout to 60 seconds in options (#773) * feat: mongodb sync (#774) * feat: refactor mongo, connection, rabbitmq, runner, migration, toolLauncher modules * feat: skip runner test * feat: copilot review * feat: copilot review * feat: aragon requeue & historical sync end flag (#769) * feat: aragon requeue service * feat: avoid to save same info multiple times * feat: historical sync set end flag * feat: lint * feat: lint * feat: new queue to handle requeue * feat: new queue to handle requeue * feat: format * feat(governance): refactor clock mode handling in token and ve token name and symbol (#775) * feat: admin queue reset token events * feat: dep test * feat: token clock mode * feat: setting voting escrow * feat(governance): refactor clock mode handling in token and governance modules * feat(governance): refactor clock mode handling in token and governance modules * feat: add clock mode handling in proposal and token tests * feat: add clock mode handling in proposal and token tests * feat: fix formatting in proposalHandler.spec.ts * feat: enhance logging and refactor token handling in queue management * feat: enhance logging and refactor token handling in queue management * feat: name and symbol keep null by default * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test * feat: migration token has clock mode + unit test --------- Co-authored-by: cristianizzo <cristianizzo@me.com> * feat(zksync): enhance contract source code fetching for ZkSync networks * feat(zksync): add test for contract creation fetching on zkSync network * Update test/unit/modules/proxyProvider/web3Provider.spec.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> * Update test/unit/modules/proxyProvider/web3Provider.spec.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> * chore: update Node.js version in .nvmrc to 20.12.2 * feat(docker): upgrade MongoDB version to 8.0 and update dependencies in package.json (#780) * feat(docker): upgrade MongoDB version to 8.0 and update dependencies in package.json * feat(nvm): update Node.js version to 21.1.0 --------- Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> --------- Signed-off-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> Co-authored-by: ccir <harryburger105@gmail.com> Co-authored-by: Sishir Pokhrel <98728151+harryburger@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📝 Summary
Explain the purpose of these changes and what problem they solve.
Task: APP-0000
🔄 What Changed
✅ Checklist
🔍 Code Review
🧪 Testing
🔒 Security