Skip to content

Instantly share code, notes, and snippets.

@A60AB5450353F40E
Last active February 24, 2023 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save A60AB5450353F40E/68065cef2bb4e5b6a1b3d8b00ffa6756 to your computer and use it in GitHub Desktop.
Save A60AB5450353F40E/68065cef2bb4e5b6a1b3d8b00ffa6756 to your computer and use it in GitHub Desktop.
# Matches all spends from AnyHedge v0.11 contract template
# https://gitlab.com/GeneralProtocols/anyhedge/contracts/-/blob/development/contracts/v0.11/bytecode.asm
query {
input(
limit: 100
offset: 0
where: {
transaction: {
block_inclusions: {
block: {
height: { _gte: 780000, _lt: 780100 }
accepted_by: { node: { name: { _eq: "bchn-mainnet" } } }
}
}
}
_or: [
{ unlocking_bytecode_pattern: { _eq: "40104010514d" } }
{ unlocking_bytecode_pattern: { _eq: "4141004d" } }
]
redeem_bytecode_pattern: {
_regex: "04040[2-4]0[2-4]0[2-8]0[2-8]21(17|19|23)(17|19|23)(00|51)21215c79009c637b695c7a7cad5b7a7cad6d6d6d6d6d51675c7a519dc3519d5f7a5f795779bb5d7a5d79577abb5c79587f77547f75817600a0695c79587f77547f75818c9d5c7a547f75815b799f695b795c7f77817600a0695979a35879a45c7a547f7581765c7aa2695b7aa2785a7a8b5b7aa5919b690276587a537a96a47c577a527994a4c4529d00cc7b9d00cd557a8851cc9d51cd547a8777777768"
}
}
) {
transaction {
block_inclusions {
block {
height
timestamp
}
}
inputs {
outpoint_transaction_hash
outpoint_index
outpoint {
value_satoshis
locking_bytecode
locking_bytecode_pattern
transaction {
block_inclusions {
block {
height
timestamp
}
}
input_count
output_count
outputs {
output_index
value_satoshis
locking_bytecode
locking_bytecode_pattern
}
}
}
unlocking_bytecode
unlocking_bytecode_pattern
redeem_bytecode_pattern
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment