Commit b3980f25 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #2954 from ethereum-optimism/m/no-underscore-events

style(ctb): Remove underscores from event args
parents 58689c8b 32c358bd
......@@ -30,7 +30,7 @@ var (
// AddressManagerMetaData contains all meta data concerning the AddressManager contract.
var AddressManagerMetaData = &bind.MetaData{
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6106d98061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80639b2ea4bd116100505780639b2ea4bd146100b9578063bf40fac1146100cc578063f2fde38b146100df57600080fd5b8063715018a61461006c5780638da5cb5b14610076575b600080fd5b6100746100f2565b005b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100746100c73660046105e4565b610184565b6100906100da366004610632565b6102d0565b6100746100ed36600461066f565b61030c565b60005473ffffffffffffffffffffffffffffffffffffffff163314610178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b610182600061043c565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610205576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016f565b6000610210836104b1565b60008181526001602052604090819020805473ffffffffffffffffffffffffffffffffffffffff8681167fffffffffffffffffffffffff000000000000000000000000000000000000000083161790925591519293501690610273908590610691565b6040805191829003822073ffffffffffffffffffffffffffffffffffffffff808716845284166020840152917f9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c910160405180910390a250505050565b6000600160006102df846104b1565b815260208101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff1692915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016f565b73ffffffffffffffffffffffffffffffffffffffff8116610430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161016f565b6104398161043c565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816040516020016104c49190610691565b604051602081830303815290604052805190602001209050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261052157600080fd5b813567ffffffffffffffff8082111561053c5761053c6104e1565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610582576105826104e1565b8160405283815286602085880101111561059b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146105df57600080fd5b919050565b600080604083850312156105f757600080fd5b823567ffffffffffffffff81111561060e57600080fd5b61061a85828601610510565b925050610629602084016105bb565b90509250929050565b60006020828403121561064457600080fd5b813567ffffffffffffffff81111561065b57600080fd5b61066784828501610510565b949350505050565b60006020828403121561068157600080fd5b61068a826105bb565b9392505050565b6000825160005b818110156106b25760208186018101518583015201610698565b818111156106c1576000828501525b50919091019291505056fea164736f6c634300080a000a",
}
......@@ -403,15 +403,15 @@ type AddressManagerAddressSet struct {
// FilterAddressSet is a free log retrieval operation binding the contract event 0x9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c.
//
// Solidity: event AddressSet(string indexed _name, address _newAddress, address _oldAddress)
func (_AddressManager *AddressManagerFilterer) FilterAddressSet(opts *bind.FilterOpts, _name []string) (*AddressManagerAddressSetIterator, error) {
// Solidity: event AddressSet(string indexed name, address newAddress, address oldAddress)
func (_AddressManager *AddressManagerFilterer) FilterAddressSet(opts *bind.FilterOpts, name []string) (*AddressManagerAddressSetIterator, error) {
var _nameRule []interface{}
for _, _nameItem := range _name {
_nameRule = append(_nameRule, _nameItem)
var nameRule []interface{}
for _, nameItem := range name {
nameRule = append(nameRule, nameItem)
}
logs, sub, err := _AddressManager.contract.FilterLogs(opts, "AddressSet", _nameRule)
logs, sub, err := _AddressManager.contract.FilterLogs(opts, "AddressSet", nameRule)
if err != nil {
return nil, err
}
......@@ -420,15 +420,15 @@ func (_AddressManager *AddressManagerFilterer) FilterAddressSet(opts *bind.Filte
// WatchAddressSet is a free log subscription operation binding the contract event 0x9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c.
//
// Solidity: event AddressSet(string indexed _name, address _newAddress, address _oldAddress)
func (_AddressManager *AddressManagerFilterer) WatchAddressSet(opts *bind.WatchOpts, sink chan<- *AddressManagerAddressSet, _name []string) (event.Subscription, error) {
// Solidity: event AddressSet(string indexed name, address newAddress, address oldAddress)
func (_AddressManager *AddressManagerFilterer) WatchAddressSet(opts *bind.WatchOpts, sink chan<- *AddressManagerAddressSet, name []string) (event.Subscription, error) {
var _nameRule []interface{}
for _, _nameItem := range _name {
_nameRule = append(_nameRule, _nameItem)
var nameRule []interface{}
for _, nameItem := range name {
nameRule = append(nameRule, nameItem)
}
logs, sub, err := _AddressManager.contract.WatchLogs(opts, "AddressSet", _nameRule)
logs, sub, err := _AddressManager.contract.WatchLogs(opts, "AddressSet", nameRule)
if err != nil {
return nil, err
}
......@@ -462,7 +462,7 @@ func (_AddressManager *AddressManagerFilterer) WatchAddressSet(opts *bind.WatchO
// ParseAddressSet is a log parse operation binding the contract event 0x9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c.
//
// Solidity: event AddressSet(string indexed _name, address _newAddress, address _oldAddress)
// Solidity: event AddressSet(string indexed name, address newAddress, address oldAddress)
func (_AddressManager *AddressManagerFilterer) ParseAddressSet(log types.Log) (*AddressManagerAddressSet, error) {
event := new(AddressManagerAddressSet)
if err := _AddressManager.contract.UnpackLog(event, "AddressSet", log); err != nil {
......
This diff is collapsed.
......@@ -22,72 +22,72 @@ contract L1StandardBridge is StandardBridge, Initializable {
* @custom:legacy
* @notice Emitted whenever a deposit of ETH from L1 into L2 is initiated.
*
* @param _from Address of the depositor.
* @param _to Address of the recipient on L2.
* @param _amount Amount of ETH deposited.
* @param _extraData Extra data attached to the deposit.
* @param from Address of the depositor.
* @param to Address of the recipient on L2.
* @param amount Amount of ETH deposited.
* @param extraData Extra data attached to the deposit.
*/
event ETHDepositInitiated(
address indexed _from,
address indexed _to,
uint256 _amount,
bytes _extraData
address indexed from,
address indexed to,
uint256 amount,
bytes extraData
);
/**
* @custom:legacy
* @notice Emitted whenever a withdrawal of ETH from L2 to L1 is finalized.
*
* @param _from Address of the withdrawer.
* @param _to Address of the recipient on L1.
* @param _amount Amount of ETH withdrawn.
* @param _extraData Extra data attached to the withdrawal.
* @param from Address of the withdrawer.
* @param to Address of the recipient on L1.
* @param amount Amount of ETH withdrawn.
* @param extraData Extra data attached to the withdrawal.
*/
event ETHWithdrawalFinalized(
address indexed _from,
address indexed _to,
uint256 _amount,
bytes _extraData
address indexed from,
address indexed to,
uint256 amount,
bytes extraData
);
/**
* @custom:legacy
* @notice Emitted whenever an ERC20 deposit is initiated.
*
* @param _l1Token Address of the token on L1.
* @param _l2Token Address of the corresponding token on L2.
* @param _from Address of the depositor.
* @param _to Address of the recipient on L2.
* @param _amount Amount of the ERC20 deposited.
* @param _extraData Extra data attached to the deposit.
* @param l1Token Address of the token on L1.
* @param l2Token Address of the corresponding token on L2.
* @param from Address of the depositor.
* @param to Address of the recipient on L2.
* @param amount Amount of the ERC20 deposited.
* @param extraData Extra data attached to the deposit.
*/
event ERC20DepositInitiated(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _extraData
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes extraData
);
/**
* @custom:legacy
* @notice Emitted whenever an ERC20 withdrawal is finalized.
*
* @param _l1Token Address of the token on L1.
* @param _l2Token Address of the corresponding token on L2.
* @param _from Address of the withdrawer.
* @param _to Address of the recipient on L1.
* @param _amount Amount of the ERC20 withdrawn.
* @param _extraData Extra data attached to the withdrawal.
* @param l1Token Address of the token on L1.
* @param l2Token Address of the corresponding token on L2.
* @param from Address of the withdrawer.
* @param to Address of the recipient on L1.
* @param amount Amount of the ERC20 withdrawn.
* @param extraData Extra data attached to the withdrawal.
*/
event ERC20WithdrawalFinalized(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _extraData
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes extraData
);
/**
......
......@@ -30,31 +30,30 @@ contract L2OutputOracle is OwnableUpgradeable {
uint256 timestamp;
}
// TODO: Events should NOT be underscore prefixed.
/**
* @notice Emitted when an output is appended.
*
* @param _l2Output The output root.
* @param _l1Timestamp The L1 timestamp when appended.
* @param _l2BlockNumber The L2 block number of the output root.
* @param l2Output The output root.
* @param l1Timestamp The L1 timestamp when appended.
* @param l2BlockNumber The L2 block number of the output root.
*/
event L2OutputAppended(
bytes32 indexed _l2Output,
uint256 indexed _l1Timestamp,
uint256 indexed _l2BlockNumber
bytes32 indexed l2Output,
uint256 indexed l1Timestamp,
uint256 indexed l2BlockNumber
);
/**
* @notice Emitted when an output is deleted.
*
* @param _l2Output The output root.
* @param _l1Timestamp The L1 timestamp when appended.
* @param _l2BlockNumber The L2 block number of the output root.
* @param l2Output The output root.
* @param l1Timestamp The L1 timestamp when appended.
* @param l2BlockNumber The L2 block number of the output root.
*/
event L2OutputDeleted(
bytes32 indexed _l2Output,
uint256 indexed _l1Timestamp,
uint256 indexed _l2BlockNumber
bytes32 indexed l2Output,
uint256 indexed l1Timestamp,
uint256 indexed l2BlockNumber
);
/**
......
......@@ -22,60 +22,60 @@ contract L2StandardBridge is StandardBridge {
* @custom:legacy
* @notice Emitted whenever a withdrawal from L2 to L1 is initiated.
*
* @param _l1Token Address of the token on L1.
* @param _l2Token Address of the corresponding token on L2.
* @param _from Address of the withdrawer.
* @param _to Address of the recipient on L1.
* @param _amount Amount of the ERC20 withdrawn.
* @param _extraData Extra data attached to the withdrawal.
* @param l1Token Address of the token on L1.
* @param l2Token Address of the corresponding token on L2.
* @param from Address of the withdrawer.
* @param to Address of the recipient on L1.
* @param amount Amount of the ERC20 withdrawn.
* @param extraData Extra data attached to the withdrawal.
*/
event WithdrawalInitiated(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _extraData
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes extraData
);
/**
* @custom:legacy
* @notice Emitted whenever an ERC20 deposit is finalized.
*
* @param _l1Token Address of the token on L1.
* @param _l2Token Address of the corresponding token on L2.
* @param _from Address of the depositor.
* @param _to Address of the recipient on L2.
* @param _amount Amount of the ERC20 deposited.
* @param _extraData Extra data attached to the deposit.
* @param l1Token Address of the token on L1.
* @param l2Token Address of the corresponding token on L2.
* @param from Address of the depositor.
* @param to Address of the recipient on L2.
* @param amount Amount of the ERC20 deposited.
* @param extraData Extra data attached to the deposit.
*/
event DepositFinalized(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _extraData
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes extraData
);
/**
* @custom:legacy
* @notice Emitted whenever a deposit fails.
*
* @param _l1Token Address of the token on L1.
* @param _l2Token Address of the corresponding token on L2.
* @param _from Address of the depositor.
* @param _to Address of the recipient on L2.
* @param _amount Amount of the ERC20 deposited.
* @param _extraData Extra data attached to the deposit.
* @param l1Token Address of the token on L1.
* @param l2Token Address of the corresponding token on L2.
* @param from Address of the depositor.
* @param to Address of the recipient on L2.
* @param amount Amount of the ERC20 deposited.
* @param extraData Extra data attached to the deposit.
*/
event DepositFailed(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _extraData
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes extraData
);
/**
......
......@@ -12,7 +12,7 @@ contract AddressManager is Ownable {
* Events *
**********/
event AddressSet(string indexed _name, address _newAddress, address _oldAddress);
event AddressSet(string indexed name, address newAddress, address oldAddress);
/*************
* Variables *
......
......@@ -231,103 +231,103 @@ contract Bridge_Initializer is Messenger_Initializer {
OptimismMintableERC20 RemoteL1Token;
event ETHDepositInitiated(
address indexed _from,
address indexed _to,
uint256 _amount,
bytes _data
address indexed from,
address indexed to,
uint256 amount,
bytes data
);
event ETHWithdrawalFinalized(
address indexed _from,
address indexed _to,
uint256 _amount,
bytes _data
address indexed from,
address indexed to,
uint256 amount,
bytes data
);
event ERC20DepositInitiated(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes data
);
event ERC20WithdrawalFinalized(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes data
);
event WithdrawalInitiated(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes data
);
event DepositFinalized(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes data
);
event DepositFailed(
address indexed _l1Token,
address indexed _l2Token,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed l1Token,
address indexed l2Token,
address indexed from,
address to,
uint256 amount,
bytes data
);
event ETHBridgeInitiated(
address indexed _from,
address indexed _to,
uint256 _amount,
bytes _data
address indexed from,
address indexed to,
uint256 amount,
bytes data
);
event ETHBridgeFinalized(
address indexed _from,
address indexed _to,
uint256 _amount,
bytes _data
address indexed from,
address indexed to,
uint256 amount,
bytes data
);
event ERC20BridgeInitiated(
address indexed _localToken,
address indexed _remoteToken,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed localToken,
address indexed remoteToken,
address indexed from,
address to,
uint256 amount,
bytes data
);
event ERC20BridgeFinalized(
address indexed _localToken,
address indexed _remoteToken,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed localToken,
address indexed remoteToken,
address indexed from,
address to,
uint256 amount,
bytes data
);
event ERC20BridgeFailed(
address indexed _localToken,
address indexed _remoteToken,
address indexed _from,
address _to,
uint256 _amount,
bytes _data
address indexed localToken,
address indexed remoteToken,
address indexed from,
address to,
uint256 amount,
bytes data
);
function setUp() public virtual override {
......
......@@ -250,9 +250,9 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
*****************************/
event L2OutputDeleted(
bytes32 indexed _l2Output,
uint256 indexed _l1Timestamp,
uint256 indexed _l2BlockNumber
bytes32 indexed l2Output,
uint256 indexed l1Timestamp,
uint256 indexed l2BlockNumber
);
function test_deleteL2Output() external {
......
......@@ -6,8 +6,8 @@ import "../universal/SupportedInterfaces.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
contract OptimismMintableERC20_Test is Bridge_Initializer {
event Mint(address indexed _account, uint256 _amount);
event Burn(address indexed _account, uint256 _amount);
event Mint(address indexed account, uint256 amount);
event Burn(address indexed account, uint256 amount);
function setUp() public override {
super.setUp();
......
......@@ -5,11 +5,11 @@ import { Bridge_Initializer } from "./CommonTest.t.sol";
import { LibRLP } from "./RLP.t.sol";
contract OptimismMintableTokenFactory_Test is Bridge_Initializer {
event StandardL2TokenCreated(address indexed _remoteToken, address indexed _localToken);
event StandardL2TokenCreated(address indexed remoteToken, address indexed localToken);
event OptimismMintableTokenCreated(
address indexed _localToken,
address indexed _remoteToken,
address _deployer
address indexed localToken,
address indexed remoteToken,
address deployer
);
function setUp() public override {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment