Skip to content

Commit 160c65e

Browse files
authored
fix: set repayer address from solver config (#43)
* fix: set repayer address from solver config * Fix code quality action * Deprecate code quality
1 parent 1b2fe62 commit 160c65e

File tree

5 files changed

+16
-51
lines changed

5 files changed

+16
-51
lines changed

.github/workflows/code-quality.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

chains/evm/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func NewEVMConfig(chainConfig map[string]interface{}, solverConfig solverConfig.
9595
config := &EVMConfig{
9696
GeneralChainConfig: c.GeneralChainConfig,
9797
Admin: c.Admin,
98-
Repayer: c.Repayer,
98+
Repayer: solverConfig.ProtocolsMetadata.Sprinter.Repayer[id],
9999

100100
AcrossPool: solverConfig.ProtocolsMetadata.Across.SpokePools[id],
101101
AcrossHubPool: solverConfig.ProtocolsMetadata.Across.HubPools[id],

chains/evm/config_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ func (s *NewEVMConfigTestSuite) Test_ValidConfig() {
102102
"eip155:1": "mayanSwift",
103103
},
104104
},
105+
Sprinter: &solverConfig.SprinterMetadata{
106+
Repayer: map[string]string{
107+
"eip155:1": "repayer",
108+
},
109+
},
105110
},
106111
})
107112

@@ -119,6 +124,7 @@ func (s *NewEVMConfigTestSuite) Test_ValidConfig() {
119124
BlockInterval: big.NewInt(5),
120125
BlockRetryInterval: time.Duration(5) * time.Second,
121126
Admin: "adminAddress",
127+
Repayer: "repayer",
122128
AcrossPool: "acrossPool",
123129
AcrossHubPool: "acrossHubPool",
124130
MayanSwift: "mayanSwift",
@@ -204,6 +210,11 @@ func (s *NewEVMConfigTestSuite) Test_ValidConfigWithCustomTxParams() {
204210
"eip155:1": "mayanSwift",
205211
},
206212
},
213+
Sprinter: &solverConfig.SprinterMetadata{
214+
Repayer: map[string]string{
215+
"eip155:1": "repayer",
216+
},
217+
},
207218
},
208219
})
209220

@@ -224,6 +235,7 @@ func (s *NewEVMConfigTestSuite) Test_ValidConfigWithCustomTxParams() {
224235
AcrossPool: "acrossPool",
225236
AcrossHubPool: "acrossHubPool",
226237
MayanSwift: "mayanSwift",
238+
Repayer: "repayer",
227239
ConfirmationsByValue: expectedBlockConfirmations,
228240
Tokens: expectedTokens,
229241
})

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/rs/zerolog v1.25.0
1919
github.com/spf13/cobra v1.8.1
2020
github.com/spf13/viper v1.9.0
21-
github.com/sprintertech/solver-config/go v0.0.0-20250513131040-3cde77de33bb
21+
github.com/sprintertech/solver-config/go v0.0.0-20250529124037-c285cf3b5a60
2222
github.com/stretchr/testify v1.10.0
2323
github.com/sygmaprotocol/sygma-core v0.0.0-20250304150334-bd39ac4f7b82
2424
go.opentelemetry.io/otel v1.16.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ github.com/spf13/viper v1.9.0 h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk=
766766
github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4=
767767
github.com/sprintertech/solver-config/go v0.0.0-20250513131040-3cde77de33bb h1:FUjoMHQu+thSACVV+RlCoIe5uc9/POdAOCjUrmkPVfk=
768768
github.com/sprintertech/solver-config/go v0.0.0-20250513131040-3cde77de33bb/go.mod h1:Y0MjuSx4gxwYo9/rJcwB05DmNwDsDVcGDphh6hN0uX8=
769+
github.com/sprintertech/solver-config/go v0.0.0-20250529124037-c285cf3b5a60 h1:QBjqQFS3SvchRtpUOIWfJG9S5cTz/6rHrCzXEOPAXqY=
770+
github.com/sprintertech/solver-config/go v0.0.0-20250529124037-c285cf3b5a60/go.mod h1:MrIGW6M815PSYKtWSeOd1Z7eiSeOIk/uA/6E2PhlQVQ=
769771
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
770772
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
771773
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=

0 commit comments

Comments
 (0)