Skip to content

Commit

Permalink
fix starcoin-sdk-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjiao committed Sep 24, 2024
1 parent 6a7558c commit eaf2315
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ futures-timer = "3.0"
futures-util = "~0.3"
git-version = "0.3.5"
governor = { version = "0.4.2", features = ["dashmap"] }
heck = "0.3.3"
heck = "0.5.0"
hex = "0.4"
hmac = "0.12.1"
hyper = { version = "0.14.12", features = ["full"] }
Expand Down Expand Up @@ -505,7 +505,7 @@ starcoin-dev = { path = "vm/dev" }
starcoin-executor = { path = "executor" }
#starcoin-framework = { git = "https://github.com/starcoinorg/starcoin-framework", rev = "94bcd77e80232b169cf95754ef4e87775645afcd" }
starcoin-framework = { path = "vm/framework" }
starcoin-sdk-builder = {path = "vm/starcoin-sdk-builder"}
starcoin-sdk-builder = { path = "vm/starcoin-sdk-builder" }
starcoin-genesis = { path = "genesis" }
starcoin-logger = { path = "commons/logger" }
starcoin-metrics = { path = "commons/metrics" }
Expand Down
2 changes: 1 addition & 1 deletion vm/starcoin-sdk-builder/src/golang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use serde_generate::{
indent::{IndentConfig, IndentedWriter},
CodeGeneratorConfig,
};
use starcoin_types::transaction::{
use starcoin_vm_types::transaction::{
ArgumentABI, EntryABI, EntryFunctionABI, TransactionScriptABI, TypeArgumentABI,
};
use std::{
Expand Down
2 changes: 1 addition & 1 deletion vm/starcoin-sdk-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Parts of the project are originally copyright © Meta Platforms, Inc.
// SPDX-License-Identifier: Apache-2.0

use aptos_types::transaction::EntryABI;
use starcoin_vm_types::transaction::EntryABI;
use std::{ffi::OsStr, fs, io::Read, path::Path};

pub mod golang;
Expand Down
14 changes: 7 additions & 7 deletions vm/starcoin-sdk-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct Options {

fn main() {
let options = Options::parse();
let abis = aptos_sdk_builder::read_abis(&options.abi_directories)
let abis = starcoin_sdk_builder::read_abis(&options.abi_directories)
.expect("Failed to read ABI in directory");

let install_dir = match options.target_source_dir {
Expand All @@ -70,11 +70,11 @@ fn main() {
let mut out = stdout.lock();
match options.language {
Language::Rust => {
aptos_sdk_builder::rust::output(&mut out, &abis, /* local types */ true)
starcoin_sdk_builder::rust::output(&mut out, &abis, /* local types */ true)
.unwrap()
}
Language::Go => {
aptos_sdk_builder::golang::output(
starcoin_sdk_builder::golang::output(
&mut out,
options.serde_package_name.clone(),
options.package_name.clone(),
Expand Down Expand Up @@ -105,7 +105,7 @@ fn main() {
let mut registry = serde_yaml::from_str::<Registry>(content.as_str()).unwrap();
// update the registry to prevent language keyword being used
if let Language::Rust = options.language {
aptos_sdk_builder::rust::replace_keywords(&mut registry)
starcoin_sdk_builder::rust::replace_keywords(&mut registry)
}

let (package_name, _package_path) = match options.language {
Expand All @@ -127,13 +127,13 @@ fn main() {
}

// Transaction builders
let installer: Box<dyn aptos_sdk_builder::SourceInstaller<Error = Box<dyn std::error::Error>>> =
let installer: Box<dyn starcoin_sdk_builder::SourceInstaller<Error = Box<dyn std::error::Error>>> =
match options.language {
Language::Rust => Box::new(aptos_sdk_builder::rust::Installer::new(
Language::Rust => Box::new(starcoin_sdk_builder::rust::Installer::new(
install_dir,
options.aptos_version_number,
)),
Language::Go => Box::new(aptos_sdk_builder::golang::Installer::new(
Language::Go => Box::new(starcoin_sdk_builder::golang::Installer::new(
install_dir,
options.serde_package_name,
options.package_name,
Expand Down
6 changes: 3 additions & 3 deletions vm/starcoin-sdk-builder/src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// SPDX-License-Identifier: Apache-2.0

use crate::common;
use aptos_types::transaction::{
ArgumentABI, EntryABI, EntryFunctionABI, TransactionScriptABI, TypeArgumentABI,
};
use heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase};
use move_core_types::{
account_address::AccountAddress,
Expand All @@ -17,6 +14,9 @@ use serde_generate::{
rust, CodeGeneratorConfig,
};
use serde_reflection::ContainerFormat;
use starcoin_vm_types::transaction::{
ArgumentABI, EntryABI, EntryFunctionABI, TransactionScriptABI, TypeArgumentABI,
};
use std::{
collections::BTreeMap,
io::{Result, Write},
Expand Down

0 comments on commit eaf2315

Please sign in to comment.