From 7a0503ec1c9b55d82798bc5d8d65d83846f976b0 Mon Sep 17 00:00:00 2001 From: klaidliadon <5322228+klaidliadon@users.noreply.github.com> Date: Thu, 11 Dec 2025 10:54:44 +0000 Subject: [PATCH 01/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 06a88147..0c1b6fa2 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 7f8a4b83b00e0b6849c76c2ff0e23931e26b3d9f +// sequence-relayer v0.4.1 f192d958d77a781a356ee57948513c11a0a10cf8 // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "7f8a4b83b00e0b6849c76c2ff0e23931e26b3d9f" + return "f192d958d77a781a356ee57948513c11a0a10cf8" } // @@ -1705,10 +1705,11 @@ var ( ErrRateLimited = WebRPCError{Code: 1007, Name: "RateLimited", Message: "Rate-limited. Please slow down.", HTTPStatus: 429} ErrProjectNotFound = WebRPCError{Code: 1008, Name: "ProjectNotFound", Message: "Project not found", HTTPStatus: 401} ErrAccessKeyNotFound = WebRPCError{Code: 1101, Name: "AccessKeyNotFound", Message: "Access key not found", HTTPStatus: 401} - ErrAccessKeyMismatch = WebRPCError{Code: 1102, Name: "AccessKeyMismatch", Message: "Access key mismatch", HTTPStatus: 409} + ErrAccessKeyMismatch = WebRPCError{Code: 1102, Name: "AccessKeyMismatch", Message: "Access key mismatch", HTTPStatus: 403} ErrInvalidOrigin = WebRPCError{Code: 1103, Name: "InvalidOrigin", Message: "Invalid origin for Access Key", HTTPStatus: 403} ErrInvalidService = WebRPCError{Code: 1104, Name: "InvalidService", Message: "Service not enabled for Access key", HTTPStatus: 403} ErrUnauthorizedUser = WebRPCError{Code: 1105, Name: "UnauthorizedUser", Message: "Unauthorized user", HTTPStatus: 403} + ErrInvalidChain = WebRPCError{Code: 1106, Name: "InvalidChain", Message: "Network not enabled for Access key", HTTPStatus: 403} ErrQuotaExceeded = WebRPCError{Code: 1200, Name: "QuotaExceeded", Message: "Quota request exceeded", HTTPStatus: 429} ErrQuotaRateLimit = WebRPCError{Code: 1201, Name: "QuotaRateLimit", Message: "Quota rate limit exceeded", HTTPStatus: 429} ErrNoDefaultKey = WebRPCError{Code: 1300, Name: "NoDefaultKey", Message: "No default access key found", HTTPStatus: 403} From 7ebaa414d20e3ea4e94ccbd4ce393a631e385d11 Mon Sep 17 00:00:00 2001 From: pkieltyka <18831+pkieltyka@users.noreply.github.com> Date: Thu, 11 Dec 2025 19:10:48 +0000 Subject: [PATCH 02/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 0c1b6fa2..06a88147 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 f192d958d77a781a356ee57948513c11a0a10cf8 +// sequence-relayer v0.4.1 7f8a4b83b00e0b6849c76c2ff0e23931e26b3d9f // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "f192d958d77a781a356ee57948513c11a0a10cf8" + return "7f8a4b83b00e0b6849c76c2ff0e23931e26b3d9f" } // @@ -1705,11 +1705,10 @@ var ( ErrRateLimited = WebRPCError{Code: 1007, Name: "RateLimited", Message: "Rate-limited. Please slow down.", HTTPStatus: 429} ErrProjectNotFound = WebRPCError{Code: 1008, Name: "ProjectNotFound", Message: "Project not found", HTTPStatus: 401} ErrAccessKeyNotFound = WebRPCError{Code: 1101, Name: "AccessKeyNotFound", Message: "Access key not found", HTTPStatus: 401} - ErrAccessKeyMismatch = WebRPCError{Code: 1102, Name: "AccessKeyMismatch", Message: "Access key mismatch", HTTPStatus: 403} + ErrAccessKeyMismatch = WebRPCError{Code: 1102, Name: "AccessKeyMismatch", Message: "Access key mismatch", HTTPStatus: 409} ErrInvalidOrigin = WebRPCError{Code: 1103, Name: "InvalidOrigin", Message: "Invalid origin for Access Key", HTTPStatus: 403} ErrInvalidService = WebRPCError{Code: 1104, Name: "InvalidService", Message: "Service not enabled for Access key", HTTPStatus: 403} ErrUnauthorizedUser = WebRPCError{Code: 1105, Name: "UnauthorizedUser", Message: "Unauthorized user", HTTPStatus: 403} - ErrInvalidChain = WebRPCError{Code: 1106, Name: "InvalidChain", Message: "Network not enabled for Access key", HTTPStatus: 403} ErrQuotaExceeded = WebRPCError{Code: 1200, Name: "QuotaExceeded", Message: "Quota request exceeded", HTTPStatus: 429} ErrQuotaRateLimit = WebRPCError{Code: 1201, Name: "QuotaRateLimit", Message: "Quota rate limit exceeded", HTTPStatus: 429} ErrNoDefaultKey = WebRPCError{Code: 1300, Name: "NoDefaultKey", Message: "No default access key found", HTTPStatus: 403} From cedc00b5ca82bd97713e32af1e429a1d5c9d97d2 Mon Sep 17 00:00:00 2001 From: taylanpince <12650+taylanpince@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:51:29 +0000 Subject: [PATCH 03/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 06a88147..f7fcb8d0 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 7f8a4b83b00e0b6849c76c2ff0e23931e26b3d9f +// sequence-relayer v0.4.1 1017f9087b151d697c25a5ad553183682f1279bd // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "7f8a4b83b00e0b6849c76c2ff0e23931e26b3d9f" + return "1017f9087b151d697c25a5ad553183682f1279bd" } // @@ -122,6 +122,8 @@ const ( ETHTxnStatus_FAILED ETHTxnStatus = 6 // txn accepted by relayer, waiting for preconditions to be satisfied ETHTxnStatus_PENDING_PRECONDITION ETHTxnStatus = 7 + // waiting for receipt + ETHTxnStatus_MINED ETHTxnStatus = 8 ) var ETHTxnStatus_name = map[uint]string{ @@ -133,6 +135,7 @@ var ETHTxnStatus_name = map[uint]string{ 5: "PARTIALLY_FAILED", 6: "FAILED", 7: "PENDING_PRECONDITION", + 8: "MINED", } var ETHTxnStatus_value = map[string]uint{ @@ -144,6 +147,7 @@ var ETHTxnStatus_value = map[string]uint{ "PARTIALLY_FAILED": 5, "FAILED": 6, "PENDING_PRECONDITION": 7, + "MINED": 8, } func (x ETHTxnStatus) String() string { From 3bfd9129d6422df0bf517e6e1ae3bd39ce45835a Mon Sep 17 00:00:00 2001 From: klaidliadon <5322228+klaidliadon@users.noreply.github.com> Date: Mon, 2 Feb 2026 15:42:44 +0000 Subject: [PATCH 04/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 64 +++++++++++------------------------- 1 file changed, 20 insertions(+), 44 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index f7fcb8d0..5ba29854 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 1017f9087b151d697c25a5ad553183682f1279bd +// sequence-relayer v0.4.1 c13e7c3be36799aa6d8bcc490950efbde381c7c9 // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "1017f9087b151d697c25a5ad553183682f1279bd" + return "c13e7c3be36799aa6d8bcc490950efbde381c7c9" } // @@ -328,37 +328,23 @@ func (x *FeeTokenType) Is(values ...FeeTokenType) bool { return false } -type SortOrder uint32 +type Order string const ( - SortOrder_DESC SortOrder = 0 - SortOrder_ASC SortOrder = 1 + Order_DESC Order = "DESC" + Order_ASC Order = "ASC" ) -var SortOrder_name = map[uint32]string{ - 0: "DESC", - 1: "ASC", +func (x Order) MarshalText() ([]byte, error) { + return []byte(x), nil } -var SortOrder_value = map[string]uint32{ - "DESC": 0, - "ASC": 1, -} - -func (x SortOrder) String() string { - return SortOrder_name[uint32(x)] -} - -func (x SortOrder) MarshalText() ([]byte, error) { - return []byte(SortOrder_name[uint32(x)]), nil -} - -func (x *SortOrder) UnmarshalText(b []byte) error { - *x = SortOrder(SortOrder_value[string(b)]) +func (x *Order) UnmarshalText(b []byte) error { + *x = Order(string(b)) return nil } -func (x *SortOrder) Is(values ...SortOrder) bool { +func (x *Order) Is(values ...Order) bool { if x == nil { return false } @@ -605,26 +591,16 @@ type FeeToken struct { // Page represents a results page. This can be used both to request a page and // to store the state of a page. type Page struct { - // Common for both numbered pages and cursor: Number of items per page - PageSize *uint32 `json:"pageSize"` - // Numbered pages: Page number, this is multiplied by the value of the parameter. - Page *uint32 `json:"page"` - More *bool `json:"more"` - // Number of total items on this query. - TotalRecords *uint64 `json:"total_records,omitempty"` - // Cursor: column to compare before/after to - Column *string `json:"column,omitempty"` - // Cursor: return column < before - include to get previous page - Before *interface{} `json:"before,omitempty"` - // Cursor: return column > after - include to get next page - After *interface{} `json:"after,omitempty"` - // Sorting filter - Sort []*SortBy `json:"sort,omitempty"` -} - -type SortBy struct { - Column string `json:"column"` - Order SortOrder `json:"order"` + Size uint32 `json:"size"` + Page uint32 `json:"page"` + More bool `json:"more"` + Column string `json:"column"` + Sort []*Sort `json:"sort"` +} + +type Sort struct { + Column string `json:"column"` + Order Order `json:"order"` } // From 3f037949b69d9dc77daeff38625d7e93a549c416 Mon Sep 17 00:00:00 2001 From: klaidliadon <5322228+klaidliadon@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:49:17 +0000 Subject: [PATCH 05/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 5ba29854..7a53e5c9 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 c13e7c3be36799aa6d8bcc490950efbde381c7c9 +// sequence-relayer v0.4.1 f52a30cf36fd0a0f7d7779f01246c3786aa86774 // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "c13e7c3be36799aa6d8bcc490950efbde381c7c9" + return "f52a30cf36fd0a0f7d7779f01246c3786aa86774" } // @@ -591,11 +591,11 @@ type FeeToken struct { // Page represents a results page. This can be used both to request a page and // to store the state of a page. type Page struct { - Size uint32 `json:"size"` - Page uint32 `json:"page"` - More bool `json:"more"` - Column string `json:"column"` - Sort []*Sort `json:"sort"` + PageSize uint32 `json:"pageSize"` + Page uint32 `json:"page"` + More bool `json:"more"` + Column string `json:"column"` + Sort []*Sort `json:"sort"` } type Sort struct { From 39f407957e6d844b9f9e4af8c671a3299ed58f79 Mon Sep 17 00:00:00 2001 From: taylanpince <12650+taylanpince@users.noreply.github.com> Date: Fri, 6 Feb 2026 22:50:33 +0000 Subject: [PATCH 06/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 107 +++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 23 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 7a53e5c9..5f959eb6 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 f52a30cf36fd0a0f7d7779f01246c3786aa86774 +// sequence-relayer v0.4.1 2e9613edee4061522cf716f1fc086b8b1bd863ba // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "f52a30cf36fd0a0f7d7779f01246c3786aa86774" + return "2e9613edee4061522cf716f1fc086b8b1bd863ba" } // @@ -71,6 +71,12 @@ type RelayerClient interface { FeeOptions(ctx context.Context, wallet string, to string, data string, simulate *bool) ([]*FeeOption, bool, *string, error) // TODO: deprecated, to be removed by https://github.com/0xsequence/stack/pull/356 at a later date GetMetaTxnNetworkFeeOptions(ctx context.Context, walletConfig interface{}, payload string) ([]*FeeOption, error) + // + // Sender administration + // + StartSender(ctx context.Context, sender int) error + StopSender(ctx context.Context, sender int) error + ResetSender(ctx context.Context, sender int) (uint64, error) GetMetaTransactions(ctx context.Context, projectId uint64, page *Page) (*Page, []*MetaTxnLog, error) GetTransactionCost(ctx context.Context, projectId uint64, from time.Time, to time.Time) (float64, error) // Sent transactions from an account. If filter is omitted then it will return all transactions. @@ -381,6 +387,7 @@ type SenderStatus struct { Index uint32 `json:"index"` Address string `json:"address"` EtherBalance float64 `json:"etherBalance"` + Enabled bool `json:"enabled"` Active bool `json:"active"` } @@ -611,12 +618,12 @@ const RelayerPathPrefix = "/rpc/Relayer/" type relayerClient struct { client HTTPClient - urls [33]string + urls [36]string } func NewRelayerClient(addr string, client HTTPClient) RelayerClient { prefix := urlBase(addr) + RelayerPathPrefix - urls := [33]string{ + urls := [36]string{ prefix + "Ping", prefix + "Version", prefix + "RuntimeStatus", @@ -631,6 +638,9 @@ func NewRelayerClient(addr string, client HTTPClient) RelayerClient { prefix + "FeeTokens", prefix + "FeeOptions", prefix + "GetMetaTxnNetworkFeeOptions", + prefix + "StartSender", + prefix + "StopSender", + prefix + "ResetSender", prefix + "GetMetaTransactions", prefix + "GetTransactionCost", prefix + "SentTransactions", @@ -922,6 +932,57 @@ func (c *relayerClient) GetMetaTxnNetworkFeeOptions(ctx context.Context, walletC return out.Ret0, err } +func (c *relayerClient) StartSender(ctx context.Context, sender int) error { + in := struct { + Arg0 int `json:"sender"` + }{sender} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[14], in, nil) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return err +} + +func (c *relayerClient) StopSender(ctx context.Context, sender int) error { + in := struct { + Arg0 int `json:"sender"` + }{sender} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[15], in, nil) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return err +} + +func (c *relayerClient) ResetSender(ctx context.Context, sender int) (uint64, error) { + in := struct { + Arg0 int `json:"sender"` + }{sender} + out := struct { + Ret0 uint64 `json:"deleted"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[16], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, err +} + func (c *relayerClient) GetMetaTransactions(ctx context.Context, projectId uint64, page *Page) (*Page, []*MetaTxnLog, error) { in := struct { Arg0 uint64 `json:"projectId"` @@ -932,7 +993,7 @@ func (c *relayerClient) GetMetaTransactions(ctx context.Context, projectId uint6 Ret1 []*MetaTxnLog `json:"transactions"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[14], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[17], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -953,7 +1014,7 @@ func (c *relayerClient) GetTransactionCost(ctx context.Context, projectId uint64 Ret0 float64 `json:"cost"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[15], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[18], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -974,7 +1035,7 @@ func (c *relayerClient) SentTransactions(ctx context.Context, filter *SentTransa Ret1 []*Transaction `json:"transactions"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[16], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[19], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -994,7 +1055,7 @@ func (c *relayerClient) PendingTransactions(ctx context.Context, page *Page) (*P Ret1 []*Transaction `json:"transactions"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[17], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[20], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1013,7 +1074,7 @@ func (c *relayerClient) GetGasTank(ctx context.Context, id uint64) (*GasTank, er Ret0 *GasTank `json:"gasTank"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[18], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[21], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1035,7 +1096,7 @@ func (c *relayerClient) AddGasTank(ctx context.Context, name string, feeMarkupFa Ret1 *GasTank `json:"gasTank"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[19], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[22], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1058,7 +1119,7 @@ func (c *relayerClient) UpdateGasTank(ctx context.Context, id uint64, name *stri Ret1 *GasTank `json:"gasTank"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[20], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[23], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1077,7 +1138,7 @@ func (c *relayerClient) NextGasTankBalanceAdjustmentNonce(ctx context.Context, i Ret0 uint64 `json:"nonce"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[21], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[24], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1099,7 +1160,7 @@ func (c *relayerClient) AdjustGasTankBalance(ctx context.Context, id uint64, non Ret1 *GasTankBalanceAdjustment `json:"adjustment"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[22], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[25], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1119,7 +1180,7 @@ func (c *relayerClient) GetGasTankBalanceAdjustment(ctx context.Context, id uint Ret0 *GasTankBalanceAdjustment `json:"adjustment"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[23], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[26], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1140,7 +1201,7 @@ func (c *relayerClient) ListGasTankBalanceAdjustments(ctx context.Context, id ui Ret1 []*GasTankBalanceAdjustment `json:"adjustments"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[24], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[27], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1161,7 +1222,7 @@ func (c *relayerClient) ListGasSponsors(ctx context.Context, projectId uint64, p Ret1 []*GasSponsor `json:"gasSponsors"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[25], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[28], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1181,7 +1242,7 @@ func (c *relayerClient) GetGasSponsor(ctx context.Context, projectId uint64, id Ret0 *GasSponsor `json:"gasSponsor"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[26], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[29], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1204,7 +1265,7 @@ func (c *relayerClient) AddGasSponsor(ctx context.Context, projectId uint64, add Ret1 *GasSponsor `json:"gasSponsor"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[27], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[30], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1227,7 +1288,7 @@ func (c *relayerClient) UpdateGasSponsor(ctx context.Context, projectId uint64, Ret1 *GasSponsor `json:"gasSponsor"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[28], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[31], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1247,7 +1308,7 @@ func (c *relayerClient) RemoveGasSponsor(ctx context.Context, projectId uint64, Ret0 bool `json:"status"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[29], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[32], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1268,7 +1329,7 @@ func (c *relayerClient) AddressGasSponsors(ctx context.Context, address string, Ret1 []*GasSponsor `json:"gasSponsors"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[30], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[33], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1287,7 +1348,7 @@ func (c *relayerClient) GetProjectBalance(ctx context.Context, projectId uint64) Ret0 float64 `json:"balance"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[31], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[34], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1308,7 +1369,7 @@ func (c *relayerClient) AdjustProjectBalance(ctx context.Context, projectId uint Ret0 float64 `json:"balance"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[32], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[35], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { From 0d6c37296b100b08abc2140f295a8f0cdc3f1d76 Mon Sep 17 00:00:00 2001 From: pkieltyka <18831+pkieltyka@users.noreply.github.com> Date: Thu, 12 Feb 2026 17:07:53 +0000 Subject: [PATCH 07/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 5f959eb6..9a75ab49 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 2e9613edee4061522cf716f1fc086b8b1bd863ba +// sequence-relayer v0.4.1 381aab1c8d53149311790b7f6631af093819aeec // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "2e9613edee4061522cf716f1fc086b8b1bd863ba" + return "381aab1c8d53149311790b7f6631af093819aeec" } // @@ -479,7 +479,7 @@ type MetaTxnLog struct { Input prototyp.Hash `json:"input" db:"input"` // TODO: review this field.. we may not want it.. what goes in here..? is it just // the input/target from MetaTxn above? we already have these as separate columns.. - TxnArgs map[string]interface{} `json:"txnArgs" db:"txn_args"` + TxnArgs TxnArgs `json:"txnArgs" db:"txn_args"` TxnReceipt map[string]interface{} `json:"txnReceipt" db:"txn_receipt,omitempty"` WalletAddress prototyp.Hash `json:"walletAddress" db:"wallet_address"` MetaTxnNonce prototyp.BigInt `json:"metaTxnNonce" db:"metatx_nonce"` From 726fb305faa03527c3afdb65b64997e117b4da65 Mon Sep 17 00:00:00 2001 From: attente <17548+attente@users.noreply.github.com> Date: Fri, 27 Feb 2026 15:48:00 +0000 Subject: [PATCH 08/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 116 ++++++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 29 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 9a75ab49..5d9c9346 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 381aab1c8d53149311790b7f6631af093819aeec +// sequence-relayer v0.4.1 012e18e1a304ada0bdddbb9c4805697ff9771d36 // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "381aab1c8d53149311790b7f6631af093819aeec" + return "012e18e1a304ada0bdddbb9c4805697ff9771d36" } // @@ -69,6 +69,11 @@ type RelayerClient interface { UpdateMetaTxnGasLimits(ctx context.Context, walletAddress string, walletConfig interface{}, payload string) (string, error) FeeTokens(ctx context.Context) (bool, []*FeeToken, string, error) FeeOptions(ctx context.Context, wallet string, to string, data string, simulate *bool) ([]*FeeOption, bool, *string, error) + // Bridge gas endpoints for S2S calls + // Used for bridge fees (e.g., LayerZero messaging fees) that require msg.value to be fronted at runtime. + // bridgeGas will be included in fee calculation so the relayer gets reimbursed. + SendMetaTxnWithBridgeGas(ctx context.Context, call *MetaTxn, quote *string, projectID *uint64, bridgeGas string, preconditions []*TransactionPrecondition) (bool, string, error) + FeeOptionsWithBridgeGas(ctx context.Context, wallet string, to string, data string, simulate *bool, bridgeGas string) ([]*FeeOption, bool, *string, error) // TODO: deprecated, to be removed by https://github.com/0xsequence/stack/pull/356 at a later date GetMetaTxnNetworkFeeOptions(ctx context.Context, walletConfig interface{}, payload string) ([]*FeeOption, error) // @@ -447,8 +452,7 @@ type GasSponsorUsage struct { EndTime *time.Time `json:"endTime"` } -// TODO: rename this to MetaTxnRaw (eventually), we can leave it for now to not break compat -// or name it, MetaTxnArgs ..? +// TODO: rename fields eventually (contract -> to, input -> execdata), rename struct to MetaTxnRaw type MetaTxn struct { WalletAddress string `json:"walletAddress" db:"wallet_address"` // TODO (later): rename this to `to: string` @@ -477,6 +481,9 @@ type MetaTxnLog struct { MinedAt *time.Time `json:"minedAt" db:"mined_at,omitempty"` Target prototyp.Hash `json:"target" db:"target"` Input prototyp.Hash `json:"input" db:"input"` + // Bridge gas (in wei) to be fronted at runtime with the transaction. + // Used for bridge fees (e.g., LayerZero messaging fees) that require msg.value. + BridgeGas *prototyp.BigInt `json:"bridgeGas" db:"bridge_gas"` // TODO: review this field.. we may not want it.. what goes in here..? is it just // the input/target from MetaTxn above? we already have these as separate columns.. TxnArgs TxnArgs `json:"txnArgs" db:"txn_args"` @@ -618,12 +625,12 @@ const RelayerPathPrefix = "/rpc/Relayer/" type relayerClient struct { client HTTPClient - urls [36]string + urls [38]string } func NewRelayerClient(addr string, client HTTPClient) RelayerClient { prefix := urlBase(addr) + RelayerPathPrefix - urls := [36]string{ + urls := [38]string{ prefix + "Ping", prefix + "Version", prefix + "RuntimeStatus", @@ -637,6 +644,8 @@ func NewRelayerClient(addr string, client HTTPClient) RelayerClient { prefix + "UpdateMetaTxnGasLimits", prefix + "FeeTokens", prefix + "FeeOptions", + prefix + "SendMetaTxnWithBridgeGas", + prefix + "FeeOptionsWithBridgeGas", prefix + "GetMetaTxnNetworkFeeOptions", prefix + "StartSender", prefix + "StopSender", @@ -912,6 +921,55 @@ func (c *relayerClient) FeeOptions(ctx context.Context, wallet string, to string return out.Ret0, out.Ret1, out.Ret2, err } +func (c *relayerClient) SendMetaTxnWithBridgeGas(ctx context.Context, call *MetaTxn, quote *string, projectID *uint64, bridgeGas string, preconditions []*TransactionPrecondition) (bool, string, error) { + in := struct { + Arg0 *MetaTxn `json:"call"` + Arg1 *string `json:"quote"` + Arg2 *uint64 `json:"projectID"` + Arg3 string `json:"bridgeGas"` + Arg4 []*TransactionPrecondition `json:"preconditions"` + }{call, quote, projectID, bridgeGas, preconditions} + out := struct { + Ret0 bool `json:"status"` + Ret1 string `json:"txnHash"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[13], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, out.Ret1, err +} + +func (c *relayerClient) FeeOptionsWithBridgeGas(ctx context.Context, wallet string, to string, data string, simulate *bool, bridgeGas string) ([]*FeeOption, bool, *string, error) { + in := struct { + Arg0 string `json:"wallet"` + Arg1 string `json:"to"` + Arg2 string `json:"data"` + Arg3 *bool `json:"simulate"` + Arg4 string `json:"bridgeGas"` + }{wallet, to, data, simulate, bridgeGas} + out := struct { + Ret0 []*FeeOption `json:"options"` + Ret1 bool `json:"sponsored"` + Ret2 *string `json:"quote"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[14], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, out.Ret1, out.Ret2, err +} + func (c *relayerClient) GetMetaTxnNetworkFeeOptions(ctx context.Context, walletConfig interface{}, payload string) ([]*FeeOption, error) { in := struct { Arg0 interface{} `json:"walletConfig"` @@ -921,7 +979,7 @@ func (c *relayerClient) GetMetaTxnNetworkFeeOptions(ctx context.Context, walletC Ret0 []*FeeOption `json:"options"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[13], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[15], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -937,7 +995,7 @@ func (c *relayerClient) StartSender(ctx context.Context, sender int) error { Arg0 int `json:"sender"` }{sender} - resp, err := doHTTPRequest(ctx, c.client, c.urls[14], in, nil) + resp, err := doHTTPRequest(ctx, c.client, c.urls[16], in, nil) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -953,7 +1011,7 @@ func (c *relayerClient) StopSender(ctx context.Context, sender int) error { Arg0 int `json:"sender"` }{sender} - resp, err := doHTTPRequest(ctx, c.client, c.urls[15], in, nil) + resp, err := doHTTPRequest(ctx, c.client, c.urls[17], in, nil) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -972,7 +1030,7 @@ func (c *relayerClient) ResetSender(ctx context.Context, sender int) (uint64, er Ret0 uint64 `json:"deleted"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[16], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[18], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -993,7 +1051,7 @@ func (c *relayerClient) GetMetaTransactions(ctx context.Context, projectId uint6 Ret1 []*MetaTxnLog `json:"transactions"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[17], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[19], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1014,7 +1072,7 @@ func (c *relayerClient) GetTransactionCost(ctx context.Context, projectId uint64 Ret0 float64 `json:"cost"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[18], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[20], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1035,7 +1093,7 @@ func (c *relayerClient) SentTransactions(ctx context.Context, filter *SentTransa Ret1 []*Transaction `json:"transactions"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[19], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[21], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1055,7 +1113,7 @@ func (c *relayerClient) PendingTransactions(ctx context.Context, page *Page) (*P Ret1 []*Transaction `json:"transactions"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[20], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[22], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1074,7 +1132,7 @@ func (c *relayerClient) GetGasTank(ctx context.Context, id uint64) (*GasTank, er Ret0 *GasTank `json:"gasTank"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[21], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[23], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1096,7 +1154,7 @@ func (c *relayerClient) AddGasTank(ctx context.Context, name string, feeMarkupFa Ret1 *GasTank `json:"gasTank"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[22], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[24], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1119,7 +1177,7 @@ func (c *relayerClient) UpdateGasTank(ctx context.Context, id uint64, name *stri Ret1 *GasTank `json:"gasTank"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[23], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[25], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1138,7 +1196,7 @@ func (c *relayerClient) NextGasTankBalanceAdjustmentNonce(ctx context.Context, i Ret0 uint64 `json:"nonce"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[24], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[26], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1160,7 +1218,7 @@ func (c *relayerClient) AdjustGasTankBalance(ctx context.Context, id uint64, non Ret1 *GasTankBalanceAdjustment `json:"adjustment"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[25], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[27], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1180,7 +1238,7 @@ func (c *relayerClient) GetGasTankBalanceAdjustment(ctx context.Context, id uint Ret0 *GasTankBalanceAdjustment `json:"adjustment"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[26], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[28], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1201,7 +1259,7 @@ func (c *relayerClient) ListGasTankBalanceAdjustments(ctx context.Context, id ui Ret1 []*GasTankBalanceAdjustment `json:"adjustments"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[27], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[29], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1222,7 +1280,7 @@ func (c *relayerClient) ListGasSponsors(ctx context.Context, projectId uint64, p Ret1 []*GasSponsor `json:"gasSponsors"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[28], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[30], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1242,7 +1300,7 @@ func (c *relayerClient) GetGasSponsor(ctx context.Context, projectId uint64, id Ret0 *GasSponsor `json:"gasSponsor"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[29], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[31], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1265,7 +1323,7 @@ func (c *relayerClient) AddGasSponsor(ctx context.Context, projectId uint64, add Ret1 *GasSponsor `json:"gasSponsor"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[30], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[32], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1288,7 +1346,7 @@ func (c *relayerClient) UpdateGasSponsor(ctx context.Context, projectId uint64, Ret1 *GasSponsor `json:"gasSponsor"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[31], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[33], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1308,7 +1366,7 @@ func (c *relayerClient) RemoveGasSponsor(ctx context.Context, projectId uint64, Ret0 bool `json:"status"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[32], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[34], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1329,7 +1387,7 @@ func (c *relayerClient) AddressGasSponsors(ctx context.Context, address string, Ret1 []*GasSponsor `json:"gasSponsors"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[33], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[35], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1348,7 +1406,7 @@ func (c *relayerClient) GetProjectBalance(ctx context.Context, projectId uint64) Ret0 float64 `json:"balance"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[34], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[36], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1369,7 +1427,7 @@ func (c *relayerClient) AdjustProjectBalance(ctx context.Context, projectId uint Ret0 float64 `json:"balance"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[35], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[37], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { From f8ce5d3a84cce9d3f337094a62bf7f3cdde1f7cd Mon Sep 17 00:00:00 2001 From: attente <17548+attente@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:49:11 +0000 Subject: [PATCH 09/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 5d9c9346..5db6d1c7 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 012e18e1a304ada0bdddbb9c4805697ff9771d36 +// sequence-relayer v0.4.1 3af6da1dad525c89afca98ae34bfb818103556a4 // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "012e18e1a304ada0bdddbb9c4805697ff9771d36" + return "3af6da1dad525c89afca98ae34bfb818103556a4" } // @@ -1804,10 +1804,11 @@ var ( ErrRateLimited = WebRPCError{Code: 1007, Name: "RateLimited", Message: "Rate-limited. Please slow down.", HTTPStatus: 429} ErrProjectNotFound = WebRPCError{Code: 1008, Name: "ProjectNotFound", Message: "Project not found", HTTPStatus: 401} ErrAccessKeyNotFound = WebRPCError{Code: 1101, Name: "AccessKeyNotFound", Message: "Access key not found", HTTPStatus: 401} - ErrAccessKeyMismatch = WebRPCError{Code: 1102, Name: "AccessKeyMismatch", Message: "Access key mismatch", HTTPStatus: 409} + ErrAccessKeyMismatch = WebRPCError{Code: 1102, Name: "AccessKeyMismatch", Message: "Access key mismatch", HTTPStatus: 403} ErrInvalidOrigin = WebRPCError{Code: 1103, Name: "InvalidOrigin", Message: "Invalid origin for Access Key", HTTPStatus: 403} ErrInvalidService = WebRPCError{Code: 1104, Name: "InvalidService", Message: "Service not enabled for Access key", HTTPStatus: 403} ErrUnauthorizedUser = WebRPCError{Code: 1105, Name: "UnauthorizedUser", Message: "Unauthorized user", HTTPStatus: 403} + ErrInvalidChain = WebRPCError{Code: 1106, Name: "InvalidChain", Message: "Network not enabled for Access key", HTTPStatus: 403} ErrQuotaExceeded = WebRPCError{Code: 1200, Name: "QuotaExceeded", Message: "Quota request exceeded", HTTPStatus: 429} ErrQuotaRateLimit = WebRPCError{Code: 1201, Name: "QuotaRateLimit", Message: "Quota rate limit exceeded", HTTPStatus: 429} ErrNoDefaultKey = WebRPCError{Code: 1300, Name: "NoDefaultKey", Message: "No default access key found", HTTPStatus: 403} From c4c0e762f3765aac9344f32328c37d6370332b1e Mon Sep 17 00:00:00 2001 From: klaidliadon <5322228+klaidliadon@users.noreply.github.com> Date: Tue, 10 Mar 2026 14:19:52 +0000 Subject: [PATCH 10/10] [AUTOMATED] Update: proto/clients/relayer.gen.go --- relayer/proto/relayer.gen.go | 155 +++++++++++++++++++++++++++++++---- 1 file changed, 137 insertions(+), 18 deletions(-) diff --git a/relayer/proto/relayer.gen.go b/relayer/proto/relayer.gen.go index 5db6d1c7..9dc74471 100644 --- a/relayer/proto/relayer.gen.go +++ b/relayer/proto/relayer.gen.go @@ -1,4 +1,4 @@ -// sequence-relayer v0.4.1 3af6da1dad525c89afca98ae34bfb818103556a4 +// sequence-relayer v0.4.1 fb3b85b73856f333cbba355861050f23c7b2af48 // -- // Code generated by webrpc-gen@v0.31.2 with golang generator. DO NOT EDIT. // @@ -35,7 +35,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "3af6da1dad525c89afca98ae34bfb818103556a4" + return "fb3b85b73856f333cbba355861050f23c7b2af48" } // @@ -98,12 +98,18 @@ type RelayerClient interface { AdjustGasTankBalance(ctx context.Context, id uint64, nonce uint64, amount float64) (bool, *GasTankBalanceAdjustment, error) GetGasTankBalanceAdjustment(ctx context.Context, id uint64, nonce uint64) (*GasTankBalanceAdjustment, error) ListGasTankBalanceAdjustments(ctx context.Context, id uint64, page *Page) (*Page, []*GasTankBalanceAdjustment, error) - // Gas Sponsorship + // Project-Level Gas Sponsorship ListGasSponsors(ctx context.Context, projectId uint64, page *Page) (*Page, []*GasSponsor, error) GetGasSponsor(ctx context.Context, projectId uint64, id uint64) (*GasSponsor, error) AddGasSponsor(ctx context.Context, projectId uint64, address string, name *string, active *bool) (bool, *GasSponsor, error) UpdateGasSponsor(ctx context.Context, projectId uint64, id uint64, name *string, active *bool) (bool, *GasSponsor, error) RemoveGasSponsor(ctx context.Context, projectId uint64, id uint64) (bool, error) + // Ecosystem-level Gas Sponsorship + ListEcosystemGasSponsors(ctx context.Context, ecosystemId uint64, page *Page) (*Page, []*GasSponsor, error) + GetEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, id uint64) (*GasSponsor, error) + AddEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, address string, name *string, active *bool) (bool, *GasSponsor, error) + UpdateEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, id uint64, name *string, active *bool) (bool, *GasSponsor, error) + RemoveEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, id uint64) (bool, error) // Gas Sponsor Lookup AddressGasSponsors(ctx context.Context, address string, page *Page) (*Page, []*GasSponsor, error) // Project Balance @@ -428,16 +434,17 @@ type GasTankBalanceAdjustment struct { } type GasSponsor struct { - ID uint64 `json:"id" db:"id,omitempty"` - GasTankID uint64 `json:"gasTankId" db:"gas_tank_id,omitempty"` - ProjectID uint64 `json:"projectId" db:"project_id"` - ChainID uint64 `json:"chainId" db:"chain_id,omitempty"` - Address prototyp.Hash `json:"address" db:"address"` - Name string `json:"name" db:"name"` - Active bool `json:"active" db:"active"` - UpdatedAt *time.Time `json:"updatedAt" db:"updated_at,omitempty"` - CreatedAt *time.Time `json:"createdAt" db:"created_at,omitempty"` - DeletedAt *time.Time `json:"-" db:"deleted_at,omitempty"` + ID uint64 `json:"id" db:"id,omitempty"` + GasTankID uint64 `json:"gasTankId" db:"gas_tank_id,omitempty"` + ProjectID uint64 `json:"projectId" db:"project_id"` + EcosystemID uint64 `json:"ecosystemId" db:"ecosystem_id"` + ChainID uint64 `json:"chainId" db:"chain_id,omitempty"` + Address prototyp.Hash `json:"address" db:"address"` + Name string `json:"name" db:"name"` + Active bool `json:"active" db:"active"` + UpdatedAt *time.Time `json:"updatedAt" db:"updated_at,omitempty"` + CreatedAt *time.Time `json:"createdAt" db:"created_at,omitempty"` + DeletedAt *time.Time `json:"-" db:"deleted_at,omitempty"` } type GasSponsorUsage struct { @@ -625,12 +632,12 @@ const RelayerPathPrefix = "/rpc/Relayer/" type relayerClient struct { client HTTPClient - urls [38]string + urls [43]string } func NewRelayerClient(addr string, client HTTPClient) RelayerClient { prefix := urlBase(addr) + RelayerPathPrefix - urls := [38]string{ + urls := [43]string{ prefix + "Ping", prefix + "Version", prefix + "RuntimeStatus", @@ -666,6 +673,11 @@ func NewRelayerClient(addr string, client HTTPClient) RelayerClient { prefix + "AddGasSponsor", prefix + "UpdateGasSponsor", prefix + "RemoveGasSponsor", + prefix + "ListEcosystemGasSponsors", + prefix + "GetEcosystemGasSponsor", + prefix + "AddEcosystemGasSponsor", + prefix + "UpdateEcosystemGasSponsor", + prefix + "RemoveEcosystemGasSponsor", prefix + "AddressGasSponsors", prefix + "GetProjectBalance", prefix + "AdjustProjectBalance", @@ -1377,6 +1389,113 @@ func (c *relayerClient) RemoveGasSponsor(ctx context.Context, projectId uint64, return out.Ret0, err } +func (c *relayerClient) ListEcosystemGasSponsors(ctx context.Context, ecosystemId uint64, page *Page) (*Page, []*GasSponsor, error) { + in := struct { + Arg0 uint64 `json:"ecosystemId"` + Arg1 *Page `json:"page"` + }{ecosystemId, page} + out := struct { + Ret0 *Page `json:"page"` + Ret1 []*GasSponsor `json:"gasSponsors"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[35], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, out.Ret1, err +} + +func (c *relayerClient) GetEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, id uint64) (*GasSponsor, error) { + in := struct { + Arg0 uint64 `json:"ecosystemId"` + Arg1 uint64 `json:"id"` + }{ecosystemId, id} + out := struct { + Ret0 *GasSponsor `json:"gasSponsor"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[36], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, err +} + +func (c *relayerClient) AddEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, address string, name *string, active *bool) (bool, *GasSponsor, error) { + in := struct { + Arg0 uint64 `json:"ecosystemId"` + Arg1 string `json:"address"` + Arg2 *string `json:"name"` + Arg3 *bool `json:"active"` + }{ecosystemId, address, name, active} + out := struct { + Ret0 bool `json:"status"` + Ret1 *GasSponsor `json:"gasSponsor"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[37], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, out.Ret1, err +} + +func (c *relayerClient) UpdateEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, id uint64, name *string, active *bool) (bool, *GasSponsor, error) { + in := struct { + Arg0 uint64 `json:"ecosystemId"` + Arg1 uint64 `json:"id"` + Arg2 *string `json:"name"` + Arg3 *bool `json:"active"` + }{ecosystemId, id, name, active} + out := struct { + Ret0 bool `json:"status"` + Ret1 *GasSponsor `json:"gasSponsor"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[38], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, out.Ret1, err +} + +func (c *relayerClient) RemoveEcosystemGasSponsor(ctx context.Context, ecosystemId uint64, id uint64) (bool, error) { + in := struct { + Arg0 uint64 `json:"ecosystemId"` + Arg1 uint64 `json:"id"` + }{ecosystemId, id} + out := struct { + Ret0 bool `json:"status"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[39], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, err +} + func (c *relayerClient) AddressGasSponsors(ctx context.Context, address string, page *Page) (*Page, []*GasSponsor, error) { in := struct { Arg0 string `json:"address"` @@ -1387,7 +1506,7 @@ func (c *relayerClient) AddressGasSponsors(ctx context.Context, address string, Ret1 []*GasSponsor `json:"gasSponsors"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[35], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[40], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1406,7 +1525,7 @@ func (c *relayerClient) GetProjectBalance(ctx context.Context, projectId uint64) Ret0 float64 `json:"balance"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[36], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[41], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1427,7 +1546,7 @@ func (c *relayerClient) AdjustProjectBalance(ctx context.Context, projectId uint Ret0 float64 `json:"balance"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[37], in, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[42], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil {