AIP 6: Additional interface methods to the token and policy
| Author | Nithin Krishna |
|---|---|
| Discussions-To | https://github.com/ampleforth/AIPs/issues/31 |
| Status | Implemented |
| Created | 2021-1-26 |
Summary
The following additions to Ampleforth ERC20 and policy smart contracts are proposed.
- Elastic token interface methods
scaledBalanceOf,scaledTotalSupply,transferAllandtransferAllFrom. #180, #187 - Support for
permitEIP-2612 (gasless approvals) #181 - A convenience function (
globalAmpleforthEpochAndAMPLSupply) on the policy contract for multi-chain integration #190 #189 - Minor gas optimizations #186, #182
Test Cases
Unit tests have been added to test the additions.
scaledBalanceOf, scaledTotalSupply and globalAmpleforthEpochAndAMPLSupply do not modify any smart contract state.
The permit implementation is identical to existing audited implementations on the Aave’s AToken and OpenZeppelin.
transferAll and transferAllFrom are identical to the existing implementations of transfer and transferFrom on the AMPL ERC-20 token.