Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Replaces ethereumjs-abi with ethers.js/abi-coder (#556)
Browse files Browse the repository at this point in the history
* Replaced ethereumjs-abi with ethers.js/abi-coder

* Update package-lock file.

* Adds tests for tuple types in encodeCall.

* Remove attempt to test function types in encodeCall.

* Add a couple of tests and comments to encodeCall.

* encodeCall tests compare encoded vs decoded values, and not just verifies that the abi-coder doesnt throw.

* Parse bool types in encodeCall.

* Remove web3-utils dependency and some only's from encodeCall tests.

* Remove parsing entirely from encodeCall.

* Update a package-lock file.

* Small changes requested by @facuspagnuolo.
  • Loading branch information
eternauta1337 authored and facuspagnuolo committed Jan 9, 2019
1 parent 1989e81 commit 45fa6b2
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 224 deletions.
7 changes: 1 addition & 6 deletions packages/cli/test/scripts/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,10 @@ contract('create script', function([_, owner]) {
});

it('should initialize a proxy using scientific notation', async function() {
const proxy = await createProxy({ contractAlias, network, txParams, initMethod: 'initialize', initArgs: ["20e10"], networkFile: this.networkFile });
const proxy = await createProxy({ contractAlias, network, txParams, initMethod: 'initialize', initArgs: [Number("20e10")], networkFile: this.networkFile });
(await proxy.value()).toString().should.be.eq('200000000000');
});

it('should initialize a proxy using large number on scientific notation', async function() {
const proxy = await createProxy({ contractAlias, network, txParams, initMethod: 'initialize', initArgs: ["20e70"], networkFile: this.networkFile });
(await proxy.value()).toString().should.be.eq('2e+71');
});

describe('warnings', function () {
beforeEach('capturing log output', function () {
this.logs = new CaptureLogs();
Expand Down
Loading

0 comments on commit 45fa6b2

Please sign in to comment.