poanetwork / posdao-contracts

Smart contracts for POSDAO (Proof of Stake Decentralized Autonomous Organization consensus), a DPOS consensus implemented in Solidity and running within EVM with swappable BFT consensus
Other
105 stars 49 forks source link

Do not rely on experimental Solidity features #37

Closed DemiMarie closed 5 years ago

DemiMarie commented 5 years ago

The Solidity compiler issues a warning: Experimental features are turned on. Do not use experimental features on live deployments.

varasev commented 5 years ago

Yeah, this is because of this line for HBBFT contract.

Without pragma experimental ABIEncoderV2; it doesn't want to be compiled.

Since we have no HBBFT implementation yet and this warning relates only to those contracts (HBBFT) which we don't use yet, I didn't waste time to figure out with this.

I think when we are ready with HBBFT, Solidity will have a new version which will allow using thing like bytes[] memory _publicKeys as a parameter of a function without the experimental flag.

DemiMarie commented 5 years ago

@varasev That makes sense: the experimental pragma is only used in code that won’t be used in production anyway.