Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
USDC Fiat Token V1
copy icon
Centre
• version 1.0.0
USDC
Stablecoin
ERC20
Token

USDC Fiat Token V1

The original USDC stablecoin contract -ERC20 Token backed by fiat reserves

*Visit desktop site to download or deploy

Version

1.0.0

Creator

Centre

Last Publish

11/26/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
initialize(string,string,string,uint8,address,address,address,address) :
This function is used to initialize the FiatToken contract. It sets the token name, symbol, currency, decimals, masterMinter, pauser, blacklister, and owner. It requires that the newMasterMinter, newPauser, newBlacklister, and newOwner are not the zero address. It also checks that the contract has not already been initialized. Once all the parameters have been set, the initialized variable is set to true. (autogenerated documentation)
mint(address,uint256) :
This function allows a minter to mint a specified amount of tokens to a specified address. It requires that the minter is not blacklisted, the address to mint to is not blacklisted, and that the amount to mint is greater than 0. It then subtracts the amount to mint from the minter's allowed amount, adds the amount to the total supply, adds the amount to the specified address' balance, and emits a Mint and Transfer event. (autogenerated documentation)
minterAllowance(address) :
This function returns the allowance of a given minter address. The allowance is stored in the minterAllowed mapping, which maps minter addresses to their respective allowances. The function takes in a minter address as an argument and returns the allowance associated with that address. (autogenerated documentation)
isMinter(address) :
This function checks if a given address is a minter. It does this by checking the minters mapping, which is a data structure that stores a boolean value for each address. If the address is found in the mapping, the function returns true, otherwise it returns false. (autogenerated documentation)
allowance(address,address) :
This function allows users to view the amount of tokens that have been approved for transfer from one address (the owner) to another address (the spender). It works by accessing the mapping of allowed tokens stored in the contract and returning the amount of tokens that have been approved for transfer from the owner to the spender. (autogenerated documentation)
totalSupply() :
This function is an override of the totalSupply() function from the ERC20 interface. It returns the total supply of tokens that have been created. It works by returning the value of the totalSupply_ variable, which is set when the token is created. (autogenerated documentation)
balanceOf(address) :
This function returns the balance of a given account. It takes an address as an argument and looks up the corresponding balance in the 'balances' mapping. It then returns the balance as a uint256. (autogenerated documentation)
approve(address,uint256) :
This function allows a user to approve a spender to spend a certain amount of tokens from their account. It checks that the sender and spender are not blacklisted, and that the contract is not paused. If all of these conditions are met, it calls the _approve function which updates the allowance of the spender to the specified value. It then returns true to indicate that the approval was successful. (autogenerated documentation)
_approve(address,address,uint256) :
This function is used to approve a spender to transfer a certain amount of tokens from the owner's account. It requires the owner and spender addresses, as well as the amount of tokens to be approved. The function then sets the allowed[owner][spender] variable to the value specified, and emits an Approval event. (autogenerated documentation)
transferFrom(address,address,uint256) :
This function allows a user to transfer tokens from one address to another. It requires that the sender is not blacklisted, the from and to addresses are not blacklisted, and that the value of the transfer does not exceed the allowance of the from address. It then calls the _transfer function to complete the transfer, and subtracts the value from the allowance of the from address. (autogenerated documentation)
transfer(address,uint256) :
This function allows users to transfer tokens from one address to another. It is an override of the _transfer function, which is a protected function. The function checks that the sender and recipient are not blacklisted, and that the contract is not paused. If all of these conditions are met, the _transfer function is called and the transfer is completed. (autogenerated documentation)
_transfer(address,address,uint256) :
This function is an internal function that is used to transfer tokens from one address to another. It requires three parameters: the address of the sender, the address of the recipient, and the amount of tokens to be transferred. It checks that the sender and recipient addresses are not the zero address, and that the sender has enough tokens to complete the transfer. If these conditions are met, it subtracts the amount of tokens from the sender's balance and adds it to the recipient's balance. Finally, it emits a Transfer event to notify the network of the transaction. (autogenerated documentation)
configureMinter(address,uint256) :
This function allows the master minter to configure a new minter by setting their address and the amount of tokens they are allowed to mint. It emits an event to notify that the minter has been configured. The function is only accessible when the contract is not paused and only the master minter can call it. (autogenerated documentation)
removeMinter(address) :
This function removes a minter from the list of minters. It requires the address of the minter to be removed as an argument. The function sets the minter's status to false and sets the minter's allowed amount to 0. It then emits an event to notify that the minter has been removed and returns true. (autogenerated documentation)
burn(uint256) :
This function allows minters to burn a specified amount of tokens from their account. It requires that the amount to be burned is greater than 0, and that the minter has enough tokens in their account to burn. It then subtracts the amount to be burned from the total supply of tokens, and from the minter's account balance. Finally, it emits a Burn and Transfer event to log the burn. (autogenerated documentation)
updateMasterMinter(address) :
This function allows the owner of the contract to update the masterMinter address. The function requires that the new masterMinter address is not the zero address and then sets the masterMinter address to the new address. Finally, it emits an event to signal that the masterMinter address has been changed. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i usdc-fiat-token-v1
copy icon

Last Publish

11/26/2022

Version

1.0.0

Creator

Centre

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.