Skip to content

Instantly share code, notes, and snippets.

@bryanchriswhite
Last active September 13, 2022 06:05
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 bryanchriswhite/d7c40a507b6dfd7a3881ea29a1d69fd5 to your computer and use it in GitHub Desktop.
Save bryanchriswhite/d7c40a507b6dfd7a3881ea29a1d69fd5 to your computer and use it in GitHub Desktop.
enum Interface {
CW20,
}
# (see: https://github.com/CosmWasm/wasmd/blob/v0.27.0/x/wasm/types/types.pb.go#L39)
enum AccessType {
// AccessTypeUnspecified placeholder for empty value
Unspecified
// AccessTypeNobody forbidden
AccessTypeNobody AccessType = 1
// AccessTypeOnlyAddress restricted to a single address
// Deprecated: use AccessTypeAnyOfAddresses instead
AccessTypeOnlyAddress AccessType = 2
// AccessTypeEverybody unrestricted
AccessTypeEverybody AccessType = 3
// AccessTypeAnyOfAddresses allow any of the addresses
AccessTypeAnyOfAddresses AccessType = 4
}
type CW20Contract @entity {
id: ID!
contract: Contract!
}
# (see: https://github.com/CosmWasm/wasmd/blob/v0.27.0/x/wasm/types/tx.pb.go#L38)
type StoreContractMessage {
id: ID!
sender: String!
permission: AccessType
message: Message!
transaction: Transaction!
block: Block!
}
# (see: https://github.com/CosmWasm/wasmd/blob/v0.27.0/x/wasm/types/tx.pb.go#L132)
type InstantiateContractMessage {
id: ID!
sender: String!
admin: String!
codeID: Int!
label: String!
payload: String!
funds: [Coin]
message: Message!
transaction: Transaction!
block: Block!
}
type Contract @entity {
id: ID!
address: String!
interfaces: [Interface]
storeMessage: StoreContractMessage!
instantiateMessage: InstantiateContractMessage!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment