solution: integration test with Rinkeby

This commit is contained in:
Igor Artamonov
2021-08-16 22:08:56 -04:00
parent 0f77b57bd0
commit 64d667acad
4 changed files with 85 additions and 1 deletions

View File

@@ -32,6 +32,10 @@ class ProxyClient {
return forPrefix(18081, "eth")
}
static ProxyClient ethereumRinkeby() {
return forPrefix(18081, "rinkeby")
}
static ProxyClient forPrefix(String prefix) {
return forPrefix(18080, prefix)
}

View File

@@ -0,0 +1,30 @@
package io.emeraldpay.dshackle.testing.trial.rinkeby
import io.emeraldpay.dshackle.testing.trial.ProxyClient
import spock.lang.IgnoreIf
import spock.lang.Specification
@IgnoreIf({ System.getProperty('trialMode') != 'rinkeby' })
class CallContractSpec extends Specification {
def client = ProxyClient.ethereumRinkeby()
def "get block"() {
when:
def act = client.execute(65, "eth_call",
[
[
"to" : "0xB8Ba177465b3d696180742c6ba58C408175CB6Dd",
"data": "0x70a08231000000000000000000000000da3f87aa38d07f1fc836873a3b34ec23088ef78a"
],
"0xc90f1c8c125a4d5b90742f16947bdb1d10516f173fd7fc51223d10499de2a812"
]
)
then:
act.id == 65
act.result != null
act.result == "0x000000000000000000000000000000000000000000000000000000003af9a800"
act.error == null
}
}