Tutorial Multiply by 2

ToshioToshio Member Posts: 3
Hi All,

I am following the Serpent tutorial https://github.com/ethereum/wiki/wiki/Serpent on Ubuntu 14.04.1 LTS (x86_64)

When I execute the mul2.se contract I get unexpected results:

Contents of mul2.se
return(msg.data[0] * 2)

Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyethereum import tester as t
>>> s = t.state()
>>> c = s.contract('mul2.se')
>>> s.send(t.k0, c, 0, [42])
[26724]
>>> s.send(t.k0, c, 0, [303030])
[112564220487264]
>>>

I've installed pyethereum using pip install version 0.2.2. Any idea what's going on here ?

Thanks in advance.

Kind regards,
Toshio

Comments

Sign In or Register to comment.