Skip to content
Draft
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
2 changes: 1 addition & 1 deletion relayer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ require (
)

// original author is not maintaining the repo anymore
replace github.com/fbsobreira/gotron-sdk => github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.4
replace github.com/fbsobreira/gotron-sdk => ./gotron-sdk
2 changes: 0 additions & 2 deletions relayer/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgn
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250718143957-41236f9ef8b4 h1:hPKEslzkVA2HUuqwGc6w594EWYnJFp5jXmAoBu3VryE=
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250718143957-41236f9ef8b4/go.mod h1:U1UAbPhy6D7Qz0wHKGPoQO+dpR0hsYjgUz8xwRrmKwI=
github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.4 h1:J4qtAo0ZmgX5pIr8Y5mdC+J2rj2e/6CTUC263t6mGOM=
github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.4/go.mod h1:4WhGgCA0smBbBud5mK+jnDb2wwndMvoqaWBJ3OV/7Bw=
github.com/smartcontractkit/freeport v0.1.1 h1:B5fhEtmgomdIhw03uPVbVTP6oPv27fBhZsoZZMSIS8I=
github.com/smartcontractkit/freeport v0.1.1/go.mod h1:T4zH9R8R8lVWKfU7tUvYz2o2jMv1OpGCdpY2j2QZXzU=
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs=
Expand Down
18 changes: 18 additions & 0 deletions relayer/gotron-sdk/pkg/http/fullnode/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ func (tc *Client) TriggerSmartContract(from, contractAddress address.Address, me
return &contractResponse, nil
}

func (tc *Client) TriggerSmartContractWithData(from, contractAddress address.Address, data string, feeLimit int32, tAmount int64) (*TriggerSmartContractResponse, error) {
tcRequest := TriggerSmartContractRequest{
OwnerAddress: from.String(),
ContractAddress: contractAddress.String(),
Data: data,
FeeLimit: feeLimit,
CallValue: tAmount,
Visible: true,
}
contractResponse := TriggerSmartContractResponse{}
err := tc.Post("/triggersmartcontract", tcRequest, &contractResponse)
if err != nil {
return nil, err
}

return &contractResponse, nil
}

type BroadcastResponse struct {
Result bool `json:"result"`
Code string `json:"code"`
Expand Down
32 changes: 31 additions & 1 deletion relayer/mocks/CombinedClient.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion relayer/mocks/FullNodeClient.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions relayer/sdk/full_node_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type FullNodeClient interface {
DeployContract(ownerAddress address.Address, contractName, abiJson, bytecode string, oeLimit, curPercent, feeLimit int, params []interface{}) (*fullnode.DeployContractResponse, error)
GetContract(address address.Address) (*fullnode.GetContractResponse, error)
TriggerSmartContract(from, contractAddress address.Address, method string, params []any, feeLimit int32, tAmount int64) (*fullnode.TriggerSmartContractResponse, error)
TriggerSmartContractWithData(from, contractAddress address.Address, data string, feeLimit int32, tAmount int64) (*fullnode.TriggerSmartContractResponse, error)
Transfer(fromAddress, toAddress address.Address, amount int64) (*common.Transaction, error)
BroadcastTransaction(reqBody *common.Transaction) (*fullnode.BroadcastResponse, error)
GetEnergyPrices() (*fullnode.EnergyPrices, error)
Expand Down
Loading