credmark.cmf.types.token_erc20.Tokens
- DTO class Tokens(*, tokens=[])[source]
Bases:
IterableListGenericDTO[Token]
Iterable list of Token instances.
Show JSON schema
{ "title": "Tokens", "description": "Iterable list of Token instances.", "type": "object", "properties": { "tokens": { "title": "Tokens", "description": "An iterable list of Token Objects", "default": [], "type": "array", "items": { "$ref": "#/definitions/Token" } } }, "examples": [ { "tokens": [ "0x6B175474E89094C44Da98b954EedeAC495271d0F", "0x514910771AF9Ca656af840dff83E8264EcF986CA" ] } ], "definitions": { "Token": { "title": "Token", "description": "Fungible Token that conforms to ERC20 standards.\nYou could create a token with the following\n\n t = Token(symbol='CMK')\n\n t = Token(address='0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')\n\n t = Token('CMK')\n\n t = Token('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')", "type": "object", "properties": { "address": { "title": "Address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "format": "evm-address" } }, "required": [ "address" ], "examples": [ { "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9" }, { "symbol": "AAVE" }, { "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984" }, { "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "abi": "(Optional) contract abi JSON string or list" } ] } } }
- Config
schema_extra: dict = {‘examples’: [{‘tokens’: [‘0x6B175474E89094C44Da98b954EedeAC495271d0F’, ‘0x514910771AF9Ca656af840dff83E8264EcF986CA’]}]}
- Fields
- Parameters
- Return type
None
- append(obj)
- extend(obj)