ReputationToken
Implements universe-specific ERC-20 REP, ERC-2612 permits, and ERC-3009 transfers while enforcing the supply ceiling maintained by Zoltar. ReputationToken source contract
Read surface
Use getTotalTheoreticalSupply, zoltar, universeId, repNumber, the standard ERC-20 name, symbol, decimals, totalSupply, balanceOf, and allowance reads, and authorization reads nonces, DOMAIN_SEPARATOR, and authorizationState.
State-changing interactions
| Transaction | Caller | Main prerequisites | State or asset effect | Primary signals |
|---|---|---|---|---|
initialize(universeId, totalTheoreticalSupplyAttoRep, repNumber) |
Zoltar only |
Called once by Zoltar as part of child-universe creation; universe, REP number, and theoretical supply are nonzero; supply does not exceed 11 million REP. | Atomically assigns the child universe, global display sequence, name, symbol, and theoretical-supply ceiling used to bound migration mints. | TheoreticalSupplySet and ReputationTokenInitialized |
mint(account, valueAttoRep) |
Zoltar only |
account is nonzero; resulting ERC-20 supply does not exceed theoretical supply. |
Mints branch REP to an account. | Mint and ERC-20 Transfer |
burn(account, valueAttoRep) |
Zoltar only |
account is nonzero and has sufficient REP; theoretical supply covers the burn. |
Burns account REP and reduces both actual and theoretical supply by the same amount. | Burn and ERC-20 Transfer |
transfer(to, value) |
REP holder | Destination is nonzero; caller has sufficient balance. | Moves REP from the caller without changing actual or theoretical supply. | Transfer |
approve(spender, value) |
Any REP account setting its own allowance | Spender is nonzero. | Replaces the named spender allowance without moving REP. | Approval |
transferFrom(from, to, value) |
A spender with sufficient allowance from from |
Source and destination are nonzero; source has sufficient balance; caller has sufficient allowance, including when caller equals source. | Moves REP from from; a finite allowance decreases by value, while an infinite allowance remains unchanged. Neither allowance path emits Approval. |
Transfer only |
permit(owner, spender, value, deadline, v, r, s) |
Anyone presenting the owner's valid ERC-2612 signature | Deadline has not passed; signature matches the current chain, token domain, owner, spender, value, and nonce. | Sets the signed allowance and advances the owner's permit nonce. | Approval |
transferWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s) |
Anyone presenting the source's valid ERC-3009 signature | The strict validity window is open; the nonce is unused; signature fields and source balance are valid. | Consumes the authorization nonce and transfers the exact signed amount to the signed recipient. | AuthorizationUsed and Transfer |
receiveWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s) |
The signed recipient presenting the source's valid ERC-3009 signature | Caller equals the signed recipient; the strict validity window is open; the nonce is unused; signature fields and source balance are valid. | Consumes the authorization nonce and transfers the exact signed amount to the caller-bound recipient. | AuthorizationUsed and Transfer |
cancelAuthorization(authorizer, nonce, v, r, s) |
Anyone presenting the authorizer's valid ERC-3009 cancellation signature | The nonce is unused and the cancellation signature matches the authorizer. | Marks the authorization nonce as consumed without transferring tokens. | AuthorizationCanceled |