https://github.com/broxus/token-updater
Contracts for update old tip-3 standard tokens to new tip-3.1 standard.
https://github.com/broxus/token-updater
Last synced: over 1 year ago
JSON representation
Contracts for update old tip-3 standard tokens to new tip-3.1 standard.
- Host: GitHub
- URL: https://github.com/broxus/token-updater
- Owner: broxus
- License: agpl-3.0
- Created: 2022-03-05T21:19:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-08T20:44:58.000Z (over 4 years ago)
- Last Synced: 2025-01-29T02:47:19.500Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Description
Smart contracts to update old TIP-3 standard tokens to the new TIP-3.1 standard.
## TokenUpdaterFactory
Mainnet address: `0:992d790ee8aadd1f2a3b41a392a55a1fd00a8dcafbb0fd29444e0ad7c458d526`
ABI: [TokenUpdaterFactory.abi.json](https://github.com/broxus/token-updater/blob/master/build/TokenUpdaterFactory.abi.json)
## How it works:
Public method `TokenUpdaterFactory.createUpdater` allows you to deploy new `TokenRoot` + `TokenUpdater` contracts.
After deployment `TokenUpdater` is owner of `TokenRoot`.
When `TokenUpdater` receives a burn callback from an old token root, it will mint new tokens.
`TokenUpdater` allows its owner to receive `TokenRoot` ownership. But in this case, users will no longer be able to update tokens.
## How to allow upgrade tokens for users:
### 1. Create TokenUpdater
Run the `TokenUpdaterFactory.createUpdater` method.\
Gas value: 10 EVER
Parameters: \
`callId` - This value is only used for callbacks. Recommended value: 0.\
`oldRoot` - Old token address.\
`updaterOwner` - Address which can acquire new TokenRoot ownership in the future.\
`name` - New token name. Recommended value: same as the old token name.\
`symbol` - New token symbol. Recommended value: same as the old token symbol.\
`decimals` - New token decimals. Recommended value: same as the old token decimals.\
`burnByRootDisabled` - Disable burn via the root functionality for new tokens. Recommended value: true.\
`burnPaused` - Pause burn of new tokens. Recommended value: false.\
`remainingGasTo` - Address for remaining gas.
Addresses of deployed contracts can be found in emitted event \
```event UpdaterCreated(address oldRoot, address newRoot, address updater);```
### 2. Create pull-request to the repository https://github.com/broxus/everscale-assets-upgrade
Modify `main.json` by adding item
```
{
"symbol": "",
"logoURI": "",
"rootV4": "",
"rootV5": "",
"proxy": ""
}
```
### 3. After the pull-request has been merged, it will be possible for users to upgrade tokens using DAPPs https://flatqube.io or https://octusbridge.io