code-423n4 / 2022-02-jpyc-findings

1 stars 0 forks source link

QA Report #15

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

2022-02-jpyc

1 Emit not only newMasterMinter but also old minter.

https://github.com/code-423n4/2022-02-jpyc/blob/main/contracts/v1/FiatTokenV1.sol#L66 https://github.com/code-423n4/2022-02-jpyc/blob/main/contracts/v1/FiatTokenV1.sol#L383

event MasterMinterChanged(address indexed newMasterMinter, address indexed oldMasterMinter);

function updateMasterMinter(address _newMasterMinter) external onlyOwner { require( _newMasterMinter != address(0), “FiatToken: new masterMinter is the zero address” ); address _oldMinter = masterMinter; masterMinter = _newMasterMinter; Emit MasterMinterChanged(_masterMinter, _oldMinter); }

0xywzx commented 2 years ago

Thank you for your comment.

As you said, both oldMasterMinter and newMinter should be included in Event.

Thank you for sharing the sample code as well.

We will change the code.