CELO: Integration Demo
Last updated
Last updated
Before retiring a Regen Credit, ensure you have the following:
Objective: Retrieve essential information about the Regen Credit and associated project using the EcoToken Projects API.
1. Access the Projects Endpoint
Utilize the EcoToken Projects API to fetch detailed project information.
Endpoint URL:
https://api.ecotoken.earth
2. Retrieve Metadata
Make a GET request to the projects endpoint to obtain a list of active projects and their associated metadata.
Response:
Identify the project you wish to support by reviewing attributes such as name
, description
, location
, and type
. Ensure the project is active ("active": true
).
4. Extract Wallet Information
Obtain the celo_wallet
address from the selected project’s metadata.
Objective: Transfer CELO or cUSD to the project-specific wallet to retire the desired credit.
Direct Transfer: Use your CELO wallet to send funds directly to the project's celo_wallet
.
User Interface (UI): Utilize platforms like Regen Atlas for a streamlined process.
2. Prepare the Transaction
Recipient Address: Enter the celo_wallet
address retrieved in Step 1.
Amount: Specify the amount of CELO or cUSD that corresponds to the amount of credits you wish to retire (see the price
field from project metadata).
3. Confirm Transaction
Review transaction details carefully to ensure the recipient address and amount are correct.
4. Send Payment
Initiate the transfer from your wallet or through the UI.
Await transaction confirmation on the CELO blockchain. This may take a few moments depending on network conditions.
Objective: Validate and process the transaction to initiate the retirement of Regen Network credits.
The Oracle monitors the CELO blockchain for ERC20 Smart Contract events for transfers of valid tokens to the project-specific wallets (celo_wallet
).
Note: There is a minimum of $2 required to process a retirement. Transactions below this amount will be pooled and queued for retirement when the pool reaches a significant total.
Upon successful validation, the Oracle triggers the CCEP (Cross-Chain Communication Protocol) to queue the retirement flow. The credit status changes to "retired" on the Regen Network, and a unique retirement hash is generated, ensuring it cannot be resold.
Objective: Secure verifiable proof that the Regen Credit has been successfully retired.
1. Retrieve Transaction Hash
After the transaction is confirmed, obtain the unique transaction hash from your wallet or user interface.
2. Submit to API Endpoint
Send the transaction hash to the ecoToken Retirement API to obtain a retirement hash.
Endpoint URL:
https://api.ecotoken.earth/?tx=123
Sample Request:
The API returns a retirement hash, serving as official proof of retirement.
Successful Response:
Fail Response:
Allow 3-5 seconds before retrieving a retirement hash. If you're a developer, you can poll the endpoint.
isValid
returned "false": Likely due to network congestion. Poll the endpoint.
status
returned "pending": Likely due to network congestion. Poll the endpoint.
retirementHash
returned "empty": Check the status
field. If it's "pending," poll the endpoint.
usdValue
is less than $2: No retirement hash will be provided, and the status will remain pending.
ecoToken provides a scan tool that will immediately show a transaction and its status. After a retirement is successful, you can also view the retirement on the Regen Explorer if desired.
ecoToken Scan: scan.ecotoken.earth
Regen Mintscan Explorer: Mintscan.io
CELO
0x471ece3750da237f93b8e339c536989b8978a438
USDGLO (Glo Dollar)
0x4f604735c1cf31399c6e711d5962b2b3e0225ad3
cUSD (Celo Dollar)
0x765de816845861e75a25fca122bb6898b8b1282a
USDC (Wormhole)
0x37f750b7cc259a2f741af45294f6a16572cf5cad
USDC (Circle)
0xceba9300f2b948710d2653dd7b07f33a8b32118c
USDT (Wormhole)
0x617f3112bf5397d0467d315cc709ef968d9ba546
USDT on Celo
0x48065fbbe25f71c9282ddf5e1cd6d6a887483d5e
For assistance or inquiries, contact our support team: support@ecotoken.earth