initialize() :
This function is used to initialize the contract. It sets the owner, proposedOwner, assetProtectionRole, totalSupply_, supplyController, and initialized variables to their respective values. The owner is set to the sender of the message, proposedOwner is set to address(0), assetProtectionRole is set to address(0), totalSupply_ is set to 0, supplyController is set to the sender of the message, and initialized is set to true. This function ensures that the contract is properly initialized before any other functions can be used. (autogenerated documentation)
initializeDomainSeparator() :
This function initializes the domain separator for the contract. It does this by taking the EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH, the name of the contract, and the address of the contract and hashing them together using the keccak256 hashing algorithm. The result of this hashing is stored in the EIP712_DOMAIN_HASH variable. (autogenerated documentation)
totalSupply() :
This function returns the total supply of a token. It works by accessing the totalSupply_ variable, which stores the total amount of tokens in circulation. (autogenerated documentation)
transfer(address,uint256) :
This function is used to transfer tokens from one address to another. It requires that the address to which the tokens are being transferred is not address zero, that neither the sender nor the recipient are frozen, and that the sender has enough tokens to complete the transfer. If these conditions are met, the function subtracts the amount of tokens being transferred from the sender's balance and adds it to the recipient's balance. Finally, it emits a Transfer event with the sender, recipient, and amount of tokens transferred. (autogenerated documentation)
balanceOf(address) :
This function returns the balance of a given address. It takes in an address as an argument and returns the corresponding balance stored in the balances mapping. The balances mapping is a mapping of addresses to their corresponding balances. (autogenerated documentation)
transferFrom(address,address,uint256) :
This function allows a user to transfer tokens from one address to another. It requires that the sender, recipient, and the from address are not frozen, that the sender has sufficient funds, and that the sender has sufficient allowance. If these conditions are met, the function subtracts the value from the from address, adds the value to the to address, and subtracts the value from the sender's allowance. Finally, it emits a Transfer event. (autogenerated documentation)
approve(address,uint256) :
This function allows a user to approve a spender to transfer a certain amount of tokens from their account. It requires that both the sender and the spender are not frozen, and then sets the allowed amount of tokens for the spender to the specified value. It then emits an Approval event with the sender, spender, and value. (autogenerated documentation)
allowance(address,address) :
This function allows users to check the amount of tokens that have been approved for a particular spender to spend from the owner's account. It takes two parameters, the address of the owner and the address of the spender, and returns the amount of tokens that have been approved for the spender to spend from the owner's account. The function works by accessing the allowed mapping, which stores the approved amounts of tokens for each spender. (autogenerated documentation)
proposeOwner(address) :
This function allows the current owner of a contract to propose a new owner. It requires that the proposed owner is not address zero and that the caller is not the proposed owner. If these conditions are met, the proposedOwner variable is set to the proposed owner address and an OwnershipTransferProposed event is emitted. (autogenerated documentation)
disregardProposeOwner() :
This function allows the current owner or proposed owner of a contract to disregard a proposed owner. It requires that the sender of the transaction is either the current owner or the proposed owner, and that a proposed owner has been previously set. If these conditions are met, the proposed owner is set to address(0) and an OwnershipTransferDisregarded event is emitted. (autogenerated documentation)
claimOwnership() :
This function allows the proposed owner to claim ownership of the contract. It requires that the msg.sender is the proposed owner, and if it is, it sets the owner to the proposed owner and sets the proposed owner to address(0). It also emits an OwnershipTransferred event with the old owner and the new owner. (autogenerated documentation)
reclaimBUSD() :
This function allows the owner of the contract to reclaim BUSD tokens from the contract. It first stores the balance of the contract in a variable, then sets the balance of the contract to 0. Finally, it adds the balance to the owner's account and emits a Transfer event. (autogenerated documentation)
pause() :
This function pauses the contract. It can only be called by the owner of the contract and requires that the contract is not already paused. If the conditions are met, the paused variable is set to true and a Pause event is emitted. (autogenerated documentation)
unpause() :
This function is used to unpause the contract. It can only be called by the owner of the contract and requires that the contract is currently paused. If these conditions are met, the paused variable is set to false and an Unpause event is emitted. (autogenerated documentation)
setAssetProtectionRole(address) :
This function allows the owner or the current assetProtectionRole to set a new assetProtectionRole. It emits an event AssetProtectionRoleSet which logs the old and new assetProtectionRole. The new assetProtectionRole is then set to the address passed in as an argument. (autogenerated documentation)
freeze(address) :
This function allows the AssetProtectionRole to freeze an address. It checks to make sure that the address has not already been frozen, and if not, sets the frozen mapping for that address to true and emits an AddressFrozen event. (autogenerated documentation)
unfreeze(address) :
This function allows the AssetProtectionRole to unfreeze an address. It requires that the address is already frozen, and then sets the frozen status of the address to false. It also emits an event to signal that the address has been unfrozen. (autogenerated documentation)
wipeFrozenAddress(address) :
This function wipes the balance of a frozen address. It requires that the address is frozen, then it stores the balance of the address in a variable, sets the balance of the address to 0, subtracts the balance from the total supply, and emits events to indicate that the address has been wiped, the supply has decreased, and a transfer has occurred from the frozen address to address 0. (autogenerated documentation)
isFrozen(address) :
This function checks if a given address is frozen or not. It takes an address as an argument and returns a boolean value indicating whether the address is frozen or not. The function checks the frozen mapping to determine if the address is frozen or not. The frozen mapping is a mapping of addresses to boolean values, where true indicates that the address is frozen and false indicates that the address is not frozen. (autogenerated documentation)
setSupplyController(address) :
This function allows the owner or the current supply controller to set a new supply controller. It requires that the new supply controller is not address zero and emits an event to log the change. The new supply controller is then set to the address provided. (autogenerated documentation)
increaseSupply(uint256) :
This function increases the total supply of the token by the amount specified in the _value parameter. It also adds the same amount to the balance of the supplyController address. Finally, it emits two events - SupplyIncreased and Transfer - to notify other contracts of the change in supply and the transfer of tokens to the supplyController address. (autogenerated documentation)
decreaseSupply(uint256) :
This function decreases the total supply of the token by a specified amount. It requires that the amount to be decreased is less than or equal to the balance of the supplyController. It then subtracts the specified amount from the supplyController's balance and the totalSupply, and emits two events - SupplyDecreased and Transfer. The Transfer event indicates that the supplyController has transferred the specified amount to address 0 (the null address). (autogenerated documentation)
nextSeqOf(address) :
This function returns the next sequence number for a given address. It works by accessing the nextSeqs mapping, which stores the next sequence number for each address. The function takes in an address as an argument and returns the corresponding sequence number stored in the mapping. (autogenerated documentation)
betaDelegatedTransfer(address,uint256,uint256,uint256,uint256) :
This function is used to perform a delegated transfer of funds from one account to another. It takes in a signature, the address of the recipient, the amount of funds to be transferred, the fee associated with the transfer, a sequence number, and a deadline. It then uses the signature to verify the sender's identity and then executes the transfer. The function uses the Ethereum Virtual Machine's assembly language to extract the r, s, and v values from the signature and then calls the _betaDelegatedTransfer function to perform the transfer. (autogenerated documentation)
_betaDelegatedTransfer(bytes32,bytes32,uint8,address,uint256,uint256,uint256,uint256) :
This function is used to perform a delegated transfer of tokens from one address to another. It requires that the sender is whitelisted as a beta delegate, that the value and fee are greater than zero, that the transaction has not expired, and that the signature is valid. It then calculates the delegated transfer hash and uses EIP191 and EIP712 to recover the from address from the signature. It then checks that the from and to addresses are not frozen, that the sender has sufficient funds, and that the sequence number is correct. It then updates the balances and emits the appropriate events. (autogenerated documentation)
betaDelegatedTransferBatch(bytes32[],bytes32[],uint8[],uint256[],uint256[],uint256[],uint256[]) :
This function allows for a batch of delegated transfers to be executed on the Ethereum blockchain. It takes in an array of parameters (r, s, v, to, value, fee, seq, deadline) and loops through them to execute each transfer. The function requires that all of the arrays have the same length, and that each transfer is successful. If all of the transfers are successful, the function returns true. (autogenerated documentation)
isWhitelistedBetaDelegate(address) :
This function checks if a given address is whitelisted as a beta delegate. It does this by accessing the betaDelegateWhitelist mapping and returning a boolean value indicating whether the address is whitelisted or not. (autogenerated documentation)
setBetaDelegateWhitelister(address) :
This function allows the owner or the current betaDelegateWhitelister to set a new betaDelegateWhitelister. The function requires that the msg.sender is either the owner or the current betaDelegateWhitelister, and if this is the case, the new betaDelegateWhitelister is set and an event is emitted. (autogenerated documentation)
whitelistBetaDelegate(address) :
This function whitelists a given address as a Beta Delegate. It requires that the address has not already been whitelisted, and that the caller of the function is the Beta Delegate Whitelister. If these conditions are met, the address is added to the Beta Delegate Whitelist and an event is emitted to signal that the address has been whitelisted. (autogenerated documentation)
unwhitelistBetaDelegate(address) :
This function allows the BetaDelegateWhitelister to remove a delegate from the BetaDelegateWhitelist. It takes an address as an argument and checks if the address is already whitelisted. If it is, it sets the whitelist status to false and emits an event to signal that the delegate has been unwhitelisted. (autogenerated documentation)