titanoboa
titanoboa copied to clipboard
need better fn description
currently we have:
(Pdb++) self.coins[exchange_i].allowance?
Type: VyperFunction
String Form: contracts/mocks/ERC20Mock.vy.allowance
Definition: self.coins[exchange_i].allowance(*args, value=0, gas=None, sender=None, **kwargs)
Docstring: None
we need way better description that shows what the args are, what the docstrings are, etc.
this should help: https://github.com/vyperlang/titanoboa/commit/b0099d522fe6f924a761d014d1c261f5406289fc
If I try this currently with this function I get:
Signature: c.approve(*args, value=0, gas=None, sender=None, **kwargs)
Type: VyperFunction
String form: contract function approve(address,uint256)
File: ~/curve/boa/boa/contracts/vyper/vyper_contract.py
Docstring:
@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
Beware that changing an allowance with this method brings the risk that someone may use both the old
and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
@param _spender The address which will spend the funds.
@param _value The amount of tokens to be spent.
Which means:
- The module is incorrect, the file should be the ERC20.vy instead of vyper_contract.py
- The function signature is always the same as VyperFunction.call