mirror of
https://github.com/tornadocash/tornado-nova
synced 2024-02-02 14:53:56 +01:00
docs for L1Helper
This commit is contained in:
parent
4ce8de3232
commit
039721ed7b
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user