Nothing
set_rpc_address("https://mainnet.infura.io/", key = Sys.getenv("INFURA_MAINNET_KEY"))
context("eth")
with_mock_api({
test_that("valid protocol version", {
expect_type(eth_protocolVersion(), "integer")
})
})
with_mock_api({
test_that("can retrieve transactions", {
tx = eth_getTransactionByBlockHashAndIndex("0xd3ca9f0659473d93a00dc2076c2c9e8d7805243c59c8cb0d3501b262f98a15f1", "0x0")
expect_equal(tx$blockNumber, "0x493c5f")
tx = eth_getTransactionByBlockNumberAndIndex("0x493c5f", "0x0")
expect_equal(tx$blockHash, "0xd3ca9f0659473d93a00dc2076c2c9e8d7805243c59c8cb0d3501b262f98a15f1")
})
})
# capture_requests({
# eth_getTransactionByBlockHashAndIndex("0xd3ca9f0659473d93a00dc2076c2c9e8d7805243c59c8cb0d3501b262f98a15f1", "0x0")
# eth_getTransactionByBlockNumberAndIndex("0x493c5f", "0x0")
# })
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.