solidity-docgen
Version:
Solidity API documentation automatic generator.
302 lines (281 loc) • 7.1 kB
Markdown
# Snapshot report for `src/cli.test.ts`
The actual snapshot is saved in `cli.test.ts.snap`.
Generated by [AVA](https://avajs.dev).
## fixture basic
> Snapshot 1
`## \`Bar\`␊
␊
Bar userdoc␊
␊
Bar dev␊
␊
␊
␊
### \`bar() → uint256\` (external)␊
␊
Bar.bar userdoc␊
␊
Bar.bar devdoc␊
␊
␊
␊
␊
␊
## \`Foo\`␊
␊
Foo userdoc␊
␊
Foo dev␊
␊
␊
␊
### \`bar() → uint256\` (external)␊
␊
Foo.bar userdoc␊
␊
Foo.bar devdoc␊
␊
␊
### \`foo() → uint256\` (external)␊
␊
Foo.foo userdoc␊
␊
Foo.foo devdoc␊
␊
␊
␊
`
## fixture dependencies
> Snapshot 1
`# Token␊
␊
## own␊
␊
own function␊
␊
## constructor␊
␊
Sets the values for {name} and {symbol}.␊
The defaut value of {decimals} is 18. To select a different value for␊
{decimals} you should overload it.␊
All three of these values are immutable: they can only be set once during␊
construction.␊
␊
## name␊
␊
Returns the name of the token.␊
␊
## symbol␊
␊
Returns the symbol of the token, usually a shorter version of the␊
name.␊
␊
## decimals␊
␊
Returns the number of decimals used to get its user representation.␊
For example, if \`decimals\` equals \`2\`, a balance of \`505\` tokens should␊
be displayed to a user as \`5,05\` (\`505 / 10 ** 2\`).␊
Tokens usually opt for a value of 18, imitating the relationship between␊
Ether and Wei. This is the value {ERC20} uses, unless this function is␊
overloaded;␊
NOTE: This information is only used for _display_ purposes: it in␊
no way affects any of the arithmetic of the contract, including␊
{IERC20-balanceOf} and {IERC20-transfer}.␊
␊
## totalSupply␊
␊
See {IERC20-totalSupply}.␊
␊
## balanceOf␊
␊
See {IERC20-balanceOf}.␊
␊
## transfer␊
␊
See {IERC20-transfer}.␊
Requirements:␊
- \`recipient\` cannot be the zero address.␊
- the caller must have a balance of at least \`amount\`.␊
␊
## allowance␊
␊
See {IERC20-allowance}.␊
␊
## approve␊
␊
See {IERC20-approve}.␊
Requirements:␊
- \`spender\` cannot be the zero address.␊
␊
## transferFrom␊
␊
See {IERC20-transferFrom}.␊
Emits an {Approval} event indicating the updated allowance. This is not␊
required by the EIP. See the note at the beginning of {ERC20}.␊
Requirements:␊
- \`sender\` and \`recipient\` cannot be the zero address.␊
- \`sender\` must have a balance of at least \`amount\`.␊
- the caller must have allowance for \`\`sender\`\`'s tokens of at least␊
\`amount\`.␊
␊
## increaseAllowance␊
␊
Atomically increases the allowance granted to \`spender\` by the caller.␊
This is an alternative to {approve} that can be used as a mitigation for␊
problems described in {IERC20-approve}.␊
Emits an {Approval} event indicating the updated allowance.␊
Requirements:␊
- \`spender\` cannot be the zero address.␊
␊
## decreaseAllowance␊
␊
Atomically decreases the allowance granted to \`spender\` by the caller.␊
This is an alternative to {approve} that can be used as a mitigation for␊
problems described in {IERC20-approve}.␊
Emits an {Approval} event indicating the updated allowance.␊
Requirements:␊
- \`spender\` cannot be the zero address.␊
- \`spender\` must have allowance for the caller of at least␊
\`subtractedValue\`.␊
␊
## _transfer␊
␊
Moves tokens \`amount\` from \`sender\` to \`recipient\`.␊
This is internal function is equivalent to {transfer}, and can be used to␊
e.g. implement automatic token fees, slashing mechanisms, etc.␊
Emits a {Transfer} event.␊
Requirements:␊
- \`sender\` cannot be the zero address.␊
- \`recipient\` cannot be the zero address.␊
- \`sender\` must have a balance of at least \`amount\`.␊
␊
## _mint␊
␊
Creates \`amount\` tokens and assigns them to \`account\`, increasing␊
the total supply.␊
Emits a {Transfer} event with \`from\` set to the zero address.␊
Requirements:␊
- \`to\` cannot be the zero address.␊
␊
## _burn␊
␊
Destroys \`amount\` tokens from \`account\`, reducing the␊
total supply.␊
Emits a {Transfer} event with \`to\` set to the zero address.␊
Requirements:␊
- \`account\` cannot be the zero address.␊
- \`account\` must have at least \`amount\` tokens.␊
␊
## _approve␊
␊
Sets \`amount\` as the allowance of \`spender\` over the \`owner\` s tokens.␊
This internal function is equivalent to \`approve\`, and can be used to␊
e.g. set automatic allowances for certain subsystems, etc.␊
Emits an {Approval} event.␊
Requirements:␊
- \`owner\` cannot be the zero address.␊
- \`spender\` cannot be the zero address.␊
␊
## _beforeTokenTransfer␊
␊
Hook that is called before any transfer of tokens. This includes␊
minting and burning.␊
Calling conditions:␊
- when \`from\` and \`to\` are both non-zero, \`amount\` of \`\`from\`\`'s tokens␊
will be to transferred to \`to\`.␊
- when \`from\` is zero, \`amount\` tokens will be minted for \`to\`.␊
- when \`to\` is zero, \`amount\` of \`\`from\`\`'s tokens will be burned.␊
- \`from\` and \`to\` are never both zero.␊
To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].␊
␊
## _msgSender␊
␊
␊
␊
## _msgData␊
␊
␊
␊
`
## fixture helpers
> Snapshot 1
`FOO␊
`
## fixture inheritdoc
> Snapshot 1
`## \`A\`␊
␊
### \`foo(uint256 x)\` (external)␊
␊
userdoc from A␊
␊
␊
devdoc from A␊
␊
␊
x: x from A␊
␊
␊
␊
## \`B\`␊
␊
### \`foo(uint256 x)\` (external)␊
␊
userdoc redefined in B␊
␊
devdoc from A␊
␊
␊
x: x from A␊
␊
`
## fixture solc-0.8
> Snapshot 1
`## \`Bar\`␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
## \`Foo\`␊
␊
␊
␊
some devdoc␊
␊
␊
### \`foo()\` (external)␊
␊
␊
␊
and a function␊
␊
␊
`
## fixture custom
> Snapshot 1
`Foo␊
␊
### devdoc␊
␊
dev docs␊
␊
␊
### userdoc␊
␊
user docs␊
␊
### custom a␊
␊
first␊
␊
␊
### custom b␊
␊
second␊
␊
`