From bad89ecec333f5a226d3ec51e89c2210662ecec2 Mon Sep 17 00:00:00 2001 From: Matthew Whitehead Date: Tue, 27 Aug 2024 15:33:38 +0100 Subject: [PATCH] Remove scientific number test - not supporting at present Signed-off-by: Matthew Whitehead --- .../ethereum/deploy_contract_prepare_test.go | 49 ------------------- 1 file changed, 49 deletions(-) diff --git a/internal/ethereum/deploy_contract_prepare_test.go b/internal/ethereum/deploy_contract_prepare_test.go index a8edc60..45fd2e7 100644 --- a/internal/ethereum/deploy_contract_prepare_test.go +++ b/internal/ethereum/deploy_contract_prepare_test.go @@ -96,37 +96,6 @@ const samplePrepareDeployTXLargeInputParams = `{ "params": [ 10000000000000000000000001, "some-text" ] }` -const samplePrepareDeployTXScientificNotation = `{ - "ffcapi": { - "version": "v1.0.0", - "id": "904F177C-C790-4B01-BDF4-F2B4E52E607E", - "type": "DeployContract" - }, - "from": "0xb480F96c0a3d6E9e9a263e4665a39bFa6c4d01E8", - "to": "0xe1a078b9e2b145d0a7387f09277c6ae1d9470771", - "gas": 1000000, - "nonce": "111", - "value": "12345678901234567890123456789", - "contract": "0xdeadbeef", - "definition": [{ - "inputs": [ - { - "internalType":" uint256", - "name": "x", - "type": "uint256" - }, - { - "internalType":" string", - "name": "y", - "type": "string" - } - ], - "outputs":[], - "type":"constructor" - }], - "params": [ 1.0000000000000000000000001e+25, "some-text" ] -}` - func TestDeployContractPrepareOkNoEstimate(t *testing.T) { ctx, c, _, done := newTestConnector(t) @@ -167,24 +136,6 @@ func TestDeployContractPrepareOkLargeInputParam(t *testing.T) { assert.True(t, strings.Contains(res.TransactionData, "736f6d652d74657874")) } -func TestDeployContractPrepareOkScientificNotationParam(t *testing.T) { - - ctx, c, _, done := newTestConnector(t) - defer done() - - var req ffcapi.ContractDeployPrepareRequest - err := json.Unmarshal([]byte(samplePrepareDeployTXScientificNotation), &req) - assert.NoError(t, err) - res, reason, err := c.DeployContractPrepare(ctx, &req) - assert.NoError(t, err) - assert.Empty(t, reason) - assert.Equal(t, int64(1000000), res.Gas.Int64()) - // Basic check that our input param 1.0000000000000000000000001e+25 is in the TX data - assert.True(t, strings.Contains(res.TransactionData, "84595161401484a000001")) - // Basic check that our input param "some-text" is in the TX data - assert.True(t, strings.Contains(res.TransactionData, "736f6d652d74657874")) -} - func TestDeployContractPrepareWithEstimateRevert(t *testing.T) { ctx, c, mRPC, done := newTestConnector(t)