aragon-react-boilerplate icon indicating copy to clipboard operation
aragon-react-boilerplate copied to clipboard

Transactions are ignored (Bug in aragonOS?!)

Open vporton opened this issue 4 years ago • 15 comments

After I increment the counter it remains 42, as if I did nothing.

Yes, I cleared the application cache.

I checked, that the value of the variable in contract remains the same (does not change).

Bug report for the commit 3cfd17acae7869addcbe35c5208baafc724d3a92.

vporton avatar Oct 13 '20 06:10 vporton

I will pay $10 in ETH to somebody fixing this bug.

vporton avatar Oct 13 '20 14:10 vporton

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.026 ETH (9.99 USD @ $384.12/ETH) attached to it.

gitcoinbot avatar Oct 13 '20 14:10 gitcoinbot

@vporton It's working for me just incremented the counter to 44. You might need to check your network in Metamask http://localhost:8545 and import an account in Metamask from the terminal.

image

Devilla avatar Oct 14 '20 09:10 Devilla

@vporton It's working for me just incremented the counter to 44. You might need to check your network in Metamask http://localhost:8545 and import an account in Metamask from the terminal.

Does not work for me (even after yarn upgrade). Certainly I checked my network and imported an account.

vporton avatar Oct 14 '20 09:10 vporton

Bug confirmed with both Buidler node and ganache-cli :-(

vporton avatar Oct 14 '20 09:10 vporton

Did you use npm i -g create-aragon-app or simply cloned this repository.

Devilla avatar Oct 14 '20 10:10 Devilla

Did you use npm i -g create-aragon-app or simply cloned this repository.

Simply cloned.

vporton avatar Oct 14 '20 10:10 vporton

Don't do that better stable approach will be :

  1. npm i -g create-aragon-app
  2. create-aragon-app aragonapp.

Hope this solves your problem. :+1:

Devilla avatar Oct 14 '20 10:10 Devilla

Don't do that better stable approach will be :

  1. npm i -g create-aragon-app
  2. create-aragon-app aragonapp.

Hope this solves your problem.

Did that, it does not help.

vporton avatar Oct 14 '20 10:10 vporton

It got even weirder:

I sent 10 test ETH to the proxy contract address 0xA1A7d254552BEB05f15522EeD93B54441E61d1d9.

I added

address(0).transfer(1 * 10**18);

to the increment() function.

Then when I try to call Increment, the transaction fails.

I know from Buidler logs that namely this contract is called.

Why can't I send 1 ETH?

vporton avatar Oct 14 '20 12:10 vporton

So I run npx buidler node, transfer 10 ETH to it (yes, the transfer happens in Buidler logs). BTW, transfer takes several seconds in MetaMask, as if it were a distributed blockchain

await web3.eth.getBalance('0xA1A7d254552BEB05f15522EeD93B54441E61d1d9') return '0' :-~

What the hell?

vporton avatar Oct 14 '20 12:10 vporton

When I transfer to my other MetaMask account, the transfer is reflected in the MetaMask, but await web3.eth.getBalance() for that account return 0.

Looks like I run two different blockchains, one is used by MetaMask and for sending Increment transactions and another for reading the counter variable.

I ran npx buidler node --port 1248 in one terminal and then yarn start in other terminal. Is that correct?

If I run just yarn start, the browser prints in console:

inpage.js:1 MetaMask - RPC Error: JsonRpcEngine: Response has no error or result for request:
{
  "jsonrpc": "2.0",
  "id": 1264758164,
  "method": "net_version",
  "params": [],
  "origin": "http://localhost:3000",
  "tabId": 79
}

and when I try to click Increment:

You need to be connected to the private network in order to perform this action.
Please connect Metamask to the private network.

So what is the correct way to run this blockchain at localhost?

vporton avatar Oct 14 '20 13:10 vporton

So, the real question is how to configure yarn start to use another port (8545?) instead of 1248?

vporton avatar Oct 14 '20 13:10 vporton

So, the real question is how to configure yarn start to use another port (8545?) instead of 1248?

The config is done with const (unchangeable):

node_modules/@aragon/buidler-aragon/src/config/networks.ts:const frameRpc = 'http://localhost:1248'

How to change this constant?!

vporton avatar Oct 14 '20 16:10 vporton

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.026 ETH (11.4 USD @ $379.91/ETH) attached to this issue has been cancelled by the bounty submitter

gitcoinbot avatar Oct 21 '20 07:10 gitcoinbot