Compare commits
No commits in common. "80671fdfaa0745e7a7c2855d32fd6a0ddaddc84c" and "a7cc6950452bbd80a58d178149a69191a4def552" have entirely different histories.
80671fdfaa
...
a7cc695045
52
README.md
52
README.md
@ -133,7 +133,7 @@ Attached to `ERC20` and `ERC721` tokens that may be *burned*.
|
||||
Implements the `burn(...)` part of `ERC5679` for interoperability.
|
||||
|
||||
ERC165 Interface identifier
|
||||
b1110c1b
|
||||
bc4babdd
|
||||
|
||||
Solidity interface definition
|
||||
interface IBurner {
|
||||
@ -144,11 +144,10 @@ Solidity interface definition
|
||||
function burn(address _from, uint256 _amount, bytes calldata _data) external;
|
||||
|
||||
// Burn given amount of tokens held by signer.
|
||||
function burn(uint256 _amount) external returns (bool);
|
||||
function burn(uint256 _burn) external returns (bool);
|
||||
|
||||
// Burn all tokens held by signer.
|
||||
// Returns the amount of tokens burned.
|
||||
function burn() external returns (uint256);
|
||||
function burn() external returns (bool);
|
||||
|
||||
// Total amount of tokens that have been burned.
|
||||
function totalBurned() external returns (uint256);
|
||||
@ -589,45 +588,6 @@ Solidity interface definition
|
||||
Example implementation
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
### TokenRateChange
|
||||
|
||||
Enables detection of properties for CIC tokens that change value over
|
||||
time, e.g. through demurrage.
|
||||
|
||||
It allows defining the granularity of the rate of change, aswell as a
|
||||
frequency for which the rate of change is applied.
|
||||
|
||||
A method for canonical value change calculations is also provided.
|
||||
|
||||
ERC165 Interface identifier
|
||||
b716af03
|
||||
|
||||
Solidity interface definition
|
||||
interface ITokenChangeRate {
|
||||
// Time unit resolution for rate of change.
|
||||
// A value of 0 indicates no rate of change,
|
||||
function changeTimeUnit() external view returns(uint256);
|
||||
|
||||
// Rate of change per changeTimeUnit(), signed integer.
|
||||
// An effective value of 0 indicates no rate of change.
|
||||
function changeRate() external view returns (int256);
|
||||
|
||||
// Number of decimals with which the changeRate is defined.
|
||||
// changeRate() should be divided by 10 ** changeRateDecimals() to obtain effective value
|
||||
function changeRateDecimals() external view returns(uint8);
|
||||
|
||||
// Timestamp from when rate of change should be applied.
|
||||
// A value of 0 indicates no rate of change,
|
||||
function changeStartTime() external view returns(uint256);
|
||||
|
||||
// Calculate value with change rate applied for given amount of time units.
|
||||
// Will calculate compounded change over the given amount of time units
|
||||
function applyChange(int256 _value, uint256 _changeTimeUnits) external view returns(int256);
|
||||
}
|
||||
|
||||
Reference implementations
|
||||
- <git://holbrook.no/erc20-demurrage-token.git>
|
||||
|
||||
### TokenVend
|
||||
|
||||
This interface defines the mechanism for which a specific ERC20 token
|
||||
@ -673,7 +633,7 @@ Voted tokens **SHOULD** be locked until the voting has finalized.
|
||||
Finalization of voting should be callable by anyone.
|
||||
|
||||
ERC165 Interface identifier
|
||||
f2e0bfeb
|
||||
28091366
|
||||
|
||||
Solidity interface definition
|
||||
interface ITokenVote {
|
||||
@ -695,8 +655,8 @@ Solidity interface definition
|
||||
// * _blockWait blocks from now.
|
||||
function propose(bytes32 _description, uint256 _blockWait, uint24 _targetVotePpm) external returns (uint256);
|
||||
|
||||
// Add a voting option to a proposal
|
||||
function addOption(uint256 _proposalIdx, bytes32 _description) external;
|
||||
// Same as propose(...), but provide options to vote on.
|
||||
function proposeMulti(bytes32 _description, bytes32[] memory _options, uint256 _blockWait, uint24 _targetVotePpm) external returns (uint256);
|
||||
|
||||
// Get number of options available for the proposal.
|
||||
// This decides the boundary of the index that can be used with voteOptions(...)
|
||||
|
@ -74,8 +74,6 @@ The following well-known solidity interfaces are partially implemented in CIC na
|
||||
|
||||
@include seal.sol.texi
|
||||
|
||||
@include tokenratechange.sol.texi
|
||||
|
||||
@include tokenvend.sol.texi
|
||||
|
||||
@include tokenvote.sol.texi
|
||||
|
@ -1,19 +0,0 @@
|
||||
@subsection TokenRateChange
|
||||
|
||||
Enables detection of properties for CIC tokens that change value over time, e.g. through demurrage.
|
||||
|
||||
It allows defining the granularity of the rate of change, aswell as a frequency for which the rate of change is applied.
|
||||
|
||||
A method for canonical value change calculations is also provided.
|
||||
|
||||
@table @dfn
|
||||
@item ERC165 Interface identifier
|
||||
@include ../../build/TokenRateChange.interface
|
||||
@item Solidity interface definition
|
||||
@include ../../build/contract_TokenRateChange.texi
|
||||
@item Reference implementations
|
||||
@itemize
|
||||
@item
|
||||
@uref{git://holbrook.no/erc20-demurrage-token.git,}
|
||||
@end itemize
|
||||
@end table
|
@ -133,7 +133,7 @@ Attached to `ERC20` and `ERC721` tokens that may be *burned*.
|
||||
Implements the `burn(...)` part of `ERC5679` for interoperability.
|
||||
|
||||
ERC165 Interface identifier
|
||||
b1110c1b
|
||||
bc4babdd
|
||||
|
||||
Solidity interface definition
|
||||
interface IBurner {
|
||||
@ -144,11 +144,10 @@ Solidity interface definition
|
||||
function burn(address _from, uint256 _amount, bytes calldata _data) external;
|
||||
|
||||
// Burn given amount of tokens held by signer.
|
||||
function burn(uint256 _amount) external returns (bool);
|
||||
function burn(uint256 _burn) external returns (bool);
|
||||
|
||||
// Burn all tokens held by signer.
|
||||
// Returns the amount of tokens burned.
|
||||
function burn() external returns (uint256);
|
||||
function burn() external returns (bool);
|
||||
|
||||
// Total amount of tokens that have been burned.
|
||||
function totalBurned() external returns (uint256);
|
||||
@ -589,45 +588,6 @@ Solidity interface definition
|
||||
Example implementation
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
### TokenRateChange
|
||||
|
||||
Enables detection of properties for CIC tokens that change value over
|
||||
time, e.g. through demurrage.
|
||||
|
||||
It allows defining the granularity of the rate of change, aswell as a
|
||||
frequency for which the rate of change is applied.
|
||||
|
||||
A method for canonical value change calculations is also provided.
|
||||
|
||||
ERC165 Interface identifier
|
||||
b716af03
|
||||
|
||||
Solidity interface definition
|
||||
interface ITokenChangeRate {
|
||||
// Time unit resolution for rate of change.
|
||||
// A value of 0 indicates no rate of change,
|
||||
function changeTimeUnit() external view returns(uint256);
|
||||
|
||||
// Rate of change per changeTimeUnit(), signed integer.
|
||||
// An effective value of 0 indicates no rate of change.
|
||||
function changeRate() external view returns (int256);
|
||||
|
||||
// Number of decimals with which the changeRate is defined.
|
||||
// changeRate() should be divided by 10 ** changeRateDecimals() to obtain effective value
|
||||
function changeRateDecimals() external view returns(uint8);
|
||||
|
||||
// Timestamp from when rate of change should be applied.
|
||||
// A value of 0 indicates no rate of change,
|
||||
function changeStartTime() external view returns(uint256);
|
||||
|
||||
// Calculate value with change rate applied for given amount of time units.
|
||||
// Will calculate compounded change over the given amount of time units
|
||||
function applyChange(int256 _value, uint256 _changeTimeUnits) external view returns(int256);
|
||||
}
|
||||
|
||||
Reference implementations
|
||||
- <git://holbrook.no/erc20-demurrage-token.git>
|
||||
|
||||
### TokenVend
|
||||
|
||||
This interface defines the mechanism for which a specific ERC20 token
|
||||
@ -673,7 +633,7 @@ Voted tokens **SHOULD** be locked until the voting has finalized.
|
||||
Finalization of voting should be callable by anyone.
|
||||
|
||||
ERC165 Interface identifier
|
||||
f2e0bfeb
|
||||
28091366
|
||||
|
||||
Solidity interface definition
|
||||
interface ITokenVote {
|
||||
@ -695,8 +655,8 @@ Solidity interface definition
|
||||
// * _blockWait blocks from now.
|
||||
function propose(bytes32 _description, uint256 _blockWait, uint24 _targetVotePpm) external returns (uint256);
|
||||
|
||||
// Add a voting option to a proposal
|
||||
function addOption(uint256 _proposalIdx, bytes32 _description) external;
|
||||
// Same as propose(...), but provide options to vote on.
|
||||
function proposeMulti(bytes32 _description, bytes32[] memory _options, uint256 _blockWait, uint24 _targetVotePpm) external returns (uint256);
|
||||
|
||||
// Get number of options available for the proposal.
|
||||
// This decides the boundary of the index that can be used with voteOptions(...)
|
||||
|
@ -1,2 +1,2 @@
|
||||
safe-pysha3==1.0.4
|
||||
pysha3==1.0.2
|
||||
ply==3.11
|
||||
|
@ -1,29 +0,0 @@
|
||||
pragma solidity >=0.6.12;
|
||||
|
||||
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
// File-version: 1
|
||||
|
||||
// Methods to detect tokens that are subject to continuous change, and
|
||||
|
||||
interface ITokenChangeRate {
|
||||
// Time unit resolution for rate of change.
|
||||
// A value of 0 indicates no rate of change,
|
||||
function changeTimeUnit() external view returns(uint256);
|
||||
|
||||
// Rate of change per changeTimeUnit(), signed integer.
|
||||
// An effective value of 0 indicates no rate of change.
|
||||
function changeRate() external view returns (int256);
|
||||
|
||||
// Number of decimals with which the changeRate is defined.
|
||||
// changeRate() should be divided by 10 ** changeRateDecimals() to obtain effective value
|
||||
function changeRateDecimals() external view returns(uint8);
|
||||
|
||||
// Timestamp from when rate of change should be applied.
|
||||
// A value of 0 indicates no rate of change,
|
||||
function changeStartTime() external view returns(uint256);
|
||||
|
||||
// Calculate value with change rate applied for given amount of time units.
|
||||
// Will calculate compounded change over the given amount of time units
|
||||
function applyChange(int256 _value, uint256 _changeTimeUnits) external view returns(int256);
|
||||
}
|
@ -2,7 +2,7 @@ pragma solidity >=0.6.12;
|
||||
|
||||
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
// File-version: 2
|
||||
// File-version: 1
|
||||
|
||||
|
||||
interface ITokenVote {
|
||||
@ -24,8 +24,8 @@ interface ITokenVote {
|
||||
// * _blockWait blocks from now.
|
||||
function propose(bytes32 _description, uint256 _blockWait, uint24 _targetVotePpm) external returns (uint256);
|
||||
|
||||
// Add a voting option to a proposal
|
||||
function addOption(uint256 _proposalIdx, bytes32 _description) external;
|
||||
// Same as propose(...), but provide options to vote on.
|
||||
function proposeMulti(bytes32 _description, bytes32[] memory _options, uint256 _blockWait, uint24 _targetVotePpm) external returns (uint256);
|
||||
|
||||
// Get number of options available for the proposal.
|
||||
// This decides the boundary of the index that can be used with voteOptions(...)
|
||||
|
Loading…
Reference in New Issue
Block a user