We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 859bfe3 commit de0829bCopy full SHA for de0829b
.gitignore
@@ -4,3 +4,4 @@
4
# Temporary data
5
.ipynb_checkpoints/
6
/examples/stats/.ipynb_checkpoints
7
+/.cache/
tests/__init__.py
tests/test_token.py
@@ -0,0 +1,18 @@
1
+import pytest
2
+
3
+from etherscan.tokens import Tokens
+DGD_TOKEN_SUPPLY = '1994946756800000'
+DGD_TOKEN_BALANCE = '212900000000000'
+AP_IKEY = 'YourAPIkey'
8
+TOKEN_NAME = 'DGD'
9
+ADDRESS = '0x4366ddc115d8cf213c564da36e64c8ebaa30cdbd'
10
+API_KEY = 'YourAPIkey'
11
12
+def test_get_token_supply():
13
+ api = Tokens(tokenname=TOKEN_NAME, api_key=(API_KEY))
14
+ assert (api.get_total_supply() == DGD_TOKEN_SUPPLY)
15
16
+def test_get_token_balance():
17
+ api = Tokens(tokenname=TOKEN_NAME, api_key=API_KEY)
18
+ assert(api.get_token_balance(ADDRESS) == DGD_TOKEN_BALANCE)
0 commit comments