-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Low Code Carbon Credit Implementation #22
base: main
Are you sure you want to change the base?
Low Code Carbon Credit Implementation #22
Conversation
low-code-carbon-credits-marketplace/contracts/src/carbon_credits/retire.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/carbon_credits/state.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/carbon_credits/update_operator.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/carbon_credits/update_operator.rs
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/project_token/events.rs
Show resolved
Hide resolved
@DOBEN : Kindly note that changes which were done in the previous PR related to Metadata URL also would have to be done in this PR since the same approch was used. Im on it. |
low-code-carbon-credits-marketplace/contracts/src/carbon_credits/retire.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/project_token/init.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/project_token/maturity_of.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/project_token/mint.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/contracts/src/project_token/retire.rs
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/indexer/server-rust-bindings/src/types.rs
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/indexer/server/src/auth/authClient.ts
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/indexer/server/src/listener/events-deserializer.ts
Outdated
Show resolved
Hide resolved
low-code-carbon-credits-marketplace/indexer/server/src/listener/listener-plugin.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works very well.
I had a problem with buying the tokens from the marketplace. I think initially the logic was to call updateOperator
and then to sell a token by transferring it from the seller account to the buyer account. Now the front end transfers the token to the marketplace and then when buying a token the token needs to be transferred from the marketPlaceContract
to the buyer
account. Currently, the smart contract logic still uses the seller
account to the buyer
account which results in an -4
error.
.cis2
.transfer::<State<S>, ContractTokenId, ContractTokenAmount, ()>(
host,
Transfer {
amount: params.quantity,
to: Receiver::Account(params.to),
token_id: params.token_id,
from: Address::Account(params.owner),
data: AdditionalData::empty(),
},
)?;
logger.log(&ContractEvent::TokenTransferred(TokenTransferredEvent {
token_id: params.token_id,
token_contract: params.cis_contract_address,
from: Address::Account(params.owner),
to: Address::Account(params.to),
amount: params.quantity,
}))?;
There is an issue when using googleMail:
- buying a token when log-in with googleMail (error: Private key as second argument is required)
Thanks @DOBEN |
@parv0888 There is something not picked up in the See the associated event I wonder if the intention of the indexer is to pick up all the CIS2 There are no |
Please add a note about this project and the |
HI @DOBEN Thanks |
This has been fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done. The project looks very good in general.
yarn start:ui | ||
``` | ||
|
||
* Wert integration is **disabled by default**. To enable it, set thefollowing environment variables in the [.env](./market-ui/.env) file. Contract [Wert sales](https://wert.io/for-partners) to get these credentials |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Wert integration is **disabled by default**. To enable it, set thefollowing environment variables in the [.env](./market-ui/.env) file. Contract [Wert sales](https://wert.io/for-partners) to get these credentials | |
* Wert integration is **disabled by default**. To enable it, set the following environment variables in the [.env](./market-ui/.env) file. Contact [Wert sales](https://wert.io/for-partners) to get these credentials |
Purpose
Adds Carbon Credit Sample Implementation.
Changes
Adds Marketplace, Carbon Project Fractionalizer to Carbon Credits & Carbon Project NFT contracts.
Adds Frontend to interact with the contracts and backend
Adds backend & Indexer / Listener to listen for a process events from the contracts.
Checklist
hard-to-understand areas.
CLA acceptance
By submitting the contribution I accept the terms and conditions of the
Contributor License Agreement v1.0
link: https://developers.concordium.com/CLAs/Contributor-License-Agreement-v1.0.pdf
I accept the above linked CLA.