get_log_by_contract: Get Log Events By Contract Address

Description Usage Arguments Value Examples

View source: R/get_log_by_contract.R

Description

Get Log Events By Contract Address

Usage

1
2
3
4
5
6
7
8
get_log_by_contract(
  contract,
  api_key,
  starting_block,
  ending_block = "latest",
  sleep = 1/10,
  ...
)

Arguments

contract

The contract address.

api_key

The user's public API key. To generate it, you need an account at Covalent HQ.

starting_block

First block to retrieve log events.

ending_block

Last block to retrieve log events.

sleep

Interval in seconds between requests.

...

Additional arguments to pass to the request. For more information on available parameters see Covalent HQ API.

Value

Returns a data.frame with the decoded log events emitted by a particular smart contract.

Examples

1
2
3
4
5
6
7
8
## Not run: 
contract <- "0xc0da01a04c3f3e0be433606045bb7017a7323e38"

get_log_by_contract(contract, MY_API_KEY, starting_block = "9601459")
get_log_by_contract(contract, MY_API_KEY, starting_block = "9601459",
                    ending_block = "10005000")

## End(Not run)

santiagogualchi/cvlnt documentation built on Jan. 22, 2021, 2:34 p.m.