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

refactor(lib): remove unused folders #10

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ require (
github.com/syndtr/goleveldb v1.0.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0
go.uber.org/goleak v1.3.0
go.uber.org/mock v0.4.0
golang.org/x/sync v0.7.0 // indirect
golang.org/x/tools v0.21.0
Expand Down Expand Up @@ -244,7 +243,7 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gotest.tools/v3 v3.5.1
gotest.tools/v3 v3.5.1 // indirect
nhooyr.io/websocket v1.8.6 // indirect
pgregory.net/rapid v1.1.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
Expand Down
37 changes: 20 additions & 17 deletions lib/evmchain/evmchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package evmchain

import (
"time"

"github.com/piplabs/story/lib/tokens"
)

type Token string

const (
// Mainnets.
IDEthereum uint64 = 1
Expand All @@ -30,15 +30,18 @@ const (
IDMockOp uint64 = 1655
IDMockArb uint64 = 1656

iliadEVMName = "iliad_evm"
iliadEVMName = "story_evm"
iliadEVMBlockPeriod = time.Second * 2

IP Token = "IP"
ETH Token = "ETH"
)

type Metadata struct {
ChainID uint64
Name string
BlockPeriod time.Duration
NativeToken tokens.Token
NativeToken Token
}

func MetadataByID(chainID uint64) (Metadata, bool) {
Expand All @@ -61,78 +64,78 @@ var static = map[uint64]Metadata{
ChainID: IDEthereum,
Name: "ethereum",
BlockPeriod: 12 * time.Second,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDIliadMainnet: {
ChainID: IDIliadMainnet,
Name: iliadEVMName,
BlockPeriod: iliadEVMBlockPeriod,
NativeToken: tokens.ILIAD,
NativeToken: IP,
},
IDIliadTestnet: {
ChainID: IDIliadTestnet,
Name: iliadEVMName,
BlockPeriod: iliadEVMBlockPeriod,
NativeToken: tokens.ILIAD,
NativeToken: IP,
},
IDIliad: {
ChainID: IDIliad,
Name: iliadEVMName,
BlockPeriod: iliadEVMBlockPeriod,
NativeToken: tokens.ILIAD,
NativeToken: IP,
},
IDHolesky: {
ChainID: IDHolesky,
Name: "holesky",
BlockPeriod: 12 * time.Second,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDArbSepolia: {
ChainID: IDArbSepolia,
Name: "arb_sepolia",
BlockPeriod: 300 * time.Millisecond,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDOpSepolia: {
ChainID: IDOpSepolia,
Name: "op_sepolia",
BlockPeriod: 2 * time.Second,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDIliadEphemeral: {
ChainID: IDIliadEphemeral,
Name: iliadEVMName,
BlockPeriod: iliadEVMBlockPeriod,
NativeToken: tokens.ILIAD,
NativeToken: IP,
},
IDMockL1Fast: {
ChainID: IDMockL1Fast,
Name: "mock_l1",
BlockPeriod: time.Second,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDMockL1Slow: {
ChainID: IDMockL1Slow,
Name: "slow_l1",
BlockPeriod: time.Second * 12,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDMockL2: {
ChainID: IDMockL2,
Name: "mock_l2",
BlockPeriod: time.Second,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDMockOp: {
ChainID: IDMockOp,
Name: "mock_op",
BlockPeriod: time.Second * 2,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
IDMockArb: {
ChainID: IDMockArb,
Name: "mock_arb",
BlockPeriod: time.Second / 4,
NativeToken: tokens.ETH,
NativeToken: ETH,
},
}
14 changes: 0 additions & 14 deletions lib/fireblocks/README.md

This file was deleted.

149 changes: 0 additions & 149 deletions lib/fireblocks/account.go

This file was deleted.

Loading
Loading