Terra mantle client
Project description
Mantle client
Wasm query only
wasm_query = {
'marketState': {
'contractAddress': 'terra15dwd5mj8v59wpj0wvt233mf5efdff808c5tkal', # moneyMarket.market
'query': {
'state': {}
}
},
'govState': {
'contractAddress': 'terra16ckeuu7c6ggu52a8se005mg5c0kd2kmuun63cu', # gov
'query': {
'state': {}
}
}
}
mantle_result = mantle(wasm_query=wasm_query)
print(mantle_result)
Endpoint options
# default mantle_endpoint is 'https://tequila-mantle.anchorprotocol.com'
mantle_result = mantle(wasm_query=wasm_query, mantle_endpoint='https://mantle.anchorprotocol.com')
print(mantle_result)
With graphql query
from mantle import mantle
query_variables = {
'wallet_address': 'terra12hnhh5vtyg5juqnzm43970nh4fw42pt27nw9g9'
}
query = """
query queryName ($wallet_address: String!) {
LastSyncedHeight
nativeTokenBalances: BankBalancesAddress(Address: $wallet_address) {
Result {
Denom
Amount
}
}
}
"""
wasm_query = {
'marketState': {
'contractAddress': 'terra15dwd5mj8v59wpj0wvt233mf5efdff808c5tkal', # moneyMarket.market
'query': {
'state': {}
}
},
'govState': {
'contractAddress': 'terra16ckeuu7c6ggu52a8se005mg5c0kd2kmuun63cu', # gov
'query': {
'state': {}
}
}
}
mantle_result = mantle(wasm_query=wasm_query, query=query,
query_variables=query_variables)
print(mantle_result)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for terra_mantle-0.1.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 061adad10bd4d0572a069f65bc96bc2a6e19d6aa61012bfbad53839c4011f92c |
|
MD5 | 08ab6bc90782aa4cd7719ae364d955ec |
|
BLAKE2b-256 | 2abcb6ef8ee4e886efa4ad4ac1e24d27c5f98b62253e9b8d7a268622a81db947 |