From 6c0723bc437cdd100386f0a66c9f5539dd3266f1 Mon Sep 17 00:00:00 2001 From: ricmoo Date: Tue, 4 Apr 2017 17:36:59 -0400 Subject: [PATCH] Added testcase for nonce (which should be truncated). --- tests/run-utils.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/run-utils.js b/tests/run-utils.js index 45e4dd31..3e815a2b 100644 --- a/tests/run-utils.js +++ b/tests/run-utils.js @@ -44,6 +44,18 @@ function testContractAddress(test) { 'Failed to match contract address' ) + // Ropsten: 0x5bdfd14fcc917abc2f02a30721d152a6f147f09e8cbaad4e0d5405d646c5c3e1 + transaction = { + from: '0xc6af6e1a78a6752c7f8cd63877eb789a2adb776c', + nonce: 0 + }; + + test.equal( + getContractAddress(transaction), + '0x0CcCC7507aEDf9FEaF8C8D731421746e16b4d39D', + 'zero nonce' + ); + test.done(); }