-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from 0glabs/dev
merge dev changes
- Loading branch information
Showing
23 changed files
with
209 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM --platform=linux/amd64 ubuntu:24.04 | ||
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
sudo \ | ||
wget \ | ||
jq \ | ||
make \ | ||
gcc \ | ||
unzip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Go | ||
RUN wget https://golang.org/dl/go1.22.5.linux-amd64.tar.gz && \ | ||
tar -C /usr/local -xzf go1.22.5.linux-amd64.tar.gz && \ | ||
rm go1.22.5.linux-amd64.tar.gz | ||
# Set Go environment variables | ||
ENV GOPATH=/root/go | ||
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin | ||
# Create Go workspace directory | ||
RUN mkdir -p /root/go | ||
|
||
WORKDIR /root | ||
|
||
# https://docs.0g.ai/0g-doc/run-a-node/validator-node | ||
RUN git clone -b v0.2.3 https://github.com/0glabs/0g-chain.git | ||
RUN ./0g-chain/networks/testnet/install.sh | ||
|
||
RUN 0gchaind config chain-id zgtendermint_16600-2 | ||
|
||
RUN 0gchaind init testnetnode --chain-id zgtendermint_16600-2 | ||
|
||
RUN rm ~/.0gchain/config/genesis.json | ||
RUN wget -P ~/.0gchain/config https://github.com/0glabs/0g-chain/releases/download/v0.2.3/genesis.json | ||
|
||
RUN 0gchaind validate-genesis | ||
|
||
RUN sed -i 's|seeds = ""|seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"|' $HOME/.0gchain/config/config.toml | ||
|
||
ENTRYPOINT ["0gchaind", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...o/zg/validatorvesting/v1beta1/query.proto → .../zgc/validatorvesting/v1beta1/query.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
package e2e_test | ||
|
||
import ( | ||
"github.com/0glabs/0g-chain/chaincfg" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
func (suite *IntegrationTestSuite) TestGrpcClientUtil_Account() { | ||
// ARRANGE | ||
// setup kava account | ||
kavaAcc := suite.Kava.NewFundedAccount("account-test", sdk.NewCoins(ukava(1e5))) | ||
// setup 0g account | ||
zgAcc := suite.ZgChain.NewFundedAccount("account-test", sdk.NewCoins(chaincfg.MakeCoinForGasDenom(1e5))) | ||
|
||
// ACT | ||
rsp, err := suite.Kava.Grpc.BaseAccount(kavaAcc.SdkAddress.String()) | ||
rsp, err := suite.ZgChain.Grpc.BaseAccount(zgAcc.SdkAddress.String()) | ||
|
||
// ASSERT | ||
suite.Require().NoError(err) | ||
suite.Equal(kavaAcc.SdkAddress.String(), rsp.Address) | ||
suite.Equal(zgAcc.SdkAddress.String(), rsp.Address) | ||
suite.Greater(rsp.AccountNumber, uint64(1)) | ||
suite.Equal(uint64(0), rsp.Sequence) | ||
} |
Oops, something went wrong.