89 lines
1.6 KiB
Python
89 lines
1.6 KiB
Python
from cic_eth.graphql.schema import schema
|
|
|
|
query_with_argument = """
|
|
{
|
|
defaultToken{
|
|
symbol
|
|
}
|
|
}
|
|
|
|
"""
|
|
# result = schema.execute(query_with_argument)
|
|
# print(result)
|
|
|
|
|
|
mutation_with_argument = """
|
|
mutation {
|
|
createAccount(password:"test"){
|
|
address
|
|
}
|
|
}
|
|
|
|
"""
|
|
m_result = schema.execute(mutation_with_argument)
|
|
print(m_result)
|
|
mutation_with_argument = """
|
|
mutation {
|
|
createAccount(password:"test"){
|
|
address
|
|
}
|
|
}
|
|
|
|
"""
|
|
m_result = schema.execute(mutation_with_argument)
|
|
print(m_result)
|
|
|
|
balance_query = """
|
|
query {
|
|
balance(address:"0x643c99d5ab51b5e06d55a68e6b24fd36e9d6b1c9", tokenSymbols:["GFT", "COFE"]){
|
|
balanceNetwork
|
|
balanceIncoming
|
|
balanceOutgoing
|
|
balanceAvailable
|
|
}
|
|
}
|
|
|
|
"""
|
|
balance_query_result = schema.execute(balance_query)
|
|
print(balance_query_result)
|
|
|
|
|
|
transfer_mutation = """
|
|
mutation {
|
|
transfer(fromAddress :"0xcf41bd087b71c72d748fe2b8b4c88b2367c37df3",
|
|
toAddress: "0x63474da1a315f9abe0999b6adb61ae8a9ea19a76"
|
|
value: 20
|
|
tokenSymbol: "COFE" ){
|
|
test
|
|
}
|
|
}
|
|
|
|
"""
|
|
# transfer_mutation_result = schema.execute(transfer_mutation)
|
|
# print(transfer_mutation_result)
|
|
|
|
|
|
balance_query = """
|
|
query {
|
|
balance(address:"0x63474da1a315f9abe0999b6adb61ae8a9ea19a76", tokenSymbols:["GFT"]){
|
|
balanceNetwork
|
|
balanceIncoming
|
|
balanceOutgoing
|
|
balanceAvailable
|
|
}
|
|
}
|
|
|
|
"""
|
|
# balance_query_result = schema.execute(balance_query)
|
|
# print(balance_query_result)
|
|
|
|
|
|
transactions_query = """
|
|
query {
|
|
transactions(address:"0xcf41bd087b71c72d748fe2b8b4c88b2367c37df3")
|
|
}
|
|
|
|
"""
|
|
# transactions_query_result = schema.execute(transactions_query)
|
|
# print(transactions_query_result)
|