@@ -130,7 +130,7 @@ func TransferOps(tx *evmClient.LoadedTransaction, startIndex int) []*RosettaType
130130 return ops
131131}
132132
133- func FeeOps (tx * evmClient.LoadedTransaction ) []* RosettaTypes.Operation {
133+ func FeeOps (tx * evmClient.LoadedTransaction , native_currency * RosettaTypes. Currency ) []* RosettaTypes.Operation {
134134 var minerEarnedAmount * big.Int
135135 if tx .FeeBurned == nil {
136136 minerEarnedAmount = tx .FeeAmount
@@ -157,7 +157,7 @@ func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation {
157157 Account : & RosettaTypes.AccountIdentifier {
158158 Address : evmClient .MustChecksum (tx .From .String ()),
159159 },
160- Amount : evmClient .Amount (new (big.Int ).Neg (minerEarnedAmount ), sdkTypes . Currency ),
160+ Amount : evmClient .Amount (new (big.Int ).Neg (minerEarnedAmount ), native_currency ),
161161 },
162162
163163 {
@@ -174,7 +174,7 @@ func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation {
174174 Account : & RosettaTypes.AccountIdentifier {
175175 Address : evmClient .MustChecksum (feeRewarder ),
176176 },
177- Amount : evmClient .Amount (minerEarnedAmount , sdkTypes . Currency ),
177+ Amount : evmClient .Amount (minerEarnedAmount , native_currency ),
178178 },
179179 }
180180
@@ -189,7 +189,7 @@ func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation {
189189 Type : sdkTypes .FeeOpType ,
190190 Status : RosettaTypes .String (sdkTypes .SuccessStatus ),
191191 Account : evmClient .Account (tx .From ),
192- Amount : evmClient .Amount (new (big.Int ).Neg (tx .FeeBurned ), sdkTypes . Currency ),
192+ Amount : evmClient .Amount (new (big.Int ).Neg (tx .FeeBurned ), native_currency ),
193193 }
194194
195195 ops = append (ops , burntOp )
@@ -203,6 +203,7 @@ func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation {
203203func TraceOps (
204204 calls []* evmClient.FlatCall ,
205205 startIndex int ,
206+ native_currency * RosettaTypes.Currency ,
206207) []* RosettaTypes.Operation { // nolint: gocognit
207208 var ops []* RosettaTypes.Operation
208209 if len (calls ) == 0 {
@@ -250,7 +251,7 @@ func TraceOps(
250251 },
251252 Amount : & RosettaTypes.Amount {
252253 Value : new (big.Int ).Neg (trace .Value ).String (),
253- Currency : sdkTypes . Currency ,
254+ Currency : native_currency ,
254255 },
255256 Metadata : metadata ,
256257 }
@@ -311,7 +312,7 @@ func TraceOps(
311312 },
312313 Amount : & RosettaTypes.Amount {
313314 Value : trace .Value .String (),
314- Currency : sdkTypes . Currency ,
315+ Currency : native_currency ,
315316 },
316317 Metadata : metadata ,
317318 }
@@ -355,7 +356,7 @@ func TraceOps(
355356 },
356357 Amount : & RosettaTypes.Amount {
357358 Value : new (big.Int ).Neg (val ).String (),
358- Currency : sdkTypes . Currency ,
359+ Currency : native_currency ,
359360 },
360361 })
361362 }
0 commit comments