Skip to content

Commit

Permalink
Revert "feat: added new bundler_url and paymaster_url columns to …
Browse files Browse the repository at this point in the history
…`networks` table" (#428)

* Revert "refactor: remove debug logging in SendUserOperation utility function"

This reverts commit 38b7f8b.

* Revert "refactor: update AA service integration and test URLs"

This reverts commit 5a412af.

* Revert "refactor: simplify database client access in getEndpoints"

This reverts commit 89dff2f.

* Revert "feat(migrations): add bundler & paymaster URLs to networks table"

This reverts commit cac5ef5.

* Revert "refactor: remove redundant env vars, optimize database queries, and clean up tests"

This reverts commit 5940119.

* Revert "chore: update test file and remove unnecessary comments"

This reverts commit 1f7d81e.

* Revert "feat: added new `bundler_url` and `paymaster_url` columns to `networks` table"

This reverts commit f731494.
  • Loading branch information
chibie committed Feb 21, 2025
1 parent 83b068b commit 5b91821
Show file tree
Hide file tree
Showing 19 changed files with 198 additions and 840 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start from golang base image
FROM golang:1.23.0-bullseye
FROM golang:1.22.11-bullseye

# Install the air binary
RUN curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start from golang base image
FROM golang:1.23-alpine3.21 as builder
FROM golang:1.22.11-alpine3.21 as builder

# Install git.
RUN apk update && apk add --no-cache git
Expand Down
24 changes: 24 additions & 0 deletions config/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ type OrderConfiguration struct {
RefundCancellationCount int
PercentDeviationFromExternalRate decimal.Decimal
PercentDeviationFromMarketRate decimal.Decimal
BundlerUrlEthereum string
PaymasterUrlEthereum string
BundlerUrlPolygon string
PaymasterUrlPolygon string
BundlerUrlBase string
PaymasterUrlBase string
BundlerUrlBSC string
PaymasterUrlBSC string
BundlerUrlArbitrum string
PaymasterUrlArbitrum string
ActiveAAService string
}

// OrderConfig sets the order configuration
Expand All @@ -34,12 +45,25 @@ func OrderConfig() *OrderConfiguration {
viper.SetDefault("NETWORK_FEE", 0.05)
viper.SetDefault("PERCENT_DEVIATION_FROM_EXTERNAL_RATE", 0.01)
viper.SetDefault("PERCENT_DEVIATION_FROM_MARKET_RATE", 0.1)
viper.SetDefault("ACTIVE_AA_SERVICE", "stackup")

return &OrderConfiguration{
OrderFulfillmentValidity: time.Duration(viper.GetInt("ORDER_FULFILLMENT_VALIDITY")) * time.Minute,
OrderRefundTimeout: time.Duration(viper.GetInt("ORDER_REFUND_TIMEOUT")) * time.Minute,
ReceiveAddressValidity: time.Duration(viper.GetInt("RECEIVE_ADDRESS_VALIDITY")) * time.Minute,
OrderRequestValidity: time.Duration(viper.GetInt("ORDER_REQUEST_VALIDITY")) * time.Second,
TronProApiKey: viper.GetString("TRON_PRO_API_KEY"),
ActiveAAService: viper.GetString("ACTIVE_AA_SERVICE"),
BundlerUrlEthereum: viper.GetString("BUNDLER_URL_ETHEREUM"),
PaymasterUrlEthereum: viper.GetString("PAYMASTER_URL_ETHEREUM"),
BundlerUrlPolygon: viper.GetString("BUNDLER_URL_POLYGON"),
PaymasterUrlPolygon: viper.GetString("PAYMASTER_URL_POLYGON"),
BundlerUrlBase: viper.GetString("BUNDLER_URL_BASE"),
PaymasterUrlBase: viper.GetString("PAYMASTER_URL_BASE"),
BundlerUrlBSC: viper.GetString("BUNDLER_URL_BSC"),
PaymasterUrlBSC: viper.GetString("PAYMASTER_URL_BSC"),
BundlerUrlArbitrum: viper.GetString("BUNDLER_URL_ARBITRUM"),
PaymasterUrlArbitrum: viper.GetString("PAYMASTER_URL_ARBITRUM"),
EntryPointContractAddress: common.HexToAddress(viper.GetString("ENTRY_POINT_CONTRACT_ADDRESS")),
BucketQueueRebuildInterval: viper.GetInt("BUCKET_QUEUE_REBUILD_INTERVAL"),
RefundCancellationCount: viper.GetInt("REFUND_CANCELLATION_COUNT"),
Expand Down
2 changes: 0 additions & 2 deletions ent/migrate/migrations/20250220014823_aa_to_db.sql

This file was deleted.

3 changes: 1 addition & 2 deletions ent/migrate/migrations/atlas.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h1:dR+GjJoPfeuDFy3ZE8clPJfTvnRV/Q1LPkeT1nxVxJ4=
h1:0TorEmKfcV3nUsITm2cbp5Yv14Y/YkjEuBOXQsvpcH4=
20240118234246_initial.sql h1:dYuYBqns33WT+3p8VQvbKUP62k3k6w6h8S+FqNqgSvU=
20240130122324_order_from_address.sql h1:mMVI2iBUd1roIYLUqu0d2jZ7+B6exppRN8qqn+aIHx4=
20240202010744_fees_on_order.sql h1:P7ngxZKqDKefBM5vk6M3kbWeMPVwbZ4MZVcLBjEfS34=
Expand Down Expand Up @@ -43,4 +43,3 @@ h1:dR+GjJoPfeuDFy3ZE8clPJfTvnRV/Q1LPkeT1nxVxJ4=
20241011010524_linked_addresses.sql h1:JvCXlyrRTwXqYPwz5YoGoh+/KEaGiswxmRp//wyxyhU=
20241226183354_add_reference.sql h1:oS3oVJcfD6q7EvDQrTWudCEf3HjBm/yI8XTlPvGqLC8=
20250205002723_lof_optional_txid.sql h1:Ew1wBRx/K1cBIA//BAOjReVJW11idWCIkLnuaF8FdXY=
20250220014823_aa_to_db.sql h1:pqbdJZe7CXgXI7ak+ggHUhjncM7l5Kiw02S4N/hqCXU=
2 changes: 0 additions & 2 deletions ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

148 changes: 1 addition & 147 deletions ent/mutation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 1 addition & 23 deletions ent/network.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions ent/network/network.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5b91821

Please sign in to comment.