Skip to content

Instantly share code, notes, and snippets.

@ilyar
Created May 3, 2022 18:20
Show Gist options
  • Select an option

  • Save ilyar/00d06b396c282565aceb5fd4dbb5d8bf to your computer and use it in GitHub Desktop.

Select an option

Save ilyar/00d06b396c282565aceb5fd4dbb5d8bf to your computer and use it in GitHub Desktop.

EGQL

Get address by code hash (dev)

query:

query {
	accounts(
		filter: {
			code_hash: {
				eq: "43223ab75c517158ba4af126082f7667294aee8962d435d9204e7c1c4986ded3"
			}
			acc_type: { eq: 1 }
		}

		limit: 100
	) {
		id
	}
}

out:

{
  "data": {
    "accounts": [
      {
        "id": "0:08ff47a77ba853306d234f5803dc25e5a9128aa280df44889f7d64c69f81aec8"
      },
      {
        "id": "0:24774365bdc520aa0d1f784c195d5233217e7210ab7fae9bc86a6258c497a513"
      },
      {
        "id": "0:8eb72de69e1011cd2f1f6f0b7042cb1d4bc5de2f40f2cb0e8a54bfb987cc7979"
      },
      {
        "id": "0:a99c36272599b48894f08b01a2ee8d7915796b49a9d90ef3d7b03e7fdb5e8f34"
      },
      {
        "id": "0:db893f23dffb25dbb5a5bc2a40e6ac4747541c708a7a50b4dfae7c6fc710d88b"
      },
      {
        "id": "0:e7a63084905e63cfb23c63ddb132ca312f466835b493a02c20be4f7112bab103"
      }
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment