Skip to content

Commit

Permalink
Gas optimiziation
Browse files Browse the repository at this point in the history
  • Loading branch information
tsudmi committed Mar 21, 2024
1 parent a2e5a20 commit 9e15aab
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contracts/vaults/modules/VaultEthStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ abstract contract VaultEthStaking is
publicKey,
_withdrawalCredentials(),
validator[48:144],
bytes32(validator[144:validator.length])
bytes32(validator[144:_validatorLength()])
);
emit ValidatorRegistered(publicKey);
}
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/DepositDataManager.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ Object {
exports[`DepositDataManager single validator succeeds 1`] = `
Object {
"calldataByteLength": 1156,
"gasUsed": 331930,
"gasUsed": 331879,
}
`;
2 changes: 1 addition & 1 deletion test/__snapshots__/EthGenesisVault.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Object {
exports[`EthGenesisVault pulls withdrawals on single validator registration 1`] = `
Object {
"calldataByteLength": 1156,
"gasUsed": 310166,
"gasUsed": 310115,
}
`;

Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/EthVault.register.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Object {
exports[`EthVault - register single validator succeeds 1`] = `
Object {
"calldataByteLength": 964,
"gasUsed": 298127,
"gasUsed": 298076,
}
`;
4 changes: 2 additions & 2 deletions test/__snapshots__/KeeperValidators.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Object {
exports[`KeeperValidators register single validator succeeds 1`] = `
Object {
"calldataByteLength": 1540,
"gasUsed": 338356,
"gasUsed": 338305,
}
`;

exports[`KeeperValidators register single validator succeeds 2`] = `
Object {
"calldataByteLength": 1540,
"gasUsed": 284631,
"gasUsed": 284580,
}
`;

Expand Down

0 comments on commit 9e15aab

Please sign in to comment.