From 2e1d076460eb226998cdda1e439269827b9eadc2 Mon Sep 17 00:00:00 2001 From: 0g-peterzhb <158457852+0g-peterzhb@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:49:51 +0800 Subject: [PATCH] @peter/update submodule (#25) * update modules --- .gitmodules | 12 ++++++------ 0g-storage-client | 1 + 0g-storage-contracts | 1 + common/contract-interface/build.rs | 14 +++++++------- common/contract-interface/src/lib.rs | 4 ++-- doc/install.md | 4 ++-- doc/run.md | 4 ++-- node/build.rs | 6 +++--- tests/test_framework/test_framework.py | 6 +++--- zerog-storage-client | 1 - zerog-storage-contracts | 1 - 11 files changed, 27 insertions(+), 27 deletions(-) create mode 160000 0g-storage-client create mode 160000 0g-storage-contracts delete mode 160000 zerog-storage-client delete mode 160000 zerog-storage-contracts diff --git a/.gitmodules b/.gitmodules index a18b7e0..2240d2f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "zerog-storage-contracts"] - path = zerog-storage-contracts - url = https://github.com/zero-gravity-labs/zerog-storage-contracts.git -[submodule "zerog-storage-client"] - path = zerog-storage-client - url = https://github.com/zero-gravity-labs/zerog-storage-client.git +[submodule "0g-storage-contracts"] + path = 0g-storage-contracts + url = git@github.com:0glabs/0g-storage-contracts.git +[submodule "0g-storage-client"] + path = 0g-storage-client + url = git@github.com:0glabs/0g-storage-client.git diff --git a/0g-storage-client b/0g-storage-client new file mode 160000 index 0000000..1d09ec4 --- /dev/null +++ b/0g-storage-client @@ -0,0 +1 @@ +Subproject commit 1d09ec4f0b9c27428b2357de46b66e8c231b74df diff --git a/0g-storage-contracts b/0g-storage-contracts new file mode 160000 index 0000000..6045ed2 --- /dev/null +++ b/0g-storage-contracts @@ -0,0 +1 @@ +Subproject commit 6045ed2f859ad95cb289188ba726bc8f5bfe72cd diff --git a/common/contract-interface/build.rs b/common/contract-interface/build.rs index 93043a6..923f860 100644 --- a/common/contract-interface/build.rs +++ b/common/contract-interface/build.rs @@ -1,30 +1,30 @@ // use std::process::Command; // const INSTALL_ERROR_MESSAGE: &str = -// "Install dependencies for contract fail, try to run `yarn` in folder 'zerog-storage-contracts'"; +// "Install dependencies for contract fail, try to run `yarn` in folder '0g-storage-contracts'"; // const COMPILE_ERROR_MESSAGE: &str = -// "Compile solidity contracts fail, try to run `yarn compile` in folder 'zerog-storage-contracts'"; +// "Compile solidity contracts fail, try to run `yarn compile` in folder '0g-storage-contracts'"; fn main() { // if cfg!(feature = "compile-contracts") { - // println!("cargo:rerun-if-changed=../../zerog-storage-contracts/contracts/"); - // println!("cargo:rerun-if-changed=../../zerog-storage-contracts/hardhat.config.ts"); + // println!("cargo:rerun-if-changed=../../0g-storage-contracts/contracts/"); + // println!("cargo:rerun-if-changed=../../0g-storage-contracts/hardhat.config.ts"); // let output = Command::new("yarn") // .arg("--cwd") - // .arg("../../zerog-storage-contracts") + // .arg("../../0g-storage-contracts") // .status() // .expect(INSTALL_ERROR_MESSAGE); // assert!(output.success(), "{}", INSTALL_ERROR_MESSAGE); // let output = Command::new("yarn") // .arg("--cwd") - // .arg("../../zerog-storage-contracts") + // .arg("../../0g-storage-contracts") // .arg("compile") // .status() // .expect(COMPILE_ERROR_MESSAGE); // assert!(output.success(), "{}", COMPILE_ERROR_MESSAGE); // } else { - // println!("cargo:rerun-if-changed=../../zerog-storage-contracts/artifacts/"); + // println!("cargo:rerun-if-changed=../../0g-storage-contracts/artifacts/"); // } } diff --git a/common/contract-interface/src/lib.rs b/common/contract-interface/src/lib.rs index 8750816..54eb6b4 100644 --- a/common/contract-interface/src/lib.rs +++ b/common/contract-interface/src/lib.rs @@ -4,10 +4,10 @@ use ethers::prelude::abigen; abigen!( ZgsFlow, - "../../zerog-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json" + "../../0g-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json" ); abigen!( PoraMine, - "../../zerog-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json" + "../../0g-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json" ); diff --git a/doc/install.md b/doc/install.md index d1207ac..e4adfe3 100644 --- a/doc/install.md +++ b/doc/install.md @@ -61,8 +61,8 @@ We recommend installing Rust through [rustup](https://www.rustup.rs/). ## Build from source ```shell # Download code -$ git clone https://github.com/zero-gravity-labs/zerog-storage-rust.git -$ cd zerog-storage-rust +$ git clone https://github.com/0glabs/0g-storage-node.git +$ cd 0g-storage-node $ git submodule update --init # Build in release mode diff --git a/doc/run.md b/doc/run.md index 3c2e4d7..e8bd920 100644 --- a/doc/run.md +++ b/doc/run.md @@ -31,8 +31,8 @@ Download and install node from [here](https://nodejs.org/en/download/) ### Download contract source code ```shell -git clone https://github.com/zero-gravity-labs/zerog-storage-contracts.git -cd zerog-storage-contracts +git clone https://github.com/0glabs/0g-storage-contracts.git +cd 0g-storage-contracts ``` Add target network to your hardhat.config.js, i.e. diff --git a/node/build.rs b/node/build.rs index d6f58bb..e9e0853 100644 --- a/node/build.rs +++ b/node/build.rs @@ -1,13 +1,13 @@ use std::process::Command; fn main() { - println!("cargo:rerun-if-changed=../zerog-storage-client"); + println!("cargo:rerun-if-changed=../0g-storage-client"); let status = Command::new("go") - .current_dir("../zerog-storage-client") + .current_dir("../0g-storage-client") .args(vec!["build", "-o", "../target"]) .status() .unwrap(); - println!("build zerog-storage-client with status {}", status); + println!("build 0g-storage-client with status {}", status); } diff --git a/tests/test_framework/test_framework.py b/tests/test_framework/test_framework.py index bb1ba94..e84d394 100644 --- a/tests/test_framework/test_framework.py +++ b/tests/test_framework/test_framework.py @@ -56,7 +56,7 @@ class TestFramework: root_dir, "target", "release", "zgs_node" + binary_ext ) self.__default_zgs_cli_binary__ = os.path.join( - root_dir, "target", "zerog-storage-client" + binary_ext + root_dir, "target", "0g-storage-client" + binary_ext ) def __setup_blockchain_node(self): @@ -212,7 +212,7 @@ class TestFramework: dest="contract", default=os.path.join( __file_path__, - "../../zerog-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json", + "../../0g-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json", ), type=str, ) @@ -232,7 +232,7 @@ class TestFramework: dest="mine_contract", default=os.path.join( __file_path__, - "../../zerog-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json", + "../../0g-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json", ), type=str, ) diff --git a/zerog-storage-client b/zerog-storage-client deleted file mode 160000 index 76a9eae..0000000 --- a/zerog-storage-client +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 76a9eae4804be6d51357fd2de2beb2f921287ffe diff --git a/zerog-storage-contracts b/zerog-storage-contracts deleted file mode 160000 index 951c029..0000000 --- a/zerog-storage-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 951c02992e2a03eb47e41eb840392ec824639640