These are chat archives for ethereum/solidity

9th
Sep 2016
Shravan Shandilya
@shravan-shandilya
Sep 09 2016 03:57 UTC
Hi..guys.Pretty new to Solidity. Just wondering, Is there a way to create a smart contract that has to be signed by two people?
Shravan Shandilya
@shravan-shandilya
Sep 09 2016 04:42 UTC
Thanks @CyberNano . I will check it out!
TheGlassHunt
@TheGlassHunt
Sep 09 2016 06:47 UTC
Some ethereum smart contracts with vulnerabilities built in for extracting the Ethereum from inside: http://challenges.glasshunt.co/challenges . Would love some feedback... Just put it up a few days ago...
@shravan-shandilya sure. You have to create a contract that creates a contract. The first contract has to require two separate addresses to call a method to create the new doubly-signed contract. There might be other ways, and I'll think about it. What are you trying to make this for?
TheGlassHunt
@TheGlassHunt
Sep 09 2016 06:52 UTC
Darryl Morris
@o0ragman0o
Sep 09 2016 07:16 UTC
This message was deleted
konradkonrad
@konradkonrad
Sep 09 2016 07:16 UTC
what is the state of solc compatible command line interfaces to solc-js? with the latest breaking changes in 0.4.0 I'm a tad sad, that I cannot install older solc versions from ppa. 0.4.0 breaks our builds and with the added version pragma I believe there should be a way to retrieve (at least) older minor versions.
A working wrapper for solc-jswould allow for a workaround.
But even better would be putting solc-<minor> packages in the ppa plus having a "meta" package that calls update-alternatives for solc (so it can be overwritten with older minor versions or explicitely called)
Shravan Shandilya
@shravan-shandilya
Sep 09 2016 07:42 UTC
@TheGlassHunt Thanks for the response. Trying to recreate something like slock.it..just for fun.
pdobacz
@pdobacz
Sep 09 2016 07:49 UTC

Hello,
+1 to this:

putting solc-<minor> packages in the ppa

at least the previous stable 0.3.6

rain
@rainbreak
Sep 09 2016 10:59 UTC
@konradkonrad: as a stopgap you could try building your own static solc binaries. See recipe here: https://github.com/rainbeam/solidity-static
konradkonrad
@konradkonrad
Sep 09 2016 11:16 UTC
@rainbeam very nice! where do you push the artifacts to? https://github.com/rainbeam/solidity-static/blob/master/.travis.yml#L17-L27 is there a ppa or anything?
oh wait! you release on gh? https://github.com/rainbeam/solidity-static/releases that is awesome!!
chriseth
@chriseth
Sep 09 2016 11:39 UTC
@rfikki solidity and testnet should be totally unrelated.
@konradkonrad in the long run, the default way to use the solidity compiler is via the json interface, so you have to switch at some point
Rocky Fikki
@rfikki
Sep 09 2016 11:46 UTC
@chriseth I am trying to deploy some contracts via browser-solidity with no success. Truffle seems to deploy just fine though.
Might be an issue with browser-solidity.
Alex Beregszaszi
@axic
Sep 09 2016 11:47 UTC
Deploy via RPC?
konradkonrad
@konradkonrad
Sep 09 2016 11:50 UTC
@chriseth just so I understand: is that "in the long run there will be only solc-js from npm" or "in the long run the interface is going to change"?
Alex Beregszaszi
@axic
Sep 09 2016 11:51 UTC
@konradkonrad there's the JSON interface to interact with the compiler (which is available via the emscripten build). The emscripten compiler can be used via solc-js, but if you wanted you can also interface with the JSON API (it is C, see solc/jsonCompiler.c)
Rocky Fikki
@rfikki
Sep 09 2016 12:11 UTC
This message was deleted
konradkonrad
@konradkonrad
Sep 09 2016 12:13 UTC
thanks
rain
@rainbreak
Sep 09 2016 13:03 UTC
@konradkonrad: yes I push to releases for convenience. It's super easy to run yourself though, and means you don't need to trust me not to upload an exploited binary or something :)
chriseth
@chriseth
Sep 09 2016 13:37 UTC
@konradkonrad the recommended input-output will be json based
there already is --combined-json, although it is a bit different
Ramesh Nair
@hiddentao
Sep 09 2016 13:52 UTC
Hey guys, I want to send ether from within a contract to an account, but want to attach some data with the send. Is this possible?
So, e.g: dest.send(msg.value, { data: “0x223” }); - something like that
Nick Johnson
@Arachnid
Sep 09 2016 13:56 UTC
That's the syntax for Javascript, not solidity
Normally you would include the ABI of the function you're calling, and call that function, rather than trying to send data explicitly
Can you do that?
Tjaden Hess
@tjade273
Sep 09 2016 15:05 UTC
@chriseth 4.0 is great, love the hex literals. Keep up the good work
chriseth
@chriseth
Sep 09 2016 15:16 UTC
thanks!
hex literals are by @axic :-)
Ramesh Nair
@hiddentao
Sep 09 2016 15:22 UTC
@Arachnid Oh yeah, i was just guessing at what the syntax might be. I want to send Eth to an account, not call another contract. That’s why I’m not sure how to add data to the send.
Nick Johnson
@Arachnid
Sep 09 2016 15:25 UTC
Why do you want to add data to a send to a bare account, though?
Tjaden Hess
@tjade273
Sep 09 2016 16:22 UTC
@hiddentao if you're set on doing this, dest.call.value(msg.value)(hex "223") is the way to go
Kobi Gurkan
@kobigurk
Sep 09 2016 16:22 UTC
@chriseth are the "commit" files here the official releases?
Chevdor
@chevdor
Sep 09 2016 16:25 UTC
Just submitted a PR that I need for another change: ethereum/solc-js#48
Travis is on it :)
Chevdor
@chevdor
Sep 09 2016 16:32 UTC
@kobigurk not all of the them. Some commits are the releases. You can see them here: https://ethereum.github.io/solc-bin/bin/list.json
Kobi Gurkan
@kobigurk
Sep 09 2016 16:33 UTC
I was looking at list.txt which wasn't so explanatory, but list.json clearly points the official releases!
thanks
Chevdor
@chevdor
Sep 09 2016 16:33 UTC
No problem.
chriseth
@chriseth
Sep 09 2016 16:57 UTC
@kobigurk yes, these are the archived binaries
ah right :-)
Kobi Gurkan
@kobigurk
Sep 09 2016 16:58 UTC
;-)
Chevdor
@chevdor
Sep 09 2016 17:02 UTC
@chriseth are you aware of troubles with travis? the change I made in the PR is not part of the tests but Travis complains about memory issues….
@chriseth Am I the new Travis CI innocent victim? :smile:
Dipen Joshi
@dipenjoshi
Sep 09 2016 18:12 UTC
@TheGlassHunt thanks for the lead. i'll look into it.
Chevdor
@chevdor
Sep 09 2016 18:27 UTC

I am a little confused… My previous PR allows getting any version of the solidity-compiler.js file. I am working on a PR to allow solcjs to use a given version of the compiler when called from the CLI. I see it work with 0.4.0 and 0.4.1 but not before. I get no error but no file is created (I tested 0.3.6). I am using what is advertised in the doc:

solc = solc.useVersion(getVersion(compiler));

Did something change on the way or is something known as broken before 0.4.0 ?

Kobi Gurkan
@kobigurk
Sep 09 2016 19:09 UTC
@chevdor, if you don't have a bin directory, you'd need to use loadRemoteVersion
Chevdor
@chevdor
Sep 09 2016 19:10 UTC
yes but for the cli, the loadRemote takes too long. That´s why I changes the ./download.js script to pre-fetch them. Once you have them local, that´s much faster!
Kobi Gurkan
@kobigurk
Sep 09 2016 19:15 UTC
yep
to be honest
I JUST wrote this same mechanism
like, an hour ago
getSpecificSolc
maybe it will help you somehow
doesn't use useVersion though
Alex Beregszaszi
@axic
Sep 09 2016 19:18 UTC
(We also have updates to the JSON files and versioning to make it better.)
@kobigurk I wonder how did the solc-js MIT code transformed into AGPL3?
Kobi Gurkan
@kobigurk
Sep 09 2016 19:19 UTC
I guess I was too quick on the trigger
thanks for pointing it out
I'll make the necessary changes
although I'm not sure what they are yet
could you help me figure this out?
if I make a modified version of solc with the modified bits with MIT license, and use that instead, is that OK?
Alex Beregszaszi
@axic
Sep 09 2016 19:23 UTC
I think the preferred way is to have things merged upstream to solc-js (as much as we can)
Kobi Gurkan
@kobigurk
Sep 09 2016 19:23 UTC
no prob
I'll do that
I'm all up for everyone to be happy, but licensing in OSS is such a mess
Chevdor
@chevdor
Sep 09 2016 19:30 UTC
@kobigurk double work, ohhh nooo :) Well to be honest, I did it quick and did not even make a module…. I threw all in.
Kobi Gurkan
@kobigurk
Sep 09 2016 19:31 UTC
@axic can I get a hint on what exactly is bothering you? I'm pretty much using an external API of solc
the specific code segment of fetching the file?
Alex Beregszaszi
@axic
Sep 09 2016 19:32 UTC
I'm not bothered much :)
Chevdor
@chevdor
Sep 09 2016 19:32 UTC
I think the issue @kobigurk is just that it is hard to ‘see’ the change and merge it unless you fork and submit a PR for the feature
Kobi Gurkan
@kobigurk
Sep 09 2016 19:32 UTC
yeah, with that I totally agree, I'm doing that
@axic you did raise the point though :P
I was wondering if you were referring to require, using some methods, what was it?
genuinely interested
Chevdor
@chevdor
Sep 09 2016 19:34 UTC
well, maybe you have a look at my PR then, otherwise we will end up with 2 compeating options and probably have headhaches on the way
Alex Beregszaszi
@axic
Sep 09 2016 19:34 UTC
I am on the phone atm so cannot properly review but the first method looked very similar to solc-js
Chevdor
@chevdor
Sep 09 2016 19:34 UTC
From what I saw, the ‘versioning’ topic in general would deserve a module of its own
Kobi Gurkan
@kobigurk
Sep 09 2016 19:34 UTC
it is very similar, just was wondering if that's what you're referring to
I did learn from soljs the convenient way of doing it
going to create a PR anyway
Alex Beregszaszi
@axic
Sep 09 2016 19:35 UTC
You can reuse MIT code many other open source licenses, just need to attribute it. Not sure about agpl3 though.
Kobi Gurkan
@kobigurk
Sep 09 2016 19:36 UTC
yeah...
it's ok, I guess we'll have to maintain a separate soljs repository then...
a handful, but that's the price I guess
Alex Beregszaszi
@axic
Sep 09 2016 19:37 UTC
Why do you need to maintain a separate one?
Chevdor
@chevdor
Sep 09 2016 19:37 UTC
I would not recommend, improve the existing, this is much better
Kobi Gurkan
@kobigurk
Sep 09 2016 19:38 UTC
I am improving the existing
but what if the maintainers don't accept the PR?
Chevdor
@chevdor
Sep 09 2016 19:38 UTC
well then it can be discussed
if you do a separate repo, you can be sure this will be useless in just a few days unless you keep things in sync with the rest
Kobi Gurkan
@kobigurk
Sep 09 2016 19:39 UTC
exactly...
Chevdor
@chevdor
Sep 09 2016 19:39 UTC
so PR is much better :)
Kobi Gurkan
@kobigurk
Sep 09 2016 19:39 UTC
this maybe hypothetical - but I don't want to be slowed down until PR is accepted
let's assume it wasn't soljs
it was geth, and geth had MIT license
geth may be touchier accepting PRs
what's the solution then?
Chevdor
@chevdor
Sep 09 2016 19:40 UTC
well, everyone does what he wants in open source in the end… but PR are there for a very good reason
Kobi Gurkan
@kobigurk
Sep 09 2016 19:40 UTC
I think you're missing my point - I am creating the PR
Chevdor
@chevdor
Sep 09 2016 19:41 UTC
a PR is just based on your forked repo anyway… so you work for you with something compatible and you propose it to the forked repo. When they take it, you can forget it
Alex Beregszaszi
@axic
Sep 09 2016 19:41 UTC
If MIT is compatible with AGPL3 (I am not sure) then you include MIT code in an AGPL3 codebase, but of course need to attribute it.
Kobi Gurkan
@kobigurk
Sep 09 2016 19:41 UTC
@chevdor not sure why you keep arguing this :P I agreed that a PR is the right way since we began conversing, didn't I?
Chevdor
@chevdor
Sep 09 2016 19:42 UTC
oh ok, forget it then, I am hungry, my brain is slow :)
Kobi Gurkan
@kobigurk
Sep 09 2016 19:42 UTC
:D
it's OK, I totally agree with all your points
@axic yeah, a possible path is making sure it's compatible and attributing
attributing is not the problem
figuring out compatibility... man, that's painful for me
this is lawyer realm, not tech realm
don't want to go there at this point
but that's my choice
Alex Beregszaszi
@axic
Sep 09 2016 19:44 UTC
I am sure its on the OSI site
Kobi Gurkan
@kobigurk
Sep 09 2016 20:01 UTC
it's there somewhere for sure :) I'll have to dive into that some day...
Kobi Gurkan
@kobigurk
Sep 09 2016 20:29 UTC
OK, I think I figured it out.
http://www.tawesoft.co.uk/kb/article/mit-license-faq explains it's OK redistributing under another license, as long as the notice is kept.
So I think this should satisfy the requirements: https://github.com/kobigurk/ethereum-sandbox-helper/blob/master/patched_solc.js
@axic seriously don't want to step on any project toes, so thanks for pointing it out
Chevdor
@chevdor
Sep 09 2016 21:00 UTC
That would be great if someone could have a look at ethereum/solc-js#22 and explain if threre is a reason to want compile to send nothing to the output, no matter if there were errors or success.
Alex Beregszaszi
@axic
Sep 09 2016 22:00 UTC
@kobigurk your code can actually be replaced with let solc = require('solc/wrapper')(require(<filename>)
Kobi Gurkan
@kobigurk
Sep 09 2016 22:02 UTC
good point!
will look at comments tomorrow :+1:
Alex Beregszaszi
@axic
Sep 09 2016 22:04 UTC
in any case your patched_solc is not needed because you can do it without patching
also i think it the feature should be merged
Darryl Morris
@o0ragman0o
Sep 09 2016 22:35 UTC
The JavaScript VM is not providing an account list in Browser Solidity.
Kim Bui
@KimTBui_twitter
Sep 09 2016 22:38 UTC
Where do I find sources for multisig wallet ideas?
END-LESS
@END-LESS
Sep 09 2016 23:17 UTC
solc: empty source string
at web3.js:3119:20
at web3.js:6023:15
at web3.js:4995:36
at :1:1
this question,anyone have?