-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add native ETH support to relayer (#1840)
* WIP: initial relayer api * WIP: use ByTxID naming * Feat: add GetQuoteRequestStatusByTxHash * WIP: initial impl for PUT /tx/retry * Cleanup: comments * Feat: add OriginTxHash to QuoteRequest, RequestForQuote models * Feat: fetch request by origin tx hash instead of dest * WIP: initial relayer api suite * Feat: add /health endpoint * Feat: add TestGetQuoteRequestByTxHash * Fix: use /health in TestNewAPIServer * Feat: add TestGetQuoteRequestByTxID * Cleanup: reorder funcs * WIP: add TestPutTxRetry * Feat: PutTxRetry -> GetTxRetry, remove auth * WIP: set chain IDs on test request * Fix: set transaction submitter in suite * Feat: check for submitted tx in TestGetTxRetry * Cleanup: add SubmitRelay func to deduplicate code * Cleanup: lints * Cleanup: lints * Fix: bump server start timeout * Lint: disable depguard * Fix: check nil tx in TestListenForEvents * Cleanup: use itoa instead of sprintf * [goreleaser] Bump timeout on server startup * Fix: server_test * [goreleaser] Cleanup: lint * WIP: add relayer api config * WIP: add new chain pkg, add APIConfig section for relayer api * Cleanup: lint * Cleanup: APIConfig -> RelayerAPIConfig * Cleanup: APIServer -> QuoterAPIServer * Fix: build * Cleanup: lint * Fix: build * Cleanup: lint * Cleanup: lint * [goreleaser] Remove redundant RelayerAPIConfig section * Feat: add MinGasToken to relayer config * WIP: initial gas token bridging logic * Feat: add TestGenerateQuotesForNativeToken * Fix: GetMinGasToken doesn't error on unset val * Feat: inventory manager registers native token metadata * Feat: add TestETHtoETH integration test * Fix: TestUSDCtoUSDC * Cleanup: lint * Cleanup: isNative -> isGasToken, remove unnecessary lines * Add `hasSufficientGas` check in quote processing (#1939) * Cleanup: Commitable -> Committable * Feat: add gasBalances tracking * Feat: fallback to fetching from gasBalances map * Feat: add hasSufficientGas check * WIP: export HasSufficientGas, add gasMiddleware * WIP: move HasSufficientGas into inventory manager * Feat: inventory manager now uses ClientFetcher instead of omni client * Feat: add mock inventory manager * Fix: tests * Feat: add sufficient gas clause to TestShouldProcess * Cleanup: tests * Feat: add clause testing 0 quote amount * [goreleaser] Fix: handle ETH in getDecimals() * Fix: don't approve ETH * [goreleaser] * Fix: eth to eth integration test * [goreleaser] fix panic * update quoter/generated files * fix err assertion * CI: lower individual timeout to 5m, increase retries * Revert "CI: lower individual timeout to 5m, increase retries" This reverts commit f687e5d. * Fix: Skip TestETHtoETH for now pending anvil fix * Fix: check CI env var to run integration tests --------- Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com>
- Loading branch information
Showing
16 changed files
with
673 additions
and
116 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
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,11 @@ | ||
package chain | ||
|
||
import "github.com/ethereum/go-ethereum/common" | ||
|
||
// EthAddress is the address of a chain's native gas token. | ||
var EthAddress = common.HexToAddress("0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE") | ||
|
||
// IsGasToken returns true if the given token is the gas token. | ||
func IsGasToken(token common.Address) bool { | ||
return token == EthAddress | ||
} |
Oops, something went wrong.