Skip to content

Commit

Permalink
feat(job-distributor): support tron chain type on sync
Browse files Browse the repository at this point in the history
Able to sync TRON chain type from core node to JD

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1332
  • Loading branch information
graham-chainlink committed Dec 16, 2024
1 parent d0d9e8b commit 7d1008a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-cooks-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#updated feat(job-distributor): support tron chain type on sync
4 changes: 4 additions & 0 deletions core/services/feeds/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"gopkg.in/guregu/null.v4"

proto "github.com/smartcontractkit/chainlink-protos/orchestrator/feedsmanager"

"github.com/smartcontractkit/chainlink/v2/core/utils/crypto"
)

Expand Down Expand Up @@ -82,6 +83,7 @@ const (
ChainTypeEVM ChainType = "EVM"
ChainTypeSolana ChainType = "SOLANA"
ChainTypeStarknet ChainType = "STARKNET"
ChainTypeTron ChainType = "TRON"
)

func NewChainType(s string) (ChainType, error) {
Expand All @@ -94,6 +96,8 @@ func NewChainType(s string) (ChainType, error) {
return ChainTypeSolana, nil
case "APTOS":
return ChainTypeAptos, nil
case "TRON":
return ChainTypeTron, nil
default:
return ChainTypeUnknown, errors.New("invalid chain type")
}
Expand Down
5 changes: 5 additions & 0 deletions core/services/feeds/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ func Test_NewChainType(t *testing.T) {
give: "STARKNET",
want: ChainTypeStarknet,
},
{
name: "Tron Chain Type",
give: "TRON",
want: ChainTypeTron,
},
{
name: "Invalid Chain Type",
give: "",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ require (
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db
github.com/smartcontractkit/chainlink-feeds v0.1.1
github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2
github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0
github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8
github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241202141438-a90db35252db/go.mod h1:yjb9d4q7+m8aGbjfTbkNoNuA4PeSxcUszsSZHDrvS0E=
github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c=
github.com/smartcontractkit/chainlink-feeds v0.1.1/go.mod h1:55EZ94HlKCfAsUiKUTNI7QlE/3d3IwTlsU3YNa/nBb4=
github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2 h1:onBe3DqNrbtOAzKS4PrPIiJX65BGo1aYiYZxFVEW+jc=
github.com/smartcontractkit/chainlink-protos/orchestrator v0.3.2/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo=
github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ=
github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo=
github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0=
github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo=
github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4=
Expand Down

0 comments on commit 7d1008a

Please sign in to comment.