ewasm / testnet

Testnet planning & documentation
64 stars 19 forks source link

Deploy the sentinel-governance contract on the testnet #98

Open axic opened 6 years ago

axic commented 6 years ago

https://github.com/ewasm/sentinel-governance

lrettig commented 6 years ago

Getting the following compile error:

> truffle migrate --network staging
Error parsing sentinel-governance/contracts/DummySentinel.sol: ParsedContract.sol:12:46: ParserError: Expected ',' but got identifier
    function validateAndMeter(bytes calldata input) external pure returns (bytes memory output) {
                                             ^---^
Compilation failed. See above.
axic commented 6 years ago

You are using truffle 4.x.

lrettig commented 6 years ago

Nope:

~/eth/sentinel-governance> truffle version
Truffle v5.0.0-beta.1 (core: 5.0.0-beta.1)
Solidity v0.4.25 (solc-js)
axic commented 6 years ago

It has the configuration to download Solidity 0.5.0 and that instruction is only picked up by truffle 5.

The code is only compiling under Solidity 0.5.0.

If you don't see "Downloading compiler..." then you have a wrong truffle version.

Make sure to reinstall truffle@next.

lrettig commented 6 years ago

Reinstalled truffle. It's not installing solc 0.5.0:

> npm un -g truffle
removed 1 package in 1.903s
> npm i -g truffle@next
/Users/lanerettig/.nvm/versions/node/v11.0.0/bin/truffle -> /Users/lanerettig/.nvm/versions/node/v11.0.0/lib/node_modules/truffle/build/cli.bundled.js
+ truffle@5.0.0-next.15
added 81 packages from 311 contributors in 61.912s
> truffle version
Truffle v5.0.0-next.15 (core: 5.0.0-beta.1)
Solidity v0.4.25 (solc-js)
Node v11.0.0
> truffle deploy --network staging
Error parsing /Users/lanerettig/wip/eth/sentinel-governance/contracts/DummySentinel.sol: ParsedContract.sol:12:46: ParserError: Expected ',' but got identifier
    function validateAndMeter(bytes calldata input) external pure returns (bytes memory output) {
                                             ^---^
Compilation failed. See above.
Truffle v5.0.0-next.15 (core: 5.0.0-beta.1)
Solidity v0.4.25 (solc-js)
Node v11.0.0
axic commented 6 years ago

Weird, it is working here :(

Will post some console output in a while. One difference is I'm using node 8, but that should cause any difference..

Unfortunately the code won't compile with 0.4.25.

axic commented 6 years ago

It seems the very last truffle beta broke. I had an alpha, which was working.

axic commented 6 years ago

With latest truffle nightly it works again:

  • truffle@5.0.0-next.18

This is what I have:

$ truffle version
Truffle v5.0.0-next.18 (core: 5.0.0-beta.2)
Solidity v0.5.0 (solc-js)
Node v8.2.1
axic commented 6 years ago

Updated the repository, it works now with latest nightly of Truffle and the Solidity 0.5.1 releas.e

jwasinger commented 5 years ago

I'll give this a go tomorrow.

axic commented 5 years ago

@jwasinger what is the progress on this?

hugo-dc commented 5 years ago

@axic please take a look at the deployed contract: http://ewasm.ethereum.org/explorer/account/0x793a8d040319253446F90D072D47e95719700026