Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
771bce7
Dynamic msg TL-B - JSON decoding
krebernisak Oct 23, 2025
7654441
Add chainlink-ton-extras pkg
krebernisak Oct 23, 2025
4c8886b
Extract opcode from tlb tags
krebernisak Oct 23, 2025
069989a
Decode *cell.Cell (generic) fields recursively
krebernisak Oct 23, 2025
3082ed9
Add DecodeJSONMapFromCell tests
krebernisak Oct 23, 2025
8e4d7e7
Lint fix
krebernisak Oct 23, 2025
7f7f945
Decode wallet.AskToTransfer with known FwdPayload type
krebernisak Oct 24, 2025
2160379
Refactor Jetton msg JSON decoder
krebernisak Oct 24, 2025
6531c7e
Remove unused payloadDecoders
krebernisak Oct 24, 2025
426bc23
Add and test MCMS/Timelock JSON decoder
krebernisak Oct 24, 2025
6ef8773
Refactor JSON decoder to support nested SnakeRef array decoding
krebernisak Oct 24, 2025
8dc961d
Add to mcms.Execute JSON decoding test
krebernisak Oct 24, 2025
5b14152
Refactor error code definitions - use stringer codegen
krebernisak Oct 27, 2025
568b8c1
More ErrorCode type refactor
krebernisak Oct 27, 2025
06b57d7
Bring back decoder nesting to fix explorer rendering
krebernisak Oct 27, 2025
333600b
Fix lint error, add ExitCodeInfo
krebernisak Oct 27, 2025
de18497
Add tvm.NewExitCodeFromRange fn
krebernisak Oct 27, 2025
4364e12
Add TestDecodeJSONMapFromCellIteratively
krebernisak Oct 27, 2025
8a3ed62
Add func NewExitCodeFromSet
krebernisak Oct 27, 2025
028c52c
Add TLBs double decoding (main + ctx)
krebernisak Oct 27, 2025
da85496
Unify lib.NewMessageInfoFromCell
krebernisak Oct 27, 2025
92c4de4
Add Error prefix
krebernisak Oct 28, 2025
0b9c3b0
Fix nil cases
krebernisak Oct 28, 2025
fc3f5ed
Add RBAC contract TLBs
krebernisak Oct 28, 2025
26663f5
Update lock.nix
krebernisak Oct 28, 2025
1d4a4cc
Lint fix
krebernisak Oct 28, 2025
1b75e7f
Remove cmd/explorer/explorer bin
krebernisak Oct 28, 2025
d9b7d53
go generate CI check
krebernisak Oct 28, 2025
39a09e8
Remove dep github.com/smartcontractkit/chainlink-deployments-framewor…
krebernisak Oct 29, 2025
104ffd4
Fix jetton tests
krebernisak Oct 29, 2025
f276ea3
Add func DecodeTLBStructKeys to return orderd set of TL-B struct keys
krebernisak Oct 29, 2025
91ed9bc
Continue on empty key
krebernisak Oct 29, 2025
5a0436d
Use *address.Address
krebernisak Oct 30, 2025
8eb094c
Bump vendor hash
krebernisak Nov 4, 2025
23c67c5
go mod tidy
krebernisak Nov 4, 2025
99615d3
run modgraph
krebernisak Nov 4, 2025
3c7fe5b
Fix integration test
krebernisak Nov 5, 2025
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
10 changes: 10 additions & 0 deletions .github/workflows/relayer-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,13 @@ jobs:
nix develop -c ./modgraph > go.md
git add --all
git diff --minimal --cached --exit-code

- name: Ensure go generate output is up to date
run: |
nix develop -c go generate ./...
git add --all
if ! git diff --minimal --cached --exit-code; then
echo "::error::Running 'go generate' produced uncommitted changes."
echo "Please run 'go generate ./...' and commit the results."
exit 1
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ docs/local/**
node_modules/

# Go build artifacts
/chainlink-ton
/cmd/chainlink-ton/chainlink-ton
/cmd/explorer/explorer

# macOS Finder metadata
.DS_Store
Expand Down
57 changes: 57 additions & 0 deletions cmd/chainlink-ton-extras/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
pkgs,
rev,
}: let
lock = pkgs.callPackage ./lock.nix {inherit pkgs;};
package-info = builtins.fromJSON (builtins.readFile ../../pkg/package.json);

# Fetch karalabe/hid for HIDAPI C sources and headers
karalabe-hid = pkgs.fetchFromGitHub {
owner = "karalabe";
repo = "hid";
rev = "821c38d2678e741180ec60b2512b408fa8bab99e";
sha256 = "sha256-z3KSqKrIoy6WR2HUPjKJEm93NvuN0m9Edcq5BtGO5yA=";
};
in
pkgs.buildGo124Module rec {
inherit (package-info) version;
pname = "chainlink-ton-extras";

# source at the root of the module
src = ./../..;
subPackages = ["cmd/explorer"];

nativeBuildInputs = [pkgs.gcc pkgs.pkg-config];
buildInputs = [pkgs.libusb1]; # for Linux builds
# Export CGO_CFLAGS so the C compiler can find vendored hidapi sources
preBuild = ''
export CGO_ENABLED=1

# Ensure the C compiler can find hidapi headers:
# point directly at the hidapi/hidapi subdir which contains hidapi.h
export CGO_CFLAGS="-I${karalabe-hid}/hidapi/hidapi -I${karalabe-hid} -I${pkgs.libusb1}/include"

export CGO_LDFLAGS="-L${pkgs.libusb1}/lib -lusb-1.0"
'';

ldflags = [
"-X main.Version=${package-info.version}"
"-X main.GitCommit=${rev}"
];

# pin the vendor hash (update using 'pkgs.lib.fakeHash')
vendorHash = lock.chainlink-ton-extras;

# postInstall script to write version and rev to share folder
postInstall = ''
mkdir $out/share
echo ${package-info.version} > $out/share/.version
echo ${rev} > $out/share/.rev
'';

meta = with pkgs.lib; {
inherit (package-info) description;
license = licenses.mit;
changelog = "https://github.com/smartcontractkit/chainlink-ton/releases/tag/v${version}";
};
}
5 changes: 5 additions & 0 deletions cmd/chainlink-ton-extras/lock.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Notice: `pkgs.lib.fakeHash` can be used as a placeholder,
# but `nix-lock-tidy` will only replace actual hashes.
{pkgs}: {
chainlink-ton-extras = "sha256-Qp23zuGQmZrNGly0QyyXqMUBxvH5OwtNAg+TriPn3TQ=";
}
2 changes: 1 addition & 1 deletion cmd/chainlink-ton/lock.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Notice: `pkgs.lib.fakeHash` can be used as a placeholder,
# but `nix-lock-tidy` will only replace actual hashes.
{pkgs}: {
chainlink-ton = "sha256-3H+Dd4lyt55O+67g0lFVwxikV8symRw86R8CMT0wFDc=";
chainlink-ton = "sha256-Qp23zuGQmZrNGly0QyyXqMUBxvH5OwtNAg+TriPn3TQ=";
}
5 changes: 2 additions & 3 deletions cmd/explorer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import (
"fmt"
"os"

"github.com/smartcontractkit/chainlink-deployments-framework/deployment"

"github.com/smartcontractkit/chainlink-ton/pkg/ton/debug"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/debug/explorer"
)

var rootCmd = explorer.GenerateExplorerCmd(nil, map[string]deployment.TypeAndVersion{}, nil)
var rootCmd = explorer.GenerateExplorerCmd(nil, map[string]debug.TypeAndVersion{}, nil)

func main() {
if err := rootCmd.Execute(); err != nil {
Expand Down
Empty file added deployment/go.md
Empty file.
10 changes: 10 additions & 0 deletions docs/.misc/dev-guides/explorer/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ Three ways to run:
2. **Hash + Address**: `./explorer <tx-hash> <address>`
3. **Hash only**: `./explorer <tx-hash>` (testnet/mainnet only)

## Run with Nix

The `explorer` binary is packaged with `chainlink-ton-extras` pkg bundle.

We can start a dev shell including specific pkg contents and execute a bash cmd:

```bash
nix shell .#chainlink-ton-extras -c explorer https://testnet.tonscan.org/tx/<tx-hash>
```

## Build

```bash
Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

# Resolve root module
chainlink-ton = pkgs.callPackage ./cmd/chainlink-ton commonArgs;
chainlink-ton-extras = pkgs.callPackage ./cmd/chainlink-ton-extras commonArgs;
# Resolve sub-modules
contracts = pkgs.callPackage ./contracts commonArgs;
integration-tests = pkgs.callPackage ./integration-tests {
Expand Down Expand Up @@ -82,6 +83,7 @@
{
# Chainlink core node plugin (default + alias)
inherit chainlink-ton;
inherit chainlink-ton-extras;
default = chainlink-ton;
# Dependency analyzer
dependency-analyzer = dependency-analyzer.packages.default;
Expand Down
64 changes: 4 additions & 60 deletions go.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@
```mermaid
flowchart LR

ccip-owner-contracts
click ccip-owner-contracts href "https://github.com/smartcontractkit/ccip-owner-contracts"
chain-selectors
click chain-selectors href "https://github.com/smartcontractkit/chain-selectors"
chainlink-aptos --> chainlink-common
click chainlink-aptos href "https://github.com/smartcontractkit/chainlink-aptos"
chainlink-ccip --> chainlink-common
chainlink-ccip --> chainlink-protos/rmn/v1.6/go
click chainlink-ccip href "https://github.com/smartcontractkit/chainlink-ccip"
chainlink-ccip/chains/solana --> chainlink-ccip
chainlink-ccip/chains/solana --> chainlink-ccip/chains/solana/gobindings
click chainlink-ccip/chains/solana href "https://github.com/smartcontractkit/chainlink-ccip"
chainlink-ccip/chains/solana/gobindings
click chainlink-ccip/chains/solana/gobindings href "https://github.com/smartcontractkit/chainlink-ccip"
chainlink-common --> chain-selectors
chainlink-common --> chainlink-common/pkg/chipingress
chainlink-common --> chainlink-protos/billing/go
Expand All @@ -29,86 +20,42 @@ flowchart LR
click chainlink-common href "https://github.com/smartcontractkit/chainlink-common"
chainlink-common/pkg/chipingress
click chainlink-common/pkg/chipingress href "https://github.com/smartcontractkit/chainlink-common"
chainlink-common/pkg/values
click chainlink-common/pkg/values href "https://github.com/smartcontractkit/chainlink-common"
chainlink-deployments-framework --> ccip-owner-contracts
chainlink-deployments-framework --> chainlink-protos/chainlink-catalog
chainlink-deployments-framework --> chainlink-protos/job-distributor
chainlink-deployments-framework --> chainlink-testing-framework/seth
chainlink-deployments-framework --> chainlink-tron/relayer
chainlink-deployments-framework --> mcms
click chainlink-deployments-framework href "https://github.com/smartcontractkit/chainlink-deployments-framework"
chainlink-protos/billing/go
click chainlink-protos/billing/go href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/chainlink-catalog
click chainlink-protos/chainlink-catalog href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/cre/go
click chainlink-protos/cre/go href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/job-distributor
click chainlink-protos/job-distributor href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/rmn/v1.6/go
click chainlink-protos/rmn/v1.6/go href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/storage-service
click chainlink-protos/storage-service href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/workflows/go
click chainlink-protos/workflows/go href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-sui --> chainlink-aptos
chainlink-sui --> chainlink-ccip
chainlink-sui --> chainlink-common/pkg/values
click chainlink-sui href "https://github.com/smartcontractkit/chainlink-sui"
chainlink-testing-framework/framework
click chainlink-testing-framework/framework href "https://github.com/smartcontractkit/chainlink-testing-framework"
chainlink-testing-framework/seth
click chainlink-testing-framework/seth href "https://github.com/smartcontractkit/chainlink-testing-framework"
chainlink-ton --> chainlink-deployments-framework
chainlink-ton --> chainlink-ccip
click chainlink-ton href "https://github.com/smartcontractkit/chainlink-ton"
chainlink-tron/relayer --> chainlink-common
chainlink-tron/relayer --> chainlink-common/pkg/values
click chainlink-tron/relayer href "https://github.com/smartcontractkit/chainlink-tron"
freeport
click freeport href "https://github.com/smartcontractkit/freeport"
grpc-proxy
click grpc-proxy href "https://github.com/smartcontractkit/grpc-proxy"
libocr
click libocr href "https://github.com/smartcontractkit/libocr"
mcms --> chainlink-ccip/chains/solana
mcms --> chainlink-sui
mcms --> chainlink-testing-framework/framework
click mcms href "https://github.com/smartcontractkit/mcms"

subgraph chainlink-ccip-repo[chainlink-ccip]
chainlink-ccip
chainlink-ccip/chains/solana
chainlink-ccip/chains/solana/gobindings
end
click chainlink-ccip-repo href "https://github.com/smartcontractkit/chainlink-ccip"

subgraph chainlink-common-repo[chainlink-common]
chainlink-common
chainlink-common/pkg/chipingress
chainlink-common/pkg/values
end
click chainlink-common-repo href "https://github.com/smartcontractkit/chainlink-common"

subgraph chainlink-protos-repo[chainlink-protos]
chainlink-protos/billing/go
chainlink-protos/chainlink-catalog
chainlink-protos/cre/go
chainlink-protos/job-distributor
chainlink-protos/rmn/v1.6/go
chainlink-protos/storage-service
chainlink-protos/workflows/go
end
click chainlink-protos-repo href "https://github.com/smartcontractkit/chainlink-protos"

subgraph chainlink-testing-framework-repo[chainlink-testing-framework]
chainlink-testing-framework/framework
chainlink-testing-framework/seth
end
click chainlink-testing-framework-repo href "https://github.com/smartcontractkit/chainlink-testing-framework"

classDef outline stroke-dasharray:6,fill:none;
class chainlink-ccip-repo,chainlink-common-repo,chainlink-protos-repo,chainlink-testing-framework-repo outline
class chainlink-common-repo,chainlink-protos-repo outline
```
## All modules
```mermaid
Expand Down Expand Up @@ -156,7 +103,6 @@ flowchart LR
chainlink-data-streams --> chainlink-common
click chainlink-data-streams href "https://github.com/smartcontractkit/chainlink-data-streams"
chainlink-deployments-framework --> ccip-owner-contracts
chainlink-deployments-framework --> chainlink-protos/chainlink-catalog
chainlink-deployments-framework --> chainlink-protos/job-distributor
chainlink-deployments-framework --> chainlink-protos/op-catalog
chainlink-deployments-framework --> chainlink-testing-framework/seth
Expand All @@ -183,8 +129,6 @@ flowchart LR
click chainlink-framework/multinode href "https://github.com/smartcontractkit/chainlink-framework"
chainlink-protos/billing/go --> chainlink-protos/workflows/go
click chainlink-protos/billing/go href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/chainlink-catalog
click chainlink-protos/chainlink-catalog href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/cre/go
click chainlink-protos/cre/go href "https://github.com/smartcontractkit/chainlink-protos"
chainlink-protos/job-distributor
Expand Down Expand Up @@ -223,7 +167,7 @@ flowchart LR
click chainlink-testing-framework/parrot href "https://github.com/smartcontractkit/chainlink-testing-framework"
chainlink-testing-framework/seth
click chainlink-testing-framework/seth href "https://github.com/smartcontractkit/chainlink-testing-framework"
chainlink-ton --> chainlink-deployments-framework
chainlink-ton --> chainlink-ccip
click chainlink-ton href "https://github.com/smartcontractkit/chainlink-ton"
chainlink-ton/deployment --> chainlink-ccip/deployment
chainlink-ton/deployment --> chainlink-ton
Expand All @@ -248,6 +192,7 @@ flowchart LR
chainlink/v2 --> chainlink-feeds
chainlink/v2 --> chainlink-protos/orchestrator
chainlink/v2 --> chainlink-solana
chainlink/v2 --> chainlink-sui
chainlink/v2 --> chainlink-ton
chainlink/v2 --> cre-sdk-go
chainlink/v2 --> cre-sdk-go/capabilities/networking/http
Expand Down Expand Up @@ -324,7 +269,6 @@ flowchart LR

subgraph chainlink-protos-repo[chainlink-protos]
chainlink-protos/billing/go
chainlink-protos/chainlink-catalog
chainlink-protos/cre/go
chainlink-protos/job-distributor
chainlink-protos/linking-service/go
Expand Down
Loading
Loading