|
2 | 2 |
|
3 | 3 | ## List of files
|
4 | 4 |
|
5 |
| -| File | Description | Mainnet | |
| 5 | +| File | Description | Deployed | |
6 | 6 | |--------------------------------|-------------|---------|
|
7 |
| -|contracts/CrowdsaleToken.sol | The current (or "old") DATA token | [0x0cf0...23](https://etherscan.io/address/0x0cf0ee63788a0849fe5297f3407f701e122cc023#readContract) |
8 |
| -|contracts/DATAv2.sol | The new DATA token | [0x8f6...b76](https://etherscan.io/address/0x8f693ca8d21b157107184d29d398a8d082b38b76#readContract) |
9 |
| -|contracts/DataTokenMigrator.sol | Migrator contract that acts as UpgradeAgent for the old token | [0xc7...c16c](https://etherscan.io/address/0xc7aaf6c62e86a36395d8108fe95d5f758794c16c#readContract) |
| 7 | +|contracts/CrowdsaleToken.sol | The current (or "old") DATA token | ETH [0x0cf0...23](https://etherscan.io/address/0x0cf0ee63788a0849fe5297f3407f701e122cc023#readContract) |
| 8 | +|contracts/DATAv2.sol | The new DATA token | ETH [0x8f6...b76](https://etherscan.io/address/0x8f693ca8d21b157107184d29d398a8d082b38b76#readContract) BSC [0x0864...2a](https://bscscan.com/address/0x0864c156b3c5f69824564dec60c629ae6401bf2a#readContract) xDAI [0x256...47D](https://blockscout.com/poa/xdai/address/0x256eb8a51f382650B2A1e946b8811953640ee47D) |
| 9 | +|contracts/DataTokenMigrator.sol | Migrator contract that acts as UpgradeAgent for the old token | ETH [0xc7...c16c](https://etherscan.io/address/0xc7aaf6c62e86a36395d8108fe95d5f758794c16c#readContract) |
10 | 10 | |contracts/IERC677.sol | Interface of ERC677 as defined in [the LINK token](https://etherscan.io/address/0x514910771af9ca656af840dff83e8264ecf986ca#code) |
|
11 | 11 | |contracts/IERC677Receiver.sol | Interface of ERC677Receiver also defined in [the LINK token](https://etherscan.io/address/0x514910771af9ca656af840dff83e8264ecf986ca#code) |
|
12 | 12 | |contracts/MockRecipient.sol | IERC677Receiver implementation for the purpose of testing |
|
13 | 13 | |test/DATAv2-test.js | DATAv2.sol tests |
|
14 | 14 | |test/DataTokenMigrator-test.js | DataTokenMigrator.sol tests |
|
| 15 | +|contracts/DATAv2onPolygon.sol `*` | DATAv2 deployed on MATIC/Polygon chain, extended slightly for bridging | MATIC [0x3a9...34](https://polygonscan.com/address/0x3a9A81d576d83FF21f26f325066054540720fC34#code) | |
15 | 16 |
|
| 17 | +`*` _added after the audit_ |
16 | 18 | ## DATAv2 features
|
17 | 19 |
|
18 | 20 | Some of the following features are inherited from [OpenZeppelin contracts](https://github.com/OpenZeppelin/openzeppelin-contracts/tree/v4.0.0/contracts):
|
@@ -60,4 +62,4 @@ Explanations of the origins and intents of all code found in DATAv2.sol:
|
60 | 62 | | 1...12 | OpenZeppelin and interface imports, DATAv2 token properties |
|
61 | 63 | | 16...46 | Adapted from @openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol to implement the minting feature. The AccessControl.sol is a bit of a can of worms when it comes to state-space: the "role admin" can set up any constellation of roles and grant those roles and their administration to anyone; its implementation is quite elegant though, so it didn't feel very significantly worse than a "brute" `mapping (address => bool) isMinter` type of implementation, especially since it's all library code. Added isMinter convenience function. |
|
62 | 64 | | 48...74 | Adapted from LINK token to implement the ERC-677 token transfer hook. Recipient smart contracts can now react to DATAv2 token transfer which makes approve+transferFrom two-transaction flow avoidable if not entirely redundant. Decided to go for the simply ERC-677 instead of the ERC-777 because of some misfeatures on ERC-777 (defaultOperators, higher plain transfer gas price) as well as uncertain adoption at this stage. |
|
63 |
| -| 76...98 | Allow the admin to change token symbol and name just in case, e.g. to support token rebranding, and graceful end-of-life after the possible next migration | |
| 65 | +| 76...103 | Allow the admin to change token symbol and name just in case, e.g. to support token rebranding, and graceful end-of-life after the possible next migration | |
0 commit comments