From 039721ed7b6d1eac342bb70a1e39bdebd973ece2 Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 26 Oct 2021 12:48:37 +0300 Subject: [PATCH] docs for L1Helper --- contracts/bridge/L1Helper.sol | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contracts/bridge/L1Helper.sol b/contracts/bridge/L1Helper.sol index 5c7e44e..5831736 100644 --- a/contracts/bridge/L1Helper.sol +++ b/contracts/bridge/L1Helper.sol @@ -4,6 +4,7 @@ pragma abicoder v2; import "omnibridge/contracts/helpers/WETHOmnibridgeRouter.sol"; +/// @dev Extension for original WETHOmnibridgeRouter that stores TornadoPool account registrations. contract L1Helper is WETHOmnibridgeRouter { event PublicKey(address indexed owner, bytes key); @@ -18,15 +19,14 @@ contract L1Helper is WETHOmnibridgeRouter { address _owner ) WETHOmnibridgeRouter(_bridge, _weth, _owner) {} + /** @dev Registers provided public key and its owner in pool + * @param _account pair of address and key + */ function register(Account memory _account) public { require(_account.owner == msg.sender, "only owner can be registered"); _register(_account); } - function _register(Account memory _account) internal { - emit PublicKey(_account.owner, _account.publicKey); - } - /** * @dev Wraps native assets and relays wrapped ERC20 tokens to the other chain. * It also calls receiver on other side with the _data provided. @@ -46,4 +46,8 @@ contract L1Helper is WETHOmnibridgeRouter { _register(_account); } } + + function _register(Account memory _account) internal { + emit PublicKey(_account.owner, _account.publicKey); + } }