by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    jmerestain
    @jmerestain
    on the Javascript EVM
    Just some guy
    @fubuloubu
    that's really weird. you're saying what metamask estimates for the call is ~1m gas?
    jmerestain
    @jmerestain
    yeah
    Remix gives me the error when I allocate 300k gas
    somewhere along the lines of "the transaction will fail unless it has 999k gas"
    insufficient gas allocation

    https://etherscan.io/token/0x0d8fc15b6fefc278ff642861df51b45607330871#writeContract

    this is the contract I set deployed on mainnet, which is very weird since on the JSVM it only gets 68k gas

    having some troubles seeing where the huge gas requirements come from with that code, it's just the ERC20.vy with a 2 2-3 line methods added and a few asserts put in place
    Just some guy
    @fubuloubu
    Yeah, I don't see anything either. Must be a bug in the JSVM's gas estimation because of something Vyper does slightly differently than Solidity
    weird
    jmerestain
    @jmerestain
    not just 999k apparently, reading was wrong; 9.9M gas
    I found the problem, apparently there was an assert. if it didn't pass it would shoot up the gas to 9.9m
    Just some guy
    @fubuloubu
    that's weird, our assert statement returns the remainder of the gas
    Ghost
    @ghost~5ab0d1ebd73408ce4f92358d
    Hello all :) Just a quick question, does Vyper support deployment of a contract within some other parent contract?
    Just some guy
    @fubuloubu
    No, not like in Solidity
    your choices are to either using create_forwarder_to like Uniswap does: https://vyper.readthedocs.io/en/latest/built-in-functions.html#create_forwarder_to
    the typical Solidity factory pattern creates a lot of overhead in terms of code size and gas costs
    Sergey Goncharov
    @gonchs
    Any ideas how to assign a tuple (uint, uint, unit) return value from a Solidity contract to a local variable in Vyper? And how should the interface definition look like?
    Just some guy
    @fubuloubu
    contract Bar: 
        def baz() -> (uint256, uint256, uint256): constant 
    
    @public 
    def foo(): 
        a: uint256 = 0 
        b: uint256 = 0 
        c: uint256 = 0 
        a, b, c = Bar(a).baz()
    you just have to declare them all first
    Spencer Harris
    @spencerbh
    I am looking at ERC-721 implementations in Vyper and its seems like nobody has fully implemented the spec? is this true? Im specificially interested in the ERC721Metadata option. Looks like the OxCert implementation moved to Solidity?
    Sergey Goncharov
    @gonchs
    I need to call a function called "swap" on an external contract. When I try to define the interface, I get an error: "Function name invalid. swap is a reserved keyword (Vyper language)". Is there any way around this? Or is raw_call my only option?
    Sergey Goncharov
    @gonchs
    What is the swap keyword used for? Can't find anything in the docs.
    Ben Hauser
    @iamdefinitelyahuman
    @gonchs SWAP is an opcode, i think that's why it's included in the reserved keywords
    well... SWAP{n} where n is 1-16
    are you defining the interface in vyper code or via an ABI?
    Sergey Goncharov
    @gonchs
    in vyper code
    Ben Hauser
    @iamdefinitelyahuman
    it might work to implement it via an ABI. if it doesn't, i feel like it probably should and might be worth opening an issue over.
    Sergey Goncharov
    @gonchs
    I have zero knowledge in how to write a programming language itself but shouldn't interpreter only "translate" words that are explicitly set that it should translate? I don't see "swap" used anywhere by doing the search on the repo: https://github.com/vyperlang/vyper/search?q=swap&unscoped_q=swap While the rest of the reserved keywords are used. Could this be a bug?
    I'm thinking of removing "swap" from the reserved keywords and compiling vyper just to see if it would work. But it would probably be faster for me to just use raw_call.
    Sergey Goncharov
    @gonchs
    Opened an issue: vyperlang/vyper#1938
    Ben Hauser
    @iamdefinitelyahuman
    yeah, i can't find much looking through past issues or at git blame. we'll discuss it on the next call for sure.
    Sergey Goncharov
    @gonchs
    Is there a docker for vyper-json?
    Just some guy
    @fubuloubu
    No, but we could make one. Can you open an issue for that? (publish vyper-json in docker image)
    Jacques Wagener
    @jacqueswww
    I think we should remove the opcodes check
    Never really made sense that you could inject opcodes like that.
    Jacques Wagener
    @jacqueswww
    In 3.9 beta
    Daniel Dias
    @1140251
    image.png
    I'm not very experienced in python, but I tried to install vyper through makefile and the error occurred
    I had to run the - pip3 install . by hand
    Just some guy
    @fubuloubu
    @1140251 do you have Python installed? (pip is included in most Python distros)
    It seems likely that you do not, and that the Makefile failed to find pip to install with
    What OS are you using? Also, have you tried the docker image?
    Richard Moore
    @ricmoo
    Heya! Was wondering if I could get some feedback on ethers-io/ethers.js#816 ? I’m not sure if Vyper output this ABI or if Uniswap modifies it manually afterward?
    Just some guy
    @fubuloubu
    @ricmoo we most likely output that (as of the version UniSwap was compiled with). I don't think the ABI specification dictates that named outputs must be unique for tuples, but we can certainly fix that by ensuring they have unique names
    Indeed, the latest version of Vyper does not give them names at all