Restructure texinfo to improve readme formatting for code example
This commit is contained in:
140
python/README.md
140
python/README.md
@@ -132,10 +132,12 @@ Attached to `ERC20` and `ERC721` tokens that may be *burned*.
|
||||
|
||||
Implements the `burn(...)` part of `ERC5679` for interoperability.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
b1110c1b
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IBurner {
|
||||
// Token(s) successfully burned; by who and how much.
|
||||
event Burn(address indexed _burner, uint256 _burned);
|
||||
@@ -158,7 +160,8 @@ Solidity interface definition
|
||||
function totalMinted() external returns (uint256);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
### Chrono
|
||||
@@ -167,17 +170,20 @@ Define a creation time for a resource.
|
||||
|
||||
Complements `ERC5007`.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
4db1ccd4
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IChrono {
|
||||
// Returns the timestamp of when a resource corresponding to _idx was first created.
|
||||
// int64 chosen as return value for simpler interoperability with ERC5007.
|
||||
function createTime(uint256 _idx) external returns(int64);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<https://git.defalsify.org/eth-erc721> (BadgeToken contract)
|
||||
|
||||
### Declarator
|
||||
@@ -197,10 +203,12 @@ Any number of claims can be made about an address under any number of
|
||||
topics. All claims must be stored, and returned in the order which they
|
||||
were added.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
21b7493b
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IDeclarator {
|
||||
event DeclarationAdded(address indexed _declarator, address indexed _subject, bytes32 indexed _topic, bytes32 _proof);
|
||||
|
||||
@@ -229,7 +237,8 @@ Solidity interface definition
|
||||
function declaratorCount(address _subject) external view returns ( uint256 );
|
||||
}
|
||||
|
||||
Reference implementation
|
||||
#### Reference implementation
|
||||
|
||||
<git://holbrook.no/eth-address-index.git>
|
||||
|
||||
### Digest
|
||||
@@ -242,10 +251,12 @@ Primary use-case is the abstraction of self-describing
|
||||
A default encoding *must* always be defined, and the encoding of a valid
|
||||
digest *must* succeed with the default encoding.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
982ab05d
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IDigest {
|
||||
// Returns the default digest encoding used by the contract instance.
|
||||
function defaultDigestEncoding() external view returns (uint256 _encoding);
|
||||
@@ -264,7 +275,8 @@ Solidity interface definition
|
||||
function encodeDigest(bytes memory _data) external view returns (bytes memory);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<git://holbrook.no/eth-event-msg.git>
|
||||
|
||||
### Expire
|
||||
@@ -275,10 +287,12 @@ change*.
|
||||
A contract defining an expiry *must not* allow changing the expiration
|
||||
time to a time in the past.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
841a0e94
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IExpire {
|
||||
// Contract has expired.
|
||||
event Expired(uint256 _timestamp);
|
||||
@@ -297,7 +311,8 @@ Solidity interface definition
|
||||
function applyExpiry() external returns(uint8);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
### Faucet
|
||||
@@ -332,10 +347,12 @@ amount to dispense.
|
||||
The *check(address)* contract call *must* evaluate all four criteria,
|
||||
and *must* return `false` if any of the criteria are not met.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
1a3ac634
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IFaucet {
|
||||
// Tokens were given to an address
|
||||
event Give(address indexed _recipient, address indexed _token, uint256 _value);
|
||||
@@ -370,7 +387,8 @@ Solidity interface definition
|
||||
function nextBalance(address _recipient) external returns (uint256);
|
||||
}
|
||||
|
||||
Reference implementations
|
||||
#### Reference implementations
|
||||
|
||||
- <git://holbrook.no/erc20-faucet.git>
|
||||
|
||||
- <git://holbrook.no/eth-faucet.git>
|
||||
@@ -389,10 +407,12 @@ the content address.
|
||||
Furthermore, it *should* be possible to refer to a resource by a
|
||||
fully-qualified location on the web or an overlay network (e.g. tor).
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
ed75b333
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface ILocator {
|
||||
// URI that may or may not point to a specific resource location.
|
||||
function toURI(bytes memory _data) external view returns (string memory);
|
||||
@@ -401,10 +421,11 @@ Solidity interface definition
|
||||
function toURL(bytes memory _data) external view returns(string memory);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<git://holbrook.no/eth-event-msg.git>
|
||||
|
||||
#### Expressing locators in terms of numetic token id
|
||||
#### Expressing locators in terms of numeric token id
|
||||
|
||||
Given the numeric token id `1234567890987654321` (`0x112210f4b16c1cb1`
|
||||
hex), and a base url `https://contentgateway.grassecon.net`, the result
|
||||
@@ -463,10 +484,12 @@ Attached to `ERC20` and `ERC721` tokens that may be minted.
|
||||
Implements the `mint(...)` and `safeMint(...)` parts of `ERC5679` for
|
||||
interoperability.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
5878bcf4
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IMinter {
|
||||
// Tokens are successfully minted; by who, to whom and how much
|
||||
event Mint(address indexed _minter, address indexed _beneficiary, uint256 value);
|
||||
@@ -484,7 +507,8 @@ Solidity interface definition
|
||||
function safeMint(address _beneficiary, uint256 value, bytes calldata _data) external;
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
### Msg
|
||||
@@ -497,10 +521,12 @@ The reference may or may not be mutable.
|
||||
The interface complements `Locator` and `MultiHash` to generate locators
|
||||
for how to resolve the reference.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
a3002595
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IMsg {
|
||||
// Emitted when a new message digest has been set
|
||||
// Should not be emitted if the digest set is identical to the previous
|
||||
@@ -510,7 +536,8 @@ Solidity interface definition
|
||||
function getMsg() external view returns(bytes memory);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<git://holbrook.no/eth-event-msg.git>
|
||||
|
||||
### Registry
|
||||
@@ -524,10 +551,12 @@ It currently has two distinct uses in the CIC context:
|
||||
|
||||
2. Unique (ERC20) token symbol resolver.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
effbf671
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IRegistryClient {
|
||||
// Address added to store with the given key
|
||||
event AddressKey(bytes32 indexed _key, address _address);
|
||||
@@ -542,10 +571,12 @@ Solidity interface definition
|
||||
function identifierCount() external view returns (uint256);
|
||||
}
|
||||
|
||||
Contract registry implementation
|
||||
#### Contract registry implementation
|
||||
|
||||
<git://holbrook.no/eth-contract-registry.git>
|
||||
|
||||
Token index implementation
|
||||
#### Token index implementation
|
||||
|
||||
<git://holbrook.no/eth-contract-registry.git>
|
||||
|
||||
### Seal
|
||||
@@ -574,10 +605,12 @@ Use cases of sealing include:
|
||||
|
||||
- The expiry time of a token (see `Expire`)
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
0d7491f8
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface ISeal {
|
||||
// Seal state has changed.
|
||||
event SealStateChange(bool indexed _final, uint256 _sealState);
|
||||
@@ -589,7 +622,8 @@ Solidity interface definition
|
||||
function maxSealState() external view returns(uint256);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
### TokenRateChange
|
||||
@@ -602,10 +636,12 @@ frequency for which the rate of change is applied.
|
||||
|
||||
A method for canonical value change calculations is also provided.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
b716af03
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface ITokenChangeRate {
|
||||
// Time unit resolution for rate of change.
|
||||
// A value of 0 indicates no rate of change,
|
||||
@@ -628,7 +664,8 @@ Solidity interface definition
|
||||
function applyChange(int256 _value, uint256 _changeTimeUnits) external view returns(int256);
|
||||
}
|
||||
|
||||
Reference implementations
|
||||
#### Reference implementations
|
||||
|
||||
- <git://holbrook.no/erc20-demurrage-token.git>
|
||||
|
||||
### TokenSwap
|
||||
@@ -636,10 +673,12 @@ Reference implementations
|
||||
Token swap interface that can fit token escrow aswell as token swap
|
||||
contracts.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
9e2d0236
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface ITokenSwap {
|
||||
// Add inToken liquidity of the full balance of the sender
|
||||
// Requires token approval for the balance.
|
||||
@@ -660,7 +699,8 @@ Solidity interface definition
|
||||
function withdraw(address _outToken, address _inToken, uint256 _value) external returns (uint256);
|
||||
}
|
||||
|
||||
Reference implementations
|
||||
#### Reference implementations
|
||||
|
||||
- <git://holbrook.no/erc20-vend.git>
|
||||
|
||||
### TokenVote
|
||||
@@ -675,10 +715,12 @@ Voted tokens **SHOULD** be locked until the voting has finalized.
|
||||
|
||||
Finalization of voting should be callable by anyone.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
f2e0bfeb
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface ITokenVote {
|
||||
|
||||
// A new proposal has been created.
|
||||
@@ -734,7 +776,8 @@ Solidity interface definition
|
||||
function finalize() external returns (bool);
|
||||
}
|
||||
|
||||
Reference implementations
|
||||
#### Reference implementations
|
||||
|
||||
- <git://holbrook.no/evm-tokenvote.git>
|
||||
|
||||
### Writer
|
||||
@@ -759,10 +802,12 @@ Some use-case examples of super-user actions include:
|
||||
|
||||
- Edit access control lists.
|
||||
|
||||
ERC165 Interface identifier
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
abe1f1f5
|
||||
|
||||
Solidity interface definition
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IWriter {
|
||||
// A writer has been added by _executor
|
||||
event WriterAdded(address _writer);
|
||||
@@ -780,5 +825,6 @@ Solidity interface definition
|
||||
function isWriter(address _writer) external view returns (bool);
|
||||
}
|
||||
|
||||
Example implementation
|
||||
#### Example implementation
|
||||
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
Reference in New Issue
Block a user