5a6e2ec46f
* WIP: migrating the nameservice module * WIP: migrating the nameservice module from dxns to ethermint * refactor: move the proto package version from `v1` to `v1beta1` for vulcanize modules * refactor: added bond module dependency to nameserivce module * feat: added graphql for bond module * feat: added auction module dependency to nameservice module * refactor: refactored the nameservice module * refactor: add human-readable attributes output to cli nameservice `list` * WIP: add grpc query test cases * fix: fix the sub names authority storing issue * WIP: add the test cases * refactor: removed legacyCodec from nameservice * fix: fix the responses for `authority-expiry` and `records-expiry` commands query result * refactor: sort the imports in app * WIP: add test cases for cli query, tx for nameservice module * feat: add test cases for grpc of nameservice module 1. renamed grpc gateway routes from ethermint to vulcanize * refactor: refactored the test cases for grpc lookup of nameservice * refactor: refactored the test cases for bond module * feat: add node status for gql * feat: add get actions by ids in gql * feat: add lookup authorities,resolve name, lookup name queries to gql * updated readme file
5.7 KiB
5.7 KiB
Vulcanize dxns gql
Browser : http://localhost:9473 for gql
Start server
./build/ethermintd start --gql-playground --gql-server
Basic node status:
{
getStatus {
version
node {
id
network
moniker
}
sync {
latest_block_height
catching_up
}
num_peers
peers {
is_outbound
remote_ip
}
disk_usage
}
}
Full node status:
{
getStatus {
version
node {
id
network
moniker
}
sync {
latest_block_hash
latest_block_time
latest_block_height
catching_up
}
validator {
address
voting_power
proposer_priority
}
validators {
address
voting_power
proposer_priority
}
num_peers
peers {
node {
id
network
moniker
}
is_outbound
remote_ip
}
disk_usage
}
}
Get records by IDs.
{
getRecordsByIds(ids: ["QmYDtNCKtTu6u6jaHaFAC5PWZXcj7fAmry6NoWwMaixFHz"]) {
id
names
bondId
createTime
expiryTime
owners
attributes {
key
value {
string
}
}
}
}
Query records.
{
queryRecords(attributes: [{ key: "type", value: { string: "wrn:bot" } }]) {
id
names
bondId
createTime
expiryTime
owners
attributes {
key
value {
string
}
}
}
}
Get account details:
{
getAccounts(addresses: ["cosmos1wh8vvd0ymc5nt37h29z8kk2g2ays45ct2qu094"]) {
address
pubKey
number
sequence
balance {
type
quantity
}
}
}
Query bonds:
{
queryBonds(
attributes: [
{
key: "owner"
value: { string: "cosmos1wh8vvd0ymc5nt37h29z8kk2g2ays45ct2qu094" }
}
]
) {
id
owner
balance {
type
quantity
}
}
}
Get bonds by IDs.
{
getBondsByIds(ids :
[
"1c2b677cb2a27c88cc6bf8acf675c94b69051125b40c4fd073153b10f046dd87",
"c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440"
])
{
id
owner
balance{
type
quantity
}
}
}
Query Bonds by Owner
{
queryBondsByOwner(ownerAddresses: ["ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"])
{
owner
bonds{
id
owner
balance
{
type
quantity
}
}
}
}
Query auctions by ids
{
getAuctionsByIds(ids: ["be98f2073c246194276554eefdb4c95b682a35a0f06fbe619a6da57c10c93e90"]){
id
ownerAddress
createTime
minimumBid{
type
quantity
}
commitFee{
type
quantity
}
commitsEndTime
revealFee{
type
quantity
}
revealsEndTime
winnerBid{
type
quantity
}
winnerPrice{
type
quantity
}
winnerAddress
bids{
bidderAddress
commitHash
commitTime
commitFee{
type
quantity
}
revealFee{
type
quantity
}
revealTime
bidAmount{
type
quantity
}
status
}
}
}
LookUp Authorities
{
lookupAuthorities(names: []){
ownerAddress
ownerAddress
height
bondId
status
expiryTime
auction {
id
ownerAddress
createTime
minimumBid{
type
quantity
}
commitFee{
type
quantity
}
commitsEndTime
revealFee{
type
quantity
}
revealsEndTime
winnerBid{
type
quantity
}
winnerPrice{
type
quantity
}
winnerAddress
bids{
bidderAddress
commitHash
commitTime
commitFee{
type
quantity
}
revealFee{
type
quantity
}
revealTime
bidAmount{
type
quantity
}
status
}
}
}
}
LookUp Names
{
lookupNames(names: ["wrn://hello/test"]){
latest{
id
height
}
history{
id
height
}
}
}
Resolve Names
{
resolveNames(names: ["asd"]){
id
names
bondId
createTime
expiryTime
owners
attributes {
key
value {
string
}
}
}
}