diff --git a/.envrc b/.envrc index 6ad52af5..77ab8f03 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,7 @@ export COMPOSE_DOCKER_CLI_BUILD=1 -export DOCKER_BUILDKIT=1 \ No newline at end of file +export DOCKER_BUILDKIT=1 +export TOKEN_TYPE=giftable_erc20_token +export TOKEN_NAME=Coffee +export TOKEN_SYMBOL=COFE +export TOKEN_DECIMALS=6 +export FAUCET_AMOUNT=30000000000 \ No newline at end of file diff --git a/apps/cic-eth/cic_eth/graphql/schema.py b/apps/cic-eth/cic_eth/graphql/schema.py index 6ef70270..e54cc7e8 100644 --- a/apps/cic-eth/cic_eth/graphql/schema.py +++ b/apps/cic-eth/cic_eth/graphql/schema.py @@ -207,13 +207,25 @@ mutation { } """ -# m_result = schema.execute(mutation_with_argument) -# print(m_result) +m_result = schema.execute(mutation_with_argument) +print(m_result.data) +address_1 = "0xde82da08c816865c24a2c9c76a2bcd44b5b94531" #m_result.data['createAccount']['address'] +mutation_with_argument = """ +mutation { + createAccount(password:"test"){ + address + } +} + +""" +m_result = schema.execute(mutation_with_argument) +print(m_result) +address_2 = "0xaee24c8af3249b2d0a26769286623fff00556788" #m_result.data['createAccount']['address'] balance_query = """ -query { - balance(address:"0x82e66cf2766bf20672a605bbf5a6faaa12d5b907", tokenSymbols:["GFT"]){ +query getBalance($address:String){ + balance(address: $address, tokenSymbols:["COFE"]){ balanceNetwork balanceIncoming balanceOutgoing @@ -222,22 +234,24 @@ query { } """ -# balance_query_result = schema.execute(balance_query) +balance_query_result = schema.execute( + balance_query, variables={"address": "address_1"}) # print(balance_query_result) transfer_mutation = """ -mutation { - transfer(fromAddress :"0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C", -toAddress: "0x82e66cf2766bf20672a605bbf5a6faaa12d5b907" +mutation transfer($from: String, $to: String) { + transfer(fromAddress : $from, +toAddress: $to value: 20 -tokenSymbol: "GFT" ){ - +tokenSymbol: "COFE" ){ + test } } """ -transfer_mutation_result = schema.execute(transfer_mutation) +transfer_mutation_result = schema.execute(transfer_mutation, variables={ + "from": address_1, "to": address_2}) print(transfer_mutation_result)