Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init services/explorer #174

Closed
wants to merge 4 commits into from
Closed

init services/explorer #174

wants to merge 4 commits into from

Conversation

nautsimon
Copy link
Contributor

Description

Issue: #167
PoIs: @trajan0x

This PR inits services/explorer, an indexer and a service platform analytics. The specifics are as follows:

  • basic contract generation via abigen (for contracts outlined in #167)
  • basic config settings
  • basic implementation of cli
  • placeholders for db

To Do

  • Verify Abigen process, add indexing functionality
  • Integrate with scribe api
  • More in #167

Added basic contract generation via abigen, basic config settings, implemented basic cli infra, added placeholders for things like db.
@github-actions github-actions bot added the go Pull requests that update Go code label Sep 7, 2022
Copy link
Contributor

@trajan0x trajan0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw- let's add this to the go.yml/goreleaser.yaml workflow

@@ -0,0 +1,2515 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this generated somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah its generated from a solidity contract flattener, should I remove? Just sent a question about this over slack


go 1.19

replace github.com/synapsecns/synapse-contracts v0.0.0-20220822000752-397774c0ecad => ./external/synapse-contracts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need a go replace here since this isn't a go mod

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, this is a leftover from some testing I was doing with making the contracts a sub module. will remove

package dev

import (
"github.com/synapsecns/sanguine/tools/abigen"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Underscore here

@@ -0,0 +1,2 @@
// Package explorer: indexer and analytics service.
package explorer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i addressed this in simonmahns/sanguine#1, but b/c main.go and doc.go are in the same folder, they need the same package name

@@ -0,0 +1 @@
./synapse-contracts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This'll error since it's a symbolic link loop:

image

Think this probably should be pointing to submodule?

@@ -0,0 +1,2 @@
external/synapse-contracts/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh - I see. I'm guessing the symbolic link loops exists b/c you're ignoring the submodule here so on a fresh clone, the gitmodule doesn't actually get put here. Would remove this - gitmodules won't commit the history for this submodule anyway

app.EnableBashCompletion = true

// commands
app.Commands = cli.Commands{infoCommand, backfillCommand, serverCommand}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nuke backfill/server- they don't exist yet

import (
"github.com/brianvoe/gofakeit/v6"
. "github.com/stretchr/testify/assert"
"github.com/synapsecns/sanguine/services/omnirpc/config"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be testing explorer:

"github.com/synapsecns/sanguine/services/explorer/config"

@@ -0,0 +1,33 @@
package swao
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package bridge

@github-actions github-actions bot added the M-ci Module: CI label Sep 7, 2022
@nautsimon nautsimon closed this by deleting the head repository Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code M-ci Module: CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants