question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate types from `num` to `int`

See original GitHub issue

Issue

num and num256 type in vyper are being deprecated in favor of int128 and uint256, respectively.

Proposed implementation

  • convert references of num to int256
  • convert references of num256 to uint256
  • convert type casting from as_TYPE usage to newer convert(var, type) format. (all type castings not just int/uint)
  • migrate validator_service.py and update testing accordingly
  • ensure vyper up to date such that it can handle these types

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ben-kaufmancommented, Mar 18, 2018

The problem is the docs are not up to date, I am currently working on updating and improving them. So this as_num256(1) should be changed to this: convert(1, 'uint256'). (You can see if you try to compile with as_uint256() it will give an error)

0reactions
djrtwocommented, Mar 27, 2018

Closing in favor of #63

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type migration | IntelliJ IDEA Documentation - JetBrains
The Type Migration refactoring lets you automatically change a member type (such as from integer to string), and data flow dependent type entries...
Read more >
How To Convert Data Types in Python 3 - DigitalOcean
This Python 3 tutorial will guide you through converting data types including numbers, strings, tuples and lists, as well as provide ...
Read more >
Convert Double to Integer in Java - GeeksforGeeks
Write a Java program to convert the given double number into an Integer (int) in Java. Examples: Input: double = 3452.234 Output: 3452...
Read more >
Rails Migration to convert string to integer using conversion
When you write Rails migrations to convert a string column to an integer ... to type integer HINT: Specify a USING expression to...
Read more >
convert
convert must be used in conjunction with data type conversion functions: chr converts to character. num converts to numeric. int converts to integer....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found