-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[erc20-votes] add schema and fix examples
- Loading branch information
Showing
3 changed files
with
57 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# erc20-votes strategy | ||
|
||
This strategy gets voting power from compound like contracts, it uses `getVotes` function to get the voting power of an address. | ||
|
||
## Params | ||
|
||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
|`address`|`string`|The address of the contract to get the voting power from| | ||
|`symbol`|`string`|The symbol of the token| | ||
|`decimals`|`number`|The decimals of the token| |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$ref": "#/definitions/Strategy", | ||
"definitions": { | ||
"Strategy": { | ||
"title": "Strategy", | ||
"type": "object", | ||
"properties": { | ||
"symbol": { | ||
"type": "string", | ||
"title": "Symbol", | ||
"examples": [ | ||
"e.g. ENS" | ||
], | ||
"maxLength": 16 | ||
}, | ||
"address": { | ||
"type": "string", | ||
"title": "Contract address", | ||
"examples": ["e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"], | ||
"pattern": "^0x[a-fA-F0-9]{40}$", | ||
"minLength": 42, | ||
"maxLength": 42 | ||
}, | ||
"decimals": { | ||
"type": "integer", | ||
"title": "Decimals", | ||
"examples": [ | ||
"e.g. 18" | ||
], | ||
"minimum": 0, | ||
"maximum": 18 | ||
} | ||
}, | ||
"required": [ | ||
"address" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |