- Effects:
- creates a claimable, cancellable, non-transferable stream for the protocol
- immediately deducts the balance from the stream creator
- Effects:
- allows the protocol contract to receive a stream in 13 tranches with the first tranche unlockable at the target timestamp and the 12 increments spread out by 1 week each following the allocation percentages: 5%, 5%, 6%, 6%, 7%, 7%, 8%, 8%, 9%, 9%, 10%, 10%, 10%
- Validations:
- throws an error if there are no tokens to claim
- Effects:
- allows the stream creator to cancel the stream and receive a refund for the remaining assets
- Returns:
- the correct value, compliant with EIP 1967
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Returns:
- the correct value
- Effects:
- allows admin to transfer admin
- Permissions:
- reverts when not called by admin
- Validations:
- reverts when setting to zero address
- Effects:
- sets a role to a new account
- Validations:
- reverts when setting to zero address
- Events:
- emits a RoleTransferred event with roleName, previous and new holder if the new holder is different from the previous one
- Effects:
- marks the contract as paused
- Permissions:
- can be paused by the pauser role
- reverts when called by non-pauser and non-admin
- Events:
- emits Paused event when paused
- Effects:
- allows admin to unpause the contract
- Permissions:
- reverts when called by non-admin
- Events:
- emits Unpaused event when unpaused
- Effects:
- allows admin to set a new pauser
- Permissions:
- reverts when not called by admin
- Validations:
- reverts when setting to zero address
- Events:
- emits a RoleTransferred event when pauser is changed
- Effects:
- updates the attester wallet correctly
- Permissions:
- allows authorized users
- denies unauthorized users
- Validations:
- reverts when input is invalid
- Effects:
- updates the attester wallets correctly and sets the current attester as secondary attester
- Permissions:
- allows authorized users
- denies unauthorized users
- Validations:
- reverts when input is invalid
- Effects:
- updates the admin correctly
- Permissions:
- allows authorized users
- denies unauthorized users
- Validations:
- reverts when input is invalid
- Validations:
- allows the attester wallet to attest
- prevents other wallets than the attester wallet from attesting
- Effects:
- allows a user to perform multiple claims in a single call
- does not have any effect if a single claim is invalid
- Events:
- emits a TokensClaimed event for each claim
- Effects:
- allows a user to claim tokens correctly
- Permissions:
- reverts when the contract is paused
- Validations:
- denies claims if user has already claimed
- denies claims if user is at a time too far in the future
- reverts with invalid merkle proof
- reverts when merkle root is not set
- reverts when contract balance is insufficient
- Events:
- emits a TokensClaimed event
- Effects:
- allows admin to set merkle root correctly
- sets the merkle root with a unique key
- Permissions:
- reverts when the contract is paused
- reverts when not called by admin
- allows the claims manager to set the merkle root
- Validations:
- reverts when the validUntil is in the past
- Events:
- emits a WeeklyMerkleRootSet event
- Effects:
- Sets the claims manager
- Permissions:
- reverts when not called by admin
- Effects:
- Register a new builder token using a builderId
- Permissions:
- Normal users cannot register a builder token
- Minter can register a builder token
- Validations:
- Revert if the builderId is already registered
- Revert if the builderId is empty
- Revert if the builderId is an invalid uuid
- Events:
- Emits TokenRegistered event new tokenId and builderId
- Effects:
- Updates minter and secondary minter roles
- Permissions:
- Can only be called by the admin
- Validations:
- Rejects zero address as new minter
- Events:
- Emits RoleTransferred event
- Effects:
- Mints tokens to a user account
- Mints tokens to a different address than the one paying for the transfer
- Increments total supply of the token
- Forwards 20% of the $DEV to the builder, and the remaining 80% to the proceeds receiver
- Permissions:
- Allows any user to mint tokens if they pay the price
- Cannot mint when contract is paused
- Validations:
- Reverts if tokenId is not registered
- Events:
- Emits TransferSingle event on mint
- Effects:
- Burns tokens from a user account
- Decrements total supply of the token
- Permissions:
- Allows token owner to burn tokens
- Allows approved operator to burn tokens
- Prevents burning tokens if not owner nor approved
- Validations:
- Reverts if burning more tokens than balance
- Events:
- Emits TransferSingle event on burn
- Effects:
- Sets operator approval for the caller
- Permissions:
- Allows any user to set operator approval
- Validations:
- Reverts if setting approval for self
- Events:
- Emits ApprovalForAll event
- Effects:
- Transfers tokens from one account to another
- Permissions:
- Allows token owner to transfer tokens
- Allows approved operator to transfer tokens
- Prevents transferring tokens if not owner nor approved
- Validations:
- Reverts if caller is not owner nor approved
- Reverts if transferring more tokens than balance
- Events:
- Emits TransferSingle event on transfer
- Effects:
- Transfers multiple tokens from one account to another
- Permissions:
- Allows token owner to transfer tokens
- Allows approved operator to transfer tokens
- Prevents transferring tokens if not owner nor approved
- Validations:
- Reverts if transferring more tokens than balance
- Events:
- Emits TransferBatch event on transfer
- Effects:
- Updates the base URI when called with a valid newBaseUri
- Permissions:
- Only admin can set the base URI
- Effects:
- Updates the builder address for a token
- Permissions:
- Allows current builder to update their address
- Allows admin to update builder address
- Reverts if caller is not admin or current builder
- Validations:
- Reverts if new address is zero address
- Reverts if token is not yet allocated
- Returns:
- Returns the correct balance of tokens for an account and tokenId
- Returns zero for accounts with no tokens
- Returns:
- Returns correct balances for multiple accounts and tokenIds
- Returns zeros for accounts with no tokens
- Returns:
- Returns the address of USDC contract
- Returns:
- Returns the correct price for purchasing a given amount of tokens, taking into account current supply and bonding curve formula of 2S + 2
- Returns:
- Returns the total supply of a given tokenId
- Returns zero for tokens with no supply
- Returns:
- Returns the correct builderId for a given tokenId
- Reverts if the tokenId is not registered
- Returns:
- Returns the correct tokenId for a given builderId
- Reverts if the builderId is not registered
- Returns:
- Returns the total number of registered builder tokens
- Returns:
- Returns the price increment used for calculating token prices
- Returns:
- Returns the correct URI for a given tokenId
- Returns:
- Returns the correct token URI for a given tokenId
- Returns:
- Should return the correct minter address
- Returns:
- returns its own address
- Returns:
- Returns true for IERC1155 and IERC1155MetadataURI
- Returns false for ERC20 and ERC721 interfaces
- Effects:
- Updates the implementation address correctly
- Permissions:
- Allows admin to set implementation
- Prevents non-admin from setting implementation
- Validations:
- Reverts if new implementation address is zero address
- Reverts if new implementation address is an EOA wallet
- Reverts if new implementation address does not accept the upgrade
- Reverts if new implementation address is the same as current
- Returns:
- Returns the current implementation address
- Effects:
- Updates the implementation address correctly
- Permissions:
- Allows admin to set implementation
- Prevents non-admin from setting implementation
- Validations:
- Reverts if new implementation address is zero address
- Reverts if new implementation address is an EOA wallet
- Reverts if new implementation address cannot accept the upgrade
- Reverts if new implementation address is the same as current
- Effects:
- transfers tokens correctly
- Permissions:
- allows token holders to transfer their tokens
- Validations:
- prevents transferring more tokens than balance
- Events:
- emits Transfer event on transfer
- Effects:
- approves allowance correctly
- Events:
- emits Approval event on approve
- Effects:
- transfers tokens correctly using allowance
- Permissions:
- allows spender to transfer within allowance
- prevents spender from transferring more than allowance
- prevents spender from transferring more than balance
- Events:
- emits Transfer event on transferFrom
- Effects:
- increases allowance correctly
- Events:
- emits Approval event on increaseAllowance
- Effects:
- decreases allowance correctly
- Validations:
- reverts when decreasing allowance below zero
- Effects:
- updates the implementation address correctly, preserving balances and initialized state
- Permissions:
- prevents non-admin from setting the implementation