mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-24 15:25:17 +00:00
parent
39ca3113d8
commit
2e1d076460
12
.gitmodules
vendored
12
.gitmodules
vendored
@ -1,6 +1,6 @@
|
|||||||
[submodule "zerog-storage-contracts"]
|
[submodule "0g-storage-contracts"]
|
||||||
path = zerog-storage-contracts
|
path = 0g-storage-contracts
|
||||||
url = https://github.com/zero-gravity-labs/zerog-storage-contracts.git
|
url = git@github.com:0glabs/0g-storage-contracts.git
|
||||||
[submodule "zerog-storage-client"]
|
[submodule "0g-storage-client"]
|
||||||
path = zerog-storage-client
|
path = 0g-storage-client
|
||||||
url = https://github.com/zero-gravity-labs/zerog-storage-client.git
|
url = git@github.com:0glabs/0g-storage-client.git
|
||||||
|
1
0g-storage-client
Submodule
1
0g-storage-client
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 1d09ec4f0b9c27428b2357de46b66e8c231b74df
|
1
0g-storage-contracts
Submodule
1
0g-storage-contracts
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 6045ed2f859ad95cb289188ba726bc8f5bfe72cd
|
@ -1,30 +1,30 @@
|
|||||||
// use std::process::Command;
|
// use std::process::Command;
|
||||||
|
|
||||||
// const INSTALL_ERROR_MESSAGE: &str =
|
// 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 =
|
// 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() {
|
fn main() {
|
||||||
// if cfg!(feature = "compile-contracts") {
|
// if cfg!(feature = "compile-contracts") {
|
||||||
// println!("cargo:rerun-if-changed=../../zerog-storage-contracts/contracts/");
|
// println!("cargo:rerun-if-changed=../../0g-storage-contracts/contracts/");
|
||||||
// println!("cargo:rerun-if-changed=../../zerog-storage-contracts/hardhat.config.ts");
|
// println!("cargo:rerun-if-changed=../../0g-storage-contracts/hardhat.config.ts");
|
||||||
|
|
||||||
// let output = Command::new("yarn")
|
// let output = Command::new("yarn")
|
||||||
// .arg("--cwd")
|
// .arg("--cwd")
|
||||||
// .arg("../../zerog-storage-contracts")
|
// .arg("../../0g-storage-contracts")
|
||||||
// .status()
|
// .status()
|
||||||
// .expect(INSTALL_ERROR_MESSAGE);
|
// .expect(INSTALL_ERROR_MESSAGE);
|
||||||
// assert!(output.success(), "{}", INSTALL_ERROR_MESSAGE);
|
// assert!(output.success(), "{}", INSTALL_ERROR_MESSAGE);
|
||||||
|
|
||||||
// let output = Command::new("yarn")
|
// let output = Command::new("yarn")
|
||||||
// .arg("--cwd")
|
// .arg("--cwd")
|
||||||
// .arg("../../zerog-storage-contracts")
|
// .arg("../../0g-storage-contracts")
|
||||||
// .arg("compile")
|
// .arg("compile")
|
||||||
// .status()
|
// .status()
|
||||||
// .expect(COMPILE_ERROR_MESSAGE);
|
// .expect(COMPILE_ERROR_MESSAGE);
|
||||||
// assert!(output.success(), "{}", COMPILE_ERROR_MESSAGE);
|
// assert!(output.success(), "{}", COMPILE_ERROR_MESSAGE);
|
||||||
// } else {
|
// } else {
|
||||||
// println!("cargo:rerun-if-changed=../../zerog-storage-contracts/artifacts/");
|
// println!("cargo:rerun-if-changed=../../0g-storage-contracts/artifacts/");
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,10 @@ use ethers::prelude::abigen;
|
|||||||
|
|
||||||
abigen!(
|
abigen!(
|
||||||
ZgsFlow,
|
ZgsFlow,
|
||||||
"../../zerog-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json"
|
"../../0g-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json"
|
||||||
);
|
);
|
||||||
|
|
||||||
abigen!(
|
abigen!(
|
||||||
PoraMine,
|
PoraMine,
|
||||||
"../../zerog-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json"
|
"../../0g-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json"
|
||||||
);
|
);
|
||||||
|
@ -61,8 +61,8 @@ We recommend installing Rust through [rustup](https://www.rustup.rs/).
|
|||||||
## Build from source
|
## Build from source
|
||||||
```shell
|
```shell
|
||||||
# Download code
|
# Download code
|
||||||
$ git clone https://github.com/zero-gravity-labs/zerog-storage-rust.git
|
$ git clone https://github.com/0glabs/0g-storage-node.git
|
||||||
$ cd zerog-storage-rust
|
$ cd 0g-storage-node
|
||||||
$ git submodule update --init
|
$ git submodule update --init
|
||||||
|
|
||||||
# Build in release mode
|
# Build in release mode
|
||||||
|
@ -31,8 +31,8 @@ Download and install node from [here](https://nodejs.org/en/download/)
|
|||||||
|
|
||||||
### Download contract source code
|
### Download contract source code
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/zero-gravity-labs/zerog-storage-contracts.git
|
git clone https://github.com/0glabs/0g-storage-contracts.git
|
||||||
cd zerog-storage-contracts
|
cd 0g-storage-contracts
|
||||||
```
|
```
|
||||||
|
|
||||||
Add target network to your hardhat.config.js, i.e.
|
Add target network to your hardhat.config.js, i.e.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("cargo:rerun-if-changed=../zerog-storage-client");
|
println!("cargo:rerun-if-changed=../0g-storage-client");
|
||||||
|
|
||||||
let status = Command::new("go")
|
let status = Command::new("go")
|
||||||
.current_dir("../zerog-storage-client")
|
.current_dir("../0g-storage-client")
|
||||||
.args(vec!["build", "-o", "../target"])
|
.args(vec!["build", "-o", "../target"])
|
||||||
.status()
|
.status()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
println!("build zerog-storage-client with status {}", status);
|
println!("build 0g-storage-client with status {}", status);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ class TestFramework:
|
|||||||
root_dir, "target", "release", "zgs_node" + binary_ext
|
root_dir, "target", "release", "zgs_node" + binary_ext
|
||||||
)
|
)
|
||||||
self.__default_zgs_cli_binary__ = os.path.join(
|
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):
|
def __setup_blockchain_node(self):
|
||||||
@ -212,7 +212,7 @@ class TestFramework:
|
|||||||
dest="contract",
|
dest="contract",
|
||||||
default=os.path.join(
|
default=os.path.join(
|
||||||
__file_path__,
|
__file_path__,
|
||||||
"../../zerog-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json",
|
"../../0g-storage-contracts/artifacts/contracts/dataFlow/Flow.sol/Flow.json",
|
||||||
),
|
),
|
||||||
type=str,
|
type=str,
|
||||||
)
|
)
|
||||||
@ -232,7 +232,7 @@ class TestFramework:
|
|||||||
dest="mine_contract",
|
dest="mine_contract",
|
||||||
default=os.path.join(
|
default=os.path.join(
|
||||||
__file_path__,
|
__file_path__,
|
||||||
"../../zerog-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json",
|
"../../0g-storage-contracts/artifacts/contracts/test/PoraMineTest.sol/PoraMineTest.json",
|
||||||
),
|
),
|
||||||
type=str,
|
type=str,
|
||||||
)
|
)
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 76a9eae4804be6d51357fd2de2beb2f921287ffe
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 951c02992e2a03eb47e41eb840392ec824639640
|
|
Loading…
Reference in New Issue
Block a user