Skip to content

Conversation

@briansztamfater
Copy link
Contributor

NONEVM-2205

CCIPProvider and ContractTransmitter implementation

return fmt.Errorf("failed to generate ed25519 call data: %w", err)
}
} else {
return errors.New("no calldata function")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a constructor and check this there?

Mode: wallet.PayGasSeparately,
FromWallet: *c.fromWallet,
ContractAddress: *address.MustParseAddr(contract),
// Body: , fill me
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the report will be encoded as BOC, we'll likely need to decode it, then pack it together with other args (signatures)

}
var sigBytes [96]byte
copy(sigBytes[:], sig)
signatures = append(signatures, sigBytes)
Copy link
Collaborator

Choose a reason for hiding this comment

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

You you should construct types from the bindings, so the payload can be serialized: https://github.com/smartcontractkit/chainlink-ton/blob/main/pkg/ccip/bindings/plugin/commitreport.go

I think we're still missing the top level type for Commit/Execute that will hold report+signatures

@briansztamfater briansztamfater force-pushed the NONEVM-2035-relayer-setup branch 5 times, most recently from 37e39c6 to 8003f24 Compare July 30, 2025 01:22
Base automatically changed from NONEVM-2035-relayer-setup to main July 30, 2025 02:01
@briansztamfater briansztamfater force-pushed the NONEVM-2205-ccip-provider-transmitter branch from 156bf07 to f187dc0 Compare July 30, 2025 13:37
@nicolasgnr nicolasgnr requested a review from ogtownsend July 30, 2025 14:59
@briansztamfater briansztamfater force-pushed the NONEVM-2205-ccip-provider-transmitter branch from 8265c71 to b780161 Compare July 30, 2025 23:36
@briansztamfater briansztamfater force-pushed the NONEVM-2205-ccip-provider-transmitter branch from b780161 to ba10142 Compare July 30, 2025 23:49
@briansztamfater briansztamfater changed the title [WIP] feat(relayer): ccip provider and contract transmitter feat(relayer): ccip provider and contract transmitter Jul 31, 2025
@briansztamfater briansztamfater marked this pull request as ready for review July 31, 2025 02:00
cp := &Provider{
lggr: logger.Named(lggr, CCIPProviderName),
ct: ct,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: want to toss a TODO: implement in here for chain accessor ca?

}

func NewCCIPProvider(lggr logger.Logger, txm txm.TxManager) (*Provider, error) {
ct, err := ocr.NewCCIPTransmitter(txm, lggr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's still a little unclear to me how we're going to split between commit vs exec ToEd25519CalldataFunc if we're only creating one transmitter and we're not passing it in here or during Transmit(). cc @archseer

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we can define some type inside of contract_transmitter.go to distinguish them? But we'd still need to set that somehow

Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably we'll need to have ton_contract_transmitter_factory.go in https://github.com/smartcontractkit/chainlink/tree/develop/core/capabilities/ccip/ocrimpls ?

FromWallet: w,
ContractAddress: *address.MustParseAddr(c.offrampAddress),
Body: body,
Amount: tlb.MustFromTON("0.05"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would we want to have an ability to configure this?

}

func NewCCIPProvider(lggr logger.Logger, txm txm.TxManager) (*Provider, error) {
ct, err := ocr.NewCCIPTransmitter(txm, lggr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably we'll need to have ton_contract_transmitter_factory.go in https://github.com/smartcontractkit/chainlink/tree/develop/core/capabilities/ccip/ocrimpls ?

services.StateMachine
}

func NewCCIPProvider(lggr logger.Logger, txm txm.TxManager) (*Provider, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

iirc, do we also need to initialize TON accessor here as well?

@archseer archseer merged commit 020e0fa into main Aug 14, 2025
19 checks passed
@archseer archseer deleted the NONEVM-2205-ccip-provider-transmitter branch August 14, 2025 06:22
type ccipTransmitter struct {
txm txm.TxManager
offrampAddress string
toEd25519CalldataFn ToEd25519CalldataFunc
Copy link
Collaborator

Choose a reason for hiding this comment

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

When is this set?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also why do we need this fn? Why don't we just configure the transmitter with the address and method, and encode input args ourselves as this is a TON-CCIP-specific transmitter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants