From ed6a5331ff42bf842faa1ba912e1779f68cfa4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Volpe?= Date: Tue, 19 Nov 2024 07:06:40 +0700 Subject: [PATCH] Added proposal to add Celo Token to the registry (#506) --- CGPs/cgp-0155.md | 48 ++++++++++++++++++++++++++++++++++++ CGPs/cgp-0155/alfajores.json | 20 +++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 CGPs/cgp-0155.md create mode 100644 CGPs/cgp-0155/alfajores.json diff --git a/CGPs/cgp-0155.md b/CGPs/cgp-0155.md new file mode 100644 index 00000000..e2bf4192 --- /dev/null +++ b/CGPs/cgp-0155.md @@ -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 \ No newline at end of file diff --git a/CGPs/cgp-0155/alfajores.json b/CGPs/cgp-0155/alfajores.json new file mode 100644 index 00000000..0ff0662a --- /dev/null +++ b/CGPs/cgp-0155/alfajores.json @@ -0,0 +1,20 @@ +[ + { + "contract": "Registry", + "function": "setAddressFor", + "args": [ + "CeloToken", + "0xF194afDf50B03e69Bd7D057c1Aa9e10c9954E4C9" + ], + "value": "0" + }, + { + "contract": "Registry", + "function": "setAddressFor", + "args": [ + "LockedCelo", + "0x6a4CC5693DC5BFA3799C699F3B941bA2Cb00c341" + ], + "value": "0" + } +] \ No newline at end of file