Testing Proxy with Truffle and Solidity 0.5

Hey @abcoathup and thanks for your answer.
I am building in Solidity 0.5.17 at the moment and, as far as I understand this is a release for sol 0.7;

I have tested the contract and I do confirm that go() is called (I do have a variable inside that gets the value 5 when go is called).

Still cannot wrap my mind around the admin revert.
In the proxy contract I have created a getter method (view) that returns the admin of the proxy.

  function getAdmin () public view returns (address){
    return _admin();
  }

  it("Should not allow the proxy admin to call this function", async () => {
    let admin = await proxy.getAdmin();
    console.log('calling a fallback function from: ' + admin)
    let res = await proxyControl.getTestVar({from:admin});
    assert.equal(res.toNumber(),5);
  })
1 Like