forked from cerc-io/ipld-eth-server
remove references to infura token except for in infura.toml so that tests will continue to pass on CI
This commit is contained in:
parent
37fc038605
commit
d3e172d9ab
16
README.md
16
README.md
@ -177,7 +177,7 @@ This command takes a config of the form:
|
|||||||
port = 5432
|
port = 5432
|
||||||
|
|
||||||
[client]
|
[client]
|
||||||
ipcPath = "https://mainnet.infura.io/J5Vd2fRtGsw0zZ0Ov3BL"
|
ipcPath = "path_to_ethjson_rpc"
|
||||||
|
|
||||||
[contract]
|
[contract]
|
||||||
network = ""
|
network = ""
|
||||||
@ -248,9 +248,19 @@ The 'method' and 'event' identifiers are tacked onto the end of the table names
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
Running `./vulcanizedb contractWatcher --config=./environments/example.toml --mode=light`
|
Modify `./environments/example.toml` to replace `"path_to_ethjson_rpc"` with a path that points to an ethjson_rpc endpoint (e.g. a local geth node ipc path or an Infura url).
|
||||||
|
This endpoint should be for an archival eth node if we want to perform method polling as this configuration is currently set up to do. To work with a non-archival full node,
|
||||||
|
remove the `balanceOf` method from the `0x8dd5fbce2f6a956c3022ba3663759011dd51e73e` (TrueUSD) contract.
|
||||||
|
|
||||||
Runs our contract watcher in light mode, configured to watch the contracts specified in the config file. Note that
|
If you are operating a light sync vDB, run:
|
||||||
|
|
||||||
|
`./vulcanizedb contractWatcher --config=./environments/example.toml --mode=light`
|
||||||
|
|
||||||
|
If instead you are operating a full sync vDB and provided an archival node IPC path, run in full mode:
|
||||||
|
|
||||||
|
`./vulcanizedb contractWatcher --config=./environments/example.toml --mode=full`
|
||||||
|
|
||||||
|
This will run the contractWatcher and configures it to watch the contracts specified in the config file. Note that
|
||||||
by default we operate in `light` mode but the flag is included here to demonstrate its use.
|
by default we operate in `light` mode but the flag is included here to demonstrate its use.
|
||||||
|
|
||||||
The example config we link to in this example watches two contracts, the ENS Registry (0x314159265dD8dbb310642f98f50C066173C1259b) and TrueUSD (0x8dd5fbCe2F6a956C3022bA3663759011Dd51e73E).
|
The example config we link to in this example watches two contracts, the ENS Registry (0x314159265dD8dbb310642f98f50C066173C1259b) and TrueUSD (0x8dd5fbCe2F6a956C3022bA3663759011Dd51e73E).
|
||||||
|
@ -46,7 +46,7 @@ Requires a .toml config file:
|
|||||||
port = 5432
|
port = 5432
|
||||||
|
|
||||||
[client]
|
[client]
|
||||||
ipcPath = "https://mainnet.infura.io/J5Vd2fRtGsw0zZ0Ov3BL"
|
ipcPath = "path_to_ethjson_rpc"
|
||||||
|
|
||||||
[contract]
|
[contract]
|
||||||
network = ""
|
network = ""
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[database]
|
[database]
|
||||||
name = "vulcanize_infura"
|
name = "vulcanize_public"
|
||||||
hostname = "localhost"
|
hostname = "localhost"
|
||||||
port = 5432
|
port = 5432
|
||||||
|
|
||||||
[client]
|
[client]
|
||||||
ipcPath = "https://mainnet.infura.io/J5Vd2fRtGsw0zZ0Ov3BL"
|
ipcPath = "path_to_ethjson_rpc"
|
||||||
|
|
||||||
[contract]
|
[contract]
|
||||||
network = ""
|
network = ""
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[database]
|
[database]
|
||||||
name = "vulcanize_public"
|
name = "vulcanize_public"
|
||||||
hostname = "localhost"
|
hostname = "localhost"
|
||||||
port = 5432
|
port = 5432
|
||||||
|
|
||||||
[client]
|
[client]
|
||||||
ipcPath = "https://mainnet.infura.io/J5Vd2fRtGsw0zZ0Ov3BL"
|
ipcPath = "https://mainnet.infura.io/J5Vd2fRtGsw0zZ0Ov3BL"
|
@ -1,7 +1,7 @@
|
|||||||
[database]
|
[database]
|
||||||
name = "vulcanize_private"
|
name = "vulcanize_private"
|
||||||
hostname = "localhost"
|
hostname = "localhost"
|
||||||
port = 5432
|
port = 5432
|
||||||
|
|
||||||
[client]
|
[client]
|
||||||
ipcPath = "http://127.0.0.1:7545"
|
ipcPath = "http://127.0.0.1:7545"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[database]
|
[database]
|
||||||
name = "vulcanize_public"
|
name = "vulcanize_public"
|
||||||
hostname = "localhost"
|
hostname = "localhost"
|
||||||
port = 5432
|
port = 5432
|
||||||
|
|
||||||
[client]
|
[client]
|
||||||
ipcPath = <local node's IPC filepath>
|
ipcPath = <local node's IPC filepath>
|
||||||
levelDbPath = <local node's LevelDB chaindata filepath>
|
levelDbPath = <local node's LevelDB chaindata filepath>
|
||||||
|
@ -28,15 +28,16 @@ import (
|
|||||||
"github.com/vulcanize/vulcanizedb/pkg/geth/client"
|
"github.com/vulcanize/vulcanizedb/pkg/geth/client"
|
||||||
rpc2 "github.com/vulcanize/vulcanizedb/pkg/geth/converters/rpc"
|
rpc2 "github.com/vulcanize/vulcanizedb/pkg/geth/converters/rpc"
|
||||||
"github.com/vulcanize/vulcanizedb/pkg/geth/node"
|
"github.com/vulcanize/vulcanizedb/pkg/geth/node"
|
||||||
|
"github.com/vulcanize/vulcanizedb/test_config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Interface Getter", func() {
|
var _ = Describe("Interface Getter", func() {
|
||||||
Describe("GetAbi", func() {
|
Describe("GetAbi", func() {
|
||||||
It("Constructs and returns a custom abi based on results from supportsInterface calls", func() {
|
It("Constructs and returns a custom abi based on results from supportsInterface calls", func() {
|
||||||
expectedABI := `[` + constants.AddrChangeInterface + `,` + constants.NameChangeInterface + `,` + constants.ContentChangeInterface + `,` + constants.AbiChangeInterface + `,` + constants.PubkeyChangeInterface + `]`
|
expectedABI := `[` + constants.AddrChangeInterface + `,` + constants.NameChangeInterface + `,` + constants.ContentChangeInterface + `,` + constants.AbiChangeInterface + `,` + constants.PubkeyChangeInterface + `]`
|
||||||
|
con := test_config.InfuraClient
|
||||||
|
infuraIPC := con.IPCPath
|
||||||
blockNumber := int64(6885696)
|
blockNumber := int64(6885696)
|
||||||
infuraIPC := "https://mainnet.infura.io/v3/b09888c1113640cc9ab42750ce750c05"
|
|
||||||
rawRpcClient, err := rpc.Dial(infuraIPC)
|
rawRpcClient, err := rpc.Dial(infuraIPC)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
rpcClient := client.NewRpcClient(rawRpcClient, infuraIPC)
|
rpcClient := client.NewRpcClient(rawRpcClient, infuraIPC)
|
||||||
|
@ -34,6 +34,7 @@ import (
|
|||||||
"github.com/vulcanize/vulcanizedb/pkg/geth/client"
|
"github.com/vulcanize/vulcanizedb/pkg/geth/client"
|
||||||
rpc2 "github.com/vulcanize/vulcanizedb/pkg/geth/converters/rpc"
|
rpc2 "github.com/vulcanize/vulcanizedb/pkg/geth/converters/rpc"
|
||||||
"github.com/vulcanize/vulcanizedb/pkg/geth/node"
|
"github.com/vulcanize/vulcanizedb/pkg/geth/node"
|
||||||
|
"github.com/vulcanize/vulcanizedb/test_config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TransferLog struct {
|
type TransferLog struct {
|
||||||
@ -106,22 +107,9 @@ type Owner struct {
|
|||||||
Address string `db:"returned"`
|
Address string `db:"returned"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetupBC() core.BlockChain {
|
|
||||||
infuraIPC := "https://mainnet.infura.io/v3/b09888c1113640cc9ab42750ce750c05"
|
|
||||||
rawRpcClient, err := rpc.Dial(infuraIPC)
|
|
||||||
Expect(err).NotTo(HaveOccurred())
|
|
||||||
rpcClient := client.NewRpcClient(rawRpcClient, infuraIPC)
|
|
||||||
ethClient := ethclient.NewClient(rawRpcClient)
|
|
||||||
blockChainClient := client.NewEthClient(ethClient)
|
|
||||||
node := node.MakeNode(rpcClient)
|
|
||||||
transactionConverter := rpc2.NewRpcTransactionConverter(ethClient)
|
|
||||||
blockChain := geth.NewBlockChain(blockChainClient, rpcClient, node, transactionConverter)
|
|
||||||
|
|
||||||
return blockChain
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetupDBandBC() (*postgres.DB, core.BlockChain) {
|
func SetupDBandBC() (*postgres.DB, core.BlockChain) {
|
||||||
infuraIPC := "https://mainnet.infura.io/v3/b09888c1113640cc9ab42750ce750c05"
|
con := test_config.InfuraClient
|
||||||
|
infuraIPC := con.IPCPath
|
||||||
rawRpcClient, err := rpc.Dial(infuraIPC)
|
rawRpcClient, err := rpc.Dial(infuraIPC)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
rpcClient := client.NewRpcClient(rawRpcClient, infuraIPC)
|
rpcClient := client.NewRpcClient(rawRpcClient, infuraIPC)
|
||||||
|
Loading…
Reference in New Issue
Block a user