Skip to content

New archiver smart contract - #59

Merged
nicolas-assouad-spiko merged 2 commits into
mainfrom
implement-archiver-contract
Oct 6, 2026
Merged

nicolas-assouad-spiko merged 2 commits into
mainfrom
implement-archiver-contract

Conversation

@nicolas-assouad-spiko

Copy link
Copy Markdown
Contributor

No description provided.

@nicolas-assouad-spiko nicolas-assouad-spiko self-assigned this Jul 17, 2026
Copilot AI review requested due to automatic review settings July 17, 2026 09:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new upgradeable Archiver smart contract (backed by @spiko/erc-cross-chain-event-archive) and wires it into the deployment/migration flow, along with a dedicated test suite and shared test fixture refactor.

Changes:

  • Add contracts/archiver/Archiver.sol (UUPS + PermissionManager-restricted writer/amender wrapper).
  • Extend scripts/migrate.js to deploy and verify the new Archiver contract.
  • Add test/archiver.test.js and refactor test fixture setup into test/fixtures.js.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
contracts/archiver/Archiver.sol New permissioned Archiver contract exposing archiveEvent/amendEvent, UUPS upgrade authorization, ERC165 support.
scripts/migrate.js Deploys + verifies Archiver; adds new archiver role constant (affects config sanity checking).
test/fixtures.js New shared fixture; introduces accounts.archiver and archiver role membership.
test/main.test.js Switches to shared fixture/helpers from test/fixtures.js.
test/archiver.test.js New test coverage for Archiver permissions, archiving/amending behavior, ERC165, multicall.
package.json Adds @spiko/erc-cross-chain-event-archive dependency.
pnpm-lock.yaml Lockfile updates to include the new dependency resolution.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/fixtures.js
Comment on lines +18 to +35
const { contracts, config, roles } = await migrate(
{
deployer: accounts.admin,
roles: {
admin: { members: [accounts.admin].map(getAddress) },
'operator-exceptional': { members: [accounts.operator].map(getAddress) },
'operator-daily': { members: [accounts.operator, 'minter'].map(getAddress) },
'operator-oracle': { members: [accounts.operator].map(getAddress) },
burner: { members: ['redemption'].map(getAddress) },
whitelister: { members: [accounts.whitelister].map(getAddress) },
whitelisted: { members: [accounts.alice, accounts.bruce, 'redemption'].map(getAddress) },
'mint-initiator': { members: [accounts.operator].map(getAddress) },
'mint-approver': { members: [accounts.admin].map(getAddress) },
archiver: { members: [accounts.archiver].map(getAddress) },
},
},
{ noCache: true, noConfirm: true }
);
Comment thread package.json Outdated
"@chainlink/contracts": "^0.8.0",
"@openzeppelin/contracts": "^5.4.0",
"@openzeppelin/contracts-upgradeable": "^5.4.0",
"@spiko/erc-cross-chain-event-archive": "github:spiko-tech/erc-cross-chain-event-archive#v0.1.0",
Comment thread scripts/migrate.js
Comment on lines 83 to 87
RedemptionExecutor: 'redemption-executor',
MintInitiator: 'mint-initiator',
MintApprover: 'mint-approver',
Archiver: 'archiver',
};
@nicolas-assouad-spiko
nicolas-assouad-spiko force-pushed the implement-archiver-contract branch from da30d4a to bd3e7b1 Compare July 17, 2026 13:06
Add OpenZeppelin manifest .openzeppelin/archiver-421614.json with proxy and implementation entries and record the archiver proxy address and txHash in .cache-421614-staging.json. Update README.md: bump compiler to 0.8.27, clarify environment variables (PRIVATE_KEY, ETHERSCAN, network NODE vars and FORCE), and add step-by-step instructions for deploying a single Archiver proxy to an existing network, recording the cache entry, granting permissions via PermissionManager, and verifying the implementation on explorers.
@nicolas-assouad-spiko
nicolas-assouad-spiko merged commit d8e10e8 into main Oct 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants