Questions tagged [vyper]

The Python-like smart contract programming language

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

does vyper support contracts making contracts?

I am trying to create manager contract that generates player contracts for a game. Right now I am using vyper to try and generate new contracts but that seems to be failing. I know you can have a ...
1
vote
1answer
45 views

Vyper fundraising smart contract: 'Attribute' object has no attribute 'func'

[SOLVED]: See below. I am taking a blockchain and security class and we are working with vyper. We have been tasked with rewriting a fundraising smart contract. However, the compilers do not seem to ...
2
votes
1answer
20 views

How to setup an oracle in Vyper?

I need an ETH-USD price oracle for my vyper contract. So far, the oracle services I've found, like chainlink, are written in solidity. Is it possible to use a solidity oracle in a vyper contract? How ...
0
votes
0answers
27 views

How to correctly send Ether between contracts in vyper?

I have a user, Contract A, and Contract B. I want user to call a function A of Contract A, that function executes function B from Contract B, which sends ether from Contract B to Contract A. Here is ...
0
votes
1answer
15 views

Truffle Contract Abstraction Contract.at() not returning logs when methods are called

In my test file I have this set up: let acc = await Account.deployed() Then when I call a method, I can get the logs in the receipt: let deposit = await acc.deposit() console.log(deposit.receipt....
2
votes
1answer
30 views

Reference contract own address in vyper

how do you reference your own contract address in vyper, for example in solidity you would do something like that: address(this) Is there a way to do the same in vyper? Thanks.
0
votes
0answers
27 views

Transfer ERC20 Token with vyper

Hello i m learning vyper and i have this issue: I deployed a standard ERC20 token contract using vyper default contract: https://github.com/ethereum/vyper/blob/master/examples/tokens/ERC20.vy When i ...
1
vote
1answer
63 views

Vyper mapping inside a struct

Is it possible to have a mapping inside a struct for vyper? For example: struct Teddy: id: uint256 year: uint256 component: map(uint256, uint256) teddies: private(map(uint256, Teddy)) ...
1
vote
2answers
77 views

Transaction always failing - Vyper

I've been trying to teach myself how to program smart contracts in Vyper and I was trying out a toy problem where the contract transfers USDC to itself and then mints some Compound USDC on Compound ...
1
vote
2answers
35 views

How to check if an address is an active contract in Vyper?

Often for security reasons I want to limit certain address parameters to non-contract addresses for certain functions in my contracts, ie. there are no code stored on the addresses passed in as ...
1
vote
1answer
63 views

What's the equivalent of Vyper's create_forwarder_to in Solidity?

In Vyper, there's a built-in function called create_forwarder_to, which Duplicates a contract’s code and deploys it as a new instance, by means of a DELEGATECALL. If my understanding is correct, ...
0
votes
1answer
42 views

Can't import a contract interface in vyper

I need to import a contract interface using the JSON ABI but I get syntax error when trying to import the interface. I have created the JSON file in remix and named it IERC1620.json then I am trying ...
1
vote
1answer
57 views

How to declare a storage variable in vyper?

I am trying to convert my solidity code into vyper but I can't find a way to declare a storage variable. My solidity function was this: struct Account { uint256 balance; // Account's balance uint256 ...
1
vote
1answer
62 views

Cannot use external contract addresses as function arguments in Vyper contract interface

I'm trying to compile the Uniswap Exchange contract using the latest vyper compiler. I first updated the ERC20 references to the new token: ERC20 definition and set up an import from vyper.interfaces ...
1
vote
0answers
45 views

Cannot use abigen to make vyper bindings

using the command abigen --vy=uniswap_exchange.vy --pkg=uniswap --out=UniswapExchange.go results in the error: flag provided but not defined: -vy support for the vyper compiler was just added a ...
4
votes
1answer
466 views

Solidity Vs Vyper

What is the key differences between Solidity and Vyper? In present and future which one can more acceptable for making smart contracts and why?
1
vote
1answer
105 views

Uint256 division in vyper (and solidity)

Floating point division is not supported in solidity as mentioned here: How can I perform float type division in solidity? I want to divide two uint256 numbers and save them as a decimal, retaining ...
0
votes
2answers
126 views

Vyper and ethereum: how do I read a public constant function on another contract?

I'd like to call a constant function on one contract (X) from another contract (Y). I have the ABI and address for X. X and Y are both on Ropsten. I can interact with X fine using, for example, MEW. ...
2
votes
0answers
50 views

query about function call in ethereum vyper [closed]

How the function will be called in vyper while compiling?, how the variables will be declared and how the data will be mapped to that variables?
0
votes
1answer
142 views

Vyper: Truffle test read mapping value inside struct

I have the following struct inside my vyper file: races: public({ start: timestamp, end: timestamp, racersBetHash: bytes32[address], racersBetAmount: wei_value[address] }[int128]) Then I ...
1
vote
0answers
30 views

Vyper OPCODES gas estimate at compile time

I am trying to dissect Vyper at lower levels to understand how the gas estimates are generated. I tried following the yellow paper and I searched every single line of the compiler but I can't get it ...
1
vote
0answers
173 views

What are the downsides of using vyper and truffle together

Recently I read an article Vyper+Truffle and wanted to build a token deployer using vyper contracts. I was wondering if anyone knew the current downsides of using Vyper and truffle together? Is it ...
3
votes
1answer
115 views

When is Vyper going to be production ready?

At a high level, Vyper seems like a much more adoptable language compared to Solidity. Everywhere I look, Vyper is still considered to be "experimental". Any idea of when it will be production ready? ...
2
votes
1answer
130 views

Anyway to tell what Vyper can and cannot accomplish compared to Solidity?

After studying both Solidity and Vyper, I really like Vyper's strong security and simplicity. However one thing got me somehow worried, is that unlike Solidity, Vyper is not a Turing Complete language....
1
vote
1answer
201 views

Vyper and strings

How can I manipulate strings in Vyper? In solidity I could use Nick Johnson's string library. He's using assembly to do that. But that's not possible with Vyper as far as I know.
0
votes
1answer
342 views

How to resolve Vyper installation error: fatal error: leveldb/db.h

Created a virtualenv with python3.6 and performed the following steps git clone https://github.com/ethereum/vyper.git cd vyper make I see following error(s): Downloading https://files.pythonhosted....
0
votes
1answer
89 views

How to fix an error with Vyper: invalid syntax (, line 168)

I'm trying to figure out why the following line is giving the error at https://vyper.online/: invalid syntax (, line 168). Line 168 is self.collator_pool.empty_slots_stack_top] = index). @internal ...
1
vote
1answer
121 views

How to launch test with Viper?

I would like to switch the smart contract compiler from Solidity to Viper. I'm following the Viper support page found in Populus documentation. This is what I get at the final step: Mac:tutorial ...
10
votes
2answers
8k views

Solidity vs Viper? [closed]

I am new to smart contract development and I really want to understand how it all works, and start programming smart contracts. I don't care for JavaScript syntax, but I love Python. I know Serpent ...
2
votes
1answer
501 views

How to call the functions of Ethereum Smart Contract from Android/iOS application?

I've been learning solidity & viper for some time now but i am wondering if it's possible to call the functions/methods of a smart contract (already deployed on Ethereum Network) from an Android/...
5
votes
2answers
8k views

Are there any implementations of smart contracts in Python?

I want to implement some smart contracts and I am strongest in python.
7
votes
1answer
518 views

How to install and test Viper programming language?

Viper is a new functional, strongly typed, bounds/overflow-checking, fixed-point-decimal python syntax-based HLL. The repository does not inlcude any documentation yet. I built and installed ...