-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ERC20 token bridging (withdrawal flow) (#1259)
* Extract common code for withdraw and deposit commands * Refactor deposit and withdraw commands, introduce exit command (draft) * Mark json rpc flags optional and rely on default values * Withdrawal workflow implemented * Cleanups * Remove child-token flag * E2E build fix * Document bridge exit command * Refactor flags in bridge subcommands * Remove AdminAddr from manifest file * Update polybft readme * Update README.md Remove child-token flag from deposit-erc20 command example. * Fix receivers addresses * Code cleanup and wrapping up * Generate missing bindings * Remove json rpc unused flag name * Introduce L2StateSyncedEvent and utilize it * Remove outdated comment
- Loading branch information
1 parent
ee35129
commit a20e154
Showing
27 changed files
with
1,221 additions
and
610 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package common | ||
|
||
import ( | ||
"errors" | ||
) | ||
|
||
const ( | ||
SenderKeyFlag = "sender-key" | ||
ReceiversFlag = "receivers" | ||
AmountsFlag = "amounts" | ||
) | ||
|
||
var ( | ||
errInconsistentAccounts = errors.New("receivers and amounts must be equal length") | ||
) | ||
|
||
type ERC20BridgeParams struct { | ||
TxnSenderKey string | ||
Receivers []string | ||
Amounts []string | ||
} | ||
|
||
func (bp *ERC20BridgeParams) ValidateFlags() error { | ||
if len(bp.Receivers) != len(bp.Amounts) { | ||
return errInconsistentAccounts | ||
} | ||
|
||
return nil | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.