@@ -166,8 +166,9 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
166166 Expect (err ).ToNot (HaveOccurred (), "error while funding account" )
167167 Expect (is .network .NextBlock ()).ToNot (HaveOccurred (), "error on NextBlock" )
168168
169- queryArgs , balancesArgs := getTxAndCallArgs (directCall , contractData , bank2 .BalancesMethod , receiver )
170- _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , balancesArgs , passCheck )
169+ queryArgs := getTxAndCallArgs (directCall , contractData )
170+ args := & bank2.BalancesCall {Account : receiver }
171+ _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , args , passCheck )
171172 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
172173
173174 var ret bank2.BalancesReturn
@@ -189,7 +190,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
189190 Expect (err ).ToNot (HaveOccurred (), "error while funding account" )
190191 Expect (is .network .NextBlock ()).ToNot (HaveOccurred (), "error on NextBlock" )
191192
192- queryArgs , balancesArgs := getTxAndCallArgs (directCall , contractData , bank2 .BalancesMethod , receiver )
193+ queryArgs := getTxAndCallArgs (directCall , contractData )
194+ balancesArgs := & bank2.BalancesCall {Account : receiver }
193195 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , balancesArgs , passCheck )
194196 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
195197
@@ -205,7 +207,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
205207 })
206208
207209 It ("should return no balance for new account" , func () {
208- queryArgs , balancesArgs := getTxAndCallArgs (directCall , contractData , bank2 .BalancesMethod , utiltx .GenerateAddress ())
210+ queryArgs := getTxAndCallArgs (directCall , contractData )
211+ balancesArgs := & bank2.BalancesCall {Account : utiltx .GenerateAddress ()}
209212 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , balancesArgs , passCheck )
210213 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
211214
@@ -217,7 +220,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
217220 })
218221
219222 It ("should consume the correct amount of gas" , func () {
220- queryArgs , balancesArgs := getTxAndCallArgs (directCall , contractData , bank2 .BalancesMethod , sender .Addr )
223+ queryArgs := getTxAndCallArgs (directCall , contractData )
224+ balancesArgs := & bank2.BalancesCall {Account : sender .Addr }
221225 res , err := is .factory .ExecuteContractCall (sender .Priv , queryArgs , balancesArgs )
222226 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
223227
@@ -236,7 +240,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
236240
237241 Context ("totalSupply query" , func () {
238242 It ("should return the correct total supply" , func () {
239- queryArgs , supplyArgs := getTxAndCallArgs (directCall , contractData , bank2 .TotalSupplyMethod )
243+ queryArgs := getTxAndCallArgs (directCall , contractData )
244+ supplyArgs := & bank2.TotalSupplyCall {}
240245 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
241246 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
242247
@@ -251,7 +256,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
251256
252257 Context ("supplyOf query" , func () {
253258 It ("should return the supply of Cosmos EVM" , func () {
254- queryArgs , supplyArgs := getTxAndCallArgs (directCall , contractData , bank2 .SupplyOfMethod , is .cosmosEVMAddr )
259+ queryArgs := getTxAndCallArgs (directCall , contractData )
260+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : is .cosmosEVMAddr }
255261 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
256262 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
257263
@@ -263,7 +269,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
263269 })
264270
265271 It ("should return the supply of XMPL" , func () {
266- queryArgs , supplyArgs := getTxAndCallArgs (directCall , contractData , bank2 .SupplyOfMethod , is .xmplAddr )
272+ queryArgs := getTxAndCallArgs (directCall , contractData )
273+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : is .xmplAddr }
267274 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
268275 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
269276
@@ -275,7 +282,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
275282 })
276283
277284 It ("should return a supply of 0 for a non existing token" , func () {
278- queryArgs , supplyArgs := getTxAndCallArgs (directCall , contractData , bank2 .SupplyOfMethod , utiltx .GenerateAddress ())
285+ queryArgs := getTxAndCallArgs (directCall , contractData )
286+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : utiltx .GenerateAddress ()}
279287 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
280288 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
281289
@@ -287,7 +295,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
287295 })
288296
289297 It ("should consume the correct amount of gas" , func () {
290- queryArgs , supplyArgs := getTxAndCallArgs (directCall , contractData , bank2 .SupplyOfMethod , is .xmplAddr )
298+ queryArgs := getTxAndCallArgs (directCall , contractData )
299+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : is .xmplAddr }
291300 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
292301 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
293302
@@ -312,7 +321,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
312321 Expect (err ).ToNot (HaveOccurred (), "error while funding account" )
313322 Expect (is .network .NextBlock ()).ToNot (HaveOccurred (), "error on NextBlock" )
314323
315- queryArgs , balancesArgs := getTxAndCallArgs (contractCall , contractData , BalancesFunction , receiver )
324+ queryArgs := getTxAndCallArgs (contractCall , contractData )
325+ balancesArgs := & bank2.BalancesCall {Account : receiver }
316326 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , balancesArgs , passCheck )
317327 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
318328
@@ -335,7 +345,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
335345 Expect (err ).ToNot (HaveOccurred (), "error while funding account" )
336346 Expect (is .network .NextBlock ()).ToNot (HaveOccurred (), "error on NextBlock" )
337347
338- queryArgs , balancesArgs := getTxAndCallArgs (contractCall , contractData , BalancesFunction , receiver )
348+ queryArgs := getTxAndCallArgs (contractCall , contractData )
349+ balancesArgs := & bank2.BalancesCall {Account : receiver }
339350 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , balancesArgs , passCheck )
340351 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
341352
@@ -351,7 +362,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
351362 })
352363
353364 It ("should return no balance for new account" , func () {
354- queryArgs , balancesArgs := getTxAndCallArgs (contractCall , contractData , BalancesFunction , utiltx .GenerateAddress ())
365+ queryArgs := getTxAndCallArgs (contractCall , contractData )
366+ balancesArgs := & bank2.BalancesCall {Account : utiltx .GenerateAddress ()}
355367 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , balancesArgs , passCheck )
356368 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
357369
@@ -363,7 +375,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
363375 })
364376
365377 It ("should consume the correct amount of gas" , func () {
366- queryArgs , balancesArgs := getTxAndCallArgs (contractCall , contractData , BalancesFunction , sender .Addr )
378+ queryArgs := getTxAndCallArgs (contractCall , contractData )
379+ balancesArgs := & bank2.BalancesCall {Account : sender .Addr }
367380 res , err := is .factory .ExecuteContractCall (sender .Priv , queryArgs , balancesArgs )
368381 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
369382
@@ -382,7 +395,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
382395
383396 Context ("totalSupply query" , func () {
384397 It ("should return the correct total supply" , func () {
385- queryArgs , supplyArgs := getTxAndCallArgs (contractCall , contractData , TotalSupplyOf )
398+ queryArgs := getTxAndCallArgs (contractCall , contractData )
399+ supplyArgs := & bank2.TotalSupplyCall {}
386400 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
387401 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
388402
@@ -397,7 +411,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
397411
398412 Context ("supplyOf query" , func () {
399413 It ("should return the supply of Cosmos EVM" , func () {
400- queryArgs , supplyArgs := getTxAndCallArgs (contractCall , contractData , SupplyOfFunction , is .cosmosEVMAddr )
414+ queryArgs := getTxAndCallArgs (contractCall , contractData )
415+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : is .cosmosEVMAddr }
401416 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
402417 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
403418
@@ -409,7 +424,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
409424 })
410425
411426 It ("should return the supply of XMPL" , func () {
412- queryArgs , supplyArgs := getTxAndCallArgs (contractCall , contractData , SupplyOfFunction , is .xmplAddr )
427+ queryArgs := getTxAndCallArgs (contractCall , contractData )
428+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : is .xmplAddr }
413429 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
414430 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
415431
@@ -421,7 +437,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
421437 })
422438
423439 It ("should return a supply of 0 for a non existing token" , func () {
424- queryArgs , supplyArgs := getTxAndCallArgs (contractCall , contractData , SupplyOfFunction , utiltx .GenerateAddress ())
440+ queryArgs := getTxAndCallArgs (contractCall , contractData )
441+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : utiltx .GenerateAddress ()}
425442 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
426443 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
427444
@@ -433,7 +450,8 @@ func TestIntegrationSuite(t *testing.T, create network.CreateEvmApp, options ...
433450 })
434451
435452 It ("should consume the correct amount of gas" , func () {
436- queryArgs , supplyArgs := getTxAndCallArgs (contractCall , contractData , SupplyOfFunction , is .xmplAddr )
453+ queryArgs := getTxAndCallArgs (contractCall , contractData )
454+ supplyArgs := & bank2.SupplyOfCall {Erc20Address : is .xmplAddr }
437455 _ , ethRes , err := is .factory .CallContractAndCheckLogs (sender .Priv , queryArgs , supplyArgs , passCheck )
438456 Expect (err ).ToNot (HaveOccurred (), "unexpected result calling contract" )
439457
0 commit comments