@ -1,9 +1,9 @@
import fetch from 'jest-fetch-mock' ;
import fetch from 'jest-fetch-mock' ;
import { harmony , checkCalledMethod } from './harmony ' ;
import { woop , checkCalledMethod } from './woop ' ;
import txnJsons from '../fixtures/transactions.json' ;
import txnJsons from '../fixtures/transactions.json' ;
import { RPCMethod } from '@harmony -js/network' ;
import { RPCMethod } from '@woop -js/network' ;
const messenger = harmony . messenger ;
const messenger = woop . 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 hmy _sendRawTransaction' , async ( ) = > {
it ( 'should test wiki _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 ( 'hmy _sendRawTransaction' , transactions [ index ] . rawTransaction ) ;
const sent = await messenger . send ( 'wiki _sendRawTransaction' , transactions [ index ] . rawTransaction ) ;
expect ( harmony . utils . isHash ( sent . result ) ) . toEqual ( true ) ;
expect ( woop . utils . isHash ( sent . result ) ) . toEqual ( true ) ;
txnHashesFixtures . push ( sent . result ) ;
txnHashesFixtures . push ( sent . result ) ;
expect ( checkCalledMethod ( index , 'hmy _sendRawTransaction' ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( index , 'wiki _sendRawTransaction' ) ) . toEqual ( true ) ;
}
}
} ) ;
} ) ;
it ( 'should test hmy _getTransactionByHash' , async ( ) = > {
it ( 'should test wiki _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" : harmony . utils . numberToHex ( index ) ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"transactionIndex" : woop . 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" : harmony . utils . numberToHex ( index ) ,
"v" : woop . utils . numberToHex ( index ) ,
"r" : harmony . utils . numberToHex ( index ) ,
"r" : woop . utils . numberToHex ( index ) ,
"s" : harmony . utils . numberToHex ( index ) ,
"s" : woop . utils . numberToHex ( index ) ,
}
}
} )
} )
) ;
) ;
const txnDetail = await harmony . blockchain . getTransactionByHash ( {
const txnDetail = await woop . 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 hmy _getTransactionByBlockHashAndIndex' , async ( ) = > {
it ( 'should test wiki _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 = harmony . utils . numberToHex ( index ) ;
let expectedTransactionIndex : string = woop . 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" : harmony . utils . numberToHex ( index ) ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"transactionIndex" : woop . 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" : harmony . utils . numberToHex ( index ) ,
"v" : woop . utils . numberToHex ( index ) ,
"r" : harmony . utils . numberToHex ( index ) ,
"r" : woop . utils . numberToHex ( index ) ,
"s" : harmony . utils . numberToHex ( index ) ,
"s" : woop . utils . numberToHex ( index ) ,
}
}
} ) ) ;
} ) ) ;
} ) ;
} ) ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const txnDetail : any = await harmony . blockchain . getTransactionByBlockHashAndIndex ( {
const txnDetail : any = await woop . 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 hmy _getTransactionByBlockNumberAndIndex' , async ( ) = > {
it ( 'should test wiki _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 = harmony . utils . numberToHex ( index ) ;
let expectedBlockNumber : string = woop . 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 = harmony . utils . numberToHex ( index ) ;
let expectedTransactionIndex : string = woop . 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" : harmony . utils . numberToHex ( index ) ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"transactionIndex" : woop . 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" : harmony . utils . numberToHex ( index ) ,
"v" : woop . utils . numberToHex ( index ) ,
"r" : harmony . utils . numberToHex ( index ) ,
"r" : woop . utils . numberToHex ( index ) ,
"s" : harmony . utils . numberToHex ( index ) ,
"s" : woop . utils . numberToHex ( index ) ,
}
}
} ) ) ;
} ) ) ;
} ) ;
} ) ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const transactionInfo : TransactionInfo = transactionInfoList [ index ] ;
const txnDetail : any = await harmony . blockchain . getTransactionByBlockNumberAndIndex ( {
const txnDetail : any = await woop . 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 hmy _getTransactionCountByHash' , async ( ) = > {
it ( 'should test wiki _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 harmony . blockchain . getBlockTransactionCountByHash ( {
const txnCount : any = await woop . blockchain . getBlockTransactionCountByHash ( {
blockHash : transactionInfo.blockHash ,
blockHash : transactionInfo.blockHash ,
} ) ;
} ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByHash ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByHash ) ) . toEqual ( true ) ;
expect ( harmony . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
expect ( woop . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
}
}
} ) ;
} ) ;
it ( 'should test hmy _getTransactionCountByNumber' , async ( ) = > {
it ( 'should test wiki _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 harmony . blockchain . getBlockTransactionCountByNumber ( {
const txnCount : any = await woop . blockchain . getBlockTransactionCountByNumber ( {
blockNumber : transactionInfo.blockNumber ,
blockNumber : transactionInfo.blockNumber ,
} ) ;
} ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByNumber ) ) . toEqual ( true ) ;
expect ( checkCalledMethod ( 0 , RPCMethod . GetBlockTransactionCountByNumber ) ) . toEqual ( true ) ;
expect ( harmony . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
expect ( woop . utils . isHex ( txnCount . result ) ) . toEqual ( true ) ;
}
}
} ) ;
} ) ;
it ( 'should test hmy _getTransactionReceipt' , async ( ) = > {
it ( 'should test wiki _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" : harmony . utils . numberToHex ( index ) ,
"blockNumber" : woop . utils . numberToHex ( index ) ,
"from" : transactions [ index ] . senderAddress ,
"from" : transactions [ index ] . senderAddress ,
"gasUsed" : harmony . utils . numberToHex ( index ) ,
"gasUsed" : woop . utils . numberToHex ( index ) ,
"cumulativeGasUsed" : harmony . utils . numberToHex ( index ) ,
"cumulativeGasUsed" : woop . utils . numberToHex ( index ) ,
"logs" : [ ] ,
"logs" : [ ] ,
"logsBloom" : harmony . utils . numberToHex ( index ) ,
"logsBloom" : woop . utils . numberToHex ( index ) ,
"shardID" : 0 ,
"shardID" : 0 ,
"to" : transactions [ index ] . receiverAddress ,
"to" : transactions [ index ] . receiverAddress ,
"transactionHash" : hashes [ index ] ,
"transactionHash" : hashes [ index ] ,
"transactionIndex" : harmony . utils . numberToHex ( index ) ,
"transactionIndex" : woop . utils . numberToHex ( index ) ,
"blockHash" : blockHashes [ index ]
"blockHash" : blockHashes [ index ]
}
}
} )
} )
) ;
) ;
const receipt : any = await harmony . blockchain . getTransactionReceipt ( {
const receipt : any = await woop . 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 ( harmony . crypto . getAddress ( receipt . result . from ) . checksum ) . toEqual (
expect ( woop . crypto . getAddress ( receipt . result . from ) . checksum ) . toEqual (
transactions [ index ] . senderAddress ,
transactions [ index ] . senderAddress ,
) ;
) ;
expect ( harmony . crypto . getAddress ( receipt . result . to ) . checksum ) . toEqual (
expect ( woop . 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 hmy _getTransactionCount' , async ( ) = > {
it ( 'should test wiki _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 harmony . blockchain . getTransactionCount ( {
const nonce : any = await woop . 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 harmony . utils . validateArgs (
return woop . utils . validateArgs (
data ,
data ,
{
{
blockHash : [ harmony . utils . isHash ] ,
blockHash : [ woop . utils . isHash ] ,
blockNumber : [ harmony . utils . isHex ] ,
blockNumber : [ woop . utils . isHex ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
from : [ harmony . utils . isValidAddress ] ,
from : [ woop . utils . isValidAddress ] ,
gas : [ harmony . utils . isHex ] ,
gas : [ woop . utils . isHex ] ,
gasPrice : [ harmony . utils . isHex ] ,
gasPrice : [ woop . utils . isHex ] ,
hash : [ harmony . utils . isHash ] ,
hash : [ woop . utils . isHash ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
input : [ ( data : any ) = > data === '0x' || harmony . utils . isHex ( data ) ] ,
input : [ ( data : any ) = > data === '0x' || woop . utils . isHex ( data ) ] ,
nonce : [ harmony . utils . isHex ] ,
nonce : [ woop . utils . isHex ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
to : [ ( data : any ) = > data === '0x' || harmony . utils . isValidAddress ( data ) ] ,
to : [ ( data : any ) = > data === '0x' || woop . utils . isValidAddress ( data ) ] ,
transactionIndex : [ harmony . utils . isHex ] ,
transactionIndex : [ woop . utils . isHex ] ,
value : [ harmony . utils . isHex ] ,
value : [ woop . utils . isHex ] ,
v : [ harmony . utils . isHex ] ,
v : [ woop . utils . isHex ] ,
r : [ harmony . utils . isHex ] ,
r : [ woop . utils . isHex ] ,
s : [ harmony . utils . isHex ] ,
s : [ woop . utils . isHex ] ,
} ,
} ,
{ } ,
{ } ,
) ;
) ;
}
}
function checkTransactionReceipt ( data : any ) {
function checkTransactionReceipt ( data : any ) {
return harmony . utils . validateArgs (
return woop . utils . validateArgs (
data ,
data ,
{
{
blockNumber : [ harmony . utils . isHex ] ,
blockNumber : [ woop . utils . isHex ] ,
contractAddress : [
contractAddress : [
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
( data : any ) = > data === null || harmony . utils . isValidAddress ,
( data : any ) = > data === null || woop . utils . isValidAddress ,
] ,
] ,
cumulativeGasUsed : [ harmony . utils . isHex ] ,
cumulativeGasUsed : [ woop . utils . isHex ] ,
from : [ harmony . utils . isValidAddress ] ,
from : [ woop . utils . isValidAddress ] ,
gasUsed : [ harmony . utils . isHex ] ,
gasUsed : [ woop . utils . isHex ] ,
logs : [ harmony . utils . isArray ] ,
logs : [ woop . utils . isArray ] ,
logsBloom : [ harmony . utils . isHex ] ,
logsBloom : [ woop . utils . isHex ] ,
shardID : [ harmony . utils . isNumber ] ,
shardID : [ woop . utils . isNumber ] ,
// tslint:disable-next-line: no-shadowed-variable
// tslint:disable-next-line: no-shadowed-variable
to : [ ( data : any ) = > data === '0x' || harmony . utils . isValidAddress ] ,
to : [ ( data : any ) = > data === '0x' || woop . utils . isValidAddress ] ,
transactionHash : [ harmony . utils . isHash ] ,
transactionHash : [ woop . utils . isHash ] ,
transactionIndex : [ harmony . utils . isHex ] ,
transactionIndex : [ woop . utils . isHex ] ,
} ,
} ,
{ blockHash : [ harmony . utils . isHash ] , root : [ harmony . utils . isHash ] } ,
{ blockHash : [ woop . utils . isHash ] , root : [ woop . utils . isHash ] } ,
) ;
) ;
}
}