Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksuss committed Jun 26, 2023
1 parent 19464b9 commit 27cd425
Show file tree
Hide file tree
Showing 10 changed files with 435 additions and 458 deletions.
809 changes: 391 additions & 418 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "aurora-cli-rs"
version = "0.1.0"
authors = ["Aurora Labs <[email protected]>"]
edition = "2021"
rust-version = "1.68.2"
rust-version = "1.69.0"
homepage = "https://github.com/aurora-is-near/aurora-cli-rs"
repository = "https://github.com/aurora-is-near/aurora-cli-rs"
description = "Aurora CLI is a command line interface to bootstrap Aurora engine"
Expand All @@ -19,36 +19,34 @@ simple = []
advanced = []

[dependencies]
aurora-engine = { git = "https://github.com/aurora-is-near/aurora-engine.git", branch = "feat/aleksuss/silo", features = ["std", "impl-serde"] }
aurora-engine-precompiles = { git = "https://github.com/aurora-is-near/aurora-engine.git", branch = "feat/aleksuss/silo", features = ["std"] }
aurora-engine-sdk = { git = "https://github.com/aurora-is-near/aurora-engine.git", branch = "feat/aleksuss/silo", features = ["std"] }
aurora-engine-transactions = { git = "https://github.com/aurora-is-near/aurora-engine.git", branch = "feat/aleksuss/silo", features = ["std"] }
aurora-engine-types = { git = "https://github.com/aurora-is-near/aurora-engine.git", branch = "feat/aleksuss/silo", features = ["std", "impl-serde"] }

anyhow = "1"
borsh = "0.10"
bs58 = "0.4.0"
bs58 = "0.5"
clap = { version = "4", features = ["derive"] }
ethabi = "18"
hex = "0.4.3"
lazy_static = "1.4.0"
libsecp256k1 = { version = "0.7", features = ["std"] }
near-chain-configs = "0.16"
near-crypto = "0.16"
near-jsonrpc-client = "0.5"
near-jsonrpc-primitives = "0.16"
near-primitives = "0.16"
near-chain-configs = "0.17"
near-crypto = "0.17"
near-jsonrpc-client = "0.6"
near-jsonrpc-primitives = "0.17"
near-primitives = "0.17"
reqwest = { version = "0.11", features = ["json"] }
rand = "0.8"
rlp = "0.5.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
shadow-rs = "0.21.0"
shadow-rs = "0.23"
thiserror = "1"
tokio = { version = "1", features = ["full"] }

[dev-dependencies]
rand = "0.8"

[build-dependencies]
shadow-rs = "0.21.0"
shadow-rs = "0.23"
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.68.2"
channel = "1.69.0"
components = [ "clippy", "rustfmt" ]
9 changes: 5 additions & 4 deletions src/cli/advanced/near.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ use crate::{
config::{Config, Network},
utils,
};
use aurora_engine::parameters::{
DeployErc20TokenArgs, GetStorageAtArgs, InitCallArgs, NewCallArgs, NewCallArgsV2,
PauseEthConnectorCallArgs, SubmitResult, TransactionStatus,
use aurora_engine_types::borsh::{BorshDeserialize, BorshSerialize};
use aurora_engine_types::parameters::connector::InitCallArgs;
use aurora_engine_types::parameters::engine::{
DeployErc20TokenArgs, GetStorageAtArgs, NewCallArgs, NewCallArgsV2, PauseEthConnectorCallArgs,
SubmitResult, TransactionStatus,
};
use aurora_engine_types::{
account_id::AccountId,
parameters::{CrossContractCallArgs, PromiseArgs, PromiseCreateArgs},
types::{Address, NearGas, Wei, Yocto},
H256, U256,
};
use borsh::{BorshDeserialize, BorshSerialize};
use clap::Subcommand;
use near_primitives::{
account::{AccessKey, Account},
Expand Down
20 changes: 13 additions & 7 deletions src/cli/simple/command/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use aurora_engine::parameters::{
GetStorageAtArgs, InitCallArgs, NewCallArgs, NewCallArgsV2, PausePrecompilesCallArgs,
SetOwnerArgs, TransactionStatus,
};
use aurora_engine::xcc::FundXccArgs;
use aurora_engine_sdk::types::near_account_to_evm_address;
use aurora_engine_types::account_id::AccountId;
use aurora_engine_types::parameters::engine::SubmitResult;
use aurora_engine_types::borsh::{self, BorshDeserialize, BorshSerialize};
use aurora_engine_types::parameters::connector::InitCallArgs;
use aurora_engine_types::parameters::engine::{
GetStorageAtArgs, NewCallArgs, NewCallArgsV2, PausePrecompilesCallArgs, SetOwnerArgs,
SubmitResult, TransactionStatus,
};
use aurora_engine_types::types::Address;
use aurora_engine_types::{types::Wei, H256, U256};
use borsh::{BorshDeserialize, BorshSerialize};
use near_primitives::views::{CallResult, FinalExecutionStatus};
use serde_json::Value;
use std::fmt::{Display, Formatter};
Expand Down Expand Up @@ -356,6 +355,13 @@ pub async fn factory_set_wnear_address(client: Client, address: String) -> anyho
.await
}

// TODO: Use it from aurora_engine_types::parameters::xcc module.
#[derive(Debug, Clone, PartialEq, Eq, BorshDeserialize, BorshSerialize)]
struct FundXccArgs {
pub target: Address,
pub wnear_account_id: Option<AccountId>,
}

/// Create and/or fund an XCC sub-account directly
pub async fn fund_xcc_sub_account(
client: Client,
Expand Down
9 changes: 4 additions & 5 deletions src/cli/simple/command/silo.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use aurora_engine::silo::parameters::{
FixedGasCostArgs, WhitelistAccountArgs, WhitelistAddressArgs, WhitelistArgs, WhitelistKindArgs,
WhitelistStatusArgs,
use aurora_engine_types::borsh::{BorshDeserialize, BorshSerialize};
use aurora_engine_types::parameters::silo::{
FixedGasCostArgs, WhitelistAccountArgs, WhitelistAddressArgs, WhitelistArgs, WhitelistKind,
WhitelistKindArgs, WhitelistStatusArgs,
};
use aurora_engine::silo::WhitelistKind;
use aurora_engine_types::types::Wei;
use borsh::{BorshDeserialize, BorshSerialize};
use near_primitives::views::CallResult;
use std::fmt::{Display, Formatter};

Expand Down
4 changes: 2 additions & 2 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#[cfg(feature = "advanced")]
use aurora_engine::parameters::SubmitResult;
#[cfg(feature = "simple")]
use aurora_engine_types::account_id::AccountId;
#[cfg(feature = "advanced")]
use aurora_engine_types::parameters::engine::SubmitResult;
#[cfg(feature = "advanced")]
use aurora_engine_types::H256;
#[cfg(feature = "advanced")]
use thiserror::Error;
Expand Down
10 changes: 5 additions & 5 deletions src/client/near.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use aurora_engine_types::borsh::{BorshDeserialize, BorshSerialize};
#[cfg(feature = "advanced")]
use aurora_engine::parameters::SubmitResult;
use aurora_engine::parameters::TransactionStatus;
use aurora_engine_types::parameters::engine::SubmitResult;
use aurora_engine_types::parameters::engine::TransactionStatus;
use aurora_engine_types::{
types::{Address, Wei},
U256,
};
use borsh::{BorshDeserialize, BorshSerialize};
use near_crypto::InMemorySigner;
use near_jsonrpc_client::{
methods::broadcast_tx_commit::RpcBroadcastTxCommitRequest, AsUrl, JsonRpcClient,
Expand Down Expand Up @@ -94,7 +94,7 @@ impl NearClient {

#[cfg(feature = "advanced")]
pub async fn get_erc20_from_nep141(&self, nep141: &str) -> anyhow::Result<Address> {
let args = aurora_engine::parameters::GetErc20FromNep141CallArgs {
let args = aurora_engine_types::parameters::engine::GetErc20FromNep141CallArgs {
nep141: nep141.parse().unwrap(),
};
let result = self
Expand All @@ -117,7 +117,7 @@ impl NearClient {
amount: Wei,
input: Vec<u8>,
) -> anyhow::Result<TransactionStatus> {
let args = aurora_engine::parameters::ViewCallArgs {
let args = aurora_engine_types::parameters::engine::ViewCallArgs {
sender,
address: target,
amount: amount.to_bytes(),
Expand Down
6 changes: 3 additions & 3 deletions src/transaction_reader/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Helpful functions for analyzing JSON data obtained from NEAR (e.g. via `tx` JSON RPC method).
//! `paths: Vec<String>` gives the list of (absolute) paths for all the files to include in the analysis.

use aurora_engine::parameters::SubmitResult;
use aurora_engine_transactions::EthTransactionKind;
use borsh::BorshDeserialize;
use aurora_engine_types::borsh::BorshDeserialize;
use aurora_engine_types::parameters::engine::{SubmitResult, TransactionStatus};
use serde_json::Value;
use std::{collections::HashMap, path::Path, sync::Arc};
use tokio::fs;
Expand Down Expand Up @@ -199,7 +199,7 @@ impl TxStatus {
const fn flatten(&self) -> FlatTxStatus {
match self {
Self::Executed(result) => match result.status {
aurora_engine::parameters::TransactionStatus::Succeed(_) => FlatTxStatus::Succeeded,
TransactionStatus::Succeed(_) => FlatTxStatus::Succeeded,
_ => FlatTxStatus::Reverted,
},
Self::GasLimit => FlatTxStatus::GasLimit,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/ft_metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use aurora_engine::fungible_token::{FungibleReferenceHash, FungibleTokenMetadata};
use borsh::BorshDeserialize;
use aurora_engine_types::borsh::BorshDeserialize;
use aurora_engine_types::parameters::connector::{FungibleReferenceHash, FungibleTokenMetadata};

pub fn parse_ft_metadata(input: Option<String>) -> anyhow::Result<FungibleTokenMetadata> {
let Some(input) = input else { return Ok(default_ft_metadata()); };
Expand Down

0 comments on commit 27cd425

Please sign in to comment.