👩‍💻
Unlockd Developers Docs
Unlockd for Devs V2
Unlockd for Devs V2
  • Introduction
  • ⚙️Core
    • Unlockd
    • BaseCore
    • BaseCoreModule
  • ⚙️Modules
    • Installer
    • Manager
    • Action
    • SellNow
    • BuyNow
    • Market
    • Auction
  • 🆕Vault and Tokens
    • UTokenVault
    • BaseToken
    • ScaledToken
    • WethGateway
  • 🆕Adapters and Strategies
    • ReservoirAdapter
    • MaxApyStrategy
  • 🆕Storage
    • CoreStorage
    • UVaultStorage
  • 📔Deployed Contracts
    • Ethereum Sepolia
    • Ethereum Mainnet
  • 📫Unlockd Account (Wallet)
    • Introduction
    • Architecture
    • DelegationWalletFactory
    • DelegationWalletRegistry
    • DelegationOwner
    • GuardOwner
    • ProtocolOwner
    • TransactionGuard
    • DelegationRecipes
    • AllowedControllers
    • Deployed Contracts
      • Ethereum Sepolia (Testnet)
  • 🧰SDK
    • Typescript Package
    • SDK Docs
  • 🤝DEVELOPERS HELP
    • Best Practices
    • Security and Risk Management
    • Github
    • Bug Bounty - ACTIVE
Powered by GitBook
On this page
  • Key functions:
  • Parameters:
  • Parameters:
  • Parameters:
  • Returns:
  • Parameters:
  • Parameters:
  • Parameters:
  1. Vault and Tokens

BaseToken

BaseToken.sol is a contract that provides the base implementation for ERC20 tokens used within the Unlockd Protocol.

Key functions:

function __BaseToken_init(
    address aclManager_, 
    address uTokenVault_, 
    uint8 decimals_, 
    string calldata name_, 
    string calldata symbol_
) internal onlyInitializing

Initializes the BaseToken contract with the provided parameters.

Parameters:

aclManager_: The address of the ACL manager contract.

uTokenVault_: The address of the UToken vault contract.

decimals_: The number of decimals used by the token.

name_: The name of the token.

symbol_: The symbol of the token.


function setActive(bool active) external onlyEmergencyAdmin

Sets the active state of the token.

Parameters:

active: A boolean indicating whether to set the token as active or not.


function setFrozen(bool frozen) external onlyEmergencyAdmin

Sets the frozen state of the token.

Parameters:

frozen: A boolean indicating whether to set the token as frozen or not.


function decimals() public view virtual override returns (uint8)

Returns the number of decimals used by the token.

Returns:

The number of decimals as a uint8.


function _transfer(
    address sender, 
    address recipient, 
    uint256 amount
) internal virtual override

Transfers tokens from the sender to the recipient.

Parameters:

sender: The address of the sender.

recipient: The address of the recipient.

amount: The amount of tokens to transfer.


function _mint(
    address account, 
    uint256 amount
) internal virtual override isFrozen isActive

Mints new tokens to the specified account.

Parameters:

account: The address of the account to mint tokens to.

amount: The amount of tokens to mint.


function _burn(
    address account, 
    uint256 amount
) internal virtual override isFrozen

Burns tokens from the specified account.

Parameters:

account: The address of the account to burn tokens from.

amount: The amount of tokens to burn.

PreviousUTokenVaultNextScaledToken

Last updated 1 year ago

🆕