relevant tag icon
USDC Mint Controller
copy icon
Centre
• version 1.0.0
Controller
Stablecoin
USDC

USDC Mint Controller

The MintController contract manages minters for a contract that * implements the MinterManagerInterface. It lets the owner designate certain * addresses as controllers, and these controllers then manage the * minters by adding and removing minters, as well as modifying their minting * allowance. A controller may manage exactly one minter, but the same minter * address may be managed by multiple controllers.

*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
getMinterManager() :
This function returns a reference to the MinterManagementInterface, which is an interface for managing the minter contract. It works by retrieving the minterManager variable, which is a global variable that stores the reference to the MinterManagementInterface. (autogenerated documentation)
setMinterManager(address) :
This function allows the owner of the contract to set a new minter manager. It emits an event to log the change, and then sets the minterManager variable to the new address provided. The minterManager variable is of type MinterManagementInterface, which is an interface that allows the contract to interact with the minter manager. (autogenerated documentation)
removeMinter() :
This function removes a minter from the minterManager. It is only accessible to the controller, which is set by the owner. The function emits an event, MinterRemoved, which contains the sender's address and the minter's address. It then returns a boolean value indicating whether the minter was successfully removed. (autogenerated documentation)
configureMinter(uint256) :
This function allows the controller of the contract to configure the allowance of a minter. It takes in a uint256 parameter, _newAllowance, which is the new allowance for the minter. It emits an event, MinterConfigured, which logs the address of the controller, the address of the minter, and the new allowance. Finally, it calls the internal_setMinterAllowance function to set the new allowance for the minter. (autogenerated documentation)
incrementMinterAllowance(uint256) :
This function allows the controller of the contract to increment the allowance of a minter in the minterManager. It requires that the allowance increment is greater than 0, that the minter is in the minterManager, and that the controller is the sender of the transaction. It then emits an event to log the allowance increment and returns a boolean indicating whether the allowance was successfully set. (autogenerated documentation)
decrementMinterAllowance(uint256) :
This function allows the controller of a minter to decrement the minter's allowance. It requires that the allowance decrement is greater than 0, that the minter is registered in the minterManager, and that the current allowance is greater than the allowance decrement. It then emits an event to log the allowance decrement and calls the internal_setMinterAllowance function to set the new allowance. (autogenerated documentation)
internal_setMinterAllowance(address,uint256) :
This function allows the owner of the contract to set the allowance for a given minter address. It does this by calling the configureMinter() function of the minterManager contract, which sets the allowance for the given minter address to the specified amount. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i usdc-mint-controller
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.