Skip to content

Commit

Permalink
Merge branch 'main' into wip/obi-typesafe
Browse files Browse the repository at this point in the history
  • Loading branch information
xxibcill committed Jun 21, 2024
2 parents b43d919 + 9c012df commit a214d87
Show file tree
Hide file tree
Showing 260 changed files with 11,771 additions and 6,518 deletions.
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Related Issue: -
### What is the feature?


### What is the solution?


### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

### How to test?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. -->

### Screenshots (if any)

## Other Notes

<!-- Add any additional information that would be useful to the developer or QA tester-->
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
```sh
<p>&nbsp;</p>
<p align="center">

<img src="bandprotocol_logo.svg" width=500>

</p>

<p align="center">
BandChain - Decentralized Data Delivery Network<br/><br/>
</p>

## What is Cosmoscan

# generate graphql_schema.json
Cosmoscan is block explorer for BandChain network

## How to Run on local machine

### generate graphql_schema.json

```sh
npx get-graphql-schema https://graphql-lt6.bandchain.org/v1/graphql -j > graphql_schema.json
```

### installed the dependencies

npx get-graphql-schema https://graphql-lm.bandchain.org/v1/graphql -j > graphql_schema.json

# installed the dependencies
yarn
```
### run the complier
## run the complier
```sh
yarn start
```

### start web server

```sh
# TESTNET
# (in another tab) Run the development server
RPC_URL=https://laozi-testnet6.bandchain.org/api GRAPHQL_URL=graphql-lt6.bandchain.org/v1/graphql LAMBDA_URL=https://asia-southeast1-testnet-instances.cloudfunctions.net/executer-cosmoscan GRPC=https://laozi-testnet6.bandchain.org/grpc-web FAUCET_URL=https://laozi-testnet6.bandchain.org/faucet yarn server
Expand Down
16 changes: 8 additions & 8 deletions __tests__/Address_test.res
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe("Expect Address to work correctly", () => {
)

test("should be able to get hexString with 0x prefix with Uppercase", () =>
expect(fromHex("f23391b5dbf982e37fb7dadea64aae21cae4c172")->toHex(~with0x=true, ~upper=true))->toEqual(
"0XF23391B5DBF982E37FB7DADEA64AAE21CAE4C172",
)
expect(
fromHex("f23391b5dbf982e37fb7dadea64aae21cae4c172")->toHex(~with0x=true, ~upper=true),
)->toEqual("0XF23391B5DBF982E37FB7DADEA64AAE21CAE4C172")
)

test("should be able to create address from fromBech32 with prefix band", () =>
Expand All @@ -40,7 +40,9 @@ describe("Expect Address to work correctly", () => {
)

test("should be able to create address from fromBech32 with prefix bandvalconspub", () =>
expect("bandvalconspub1addwnpepq0grwz83v8g4s06fusnq5s4jkzxnhgvx67qr5g7v8tx39ur5m8tk7rg2nxj"->fromBech32)->toEqual(
expect(
"bandvalconspub1addwnpepq0grwz83v8g4s06fusnq5s4jkzxnhgvx67qr5g7v8tx39ur5m8tk7rg2nxj"->fromBech32,
)->toEqual(
Address("eb5ae9872103d03708f161d1583f49e4260a42b2b08d3ba186d7803a23cc3acd12f074d9d76f"),
)
)
Expand Down Expand Up @@ -85,9 +87,7 @@ describe("Expect Address to work correctly", () => {
expect({
let addr1 = "band18p27yl962l8283ct7srr5l3g7ydazj07dqrwph"->fromBech32
let addr2 = "band18p27yl962l8283ct7srr5l3g7ydazj07dqrwph"->fromBech32
isEqual(addr1,addr2)
})->toEqual(
true
)
isEqual(addr1, addr2)
})->toEqual(true)
)
})
5 changes: 4 additions & 1 deletion __tests__/BandChainJS_test.res
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ describe("Expect BandChainJS PubKey Module binding work correctly", () => {

test("toBech32", () =>
expect(
mnemonic->PrivateKey.fromMnemonic("m/44'/494'/0'/0/0")->PrivateKey.toPubkey->PubKey.toBech32("band"),
mnemonic
->PrivateKey.fromMnemonic("m/44'/494'/0'/0/0")
->PrivateKey.toPubkey
->PubKey.toBech32("band"),
)->toEqual("band1addwnpepqt79xhl2m49qfpre5jf9td3q64y8r9cxwm26fmzaug2vsrfcwsg0v70ls97")
)

Expand Down
9 changes: 6 additions & 3 deletions __tests__/Ellipsis_test.res
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ open Expect

describe("Expect Ellipsis module to work correctly", () => {
test("text length > limit", () => {
expect(format(~text="EDCD7E7A10F564CCCC50B2E382E1924013CB01728EBAFEC1071D2B1D395F82CC", ~limit=25, ()))->toBe("EDCD7E7A10F564CCCC50B2E38...")
expect(
end(~text="EDCD7E7A10F564CCCC50B2E382E1924013CB01728EBAFEC1071D2B1D395F82CC", ~limit=25, ()),
)->toBe("EDCD7E7A10F564CCCC50B2E38...")
})

test("text length < limit", () => {
expect(format(~text="EDCD7E7A10F564CCCC50B2E382E1924013CB01728EBAFEC1071D2B1D395F82CC", ~limit=125, ()))->toBe("EDCD7E7A10F564CCCC50B2E382E1924013CB01728EBAFEC1071D2B1D395F82CC")
expect(
end(~text="EDCD7E7A10F564CCCC50B2E382E1924013CB01728EBAFEC1071D2B1D395F82CC", ~limit=125, ()),
)->toBe("EDCD7E7A10F564CCCC50B2E382E1924013CB01728EBAFEC1071D2B1D395F82CC")
})
})

1 change: 0 additions & 1 deletion __tests__/Format_test.res
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ describe("Expect Format module to work correctly", () => {
expect(10000000->iPretty)->toBe("10,000,000")
})
})

Loading

0 comments on commit a214d87

Please sign in to comment.