profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ricmoo/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Richard Moore ricmoo Genetic Mistakes Software Inc. Toronto, Canada http://www.ricmoo.com/ A random developer from Canada, specializing in cryptography and blockchain technologies. Hack the Planet!

ricmoo/aes-js 1187

A pure JavaScript implementation of the AES block cipher and all common modes of operation for node.js or web browsers.

ricmoo/GMEllipticCurveCrypto 115

Elliptic Curve Cryptography library for iOS (ECDSA and ECDH)

ricmoo/ethers-airdrop 75

A simple tool and library to deploy and manage a Merkle Air-Drop.

ricmoo/ethers-meow 66

A simple command-line interface and library for CryptoKitties using ethers.js.

ricmoo/BLECast 11

A custom protocol and library for iOS to send messages to Arduino over BLE advertising data.

nivida/web3.ts 9

POC for a Web3 Lib

ricmoo/account-scanner 9

A simple example of a multi-call contract for token scanning.

ricmoo/flatworm 7

A very simple documentation generation tool.

ricmoo/gas-ticker 7

Oracle for tracking effective gas prices.

ricmoo/GMClipper 7

An Objective-C wrapper for the Clipper polygon clipping and offsetting library.

issue commentethers-io/ethers.js

Saving console.log Logs on a txt file

Can you please explain what that means?

Hailiebaby16

comment created time in a day

issue commentethers-io/ethers.js

React Native : Wallet.createRandom()._mnemonic(); function took 5 min for Android 6.0.1

I’ve heard similar complaints before. Is there any way to know what the time consuming operation is?

I do not have access to any android devices for testing (and on iOS it is fast, so I cannot reproduce it). The only operation off the top of my head is sha2-512, which shouldn’t be particularly slow on android.

I want to put a way to swap out some of these low-level operations, but it does pose a security threat, since many of these operations are passed sensitive data, so it someone shimmed them, it could leak sensitive data.

Does the UI lock up? Or do things like scrolling still function properly while it is creating a new wallet?

One other option is to forego a wallet based on a mnemonic, if you don’t need that functionality, using new Wallet(utils.random ytes(32)).

ashishonmobile

comment created time in a day

issue closedethers-io/ethers.js

GetAmountsOut calculating tax token

Does the GetAmountsOut includes the token tax? For example the token I'm about to buy have 10% tax. Does it included on the GetAmountsOut?

closed time in 2 days

Hailiebaby16

issue commentethers-io/ethers.js

GetAmountsOut calculating tax token

I don’t know what contract this is regarding, but it isn’t an issue with ethers, so I’m moving it to discussions.

Please post more info, like what contract you are dealing with, including addresses on mainnet, etc.

Thanks! :)

Hailiebaby16

comment created time in 2 days

issue closedethers-io/ethers.js

Invalid opcode when estimating gas of smart contract

Describe the bug I have tried to estimate the gas to mint an ape for BAYC (I know contract closed, but MetaMask is still able to get estimate), but I am getting

Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":46,\"error\":{\"code\":-32000,\"message\":\"invalid opcode: opcode 0xa7 not defined\"}}\n", error={"code":-32000}, requestBody="{\"method\":\"eth_estimateGas\",\"params\":[{\"data\":\"0xa723533e0000000000000000000000000000000000000000000000000000000000000001\"}],\"id\":46,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="http://127.0.0.1:8545", code=SERVER_ERROR, version=web/5.4.0)

This isn't the only contract I have tried, other contracts that I have used via MetaMask give me opcode errors as well, but for different opcode. I am not sure why this is happening. Also, if I provide my own priority and base fee, can I calculate the gas limit off of that?

Reproduction steps My code is

const provider = new providers.JsonRpcProvider({ url: "http://127.0.0.1:8545" });
const abi = new ContractInterface('[{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintApe","outputs":[],"stateMutability":"payable","type":"function"}]');
const contract = new Contract('0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', abi, provider);
const fragment = abi.getFunction('mintApe');
const data = contract.interface.encodeFunctionData(fragment, [1]);
const nonce = await provider.getTransactionCount(address);
const rawTx = {
data,
nonce,
}
const gasLimit = await provider.estimateGas(rawTx);
console.log(ethers.utils.formatUnits(gasLimit, 'gwei'));

Environment: Desktop, NodeJS with my own geth node

Search Terms Failed transaction opcode, invalid opcode: opcode 0xa7, opcode not defined, estimate gas

closed time in 3 days

zMrKrabz

issue commentethers-io/ethers.js

Invalid opcode when estimating gas of smart contract

This seems to have more to do with the contract. Was it compiled using experimental flags? Was it compiled from solidity? It was it written in asm?

Or perhaps when deploying the contract to your local node, you included an address as the bytecode, which is then being attempted to be executed as code?

Can you post the result of provider.getCode(addr)? I can disassemble it and verify the opcode is present (in which case there is definitely a somewhere in the compiler, asm or deployment)?

(moving to discussions)

zMrKrabz

comment created time in 3 days

issue closedethers-io/ethers.js

Q Bignumber -> decimals?

Is it possible to use ethers/bignumber with decimals?

closed time in 3 days

emichaf

issue commentethers-io/ethers.js

Is there a reason to stick to `js-sha3@0.5.7`?

What about the original doesn’t work in a service worker??

I didn’t need to add a thirdparty.s.ts to get the types working, but seems like an innocuous enough change. I’ll look into it for the upcoming minor bump (it doesn’t need a minor bump, but should be easy to roll into it). :)

yhuard

comment created time in 3 days

issue commentethers-io/ethers.js

Is there a reason to stick to `js-sha3@0.5.7`?

Are there any meaningful changes? There is no reason to stick with it other than I’ve code reviewed it. If there is a new version, I can code review it an update to it.

For v6 I’ll be using my own implementation.

yhuard

comment created time in 3 days

issue commentethers-io/ethers.js

Fragment.format seems to be null

Can you provide a short snippet of stand-alone code to show what you mean? Preferably something I can paste into playground.ethers.org? :)

wmitsuda

comment created time in 4 days

issue commentethers-io/ethers.js

ethers.utils.parseUnits validity problem with inputs with trailing zeros

@ChALkeR I believe it should be the same. I’ll double check and tag that issue with the commit and related issues.

arkantos1482

comment created time in 4 days

PR closed ethers-io/ethers.js

bignumber: fix ida in regex

Fixes https://github.com/ethers-io/ethers.js/issues/1975.

Note: it fixes only the ReDoS part of the problem without touching the logic, but the same a9cdbe1238c149a7167c6bb1a78f314805b52755 commit also introduced an actual logic problem resulting in a miscalculation, see #1974.

+1 -1

1 comment

1 changed file

ChALkeR

pr closed time in 5 days

pull request commentethers-io/ethers.js

bignumber: fix ida in regex

Fixed in 5.4.7. See #1975 for more info.

Thanks again! :)

ChALkeR

comment created time in 5 days

issue commentethers-io/ethers.js

bignumber: parseFixed now contains a ReDoS since a9cdbe1238c149a7167c6bb1a78f314805b52755

This was fixed in 5.4.7. Please let me know if it seems fixed to you (I removed the regex entirely).

Thanks for your keen eye! :)

ChALkeR

comment created time in 5 days

issue commentethers-io/ethers.js

ethers.utils.parseUnits validity problem with inputs with trailing zeros

This has been fixed in 5.4.7. Please try it out and let me know if you have any problems.

Thanks! :)

arkantos1482

comment created time in 5 days

created tagethers-io/ethers.js

tagv5.4.7

Complete Ethereum library and wallet implementation in JavaScript.

created time in 5 days

release ethers-io/ethers.js

v5.4.7

released time in 5 days

issue commentethers-io/ethers.js

bignumber: parseFixed now contains a ReDoS since a9cdbe1238c149a7167c6bb1a78f314805b52755

Thanks! This will be fixed with #2016, which is removing the regex entirely.

Huge thanks for the info on ReDoS though, I need to spend more time understanding the intricacies of it.

Reminds me of the quote: "You have problem and think to yourself, 'I know! I can use a regular expression'. Now you have two problems." :)

ChALkeR

comment created time in 5 days

push eventethers-io/ethers.js

Richard Moore

commit sha 32a6b2a362815eb85ce3f3abad5adf92f2b80e10

Fix parseUints with excess zeros and fix ReDoS issue (#2016, #1975, #1976).

view details

Richard Moore

commit sha 4166b2753d0d6b230a3a22b5a2b6c4e1906a7af7

Updated dist files.

view details

push time in 5 days

pull request commentethers-io/ethers.js

random: fix browser version length check

Agreed. I'll add this soon.

Thanks! :)

ChALkeR

comment created time in 5 days

pull request commentethers-io/ethers.js

bytes: fix isBytes check

I completely agree! I'll update this soon.

Thanks! :)

ChALkeR

comment created time in 5 days

issue commentethers-io/ethers.js

ethers.utils.parseUnits validity problem with inputs with trailing zeros

You are right! This does seem like a bug. Investigating it now.

arkantos1482

comment created time in 5 days

PR closed ethers-io/ancillary-bsc

Use HTTPS with bscscan

Use HTTPS with bscscan

Test with default code:

{
  "status": "1",
  "message": "OK",
  "result": "4743307367795260000000000"
}
+2 -2

2 comments

1 changed file

jarcodallo

pr closed time in 5 days

pull request commentethers-io/ancillary-bsc

Use HTTPS with bscscan

Merged and released in v0.0.3.

Thanks! :)

jarcodallo

comment created time in 5 days

issue commentethers-io/website

Add my project, please: [PROJECT NAME]

You need to populate the template with your project details.

yurenyuji

comment created time in 5 days

issue commentethers-io/ethers.js

Attempted import error: 'TransactionTypes' is not exported from '@ethersproject/transactions'.

The versions should not be an issue. Only the major and minor version must match, the patch is allowed to vary. :)

Yeah, I don’t think this is an ethers issue.

Thanks! :)

snips-eth

comment created time in 6 days

issue commentricmoo/pyaes

Add Travis-Ci for testing

Travis recently had an incredible security leak (literally everyone’s private data) and their response was basically “meh”.

See this tweet thread for more info.

Can you use GitHub actions instead, as I don’t want to support any company that is cavalier about security?

odidev

comment created time in 7 days

issue commentethers-io/ethers.js

Why does Signer use a promise for the address?

You mean the line import { Signer } from "ethers" by itself gives an error? Please include code?

alcuadrado

comment created time in 7 days

issue commentethers-io/ethers.js

Why does Signer use a promise for the address?

(Keep in mind this project is not affiliated in any way with Hardhat, so if this is Hardhat-related, you might have to reach out to them)

alcuadrado

comment created time in 7 days

issue commentethers-io/ethers.js

Why does Signer use a promise for the address?

You should use signer.getAddress()) when you need a Signer’s address. You can optionally await on it.

alcuadrado

comment created time in 7 days