AgentPay contracts rename#9
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR completes a repository-wide rename from the legacy Celer* contract naming to AgentPay* (Ledger/Wallet), updating Solidity sources, interfaces, tests, scripts, and documentation to match the new public API surface.
Changes:
- Renamed core contract/interface references from
CelerLedger/CelerWallettoAgentPayLedger/AgentPayWalletacross src + tests. - Updated deploy scripts/config schema and docs to reflect the new names and output artifacts (including gas report filenames).
- Refreshed NatSpec/docs strings to remove “Celer” terminology in favor of “AgentPay”.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utils/LedgerTestBase.t.sol | Updates test scaffolding to use ledger/wallet naming and channelId derivation docs. |
| test/utils/Base.t.sol | Switches deployed test graph from Celer* to AgentPay* contracts and labels. |
| test/invariants/handlers/ChannelHandler.sol | Renames invariant handler imports/types to AgentPay*. |
| test/invariants/ChannelInvariants.t.sol | Updates invariant suite to call ledger/wallet APIs. |
| test/GasReport.t.sol | Renames gas report tests/paths and deployment measurement helpers to AgentPay*. |
| test/gas_logs/CelerLedger-ERC20.txt | Removes legacy gas log artifact for old naming. |
| test/gas_logs/AgentPayLedger-Migrate.txt | Updates migration gas log header to AgentPayLedger. |
| test/gas_logs/AgentPayLedger-ETH.txt | Updates ETH gas log labels to AgentPayLedger/AgentPayWallet. |
| test/gas_logs/AgentPayLedger-ERC20.txt | Adds ERC20 gas log artifact under new naming. |
| test/AgentPayWallet.t.sol | Renames wallet unit test contract/types to AgentPayWallet. |
| test/AgentPayLedger.Migrate.t.sol | Renames migration tests and switches to ledger/wallet fields. |
| test/AgentPayLedger.ETH.t.sol | Renames ETH-channel tests and updates calls/getters to new API names. |
| test/AgentPayLedger.ERC20.t.sol | Renames ERC20-channel tests and updates calls to ledger. |
| src/RouterRegistry.sol | Updates NatSpec text to “AgentPay Network”. |
| src/lib/ledgerlib/LedgerStruct.sol | Switches wallet interface type to IAgentPayWallet and updates docs/comments. |
| src/lib/ledgerlib/LedgerOperation.sol | Replaces ICelerWallet usage with IAgentPayWallet throughout lifecycle ops. |
| src/lib/ledgerlib/LedgerMigrate.sol | Replaces ICelerLedger/wallet calls with IAgentPayLedger/wallet. |
| src/lib/ledgerlib/LedgerChannel.sol | Updates migration import helpers to query via IAgentPayLedger. |
| src/lib/data/proto/entity.proto | Updates proto comment to reference AgentPayLedger. |
| src/lib/AgentPayErrors.sol | Renames comment section headers to AgentPayLedger/AgentPayWallet. |
| src/interfaces/INativeWrap.sol | Updates NatSpec text to reference AgentPayWallet. |
| src/interfaces/IAgentPayWallet.sol | Renames wallet interface and updates NatSpec references. |
| src/interfaces/IAgentPayLedger.sol | Renames ledger interface and updates getter name to getAgentPayWallet. |
| src/helper/WalletTestHelper.sol | Updates helper to target IAgentPayWallet. |
| src/helper/NativeWrapMock.sol | Updates NatSpec to reference AgentPayLedger. |
| src/helper/ERC20ExampleToken.sol | Updates NatSpec to reference AgentPayLedger tests. |
| src/AgentPayWallet.sol | Renames wallet implementation contract and interface inheritance to IAgentPayWallet. |
| src/AgentPayLedgerMock.sol | Renames mock contract and updates stored wallet interface type. |
| src/AgentPayLedger.sol | Renames ledger implementation and swaps internal storage to wallet (needs interface import fix). |
| script/README.md | Updates deployment documentation and verification examples to AgentPay*. |
| script/example_config.json | Renames config key from celerWallet to wallet. |
| script/DeployLedger.s.sol | Updates deploy script to deploy AgentPayLedger and read .core.wallet. |
| script/DeployCore.s.sol | Updates core deploy script to deploy AgentPayWallet. |
| script/.env.example | Updates env example comments to AgentPay*. |
| README.md | Updates top-level repo docs to reference AgentPayLedger/AgentPayWallet. |
| docs/contracts.md | Updates contract documentation sections, links, and terminology to AgentPay*. |
| docs/architecture-summary.md | Updates architecture terminology to match AgentPay* naming. |
Comments suppressed due to low confidence (2)
src/AgentPayLedger.sol:27
AgentPayLedgerdeclaresis IAgentPayLedgerbut this file does not importIAgentPayLedger, which will fail compilation with an unknown identifier. Add animport "./interfaces/IAgentPayLedger.sol";(or otherwise bring the interface into scope) alongside the other interface imports.
src/interfaces/IAgentPayWallet.sol:10- Grammar: use “An AgentPayWallet” (not “A AgentPayWallet”) and “an AgentPayLedger” (not “a AgentPayLedger”) in this NatSpec to keep documentation professional and consistent.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| library LedgerStruct { | ||
| /** | ||
| * @notice Lifecycle status of a channel inside a CelerLedger instance. | ||
| * @notice Lifecycle status of a channel inside a AgentPayLedger instance. |
| /** | ||
| * @title DeployLedger | ||
| * @notice Deploys a `CelerLedger` instance wired against the existing core | ||
| * @notice Deploys a `AgentPayLedger` instance wired against the existing core |
Contributor
Author
|
@copilot apply changes based on the comments in this thread |
…ments Agent-Logs-Url: https://github.com/celer-network/agent-pay-contracts/sessions/897ed49e-6f97-4175-9cd4-e3d5ba97294e Co-authored-by: hhl42 <708956+hhl42@users.noreply.github.com>
Done — fixed both grammar issues in commit a427c8f:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.