A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
2

To be specific there is no need to query the blockchain. Read operations (from view or pure functions or to read a variable's state) can be executed locally in your local node as they don't modify the contract's state. So the query is never sent to the blockchain and the result is immediate. Otherwise both options are possible but my guess is that it simply ...


1

The error message is misleading. You can safely disregard it since you aren't calling the constructor or sending funds. It's a lot of code to wade through so this won't be very specific. You say this seems to be the issue: request.recipient.transfer(request.value); The most likely cause is the contract doesn't have sufficient funds to make that happen. ...


1

A @Chan-Ho says, there is a transferFrom() in the buy function, and you said you didn't approve() first, so that is the first problem. This looks like the Token contract - AGI: erc20 = TOKEN(address(0x8eb24319393716668d768dcec29356ae9cffe285)); You have to call the approve() function there to "authorize" the snet contract to pull some tokens from your ...


1

There are contracts has methods to help you get specified token balances for specified accounts like below one. https://github.com/wbobeirne/eth-balance-checker#readme In fact, this is what metamask is doing. https://github.com/metamask/metamask-extension/blob/5bac055ba62bb93da28784c2beabb268256b4cf7/app/scripts/controllers/detect-tokens.js#L9


1

Hardened child keys are the ones using apostrophes (m/44'/60'/0'). By design, hardened child keys cannot be derived from extended public keys, only from private (xprv). To get around this, you derive the part that includes hardened children directly from your private key and leave the last non-hardened part of the path to be derived for each user. var ...


Only top voted, non community-wiki answers of a minimum length are eligible