R/connect_ganache.R

Defines functions connect_gananche

Documented in connect_gananche

#' Connect to Ganache
#'
#' We are connecting to the local blockchain of Ganache using R
#'
#' @return A web3 connection vis web3.py
#' @export

connect_gananche <- function(){
  library(reticulate)
  use_python("/usr/local/bin/python")
  web3 <- import("web3")
  web3_ganache <- web3$HTTPProvider("HTTP://127.0.0.1:7545")
  web3_ganache
}
cointelfinance/web3R documentation built on Jan. 4, 2022, 12:03 a.m.