|
1 | 1 | use anyhow::Result as AnyResult;
|
| 2 | +use base64::{engine::general_purpose, Engine as _}; |
2 | 3 | use cosmwasm_std::{
|
3 | 4 | from_json, to_json_binary, Addr, Api, BankMsg, Binary, BlockInfo, Coin, CosmosMsg, CustomQuery,
|
4 | 5 | Decimal, Querier, Storage, Uint128, Uint64,
|
5 | 6 | };
|
6 | 7 | use cw_multi_test::{AppResponse, BankSudo, CosmosRouter, Module, SudoMsg};
|
7 | 8 | use schemars::JsonSchema;
|
8 |
| -use sei_cosmwasm::{Cancellation, DenomOracleExchangeRatePair, DexPair, DexTwap, DexTwapsResponse, Epoch, EpochResponse, EvmAddressResponse, ExchangeRatesResponse, GetOrderByIdResponse, GetOrdersResponse, OracleTwap, OracleTwapsResponse, Order, OrderResponse, OrderSimulationResponse, OrderStatus, PositionDirection, SeiAddressResponse, SeiMsg, SeiQuery, SeiQueryWrapper, StaticCallResponse, SudoMsg as SeiSudoMsg}; |
| 9 | +use sei_cosmwasm::{ |
| 10 | + Cancellation, DenomOracleExchangeRatePair, DexPair, DexTwap, DexTwapsResponse, Epoch, |
| 11 | + EpochResponse, EvmAddressResponse, ExchangeRatesResponse, GetOrderByIdResponse, |
| 12 | + GetOrdersResponse, OracleTwap, OracleTwapsResponse, Order, OrderResponse, |
| 13 | + OrderSimulationResponse, OrderStatus, PositionDirection, SeiAddressResponse, SeiMsg, SeiQuery, |
| 14 | + SeiQueryWrapper, StaticCallResponse, SudoMsg as SeiSudoMsg, |
| 15 | +}; |
9 | 16 | use serde::de::DeserializeOwned;
|
10 | 17 | use std::{
|
11 | 18 | collections::HashMap,
|
12 | 19 | fmt::Debug,
|
13 | 20 | ops::{Add, Div, Mul, Sub},
|
14 | 21 | };
|
15 |
| -use base64::{Engine as _, engine::{general_purpose}}; |
16 | 22 |
|
17 | 23 | pub struct SeiModule {
|
18 | 24 | epoch: Epoch,
|
@@ -186,9 +192,7 @@ impl Module for SeiModule {
|
186 | 192 | id,
|
187 | 193 | );
|
188 | 194 | }
|
189 |
| - SeiQuery::StaticCall { .. } => { |
190 |
| - Ok(to_json_binary(&get_static_call_response())?) |
191 |
| - } |
| 195 | + SeiQuery::StaticCall { .. } => Ok(to_json_binary(&get_static_call_response())?), |
192 | 196 | SeiQuery::GetEvmAddress { sei_address } => {
|
193 | 197 | Ok(to_json_binary(&get_evm_address(sei_address))?)
|
194 | 198 | }
|
@@ -655,7 +659,7 @@ fn get_epoch(epoch: Epoch) -> EpochResponse {
|
655 | 659 |
|
656 | 660 | fn get_static_call_response() -> StaticCallResponse {
|
657 | 661 | StaticCallResponse {
|
658 |
| - encoded_data: general_purpose::STANDARD.encode(b"static call response") |
| 662 | + encoded_data: general_purpose::STANDARD.encode(b"static call response"), |
659 | 663 | }
|
660 | 664 | }
|
661 | 665 |
|
|
0 commit comments