Skip to main content

ERC20DebtBase

Git Source

Inherits: ERC20Base, IERC20DebtToken

Functions​

constructor​

constructor(
ERC20BaseConfig memory config
) ERC20Base(config);

nonces​

function nonces(
address owner
) public view virtual override(ERC20Base, IERC20Permit) returns (uint256);

approve​

function approve(address spender, uint256 amount) public virtual override(ERC20, IERC20) returns (bool);

allowance​

function allowance(address receiver, address spender) public view virtual override(ERC20, IERC20) returns (uint256);

debtAllowance​

Sets amount as the allowance of spender to send receiver debt tokens. Map key is the receiver of the debt approving the debt to be moved to them.

function debtAllowance(address receiver, address spender) public view returns (uint256);

approveDebt​

function approveDebt(address spender, uint256 amount) public returns (bool);

transfer​

function transfer(address receiver, uint256 amount) public virtual override(ERC20, IERC20) returns (bool);

transferFrom​

function transferFrom(
address owner,
address receiver,
uint256 amount
) public virtual override(ERC20, IERC20) returns (bool);

claimDebt​

function claimDebt(address owner, uint256 amount) public override;

_spendAllowance​

override this method to be able to use debtAllowance

function _spendAllowance(address receiver, address spender, uint256 amount) internal virtual override;

Errors​

DebtERC20ApproveDebt​

error DebtERC20ApproveDebt();

DebtERC20IncreaseDebtAllowance​

error DebtERC20IncreaseDebtAllowance();

DebtERC20DecreaseDebtAllowance​

error DebtERC20DecreaseDebtAllowance();