Skip to content

Commit

Permalink
fix: reference correct value :/
Browse files Browse the repository at this point in the history
fix: update snap
  • Loading branch information
sakulstra committed Nov 15, 2024
1 parent 758dac2 commit e70b73e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dist/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -23991,7 +23991,7 @@ function getHtmlGasReport(before, after, options = {}) {
content += `### [${name}](${options.rootUrl}${path})

`;
content += `- gas: ${formatValue(contractBefore?.deployment.gas, item.deployment.gas)} / 49152
content += `- size: ${formatValue(contractBefore?.deployment.size, item.deployment.size)} / 49152

`;
if (options.ignoreUnchanged && contractBefore && JSON.stringify(item.functions) === JSON.stringify(contractBefore.functions))
Expand Down
2 changes: 1 addition & 1 deletion dist/action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23996,7 +23996,7 @@ function getHtmlGasReport(before, after, options = {}) {
content += `### [${name}](${options.rootUrl}${path})

`;
content += `- gas: ${formatValue(contractBefore?.deployment.gas, item.deployment.gas)} / 49152
content += `- size: ${formatValue(contractBefore?.deployment.size, item.deployment.size)} / 49152

`;
if (options.ignoreUnchanged && contractBefore && JSON.stringify(item.functions) === JSON.stringify(contractBefore.functions))
Expand Down
2 changes: 1 addition & 1 deletion dist/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function getHtmlGasReport(before, after, options = {}) {
content += `### [${name}](${options.rootUrl}${path})
`;
content += `- gas: ${formatValue(contractBefore?.deployment.gas, item.deployment.gas)} / 49152
content += `- size: ${formatValue(contractBefore?.deployment.size, item.deployment.size)} / 49152
`;
if (options.ignoreUnchanged && contractBefore && JSON.stringify(item.functions) === JSON.stringify(contractBefore.functions))
Expand Down
2 changes: 1 addition & 1 deletion dist/lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function getHtmlGasReport(before, after, options = {}) {
content += `### [${name}](${options.rootUrl}${path})
`;
content += `- gas: ${formatValue(contractBefore?.deployment.gas, item.deployment.gas)} / 49152
content += `- size: ${formatValue(contractBefore?.deployment.size, item.deployment.size)} / 49152
`;
if (options.ignoreUnchanged && contractBefore && JSON.stringify(item.functions) === JSON.stringify(contractBefore.functions))
Expand Down
28 changes: 14 additions & 14 deletions src/__snapshots__/lib.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`lib > should generate a well formatted report with empty root 1`] = `
"### [Create3Factory](https://github.com/src/contracts/create3/Create3Factory.sol)
- gas: 224263 / 49152
- size: 1151 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -13,7 +13,7 @@ predictAddress(address,bytes32) | 1024 | 1024 | 1024 | 1024 | 6 |
### [ProxyAdmin](https://github.com/src/contracts/transparent-proxy/ProxyAdmin.sol)
- gas: 0 / 49152
- size: 0 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -22,7 +22,7 @@ owner() | 386 | 386 | 386 | 386 | 6 |
### [TransparentProxyFactory](https://github.com/src/contracts/transparent-proxy/TransparentProxyFactory.sol)
- gas: 1609662 / 49152
- size: 8244 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -34,7 +34,7 @@ predictCreateDeterministicProxyAdmin(bytes32) | 6236 | 6236 | 6236 | 6236 | 6 |
### [TransparentUpgradeableProxy](https://github.com/src/contracts/transparent-proxy/TransparentUpgradeableProxy.sol)
- gas: 0 / 49152
- size: 0 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -43,7 +43,7 @@ getFoo() | 1042 | 1042 | 1042 | 1042 | 6 |
### [ImplOwnableWithGuardian](https://github.com/test/OwnableWithGuardian.t.sol)
- gas: 285211 / 49152
- size: 1067 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -54,7 +54,7 @@ updateGuardian(address) | 25944 | 28245 | 28283 | 30394 | 6 |
### [TestPermissionlessRescuable](https://github.com/test/PermissionlessRescuable.t.sol)
- gas: 879072 / 49152
- size: 4033 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -70,7 +70,7 @@ whoShouldReceiveFunds() | 2566 | 2566 | 2566 | 2566 | 1 |
exports[`lib > should generate a well formatted report with existing root & skip unchanged 1`] = `
"### [Create3Factory](https://github.com/src/contracts/create3/Create3Factory.sol)
- gas: 224263 / 49152
- size: 1151 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -79,15 +79,15 @@ create(bytes32,bytes) | <sup title="296388">↓-3.4%</sup>286388 | 296666 | 2870
### [TransparentProxyFactory](https://github.com/src/contracts/transparent-proxy/TransparentProxyFactory.sol)
- gas: 1609662 / 49152
- size: <sup title="7244">↑14%</sup>8244 / 49152
"
`;

exports[`lib > should generate a well formatted report with existing root 1`] = `
"### [Create3Factory](https://github.com/src/contracts/create3/Create3Factory.sol)
- gas: 224263 / 49152
- size: 1151 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -97,7 +97,7 @@ predictAddress(address,bytes32) | 1024 | 1024 | 1024 | 1024 | 6 |
### [ProxyAdmin](https://github.com/src/contracts/transparent-proxy/ProxyAdmin.sol)
- gas: 0 / 49152
- size: 0 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -106,7 +106,7 @@ owner() | 386 | 386 | 386 | 386 | 6 |
### [TransparentProxyFactory](https://github.com/src/contracts/transparent-proxy/TransparentProxyFactory.sol)
- gas: 1609662 / 49152
- size: <sup title="7244">↑14%</sup>8244 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -118,7 +118,7 @@ predictCreateDeterministicProxyAdmin(bytes32) | 6236 | 6236 | 6236 | 6236 | 6 |
### [TransparentUpgradeableProxy](https://github.com/src/contracts/transparent-proxy/TransparentUpgradeableProxy.sol)
- gas: 0 / 49152
- size: 0 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -127,7 +127,7 @@ getFoo() | 1042 | 1042 | 1042 | 1042 | 6 |
### [ImplOwnableWithGuardian](https://github.com/test/OwnableWithGuardian.t.sol)
- gas: 285211 / 49152
- size: 1067 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand All @@ -138,7 +138,7 @@ updateGuardian(address) | 25944 | 28245 | 28283 | 30394 | 6 |
### [TestPermissionlessRescuable](https://github.com/test/PermissionlessRescuable.t.sol)
- gas: 879072 / 49152
- size: 4033 / 49152
| Method | min | mean | median | max | calls |
| --- | ---: | ---: | ---: | ---: | ---: |
Expand Down
4 changes: 2 additions & 2 deletions src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export function getHtmlGasReport(
const [path, name] = item.contract.split(":");
content += `### [${name}](${options.rootUrl}${path})\n\n`;
// limit 49152
content += `- gas: ${formatValue(contractBefore?.deployment.gas, item.deployment.gas)} / 49152\n\n`;
content += `- size: ${formatValue(contractBefore?.deployment.size, item.deployment.size)} / 49152\n\n`;
// Commented out because it's not used atm.
// Not exactly sure if "gas" is helpful for anything.
// content += `- size: ${formatValue(contractBefore?.deployment.size, item.deployment.size)}\n\n`
// content += `- gas: ${formatValue(contractBefore?.deployment.gas, item.deployment.gas)}\n\n`
if (
options.ignoreUnchanged &&
contractBefore &&
Expand Down

0 comments on commit e70b73e

Please sign in to comment.