@peter/update submodule (#25)

* update modules
This commit is contained in:
0g-peterzhb 2024-03-12 18:49:51 +08:00 committed by GitHub
parent 39ca3113d8
commit 2e1d076460
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 27 additions and 27 deletions

12
.gitmodules vendored
View File

@ -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

1
0g-storage-client Submodule

@ -0,0 +1 @@
Subproject commit 1d09ec4f0b9c27428b2357de46b66e8c231b74df

1
0g-storage-contracts Submodule

@ -0,0 +1 @@
Subproject commit 6045ed2f859ad95cb289188ba726bc8f5bfe72cd

View File

@ -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/");
// }
}

View File

@ -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"
);

View File

@ -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

View File

@ -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.

View File

@ -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);
}

View File

@ -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,
)

@ -1 +0,0 @@
Subproject commit 76a9eae4804be6d51357fd2de2beb2f921287ffe

@ -1 +0,0 @@
Subproject commit 951c02992e2a03eb47e41eb840392ec824639640