Skip to content

Commit

Permalink
Added proposal to add Celo Token to the registry (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvol authored Nov 19, 2024
1 parent c3e900f commit ed6a533
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
48 changes: 48 additions & 0 deletions CGPs/cgp-0155.md
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
20 changes: 20 additions & 0 deletions CGPs/cgp-0155/alfajores.json
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"
}
]

0 comments on commit ed6a533

Please sign in to comment.