-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from CosmWasm/get-all-allowances-for-subkeys
Add new query to return all allowances on subkeys
- Loading branch information
Showing
5 changed files
with
282 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
contracts/cw1-subkeys/schema/all_allowances_response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "AllAllowancesResponse", | ||
"type": "object", | ||
"required": [ | ||
"allowances" | ||
], | ||
"properties": { | ||
"allowances": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/AllowanceInfo" | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"AllowanceInfo": { | ||
"type": "object", | ||
"required": [ | ||
"balance", | ||
"expires", | ||
"spender" | ||
], | ||
"properties": { | ||
"balance": { | ||
"$ref": "#/definitions/Balance" | ||
}, | ||
"expires": { | ||
"$ref": "#/definitions/Expiration" | ||
}, | ||
"spender": { | ||
"$ref": "#/definitions/HumanAddr" | ||
} | ||
} | ||
}, | ||
"Balance": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Coin" | ||
} | ||
}, | ||
"Coin": { | ||
"type": "object", | ||
"required": [ | ||
"amount", | ||
"denom" | ||
], | ||
"properties": { | ||
"amount": { | ||
"$ref": "#/definitions/Uint128" | ||
}, | ||
"denom": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"Expiration": { | ||
"anyOf": [ | ||
{ | ||
"description": "AtHeight will expire when `env.block.height` >= height", | ||
"type": "object", | ||
"required": [ | ||
"at_height" | ||
], | ||
"properties": { | ||
"at_height": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
} | ||
} | ||
}, | ||
{ | ||
"description": "AtTime will expire when `env.block.time` >= time", | ||
"type": "object", | ||
"required": [ | ||
"at_time" | ||
], | ||
"properties": { | ||
"at_time": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
} | ||
} | ||
}, | ||
{ | ||
"description": "Never will never expire. Used to express the empty variant", | ||
"type": "object", | ||
"required": [ | ||
"never" | ||
], | ||
"properties": { | ||
"never": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"HumanAddr": { | ||
"type": "string" | ||
}, | ||
"Uint128": { | ||
"type": "string" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters