10

I am very new to blockchain and Ethereum. I want to get started with a BaaS cloud service and develop / execute some smart contracts. I successfully set up the Azure Ethereum template (https://github.com/Azure/azure-quickstart-templates/tree/master/ethereum-consortium-blockchain-network) and want to use Solidity Browser to create a first contract. As done in the corresponding example, I use MetaMask in Chrome to confirm transactions.

My issue: I tried several Solidity smart contract examples in Solidity browser. All show one specific error:

Error: Type "address" not supported for state variable

I think this is the reason why nothing happens besides "waiting to be mined" in Solidity Browser. Actually, MetaMask should popup to confirm the transaction as in the tutorial, but nothing is happening in MetaMask. First, I thought it is an issue with my blockchain cluster or the template (therefore, I also posted this issue here: https://github.com/Azure/azure-quickstart-templates/issues/2797), but after some more playing around, I think the issue is not related to Azure, but just to Solidity and Solidity Browser.

I also tried out different compiler versions (e.g. the most recent one and the one with the same version as the smart contract), but always the same error message. Note that all smart contracts do NOT show compile errors in the editor itself. This error is shown in the "formal verification" tab.

As I said, it happens with any example - that is what I find so strange... Let's take this one from https://www.ethereum.org/greeter:

contract mortal {
/* Define variable owner of the type address*/
address owner;

/* this function is executed at initialization and sets the owner of the contract */
function mortal() { owner = msg.sender; }

/* Function to recover the funds on the contract */
function kill() { if (msg.sender == owner) selfdestruct(owner); }
}

contract greeter is mortal {
/* define variable greeting of the type string */
string greeting;

/* this runs when the contract is executed */
function greeter(string _greeting) public {
    greeting = _greeting;
}

/* main function */
function greet() constant returns (string) {
    return greeting;
}
}

Can someone please help me? What am I missing?

Thank you.

2 Answers 2

5

This seems to be a new bug recently introduced to browser-solidity, and Mist is also affected:

https://github.com/ethereum/browser-solidity/issues/342#issuecomment-262764137

1

Just to update: The issue is fixed in the meantime. Even though you still get this validation error, you can create contracts successfully again using Solidity Browser.

1
  • yes you can create contract but contract methods not giving appropriate result.
    – Sagar
    Feb 7, 2017 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.