Skip to content

Develop - #77

Merged
aledefra merged 5 commits into
mainfrom
develop
May 18, 2026
Merged

Develop#77
aledefra merged 5 commits into
mainfrom
develop

Conversation

@aledefra

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 18, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a cspTier field to the escrow details returned by the Reader contract, exposing the CSP tier alongside other escrow metadata.

Changes:

  • Extend EscrowDetails struct and ICspEscrow interface in Reader.sol with a cspTier field/getter, and populate it in getAllEscrowsDetails and getEscrowDetailsByOwner.
  • Update Reader.test.ts to map and assert the new cspTier field, exercising setCspTier on poaiManager.
  • Refresh .openzeppelin/base-sepolia.json storage layout (type AST id renumbering and a new Reader proxy entry).

Reviewed changes

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

File Description
contracts/Reader.sol Add cspTier to EscrowDetails, declare cspTier() on ICspEscrow, populate field in both escrow detail getters.
test/Reader.test.ts Map cspTier in formatEscrowDetails and assert it (including setCspTier calls) in the escrow details tests.
.openzeppelin/base-sepolia.json Update storage layout AST type IDs and add a new Reader proxy deployment entry.

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

@github-actions

Copy link
Copy Markdown
Contributor

Gas usage comparison

Base commit: 848b206
PR commit: 188d688

Summary

  • Method gas total: 747,332,528 → 747,438,620 (+106,092, +0.01%)
  • Deployment gas total: 5,210,266,237 → 5,210,313,815 (+47,578, +0.00%)
  • Largest deployment bytecode (PR): MNDContract (22,854 bytes, 92.99%)

Largest method changes

No significant method gas differences detected.

Deployment changes

Contract Base Avg Gas PR Avg Gas Δ Gas Δ % Δ Size (bytes) Base Limit Usage PR Limit Usage Δ Limit Usage
Reader 3,648,615 3,696,193 +47,578 +1.30% +220 67.73% 68.62% +0.90pp
All method measurements
Contract Method Calls (base→PR) Base Avg Gas PR Avg Gas Δ Gas Δ %
AdoptionOracle initializeLicenseSales 15 145,145 145,145 0 0.00%
AdoptionOracle initializePoaiVolumes 7 171,655 171,655 0 0.00%
AdoptionOracle recordLicenseSales 12 101,348 101,348 0 0.00%
AdoptionOracle recordPoaiVolume 10 109,732 109,732 0 0.00%
AdoptionOracle setNdFullReleaseThreshold 3 34,768 34,768 0 0.00%
AdoptionOracle setPoaiVolumeFullReleaseThreshold 3 34,826 34,826 0 0.00%
AttestationRegistry submitRedmeshJobStartAttestation 5 151,080 151,080 0 0.00%
AttestationRegistry submitRedmeshTestAttestation 10 125,148 125,148 0 0.00%
BurnContract burn 2 41,462 41,462 0 0.00%
Controller addOracle 192 108,302 108,302 0 0.00%
Controller removeOracle 2 33,704 33,704 0 0.00%
Controller setContracts 101 68,755 68,755 0 0.00%
Controller setMinimumRequiredSignatures 7 27,646 27,646 0 0.00%
CspEscrow createJobs 77 691,340 691,340 0 0.00%
CspEscrow extendJobDuration 2 77,646 77,646 0 0.00%
CspEscrow extendJobNodes 4 78,822 78,822 0 0.00%
CspEscrow extendJobsDurationBatch 3 99,230 99,230 0 0.00%
CspEscrow extendJobsNodesBatch 3 99,639 99,639 0 0.00%
CspEscrow redeemUnusedJob 4 131,817 131,817 0 0.00%
CspEscrow removeDelegate 1 53,676 53,676 0 0.00%
CspEscrow setDelegatePermissions 12 128,042 128,042 0 0.00%
ERC20Mock approve 101 46,186 46,186 0 0.00%
ERC20Mock mint 235 62,917 62,917 0 0.00%
GratitudeBurn burn 89 289,806 289,806 0 0.00%
GratitudeBurn registerApp 63 129,370 129,370 0 0.00%
MNDContract addLicense 676 249,003 249,003 0 0.00%
MNDContract approve 32 46,395 46,395 0 0.00%
MNDContract burn 3 91,573 91,573 0 0.00%
MNDContract claimRewards 29 1,340,781 1,340,781 0 0.00%
MNDContract initiateBurn 3 51,394 51,394 0 0.00%
MNDContract initiateTransfer 2 51,728 51,728 0 0.00%
MNDContract linkMultiNode 1 286,516 286,516 0 0.00%
MNDContract linkNode 49 181,107 181,107 0 0.00%
MNDContract pause 4 51,996 51,996 0 0.00%
MNDContract setAdoptionOracle 13 35,438 35,438 0 0.00%
MNDContract setBaseURI 2 52,048 52,048 0 0.00%
MNDContract setCompanyWallets 2 140,636 140,636 0 0.00%
MNDContract setMaxCarryoverReleaseFactor 5 36,201 36,201 0 0.00%
MNDContract setNDContract 100 51,355 51,355 0 0.00%
MNDContract transferFrom 2 110,991 110,991 0 0.00%
MNDContract unlinkNode 7 49,314 49,314 0 0.00%
MNDContract unpause 1 30,250 30,250 0 0.00%
NDContract banLicense 4 51,155 51,155 0 0.00%
NDContract burn 3 56,436 56,436 0 0.00%
NDContract buyLicense 173 763,937 763,937 0 0.00%
NDContract claimRewards 9 281,785 281,785 0 0.00%
NDContract linkMultiNode 1 273,948 273,948 0 0.00%
NDContract linkNode 151 182,262 182,262 0 0.00%
NDContract pause 6 52,019 52,019 0 0.00%
NDContract setAdoptionOracle 100 51,289 51,289 0 0.00%
NDContract setBaseURI 2 52,027 52,027 0 0.00%
NDContract setCompanyWallets 100 96,438 96,438 0 0.00%
NDContract setDirectAddLpPercentage 100 50,860 50,860 0 0.00%
NDContract setMaxAllowedPriceDifference 4 50,889 50,889 0 0.00%
NDContract setMNDContract 100 51,136 51,136 0 0.00%
NDContract setPoAIManager 100 51,158 51,158 0 0.00%
NDContract setUniswapParams 100 96,336 96,336 0 0.00%
NDContract transferFrom 2 100,083 100,083 0 0.00%
NDContract unbanLicense 1 29,217 29,217 0 0.00%
NDContract unlinkNode 4 50,809 50,809 0 0.00%
NDContract unpause 1 30,206 30,206 0 0.00%
PoAIManager allocateRewardsAcrossAllEscrows 26 733,070 733,070 0 0.00%
PoAIManager deployCspEscrow 103 553,464 553,464 0 0.00%
PoAIManager increaseJobBalance 3 76,454 76,454 0 0.00%
PoAIManager reconcileAllJobsAcrossEscrows 4 105,456 105,456 0 0.00%
PoAIManager reconcileAllJobsBalance 2 101,746 101,746 0 0.00%
PoAIManager setAdoptionOracle 100 51,266 51,266 0 0.00%
PoAIManager setBurnContract 1 57,382 57,382 0 0.00%
PoAIManager setCspTier 6→8 53,046 53,046 0 0.00%
PoAIManager submitNodeUpdate 174 316,751 316,751 0 0.00%
R1 addBurner 110 46,360 46,360 0 0.00%
R1 approve 162 44,406 44,406 0 0.00%
R1 burn 1 36,577 36,577 0 0.00%
R1 mint 188 64,653 64,653 0 0.00%
R1 removeBurner 2 24,411 24,411 0 0.00%
R1 renounceOwnership 1 23,423 23,423 0 0.00%
R1 setMndContract 103 46,394 46,394 0 0.00%
R1 setNdContract 111 46,350 46,350 0 0.00%
Reader initialize 1 158,365 158,365 0 0.00%
TestnetFaucet changeSettings 1 36,509 36,509 0 0.00%
TestnetFaucet claim 3 79,755 79,755 0 0.00%
TestnetFaucet withdraw 1 53,359 53,359 0 0.00%
All deployments
Contract Base Avg Gas PR Avg Gas Δ Gas Δ % Δ Size (bytes) Base Limit Usage PR Limit Usage Δ Limit Usage
AdoptionOracle 1,648,877 1,648,877 0 0.00% 0 30.06% 30.06% 0.00pp
AttestationRegistry 1,988,798 1,988,798 0 0.00% 0 35.96% 35.96% 0.00pp
BurnContract 133,270 133,270 0 0.00% 0 1.45% 1.45% 0.00pp
Controller 1,235,030 1,235,030 0 0.00% 0 20.47% 20.47% 0.00pp
CspEscrow 4,477,811 4,477,811 0 0.00% 0 83.34% 83.34% 0.00pp
ERC20Mock 610,970 610,970 0 0.00% 0 9.44% 9.44% 0.00pp
GratitudeBurn 1,238,966 1,238,966 0 0.00% 0 22.33% 22.33% 0.00pp
MNDContract 4,986,371 4,986,371 0 0.00% 0 92.99% 92.99% 0.00pp
NDContract 4,785,637 4,785,637 0 0.00% 0 89.14% 89.14% 0.00pp
PoAIManager 4,918,326 4,918,326 0 0.00% 0 91.91% 91.91% 0.00pp
R1 919,887 919,887 0 0.00% 0 14.80% 14.80% 0.00pp
Reader 3,648,615 3,696,193 +47,578 +1.30% +220 67.73% 68.62% +0.90pp
TestnetFaucet 470,305 470,305 0 0.00% 0 6.06% 6.06% 0.00pp
UniswapMockPair 254,903 254,903 0 0.00% 0 2.41% 2.41% 0.00pp
UniswapMockRouter 507,895 507,895 0 0.00% 0 8.08% 8.08% 0.00pp

@aledefra
aledefra merged commit 6b672bb into main May 18, 2026
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.

3 participants