Closed SebasKoel closed 2 years ago
The Factory interface function createpair should've been nonpayable.
As for calling payable functions an extra parameter with value should be added.
Like this:
(amountToken, amountETH, liquidity) = self.uniswap_contract.addLiquidityETH(self, contract_balance, 0, 0, self.owner, block.timestamp, value=self.balance)
Hi,
First of all great work you all are doing! I hope to be able to be of help when I'm more familiar with the code.
I do have an issue which I tried to lookup but cannot find the answer to.
I think one of the reasons why Vyper isn't really used yet is because the current state in cryptoland is that all tokens being launched are copy-paste from other contracts. Since I don't really like Java or Javascript I wanted to rewrite a Reflection Token contract in Vyper and open source a repo with Brownie and all tests included. I think creating a copy-paste option with tests and a walkthrough can really boost Vyper and maybe prevent some actually cool projects from failing due to contract issues.
However I'm running into an issue: I want to call an Uniswap function via an interface and cannot figure out how this works.
This is the code:
And this is the working code in Solidity:
`
`
So how do I call a payable function in Vyper?
Thanks in advance
Ohh and a cute animal pic: