Skip to content

Commit a5f82f7

Browse files
authored
fix: update mandate output field (#103)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> ## Related Issue Or Context <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Otherwise, describe context and motivation for change herre --> Closes: #<issue> ## How Has This Been Tested? Testing details. <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have ensured that all acceptance criteria (or expected behavior) from issue are met - [ ] I have updated the documentation locally and in docs. - [ ] I have added tests to cover my changes. - [ ] I have ensured that all the checks are passing and green, I've signed the CLA bot
1 parent 97f7b86 commit a5f82f7

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

chains/evm/calls/consts/lifi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var LifiABI, _ = abi.JSON(strings.NewReader(`[{
2222
{"name": "token", "type": "bytes32"},
2323
{"name": "amount", "type": "uint256"},
2424
{"name": "recipient", "type": "bytes32"},
25-
{"name": "call", "type": "bytes"},
25+
{"name": "callbackData", "type": "bytes"},
2626
{"name": "context", "type": "bytes"}
2727
]
2828
},

chains/evm/message/lifiEscrow.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -207,19 +207,19 @@ func (h *LifiEscrowMessageHandler) borrowToken(order *lifi.LifiOrder) (common.Ad
207207

208208
func (h *LifiEscrowMessageHandler) calldata(order *lifi.LifiOrder) ([]byte, error) {
209209
type output struct {
210-
Oracle common.Hash
211-
Settler common.Hash
212-
Recipient common.Hash
213-
ChainId *big.Int
214-
Token common.Hash
215-
Amount *big.Int
216-
Call []byte
217-
Context []byte
210+
Oracle common.Hash
211+
Settler common.Hash
212+
Recipient common.Hash
213+
ChainId *big.Int
214+
Token common.Hash
215+
Amount *big.Int
216+
CallbackData []byte
217+
Context []byte
218218
}
219219
outputs := make([]output, len(order.Order.Outputs))
220220
for i, o := range order.Order.Outputs {
221221
chainID := new(big.Int).SetUint64(o.ChainID)
222-
call, err := hexutil.Decode(o.Call)
222+
callbackData, err := hexutil.Decode(o.CallbackData)
223223
if err != nil {
224224
return nil, err
225225
}
@@ -228,14 +228,14 @@ func (h *LifiEscrowMessageHandler) calldata(order *lifi.LifiOrder) ([]byte, erro
228228
return nil, err
229229
}
230230
outputs[i] = output{
231-
Oracle: *o.Oracle,
232-
Settler: *o.Settler,
233-
ChainId: chainID,
234-
Amount: o.Amount.Int,
235-
Recipient: *o.Recipient,
236-
Call: call,
237-
Context: context,
238-
Token: *o.Token,
231+
Oracle: *o.Oracle,
232+
Settler: *o.Settler,
233+
ChainId: chainID,
234+
Amount: o.Amount.Int,
235+
Recipient: *o.Recipient,
236+
CallbackData: callbackData,
237+
Context: context,
238+
Token: *o.Token,
239239
}
240240
}
241241

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/rs/zerolog v1.25.0
2121
github.com/spf13/cobra v1.8.1
2222
github.com/spf13/viper v1.9.0
23-
github.com/sprintertech/lifi-solver v0.0.0-20251107125259-138b58fd00bc
23+
github.com/sprintertech/lifi-solver v0.0.0-20251107154632-5c22e7948a82
2424
github.com/sprintertech/solver-config/go v0.0.0-20251107123115-0ea5f862cab9
2525
github.com/stretchr/testify v1.10.0
2626
github.com/sygmaprotocol/sygma-core v0.0.0-20250304150334-bd39ac4f7b82

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,8 @@ github.com/sprintertech/lifi-solver v0.0.0-20251106144931-4586926e1a4c h1:gt7WBO
954954
github.com/sprintertech/lifi-solver v0.0.0-20251106144931-4586926e1a4c/go.mod h1:3yuTgBKvA5WLCFsXXuBnOzk5nNS58phc881uXLGfD0o=
955955
github.com/sprintertech/lifi-solver v0.0.0-20251107125259-138b58fd00bc h1:h/DY03o7cOez2Ilrwt9TO9BKWIYrAo3o/KvhvEwkziQ=
956956
github.com/sprintertech/lifi-solver v0.0.0-20251107125259-138b58fd00bc/go.mod h1:d5/fytopwudQUE9ojF54XwtqLRFD3JbpBlri7ygb3ng=
957+
github.com/sprintertech/lifi-solver v0.0.0-20251107154632-5c22e7948a82 h1:Nq9wH4wU4W+3UXfeTqGwMBxr+yKDkz0wO6XzpSRkamg=
958+
github.com/sprintertech/lifi-solver v0.0.0-20251107154632-5c22e7948a82/go.mod h1:d5/fytopwudQUE9ojF54XwtqLRFD3JbpBlri7ygb3ng=
957959
github.com/sprintertech/solver-config/go v0.0.0-20251027142430-7f32bdd5da1e h1:5sSP6GbqCT/ApxxZmUtav6GHy5Ke98zh5oqQxewhJd4=
958960
github.com/sprintertech/solver-config/go v0.0.0-20251027142430-7f32bdd5da1e/go.mod h1:MrIGW6M815PSYKtWSeOd1Z7eiSeOIk/uA/6E2PhlQVQ=
959961
github.com/sprintertech/solver-config/go v0.0.0-20251107123115-0ea5f862cab9 h1:oo4/4LvkYMVVl/u9+iqEY91iCDFJ05pGwUJNX+6APnA=

0 commit comments

Comments
 (0)