Organizations
An organization is a record in the UTN Organizations registry, plus an account that holds its vault.
An approved company registers it. register returns an id and an account address. Save the account address. That address is the organization in Scan.
The registry is installed on testnet at 0xD8e6dCEd3a78B510be5fa351E6faA07EE6D3C424. The same value is organizations in /utn-config.js. Call name() on that address. Do not paste a name into an app and treat the paste as the source of truth.
Network roles
The owner picks any number of roles: Manufacturer, Importer, Distributor, Exporter, Service / Repairer, Recycler. Verification asks for documents for every selected role. If one role cannot be proved, the organization is not approved. Changing the roles clears verification until a verifier records it again. Scan shows the declared roles and which of them are verified.
Owner, admins, and members
The owner is the account that registered the organization. The owner is an admin. Admins add members, set roles, and set allowances. Other members need an enabled role before they can act.
The registry owner only manages verifiers. That account does not move an organization's funds and does not edit its members.
Vault
The organization account holds the vault. Anyone can send coins to it. Only the owner can withdraw.
Allowances
An allowance is an amount and a period, in seconds. The amount is how much of the vault can refund gas for that member. When the period is 0, the window does not reset. allowanceLeft is what remains.
Act on behalf
A member calls act on the registry. The organization account becomes msg.sender on the target contract. The vault refunds the transaction payer up to the member's allowance. Scan labels that transaction On behalf of the organization name from profile, together with the member and the cost. The name is whatever profile returns.
Verification
verificationLevel is a number on the organization account.
| Level | Meaning |
|---|---|
| 0 | None |
| 1 | Test |
| 2 | Basic |
| 3 | Enhanced |
Scan shows a shield when the level is above 0.
The function list is on Organizations. Creating one is Create an organization. Invites, joining, and leaving are on Membership.