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

feat(ethereum contracts): Introduce governance-driven ProxyUpdater #179

Merged
merged 6 commits into from
Nov 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Doc-comments
  • Loading branch information
mertwole committed Oct 29, 2024
commit 60f4192789c2206cde504d09c3701ebd6f9f6d2e
14 changes: 14 additions & 0 deletions ethereum/src/ERC20Gateway.sol
Original file line number Diff line number Diff line change
@@ -31,6 +31,20 @@ contract ERC20Gateway is IERC20Gateway, IMessageQueueReceiver {
emit BridgingRequested(tx.origin, to, token, amount);
}

/** @dev Accept bridging request made on other side of bridge.
* This request must be sent by `MessageQueue` only. When such a request is accepted, tokens
* are minted to the corresponding account address, specified in `payload`.
*
* Expected `payload` consisits of these:
* - `receiver` - account to mint tokens to
* - `token` - token to mint
* - `amount` - amount of tokens to mint
*
* Expected sender should be `vft-treasury` program on gear.
*
* @param sender sender of message on the gear side.
* @param payload payload of the message.
*/
function processVaraMessage(
bytes32 sender,
bytes calldata payload
12 changes: 12 additions & 0 deletions ethereum/src/ERC20Treasury.sol
Original file line number Diff line number Diff line change
@@ -32,6 +32,18 @@ contract ERC20Treasury is IERC20Treasury, IMessageQueueReceiver {
emit Deposit(tx.origin, to, token, amount);
mertwole marked this conversation as resolved.
Show resolved Hide resolved
}

/** @dev Request withdraw of tokens. This request must be sent by `MessageQueue` only.
*
* Expected `payload` consisits of these:
* - `receiver` - account to withdraw tokens to
* - `token` - token to withdraw
* - `amount` - amount of tokens to withdraw
*
* Expected sender should be `vft-gateway` program on gear.
*
* @param sender sender of message on the gear side.
* @param payload payload of the message.
*/
function processVaraMessage(
bytes32 sender,
bytes calldata payload
Loading