Web App

Company

Company registration on the onchain registry (contact data kept off-chain as a hash) and the company dashboard.

Two routes: /app/company/register and /app/company/dashboard. Both read and write the CarbonRegistry contract; the optional backend is only a mirror and is off unless NEXT_PUBLIC_BACKEND_URL is set.

What becomes public

Your company name, legal entity ID and emission figures are published permanently on a public blockchain and cannot be deleted. Your email and phone are not published: only a salted hash (contactHash = keccak256(abi.encode(email, phone, salt))) is stored onchain. The email, phone and the random salt stay in this browser's local storage.

Registration — /app/company/register

Registers your wallet as a company onchain. There is no starter pack and no free credits: registration does not mint anything.

Form

FieldRequiredValidation
Company NameYes1 to 100 characters
Legal Entity IDYes1 to 64 characters (tax ID, registration number, …)
Scope 1 / 2 / 3 emissions (tonnes CO₂e)NoEmpty or a number between 0 and 1 trillion; the form shows the running total
EmailYesMust contain @, up to 120 characters. Never sent onchain.
PhoneYes1 to 32 characters. Never sent onchain.

What happens on submit (new company)

#StepCallFails if
1Hash the contact dataThe browser generates a random salt and computes contactHashn/a
2RegisterCarbonRegistry.registerCompany(name, legalId, scope1, scope2, scope3, contactHash); the page waits for the receiptAlready registered (this wallet already has a company or trader profile), contract paused, wallet rejection
3Remember contact dataEmail, phone and salt are saved in this browser's local storagen/a
4Optional backend mirrorOnly if NEXT_PUBLIC_BACKEND_URL is set: the form values, including email and phone, are posted to that serverFailures are silent

Leave NEXT_PUBLIC_BACKEND_URL empty unless you run your own backend; with it empty nothing leaves the browser except the onchain transaction.

Editing an existing company

When the wallet is already registered the form is prefilled from the chain and the button reads Save Changes Onchain. A changed name or legal entity ID, or newly entered email and phone (which create a new contactHash), call updateCompanyProfile; changed emissions call updateEmissions. Leave email and phone empty to keep the current contact hash.

Editing resets KYB

Any change of name, legal entity ID, contact hash or any Scope 1/2/3 figure automatically resets the KYB "verified" flag, and a verifier must review the new profile again. A KYB approval covers exactly the profile hash that was reviewed (profileHashOf(company)).

Other states

StateBehaviour
Wallet not connected"Wallet connection required"
NEXT_PUBLIC_CARBON_REGISTRY missing"Registry not configured"
Wallet registered as a traderExplains that a wallet holds one profile and links to the trader dashboard

Dashboard — /app/company/dashboard

ElementSource
Header: name, Legal ID, KYB Verified / KYB Pending badgeCarbonRegistry.getCompanyData
Total EmissionsScope 1 + 2 + 3 from the registry (tonnes)
Available CreditsSum of co2Tonnes of NFT credits you own (onchain)
Credits Neededmax(total emissions − available credits, 0)
Credit Coverageavailable ÷ total × 100; 0.0% when no emissions are reported
Tabs: Overview (contact commitment hash, quick actions, status incl. KYB), Emissions, Credits (NFT cards), RequestsMixed
Reported Emissions History chart (Emissions tab)Rebuilt from the registry's CompanyRegistered and EmissionsUpdated events, scanning from NEXT_PUBLIC_DEPLOY_BLOCK
Annual reduction target (Emissions tab)target from the registry, shown when set
Requests tabStatic pointer to Credit Requests; it does not list your orders

The contact section shows the contact commitment (hash), not your email or phone. Quick actions link to Credit Requests, Marketplace, Sell Credits, Auctions, Edit Profile and the Emissions Tracker. The coverage maths counts only NFTs in your wallet; credits you have wrapped into CCT no longer show as NFTs, so coverage drops after wrapping.

KYB verification is set by a wallet holding VERIFIER_ROLE on the registry ("KYB reviewed"); until then the badge shows KYB Pending. It is a review of the submitted profile, not a guarantee about the company.

States

StateBehaviour
Wallet not connected"Connect wallet to view dashboard"
Registry not configured"Registry not configured"
LoadingSkeletons
No company profile"Company not found" with a Register Company button (or a pointer to the trader dashboard for trader wallets)

Register a company · CarbonRegistry reference