Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from node-real/testnet_config
Browse files Browse the repository at this point in the history
[R4R]add testnet config
  • Loading branch information
realuncle authored Dec 28, 2021
2 parents e46e17d + 8ee98e7 commit feb2aca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ import (
)

var rpcEndPoint = "https://bsc-dataseed.binance.org"

// Testnet endpoint
//var rpcEndPoint = "https://data-seed-prebsc-1-s1.binance.org:8545"

var directRouteEndPoint = "https://api.nodereal.io/direct-route"

// Testnet endpoint
//var directRouteEndPoint = "https://testnet-api.nodereal.io/direct-route"

var account1, _ = utils.FromHexKey("input your private key1 here")
var account2, _ = utils.FromHexKey("input your private key2 here")

Expand Down Expand Up @@ -61,6 +68,9 @@ func sendBNBByBundleDemo() {
n1, _ := rpcClient.PendingNonceAt(context.Background(), account1.Addr)

chainId := big.NewInt(56)

// testnet chain id
//chainId := big.NewInt(97)
valueToTransfer := big.NewInt(100 * params.GWei)
gasLimit := uint64(23000)

Expand Down Expand Up @@ -120,6 +130,9 @@ func sendBUSDByBundleDemo() {
n1, _ := rpcClient.PendingNonceAt(context.Background(), account1.Addr)

chainId := big.NewInt(56)

// testnet chain id
//chainId := big.NewInt(97)
valueToTransfer := big.NewInt(0)
gasLimit := uint64(70000)

Expand Down
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ Note that only one tx sender is allowed with one bundle.
bundle, _ := directClient.GetBundleByHash(context.Background(), bundleHash)
```

### Direct-Route on Testnet

You can try Direct-Route Testnet by changing the endpoint to: `https://testnet-api.nodereal.io/direct-route`

Please note you should use the BSC testnet RPC and use testnet chainId(97) when sign the transaction.

### SDK Example

Expand Down

0 comments on commit feb2aca

Please sign in to comment.