Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocol-contracts v2: Always emit events in setters #257

Open
fbac opened this issue Jul 25, 2024 · 0 comments
Open

protocol-contracts v2: Always emit events in setters #257

fbac opened this issue Jul 25, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers v2 New smart contract version

Comments

@fbac
Copy link
Contributor

fbac commented Jul 25, 2024

This suggestion applies to all v2 contracts.

When setting configuration parameters in contract, let's make sure an event is emitted.

Example:

  function setCustody(address _custody) external onlyTSS {
      if (custody != address(0)) revert CustodyInitialized();
      if (_custody == address(0)) revert ZeroAddress();

      custody = _custody;
      emit CustodySet(_custody);
  }
@fbac fbac added enhancement New feature or request good first issue Good for newcomers v2 New smart contract version labels Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers v2 New smart contract version
Projects
None yet
Development

No branches or pull requests

1 participant