forked from magicalne/godwoken-metrics-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
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 magicalne#11 from magicalne/testnet_1_1
Testnet 1 1
- Loading branch information
Showing
3 changed files
with
26 additions
and
8 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
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,19 +1,27 @@ | ||
import unittest | ||
from agent.ckb_rpc import CkbRpc | ||
from agent.godwoken_rpc import GodwokenRpc | ||
from agent.gw_config import testnet_config | ||
from agent.gw_config import testnet_config, testnet_v1_1_config | ||
from agent.gw_stat import GwStat | ||
|
||
|
||
class TestGwStat(unittest.TestCase): | ||
|
||
def setUp(self): | ||
ckb_rpc = CkbRpc("https://testnet.ckb.dev/rp") | ||
config = testnet_config() | ||
gw_rpc = GodwokenRpc("http://18.167.4.134:30119") | ||
self.ckb_rpc = CkbRpc("https://testnet.ckb.dev/rpc") | ||
config = testnet_v1_1_config() | ||
# config = testnet_config() | ||
# gw_rpc = GodwokenRpc("http://18.167.4.134:30119") | ||
gw_rpc = GodwokenRpc("https://godwoken-betanet-v1.ckbapp.dev/") | ||
self.gw_rpc = gw_rpc | ||
self.test = GwStat(config, gw_rpc, ckb_rpc) | ||
self.test = GwStat(config, gw_rpc, self.ckb_rpc) | ||
|
||
def test_deposit(self): | ||
block_hash = self.gw_rpc.get_tip_block_hash()['result'] | ||
self.test.gw_stat_by_lock("deposit_lock", block_hash) | ||
print(stat) | ||
|
||
def test_withdrawal(self): | ||
block = self.gw_rpc.get_block_by_number(221371) | ||
block = self.gw_rpc.get_block_by_number(11) | ||
|
||
self.test.gw_stat_by_lock("withdrawal_lock", "") |