Open aress31 opened 3 years ago
What they did was that they have their own custom names to the vars,
but you can see what those vars are:
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint8) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
With the functions you see that _tTotal
is totalSupply, etc.
@BryantS11 these ones are the easy ones, what about the one I mention above? rOwned, tOwned, MAX, etc. These are the ones I would like to understand.
@BryantS11 these ones are the easy ones, what about the one I mention above? rOwned, tOwned, MAX, etc. These are the ones I would like to understand.
from what i understand:
_rOwned
and _tOwned
are equal to _balances
in a regular token
_rOwned
are addresses that are not excluded
_tOwned
are addresses that are excluded
@BryantS11 Do you know what _rTotal and _tFeeTotal are and what roles they play in redistributing fees?
@BryantS11 these ones are the easy ones, what about the one I mention above? rOwned, tOwned, MAX, etc. These are the ones I would like to understand.
from what i understand:
_rOwned
and_tOwned
are equal to_balances
in a regular token
_rOwned
are addresses that are not excluded_tOwned
are addresses that are excluded
Alright, not excluded and excluded from what exactly?
From:
And what is the difference between these two very similarly named vars
:
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcluded;
And lastly what is the role of:
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
@BryantS11 these ones are the easy ones, what about the one I mention above? rOwned, tOwned, MAX, etc. These are the ones I would like to understand.
from what i understand:
_rOwned
and_tOwned
are equal to_balances
in a regular token_rOwned
are addresses that are not excluded_tOwned
are addresses that are excludedAlright, not excluded and excluded from what exactly?
From:
- rewards
- or from taxes
- or both?
And what is the difference between these two very similarly named
vars
:mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcluded;
And lastly what is the role of:
bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true;
They are Excluded from rewards, Example: You exclude a Exchange address so that the exchange is not receiving rewards and users receive more of a share because less addresses are participating.
The mapping checks if the sender and/or recipient _isExcluded
and it runs different functions based on result
I'm new to Solidity so I don't understand it too much
I am getting started with Solidity and struggle a bit to understand this RFI contract, if you could refactor it to extend
openzepplin contracts
(and use the same vars name, e.g.,_totalSupply
) and use more explicit variable names (what isrTotal
,rOwned
,tOwned
, tTotal,MAX
etc.) and comment the code that would help a lot!Alternatively, explaining in the README how to use extend this contract would do!