Skip to content

Commit

Permalink
Fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasse committed Oct 11, 2024
1 parent 5b6ec12 commit d3dbeb0
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
10 changes: 5 additions & 5 deletions services/rfq/relayer/limiter/limiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/mock"
listenerMock "github.com/synapsecns/sanguine/ethergo/listener/mocks"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridge"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridgev2"
"github.com/synapsecns/sanguine/services/rfq/relayer/limiter"
"github.com/synapsecns/sanguine/services/rfq/relayer/quoter/mocks"
"github.com/synapsecns/sanguine/services/rfq/relayer/reldb"
Expand All @@ -22,7 +22,7 @@ func (l *LimiterSuite) TestOverLimitEnoughConfirmations() {

quote := reldb.QuoteRequest{
BlockNumber: 5,
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: 1,
DestChainId: 2,
OriginToken: util.EthAddress,
Expand All @@ -46,7 +46,7 @@ func (l *LimiterSuite) TestUnderLimitEnoughConfirmations() {

quote := reldb.QuoteRequest{
BlockNumber: 5,
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: 1,
DestChainId: 2,
OriginToken: util.EthAddress,
Expand All @@ -67,7 +67,7 @@ func (l *LimiterSuite) TestUnderLimitNotEnoughConfirmations() {

quote := reldb.QuoteRequest{
BlockNumber: 1, // same block number,but shouldnt matter
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: 1,
DestChainId: 2,
OriginToken: util.EthAddress,
Expand All @@ -92,7 +92,7 @@ func (l *LimiterSuite) TestOverLimitNotEnoughConfirmations() {

quote := reldb.QuoteRequest{
BlockNumber: 4,
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: 1,
DestChainId: 2,
OriginToken: util.EthAddress,
Expand Down
6 changes: 3 additions & 3 deletions services/rfq/relayer/quoter/quoter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/synapsecns/sanguine/core/testsuite"
fetcherMocks "github.com/synapsecns/sanguine/ethergo/submitter/mocks"
"github.com/synapsecns/sanguine/services/rfq/api/model"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridge"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridgev2"
inventoryMocks "github.com/synapsecns/sanguine/services/rfq/relayer/inventory/mocks"
"github.com/synapsecns/sanguine/services/rfq/relayer/pricer"
priceMocks "github.com/synapsecns/sanguine/services/rfq/relayer/pricer/mocks"
Expand Down Expand Up @@ -115,7 +115,7 @@ func (s *QuoterSuite) TestShouldProcess() {
BlockNumber: 1,
OriginTokenDecimals: 6,
DestTokenDecimals: 6,
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: s.origin,
DestChainId: s.destination,
OriginToken: common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"),
Expand Down Expand Up @@ -146,7 +146,7 @@ func (s *QuoterSuite) TestIsProfitable() {
BlockNumber: 1,
OriginTokenDecimals: 6,
DestTokenDecimals: 6,
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: s.origin,
DestChainId: s.destination,
OriginToken: common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"),
Expand Down
4 changes: 2 additions & 2 deletions services/rfq/relayer/relapi/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/synapsecns/sanguine/core/retry"
submitterdb "github.com/synapsecns/sanguine/ethergo/submitter/db"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridge"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridgev2"
"github.com/synapsecns/sanguine/services/rfq/relayer/relapi"
"github.com/synapsecns/sanguine/services/rfq/relayer/reldb"
)
Expand Down Expand Up @@ -202,7 +202,7 @@ func (c *RelayerServerSuite) getTestQuoteRequest(status reldb.QuoteRequestStatus
DestTokenDecimals: 6,
TransactionID: txID,
Status: status,
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: c.originChainID,
DestChainId: c.destChainID,
OriginAmount: big.NewInt(100),
Expand Down
4 changes: 2 additions & 2 deletions services/rfq/relayer/reldb/base/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/brianvoe/gofakeit/v6"

"github.com/ethereum/go-ethereum/common"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridge"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridgev2"
"github.com/synapsecns/sanguine/services/rfq/relayer/reldb"
"github.com/synapsecns/sanguine/services/rfq/relayer/reldb/base"
)
Expand All @@ -23,7 +23,7 @@ func TestRoundtripBetweenFromQuoteRequestAndToQuoteRequest(t *testing.T) {
TransactionID: [32]byte{},
RawRequest: []byte(gofakeit.Paragraph(1, 2, 3, " ")),
Sender: common.Address{},
Transaction: fastbridge.IFastBridgeBridgeTransaction{
Transaction: fastbridgev2.IFastBridgeV2BridgeTransactionV2{
OriginChainId: 1,
DestChainId: 2,
OriginSender: common.Address{},
Expand Down
14 changes: 7 additions & 7 deletions services/rfq/relayer/service/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/synapsecns/sanguine/ethergo/backends/geth"
"github.com/synapsecns/sanguine/ethergo/mocks"
omnirpcHelper "github.com/synapsecns/sanguine/services/omnirpc/testhelper"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgev2mock"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgemockv2"
"github.com/synapsecns/sanguine/services/rfq/relayer/relconfig"
"github.com/synapsecns/sanguine/services/rfq/relayer/service"
"github.com/synapsecns/sanguine/services/rfq/testutil"
Expand Down Expand Up @@ -60,8 +60,8 @@ func (r *RelayerTestSuite) SetupTest() {

serverURL := omnirpcHelper.NewOmnirpcServer(r.GetTestContext(), r.T(), r.destBackend, r.originBackend)

originContract, _ := r.manager.GetMockFastBridgeV2(r.GetTestContext(), r.originBackend)
destContract, _ := r.manager.GetMockFastBridgeV2(r.GetTestContext(), r.destBackend)
originContract, _ := r.manager.GetMockFastBridge(r.GetTestContext(), r.originBackend)
destContract, _ := r.manager.GetMockFastBridge(r.GetTestContext(), r.destBackend)
r.cfg = relconfig.Config{
Database: relconfig.DatabaseConfig{
Type: dbcommon.Sqlite.String(),
Expand Down Expand Up @@ -89,7 +89,7 @@ func (r *RelayerTestSuite) TestStore() {
r.NoError(rel.StartChainParser(r.GetTestContext()))
}()

_, oc := r.manager.GetMockFastBridgeV2(r.GetTestContext(), r.originBackend)
_, oc := r.manager.GetMockFastBridge(r.GetTestContext(), r.originBackend)

auth := r.originBackend.GetTxContext(r.GetTestContext(), nil)

Expand All @@ -100,7 +100,7 @@ func (r *RelayerTestSuite) TestStore() {
r.NoError(err)

//nolint: typecheck
tx, err := oc.MockBridgeRequest(auth.TransactOpts, [32]byte(crypto.Keccak256([]byte("3"))), mocks.MockAddress(), fastbridgev2mock.IFastBridgeV2BridgeParams{
tx, err := oc.MockBridgeRequest(auth.TransactOpts, [32]byte(crypto.Keccak256([]byte("3"))), mocks.MockAddress(), fastbridgemockv2.IFastBridgeBridgeParams{
DstChainId: uint32(r.destBackend.GetChainID()),
To: mocks.MockAddress(),
OriginToken: originToken.Address(),
Expand All @@ -126,7 +126,7 @@ func (r *RelayerTestSuite) TestCommit() {
r.NoError(rel.StartChainParser(r.GetTestContext()))
}()

_, oc := r.manager.GetMockFastBridgeV2(r.GetTestContext(), r.originBackend)
_, oc := r.manager.GetMockFastBridge(r.GetTestContext(), r.originBackend)

auth := r.originBackend.GetTxContext(r.GetTestContext(), nil)

Expand All @@ -137,7 +137,7 @@ func (r *RelayerTestSuite) TestCommit() {
r.NoError(err)

//nolint: typecheck
tx, err := oc.MockBridgeRequest(auth.TransactOpts, [32]byte(crypto.Keccak256([]byte("3"))), mocks.MockAddress(), fastbridgev2mock.IFastBridgeV2BridgeParams{
tx, err := oc.MockBridgeRequest(auth.TransactOpts, [32]byte(crypto.Keccak256([]byte("3"))), mocks.MockAddress(), fastbridgemockv2.IFastBridgeBridgeParams{
DstChainId: uint32(r.destBackend.GetChainID()),
To: mocks.MockAddress(),
OriginToken: originToken.Address(),
Expand Down
4 changes: 2 additions & 2 deletions services/rfq/testutil/contracttype.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/synapsecns/sanguine/ethergo/contracts"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridge"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/dai"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgemock"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgemockv2"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/mockerc20"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/recipientmock"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/usdc"
Expand Down Expand Up @@ -97,7 +97,7 @@ func (c contractTypeImpl) ContractInfo() *compiler.Contract {
case MockERC20Type:
return mockerc20.Contracts["solidity/MockERC20.sol:MockERC20"]
case FastBridgeMockType:
return fastbridgemock.Contracts["solidity/FastBridgeMock.sol:FastBridgeMock"]
return fastbridgemockv2.Contracts["solidity/FastBridgeMock.sol:FastBridgeMock"]
case RecipientMockType:
return recipientmock.Contracts["solidity/RecipientMock.sol:RecipientMock"]
case WETH9Type:
Expand Down
6 changes: 3 additions & 3 deletions services/rfq/testutil/deployers.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/synapsecns/sanguine/ethergo/deployer"
"github.com/synapsecns/sanguine/ethergo/manager"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridgev2"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgemock"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgemockv2"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/recipientmock"
)

Expand Down Expand Up @@ -135,9 +135,9 @@ func NewMockFastBridgeDeployer(registry deployer.GetOnlyContractRegistry, backen
// Deploy deploys the mock fast bridge contract.
func (m MockFastBridgeDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error) {
return m.DeploySimpleContract(ctx, func(transactOps *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, interface{}, error) {
return fastbridgemock.DeployFastBridgeMock(transactOps, backend, transactOps.From)
return fastbridgemockv2.DeployFastBridgeMock(transactOps, backend, transactOps.From)
}, func(address common.Address, backend bind.ContractBackend) (interface{}, error) {
return fastbridgemock.NewFastBridgeMockRef(address, backend)
return fastbridgemockv2.NewFastBridgeMockRef(address, backend)
})
}

Expand Down
6 changes: 3 additions & 3 deletions services/rfq/testutil/typecast.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/synapsecns/sanguine/ethergo/manager"
"github.com/synapsecns/sanguine/services/rfq/contracts/fastbridgev2"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/dai"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgemock"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/fastbridgemockv2"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/mockerc20"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/recipientmock"
"github.com/synapsecns/sanguine/services/rfq/contracts/testcontracts/usdc"
Expand All @@ -31,10 +31,10 @@ func (d *DeployManager) GetMockERC20(ctx context.Context, backend backends.Simul
}

// GetMockFastBridge gets the mock fast bridge.
func (d *DeployManager) GetMockFastBridge(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *fastbridgemock.FastBridgeMockRef) {
func (d *DeployManager) GetMockFastBridge(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *fastbridgemockv2.FastBridgeMockRef) {
d.T().Helper()

return manager.GetContract[*fastbridgemock.FastBridgeMockRef](ctx, d.T(), d, backend, FastBridgeMockType)
return manager.GetContract[*fastbridgemockv2.FastBridgeMockRef](ctx, d.T(), d, backend, FastBridgeMockType)
}

// GetMockRecipient gets the mock recipient.

Check failure on line 40 in services/rfq/testutil/typecast.go

View workflow job for this annotation

GitHub Actions / Lint (services/rfq)

exported: comment on exported method DeployManager.GetRecipientMock should be of the form "GetRecipientMock ..." (revive)
Expand Down

0 comments on commit d3dbeb0

Please sign in to comment.