testnet icon indicating copy to clipboard operation
testnet copied to clipboard

Deploy the sentinel-governance contract on the testnet

Open axic opened this issue 6 years ago • 12 comments

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

  • Make sure to have truffle 5.x installed: npm install -g truffle@next
  • Then change truffle-config.js to point to the RPC endpoint
  • Then use truffle deploy to deploy

axic avatar Nov 12 '18 16:11 axic

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.

lrettig avatar Nov 14 '18 22:11 lrettig

You are using truffle 4.x.

axic avatar Nov 14 '18 22:11 axic

Nope:

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

lrettig avatar Nov 14 '18 23:11 lrettig

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.

axic avatar Nov 15 '18 00:11 axic

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
+ [email protected]
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

lrettig avatar Nov 15 '18 02:11 lrettig

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 avatar Nov 15 '18 09:11 axic

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

axic avatar Nov 15 '18 09:11 axic

With latest truffle nightly it works again:

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 avatar Dec 04 '18 12:12 axic

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

axic avatar Dec 04 '18 12:12 axic

I'll give this a go tomorrow.

jwasinger avatar Dec 08 '18 16:12 jwasinger

@jwasinger what is the progress on this?

axic avatar Jan 04 '19 22:01 axic

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

hugo-dc avatar Jan 30 '19 03:01 hugo-dc