Skip to content

Conversation

@0xClandestine
Copy link
Member

@0xClandestine 0xClandestine commented Feb 19, 2025

Motivation:

Naming between the getQueuedWIthdrawal aliases was inconsistent.

Modifications:

  • made queuedWithdrawals[withdrawalRoot] mapping public.
  • renamed queuedWithdrawals -> _queuedWithdrawals.
  • added _queuedWithdrawals getter
  • removed previous getQueuedWithdrawal alias.
  • renamed getQueuedWithdrawalFromRoot to getQueuedWithdrawal.

Result:

Consistent function naming.

@0xClandestine 0xClandestine changed the title refactor: rename inconsistent getQueuedWIthdrawal alias refactor: rename inconsistent getQueuedWithdrawal alias Feb 19, 2025
@0xClandestine 0xClandestine added the ⚖️ Audit Fix Audit-related fixes. label Feb 19, 2025
Copy link
Contributor

@wadealexc wadealexc left a comment

Choose a reason for hiding this comment

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

Public mappings return tuples rather than structs

If we're good with this route, let's explicitly define a public function:

function queuedWithdrawals(bytes32 root) public view returns (Withdrawal) {
    return _queuedWithdrawals[root];
}

@0xClandestine
Copy link
Member Author

function queuedWithdrawals(bytes32 root) public view returns (Withdrawal) {
return _queuedWithdrawals[root];
}

Ahh, that's where the bytecode savings were coming from.

@ypatil12 ypatil12 merged commit 5c30eb1 into slashing-magnitudes-fixes Feb 19, 2025
11 checks passed
@ypatil12 ypatil12 deleted the refactor/renaming branch February 19, 2025 20:45
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
ypatil12 added a commit that referenced this pull request Feb 20, 2025
**Motivation:**

Naming between the `getQueuedWIthdrawal` aliases was inconsistent.

**Modifications:**

- ~made `queuedWithdrawals[withdrawalRoot]` mapping public.~
- renamed `queuedWithdrawals` -> `_queuedWithdrawals`.
- added `_queuedWithdrawals` getter
- removed previous `getQueuedWithdrawal` alias.
- renamed `getQueuedWithdrawalFromRoot` to `getQueuedWithdrawal`. 

**Result:**

Consistent function naming.

---------

Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚖️ Audit Fix Audit-related fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants