0

I have a contract deployed to ropsten. It has a function called enter:

    function enter() public payable {
        assert(msg.value == MINIMUM);
        assert(OPEN == true);
        players.push(msg.sender);
    }

It pushes a player onto an array. I want to call this function with (using truffle console --network live where live is pointing to ropsten):

let lottery = await Lottery.deployed()
lottery.enter({from: accounts[0], value: 1000000000000000000})

However, it ends up just hanging, and I see no action on Etherscan.

Am I doing something wrong?

  • Are you sure accounts[0] is not null? – Miroslav Nedelchev Aug 2 at 10:30
  • How can I check if it's null? The address looks correct. accounts[0] returns the correct address. – Patrick Collins Aug 2 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.