-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into work-0xj4an-patch-4
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
cgp: 155 | ||
title: Add CeloToken and LockedCelo to the registry | ||
date-created: 2024-11-19 | ||
author: Sebastien Benoit (@soloseng), Martín Volpe (@martinvol) | ||
status: DRAFT | ||
discussions-to: | ||
governance-proposal-id: | ||
date-executed: | ||
--- | ||
|
||
## Overview | ||
|
||
This proposals seems to add CeloToken and LockedCelo to the [Celo registry](https://docs.celo.org/developer/contractkit/contracts-wrappers-registry). | ||
|
||
### Proposal Description | ||
|
||
At mainnet launch back in 2020, the Celo token was called "Celo Gold". The contracts and the directory registry where then named accordingly. When the token got renamed later that year, smart contracts were already using the assumption that the token was still called "Celo Gold", and thus changing that would require heavy lifting. | ||
|
||
This proposal is the first step in the path towards fully deprecating references to Celo Gold in the Celo smart contracts. After Contract Release 12, smart contracts will assume the Celo token has a registry entry `CeloToken` and the LockedCelo (currently known as "LockedGold") has a registry entry called LockedCelo. | ||
|
||
Registry entries `GoldToken` and `LockedGold` will remain in the codebase for backwards compatibility reasons, but after this proposal passes developers and users are highly encouraged to update their references. | ||
|
||
## Proposed Changes | ||
|
||
|
||
1. Set `CeloToken` | ||
- Destination: Registry | ||
- Data: setAddressFor("CeloToken", Celo token address = `0x471EcE3750Da237f93B8E339c536989b8978a438`) | ||
- Value: 0 | ||
2. Set `LockedCelo` | ||
- Destination: Registry | ||
- Data: setAddressFor("LockedCelo", Locked Celo address = `0x6cC083Aed9e3ebe302A6336dBC7c921C9f03349E`) | ||
- Value: 0 | ||
|
||
## Verification | ||
|
||
`$ celocli governance:view --proposalID TODO -n https://forno.celo.org` | ||
|
||
## Risks | ||
|
||
This proposal only adds registry addresses, does not modify existing ones, and thus represents a very low risk proposal. There could be a risk of a contract not getting upgraded correctly and thus reverting when trying to fetch GoldToken and/or LockedCelo, but this is a risk of Contract Release 12 itself and not this proposal. | ||
|
||
## Useful Links | ||
|
||
* Registry contract: https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/Registry.sol | ||
* GoldToken contract: https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/GoldToken.sol | ||
* LockedGold contract: https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/LockedGold.sol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"contract": "Registry", | ||
"function": "setAddressFor", | ||
"args": [ | ||
"CeloToken", | ||
"0xF194afDf50B03e69Bd7D057c1Aa9e10c9954E4C9" | ||
], | ||
"value": "0" | ||
}, | ||
{ | ||
"contract": "Registry", | ||
"function": "setAddressFor", | ||
"args": [ | ||
"LockedCelo", | ||
"0x6a4CC5693DC5BFA3799C699F3B941bA2Cb00c341" | ||
], | ||
"value": "0" | ||
} | ||
] |