Skip to content

Commit

Permalink
feat(source): implement near client, data source, core worker and LiN…
Browse files Browse the repository at this point in the history
…EAR worker (#524)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: polebug <[email protected]>
fix: missing near source

fix(monitor): init near source network client in monitor (#541)
  • Loading branch information
pseudoyu authored and kallydev committed Oct 12, 2024
1 parent 0361de6 commit 51c209f
Show file tree
Hide file tree
Showing 41 changed files with 2,122 additions and 140 deletions.
8 changes: 4 additions & 4 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1268,13 +1268,13 @@
"description": "A tag used to categorize activities.",
"type": "string",
"example": "transaction",
"enum": ["collectible","exchange","metaverse","rss","social","transaction","unknown"]
"enum": ["collectible","exchange","governance","metaverse","rss","social","transaction","unknown"]
},
"Type": {
"description": "A type used to categorize activities, it must be present with a tag.",
"type": "string",
"example": "transfer",
"enum": ["approval","bridge","burn","comment","delete","feed","liquidity","mint","post","profile","proxy","revise","reward","share","staking","swap","trade","transfer","unknown"]
"enum": ["approval","auction","bridge","burn","comment","delete","feed","liquidity","loan","mint","post","profile","proposal","proxy","revise","reward","share","staking","swap","trade","transfer","unknown","vote"]
},
"To": {
"description": "The address to which the action is directed.",
Expand All @@ -1284,13 +1284,13 @@
"description": "The network on which activities occur.",
"type": "string",
"example": "ethereum",
"enum": ["arbitrum","arweave","avax","base","binance-smart-chain","crossbell","ethereum","farcaster","gnosis","linea","mastodon","optimism","polygon","vsl","x-layer"]
"enum": ["arbitrum","arweave","avax","base","binance-smart-chain","crossbell","ethereum","farcaster","gnosis","linea","mastodon","near","optimism","polygon","vsl","x-layer"]
},
"Platform": {
"description": "The platform on which activities occur.",
"type": "string",
"example": "Uniswap",
"enum": ["1inch","AAVE","Aavegotchi","Crossbell","Curve","ENS","Farcaster","Highlight","IQWiki","KiwiStand","Lens","Lido","LooksRare","Matters","Mirror","OpenSea","Optimism","Paragraph","RSS3","SAVM","Stargate","Uniswap","Unknown","VSL"]
"enum": ["1inch","AAVE","Aavegotchi","Arbitrum","Base","BendDAO","Cow","Crossbell","Curve","ENS","Farcaster","Highlight","IQWiki","KiwiStand","Lens","LiNEAR","Lido","Linear","LooksRare","Matters","Mirror","Nouns","OpenSea","Optimism","Paragraph","Paraswap","RSS3","SAVM","Stargate","Uniswap","Unknown","VSL"]
},
"Timestamp": {
"description": "The timestamp of when the activity occurred.",
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rss3-network/protocol-go v0.5.6 h1:YBANVsOP9sW5i/1ghFc3zSqlNyTl1ug8FTZeNDRaklI=
github.com/rss3-network/protocol-go v0.5.6/go.mod h1:npcyduWt86uVbIi77xQaYk8eqltI9XNjk1FMGpjyIq0=
github.com/rss3-network/protocol-go v0.5.8 h1:w3XCFrqvNTXGHVCKM50rdmhgnj7BxY0+7FSGVvGCJeY=
github.com/rss3-network/protocol-go v0.5.8/go.mod h1:npcyduWt86uVbIi77xQaYk8eqltI9XNjk1FMGpjyIq0=
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
Expand Down
3 changes: 3 additions & 0 deletions internal/engine/source/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/rss3-network/node/internal/engine/source/arweave"
"github.com/rss3-network/node/internal/engine/source/ethereum"
"github.com/rss3-network/node/internal/engine/source/farcaster"
"github.com/rss3-network/node/internal/engine/source/near"
"github.com/rss3-network/protocol-go/schema/network"
)

Expand All @@ -22,6 +23,8 @@ func New(config *config.Module, sourceFilter engine.DataSourceFilter, checkpoint
return arweave.NewSource(config, sourceFilter, checkpoint, redisClient)
case network.FarcasterSource:
return farcaster.NewSource(config, checkpoint, databaseClient)
case network.NearSource:
return near.NewSource(config, sourceFilter, checkpoint, redisClient)
default:
return nil, fmt.Errorf("unsupported network source %s", config.Network)
}
Expand Down
Loading

0 comments on commit 51c209f

Please sign in to comment.