@ -1,9 +1,9 @@
import fetch from 'jest-fetch-mock' ;
import fetch from 'jest-fetch-mock' ;
import { woop , checkCalledMethod } from './woop ' ;
import { harmony , checkCalledMethod } from './harmony ' ;
import txnJsons from '../fixtures/transactions.json' ;
import txnJsons from '../fixtures/transactions.json' ;
import { RPCMethod } from '@woop -js/network' ;
import { RPCMethod } from '@harmony -js/network' ;
const messenger = woop . messenger ;
const messenger = harmony . messenger ;
interface TransactionInfo {
interface TransactionInfo {
blockHash : string ;
blockHash : string ;
@ -19,18 +19,18 @@ describe('e2e test transactions by RPC Method', () => {
const transactionInfoList : any = [ ] ;
const transactionInfoList : any = [ ] ;
const { transactions , hashes , blockHashes } = txnJsons ;
const { transactions , hashes , blockHashes } = txnJsons ;
// net_*
// net_*
it ( 'should test wiki _sendRawTransaction' , async ( ) = > {
it ( 'should test hmy _sendRawTransaction' , async ( ) = > {
for ( let index = 0 ; index < transactions . length ; index ++ ) {
for ( let index = 0 ; index < transactions . length ; index ++ ) {
fetch . mockResponseOnce (
fetch . mockResponseOnce (
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : hashes [ index ] } ) ,
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : hashes [ index ] } ) ,
) ;
) ;
const sent = await messenger . send ( 'wiki _sendRawTransaction' , transactions [ index ] . rawTransaction ) ;
const sent = await messenger . send ( 'hmy _sendRawTransaction' , transactions [ index ] . rawTransaction ) ;
expect ( woop . utils . isHash ( sent . result ) ) . toEqual ( true ) ;
expect ( harmony . utils . isHash ( sent . result ) ) . toEqual ( true ) ;
txnHashesFixtures . push ( sent . result ) ;
txnHashesFixtures . push ( sent . result ) ;
expect ( checkCalledMethod ( index , 'wiki _sendRawTransaction' ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( index , 'hmy _sendRawTransaction' ) ) . toEqual ( true ) ;
}
}
} ) ;
} ) ;
it ( 'should test wiki _getTransactionByHash' , async ( ) = > {
it ( 'should test hmy _getTransactionByHash' , async ( ) = > {
for ( let index : number = 0 ; index < txnHashesFixtures . length ; index ++ ) {
for ( let index : number = 0 ; index < txnHashesFixtures . length ; index ++ ) {
const txnHash = txnHashesFixtures [ index ] ;
const txnHash = txnHashesFixtures [ index ] ;
fetch . mockResponseOnce (
fetch . mockResponseOnce (
@ -40,8 +40,8 @@ describe('e2e test transactions by RPC Method', () => {
"result" : {
"result" : {
"hash" : hashes [ index ] ,
"hash" : hashes [ index ] ,
"blockHash" : blockHashes [ index ] ,
"blockHash" : blockHashes [ index ] ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"blockNumber" : harmony . utils . numberToHex ( index ) ,
"transactionIndex" : woop . utils . numberToHex ( index ) ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"from" : transactions [ index ] . senderAddress ,
"from" : transactions [ index ] . senderAddress ,
"gas" : transactions [ index ] . gasLimit ,
"gas" : transactions [ index ] . gasLimit ,
"gasPrice" : transactions [ index ] . gasPrice ,
"gasPrice" : transactions [ index ] . gasPrice ,
@ -49,13 +49,13 @@ describe('e2e test transactions by RPC Method', () => {
"nonce" : transactions [ index ] . nonce ,
"nonce" : transactions [ index ] . nonce ,
"to" : transactions [ index ] . receiverAddressBech32 ,
"to" : transactions [ index ] . receiverAddressBech32 ,
"value" : transactions [ index ] . value ,
"value" : transactions [ index ] . value ,
"v" : woop . utils . numberToHex ( index ) ,
"v" : harmony . utils . numberToHex ( index ) ,
"r" : woop . utils . numberToHex ( index ) ,
"r" : harmony . utils . numberToHex ( index ) ,
"s" : woop . utils . numberToHex ( index ) ,
"s" : harmony . utils . numberToHex ( index ) ,
}
}
} )
} )
) ;
) ;
const txnDetail = await woop . blockchain . getTransactionByHash ( {
const txnDetail = await harmony . blockchain . getTransactionByHash ( {
txnHash
txnHash
} ) ;
} ) ;
expect ( checkCalledMethod ( index , RPCMethod . GetTransactionByHash ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( index , RPCMethod . GetTransactionByHash ) ) . toEqual ( true ) ;
@ -74,7 +74,7 @@ describe('e2e test transactions by RPC Method', () => {
}
}
}
}
} ) ;
} ) ;
it ( 'should test wiki _getTransactionByBlockHashAndIndex' , async ( ) = > {
it ( 'should test hmy _getTransactionByBlockHashAndIndex' , async ( ) = > {
for ( let index : number = 0 ; index < transactionInfoList . length ; index ++ ) {
for ( let index : number = 0 ; index < transactionInfoList . length ; index ++ ) {
fetch . mockResponseOnce ( ( req ) = > {
fetch . mockResponseOnce ( ( req ) = > {
if ( ! ( Buffer . isBuffer ( req . body ) ) ) {
if ( ! ( Buffer . isBuffer ( req . body ) ) ) {
@ -86,7 +86,7 @@ describe('e2e test transactions by RPC Method', () => {
fail ( ` Expected block hash ${ blockHashes [ index ] } but got ${ body . params [ 0 ] } ` ) ;
fail ( ` Expected block hash ${ blockHashes [ index ] } but got ${ body . params [ 0 ] } ` ) ;
}
}
// validate that the transaction index is as expected
// validate that the transaction index is as expected
let expectedTransactionIndex : string = woop . utils . numberToHex ( index ) ;
let expectedTransactionIndex : string = harmony . utils . numberToHex ( index ) ;
if ( expectedTransactionIndex !== body . params [ 1 ] ) {
if ( expectedTransactionIndex !== body . params [ 1 ] ) {
fail ( ` Expected transactionIndex ${ expectedTransactionIndex } but got ${ body . params [ 1 ] } ` ) ;
fail ( ` Expected transactionIndex ${ expectedTransactionIndex } but got ${ body . params [ 1 ] } ` ) ;
}
}
@ -96,8 +96,8 @@ describe('e2e test transactions by RPC Method', () => {
"result" : {
"result" : {
"hash" : hashes [ index ] ,
"hash" : hashes [ index ] ,
"blockHash" : blockHashes [ index ] ,
"blockHash" : blockHashes [ index ] ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"blockNumber" : harmony . utils . numberToHex ( index ) ,
"transactionIndex" : woop . utils . numberToHex ( index ) ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"from" : transactions [ index ] . senderAddress ,
"from" : transactions [ index ] . senderAddress ,
"gas" : transactions [ index ] . gasLimit ,
"gas" : transactions [ index ] . gasLimit ,
"gasPrice" : transactions [ index ] . gasPrice ,
"gasPrice" : transactions [ index ] . gasPrice ,
@ -105,14 +105,14 @@ describe('e2e test transactions by RPC Method', () => {
"nonce" : transactions [ index ] . nonce ,
"nonce" : transactions [ index ] . nonce ,
"to" : transactions [ index ] . receiverAddressBech32 ,
"to" : transactions [ index ] . receiverAddressBech32 ,
"value" : transactions [ index ] . value ,
"value" : transactions [ index ] . value ,
"v" : woop . utils . numberToHex ( index ) ,
"v" : harmony . utils . numberToHex ( index ) ,
"r" : woop . utils . numberToHex ( index ) ,
"r" : harmony . utils . numberToHex ( index ) ,
"s" : woop . utils . numberToHex ( index ) ,
"s" : harmony . utils . numberToHex ( index ) ,
}
}
} ) ) ;
} ) ) ;
} ) ;
} ) ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const txnDetail : any = await woop . blockchain . getTransactionByBlockHashAndIndex ( {
const txnDetail : any = await harmony . blockchain . getTransactionByBlockHashAndIndex ( {
blockHash : transactionInfo.blockHash ,
blockHash : transactionInfo.blockHash ,
index : transactionInfo.index ,
index : transactionInfo.index ,
} ) ;
} ) ;
@ -126,7 +126,7 @@ describe('e2e test transactions by RPC Method', () => {
}
}
}
}
} ) ;
} ) ;
it ( 'should test wiki _getTransactionByBlockNumberAndIndex' , async ( ) = > {
it ( 'should test hmy _getTransactionByBlockNumberAndIndex' , async ( ) = > {
for ( let index : number = 0 ; index < transactionInfoList . length ; index ++ ) {
for ( let index : number = 0 ; index < transactionInfoList . length ; index ++ ) {
fetch . mockResponseOnce ( ( req ) = > {
fetch . mockResponseOnce ( ( req ) = > {
if ( ! ( Buffer . isBuffer ( req . body ) ) ) {
if ( ! ( Buffer . isBuffer ( req . body ) ) ) {
@ -134,12 +134,12 @@ describe('e2e test transactions by RPC Method', () => {
}
}
const body : any = JSON . parse ( req . body . toString ( ) ) ;
const body : any = JSON . parse ( req . body . toString ( ) ) ;
// validate that the block number is as expected
// validate that the block number is as expected
let expectedBlockNumber : string = woop . utils . numberToHex ( index ) ;
let expectedBlockNumber : string = harmony . utils . numberToHex ( index ) ;
if ( body . params [ 0 ] !== expectedBlockNumber ) {
if ( body . params [ 0 ] !== expectedBlockNumber ) {
fail ( ` Expected block number ${ index } but got ${ body . params [ 0 ] } ` ) ;
fail ( ` Expected block number ${ index } but got ${ body . params [ 0 ] } ` ) ;
}
}
// validate that the transaction index is as expected
// validate that the transaction index is as expected
let expectedTransactionIndex : string = woop . utils . numberToHex ( index ) ;
let expectedTransactionIndex : string = harmony . utils . numberToHex ( index ) ;
if ( expectedTransactionIndex !== body . params [ 1 ] ) {
if ( expectedTransactionIndex !== body . params [ 1 ] ) {
fail ( ` Expected transactionIndex ${ expectedTransactionIndex } but got ${ body . params [ 1 ] } ` ) ;
fail ( ` Expected transactionIndex ${ expectedTransactionIndex } but got ${ body . params [ 1 ] } ` ) ;
}
}
@ -149,8 +149,8 @@ describe('e2e test transactions by RPC Method', () => {
"result" : {
"result" : {
"hash" : hashes [ index ] ,
"hash" : hashes [ index ] ,
"blockHash" : blockHashes [ index ] ,
"blockHash" : blockHashes [ index ] ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"blockNumber" : harmony . utils . numberToHex ( index ) ,
"transactionIndex" : woop . utils . numberToHex ( index ) ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"from" : transactions [ index ] . senderAddress ,
"from" : transactions [ index ] . senderAddress ,
"gas" : transactions [ index ] . gasLimit ,
"gas" : transactions [ index ] . gasLimit ,
"gasPrice" : transactions [ index ] . gasPrice ,
"gasPrice" : transactions [ index ] . gasPrice ,
@ -158,14 +158,14 @@ describe('e2e test transactions by RPC Method', () => {
"nonce" : transactions [ index ] . nonce ,
"nonce" : transactions [ index ] . nonce ,
"to" : transactions [ index ] . receiverAddressBech32 ,
"to" : transactions [ index ] . receiverAddressBech32 ,
"value" : transactions [ index ] . value ,
"value" : transactions [ index ] . value ,
"v" : woop . utils . numberToHex ( index ) ,
"v" : harmony . utils . numberToHex ( index ) ,
"r" : woop . utils . numberToHex ( index ) ,
"r" : harmony . utils . numberToHex ( index ) ,
"s" : woop . utils . numberToHex ( index ) ,
"s" : harmony . utils . numberToHex ( index ) ,
}
}
} ) ) ;
} ) ) ;
} ) ;
} ) ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const txnDetail : any = await woop . blockchain . getTransactionByBlockNumberAndIndex ( {
const txnDetail : any = await harmony . blockchain . getTransactionByBlockNumberAndIndex ( {
blockNumber : transactionInfo.blockNumber ,
blockNumber : transactionInfo.blockNumber ,
index : transactionInfo.index ,
index : transactionInfo.index ,
} ) ;
} ) ;
@ -179,33 +179,33 @@ describe('e2e test transactions by RPC Method', () => {
}
}
}
}
} ) ;
} ) ;
it ( 'should test wiki _getTransactionCountByHash' , async ( ) = > {
it ( 'should test hmy _getTransactionCountByHash' , async ( ) = > {
for ( const some of transactionInfoList ) {
for ( const some of transactionInfoList ) {
fetch . mockResponseOnce (
fetch . mockResponseOnce (
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : "0x1" } ) ,
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : "0x1" } ) ,
) ;
) ;
const transactionInfo : TransactionInfo = some ;
const transactionInfo : TransactionInfo = some ;
const txnCount : any = await woop . blockchain . getBlockTransactionCountByHash ( {
const txnCount : any = await harmony . blockchain . getBlockTransactionCountByHash ( {
blockHash : transactionInfo.blockHash ,
blockHash : transactionInfo.blockHash ,
} ) ;
} ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByHash ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByHash ) ) . toEqual ( true ) ;
expect ( woop . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
expect ( harmony . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
}
}
} ) ;
} ) ;
it ( 'should test wiki _getTransactionCountByNumber' , async ( ) = > {
it ( 'should test hmy _getTransactionCountByNumber' , async ( ) = > {
for ( const some of transactionInfoList ) {
for ( const some of transactionInfoList ) {
fetch . mockResponseOnce (
fetch . mockResponseOnce (
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : "0x1" } ) ,
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : "0x1" } ) ,
) ;
) ;
const transactionInfo : TransactionInfo = some ;
const transactionInfo : TransactionInfo = some ;
const txnCount : any = await woop . blockchain . getBlockTransactionCountByNumber ( {
const txnCount : any = await harmony . blockchain . getBlockTransactionCountByNumber ( {
blockNumber : transactionInfo.blockNumber ,
blockNumber : transactionInfo.blockNumber ,
} ) ;
} ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByNumber ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByNumber ) ) . toEqual ( true ) ;
expect ( woop . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
expect ( harmony . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
}
}
} ) ;
} ) ;
it ( 'should test wiki _getTransactionReceipt' , async ( ) = > {
it ( 'should test hmy _getTransactionReceipt' , async ( ) = > {
// tslint:disable-next-line: prefer-for-of
// tslint:disable-next-line: prefer-for-of
for ( let index = 0 ; index < txnHashesFixtures . length ; index += 1 ) {
for ( let index = 0 ; index < txnHashesFixtures . length ; index += 1 ) {
const txnHash = txnHashesFixtures [ index ] ;
const txnHash = txnHashesFixtures [ index ] ;
@ -215,31 +215,31 @@ describe('e2e test transactions by RPC Method', () => {
"id" : 1 ,
"id" : 1 ,
"result" : {
"result" : {
"contractAddress" : null ,
"contractAddress" : null ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"blockNumber" : harmony . utils . numberToHex ( index ) ,
"from" : transactions [ index ] . senderAddress ,
"from" : transactions [ index ] . senderAddress ,
"gasUsed" : woop . utils . numberToHex ( index ) ,
"gasUsed" : harmony . utils . numberToHex ( index ) ,
"cumulativeGasUsed" : woop . utils . numberToHex ( index ) ,
"cumulativeGasUsed" : harmony . utils . numberToHex ( index ) ,
"logs" : [ ] ,
"logs" : [ ] ,
"logsBloom" : woop . utils . numberToHex ( index ) ,
"logsBloom" : harmony . utils . numberToHex ( index ) ,
"shardID" : 0 ,
"shardID" : 0 ,
"to" : transactions [ index ] . receiverAddress ,
"to" : transactions [ index ] . receiverAddress ,
"transactionHash" : hashes [ index ] ,
"transactionHash" : hashes [ index ] ,
"transactionIndex" : woop . utils . numberToHex ( index ) ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"blockHash" : blockHashes [ index ]
"blockHash" : blockHashes [ index ]
}
}
} )
} )
) ;
) ;
const receipt : any = await woop . blockchain . getTransactionReceipt ( {
const receipt : any = await harmony . blockchain . getTransactionReceipt ( {
txnHash ,
txnHash ,
} ) ;
} ) ;
expect ( checkCalledMethod ( index , RPCMethod . GetTransactionReceipt ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( index , RPCMethod . GetTransactionReceipt ) ) . toEqual ( true ) ;
if ( receipt . result !== null ) {
if ( receipt . result !== null ) {
expect ( checkTransactionReceipt ( receipt . result ) ) . toEqual ( true ) ;
expect ( checkTransactionReceipt ( receipt . result ) ) . toEqual ( true ) ;
expect ( woop . crypto . getAddress ( receipt . result . from ) . checksum ) . toEqual (
expect ( harmony . crypto . getAddress ( receipt . result . from ) . checksum ) . toEqual (
transactions [ index ] . senderAddress ,
transactions [ index ] . senderAddress ,
) ;
) ;
expect ( woop . crypto . getAddress ( receipt . result . to ) . checksum ) . toEqual (
expect ( harmony . crypto . getAddress ( receipt . result . to ) . checksum ) . toEqual (
transactions [ index ] . receiverAddress ,
transactions [ index ] . receiverAddress ,
) ;
) ;
expect ( receipt . result . blockHash ) . toEqual ( transactionInfoList [ index ] . blockHash ) ;
expect ( receipt . result . blockHash ) . toEqual ( transactionInfoList [ index ] . blockHash ) ;
@ -250,13 +250,13 @@ describe('e2e test transactions by RPC Method', () => {
}
}
}
}
} ) ;
} ) ;
it ( 'should test wiki _getTransactionCount' , async ( ) = > {
it ( 'should test hmy _getTransactionCount' , async ( ) = > {
for ( let i = 0 ; i < transactionInfoList ; i += 1 ) {
for ( let i = 0 ; i < transactionInfoList ; i += 1 ) {
fetch . mockResponseOnce (
fetch . mockResponseOnce (
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : "0x1" } ) ,
JSON . stringify ( { "jsonrpc" : "2.0" , "id" : 1 , "result" : "0x1" } ) ,
) ;
) ;
const transactionInfo : TransactionInfo = transactionInfoList [ i ] ;
const transactionInfo : TransactionInfo = transactionInfoList [ i ] ;
const nonce : any = await woop . blockchain . getTransactionCount ( {
const nonce : any = await harmony . blockchain . getTransactionCount ( {
address : transactions [ i ] . senderAddressBech32 ,
address : transactions [ i ] . senderAddressBech32 ,
blockNumber : transactionInfo.blockNumber ,
blockNumber : transactionInfo.blockNumber ,
} ) ;
} ) ;
@ -266,52 +266,52 @@ describe('e2e test transactions by RPC Method', () => {
} ) ;
} ) ;
function checkTransactionDetail ( data : any ) {
function checkTransactionDetail ( data : any ) {
return woop . utils . validateArgs (
return harmony . utils . validateArgs (
data ,
data ,
{
{
blockHash : [ woop . utils . isHash ] ,
blockHash : [ harmony . utils . isHash ] ,
blockNumber : [ woop . utils . isHex ] ,
blockNumber : [ harmony . utils . isHex ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
from : [ woop . utils . isValidAddress ] ,
from : [ harmony . utils . isValidAddress ] ,
gas : [ woop . utils . isHex ] ,
gas : [ harmony . utils . isHex ] ,
gasPrice : [ woop . utils . isHex ] ,
gasPrice : [ harmony . utils . isHex ] ,
hash : [ woop . utils . isHash ] ,
hash : [ harmony . utils . isHash ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
input : [ ( data : any ) = > data === '0x' || woop . utils . isHex ( data ) ] ,
input : [ ( data : any ) = > data === '0x' || harmony . utils . isHex ( data ) ] ,
nonce : [ woop . utils . isHex ] ,
nonce : [ harmony . utils . isHex ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
to : [ ( data : any ) = > data === '0x' || woop . utils . isValidAddress ( data ) ] ,
to : [ ( data : any ) = > data === '0x' || harmony . utils . isValidAddress ( data ) ] ,
transactionIndex : [ woop . utils . isHex ] ,
transactionIndex : [ harmony . utils . isHex ] ,
value : [ woop . utils . isHex ] ,
value : [ harmony . utils . isHex ] ,
v : [ woop . utils . isHex ] ,
v : [ harmony . utils . isHex ] ,
r : [ woop . utils . isHex ] ,
r : [ harmony . utils . isHex ] ,
s : [ woop . utils . isHex ] ,
s : [ harmony . utils . isHex ] ,
} ,
} ,
{ } ,
{ } ,
) ;
) ;
}
}
function checkTransactionReceipt ( data : any ) {
function checkTransactionReceipt ( data : any ) {
return woop . utils . validateArgs (
return harmony . utils . validateArgs (
data ,
data ,
{
{
blockNumber : [ woop . utils . isHex ] ,
blockNumber : [ harmony . utils . isHex ] ,
contractAddress : [
contractAddress : [
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
( data : any ) = > data === null || woop . utils . isValidAddress ,
( data : any ) = > data === null || harmony . utils . isValidAddress ,
] ,
] ,
cumulativeGasUsed : [ woop . utils . isHex ] ,
cumulativeGasUsed : [ harmony . utils . isHex ] ,
from : [ woop . utils . isValidAddress ] ,
from : [ harmony . utils . isValidAddress ] ,
gasUsed : [ woop . utils . isHex ] ,
gasUsed : [ harmony . utils . isHex ] ,
logs : [ woop . utils . isArray ] ,
logs : [ harmony . utils . isArray ] ,
logsBloom : [ woop . utils . isHex ] ,
logsBloom : [ harmony . utils . isHex ] ,
shardID : [ woop . utils . isNumber ] ,
shardID : [ harmony . utils . isNumber ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
to : [ ( data : any ) = > data === '0x' || woop . utils . isValidAddress ] ,
to : [ ( data : any ) = > data === '0x' || harmony . utils . isValidAddress ] ,
transactionHash : [ woop . utils . isHash ] ,
transactionHash : [ harmony . utils . isHash ] ,
transactionIndex : [ woop . utils . isHex ] ,
transactionIndex : [ harmony . utils . isHex ] ,
} ,
} ,
{ blockHash : [ woop . utils . isHash ] , root : [ woop . utils . isHash ] } ,
{ blockHash : [ harmony . utils . isHash ] , root : [ harmony . utils . isHash ] } ,
) ;
) ;
}
}