Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make billing more flexible in VRF 2.5 (#11909) #12072

Merged
Merged
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
30 changes: 30 additions & 0 deletions common/client/mock_rpc_test.go

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

11 changes: 11 additions & 0 deletions common/client/multi_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,17 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP
return n.RPC().CallContract(ctx, attempt, blockNumber)
}

func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT]) PendingCallContract(
ctx context.Context,
attempt interface{},
) (rpcErr []byte, extractErr error) {
n, err := c.selectNode()
if err != nil {
return rpcErr, err
}
return n.RPC().PendingCallContract(ctx, attempt)
}

// ChainID makes a direct RPC call. In most cases it should be better to use the configured chain id instead by
// calling ConfiguredChainID.
func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT]) ChainID(ctx context.Context) (id CHAIN_ID, err error) {
Expand Down
4 changes: 4 additions & 0 deletions common/client/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ type clientAPI[
msg interface{},
blockNumber *big.Int,
) (rpcErr []byte, extractErr error)
PendingCallContract(
ctx context.Context,
msg interface{},
) (rpcErr []byte, extractErr error)
CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error
CodeAt(ctx context.Context, account ADDR, blockNumber *big.Int) ([]byte, error)
}
Expand Down
4 changes: 4 additions & 0 deletions common/txmgr/types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ type TxMeta[ADDR types.Hashable, TX_HASH types.Hashable] struct {
// Used for keepers
UpkeepID *string `json:"UpkeepID,omitempty"`

// Used for VRF to know if the txn is a ForceFulfilment txn
ForceFulfilled *bool `json:"ForceFulfilled,omitempty"`
ForceFulfillmentAttempt *uint64 `json:"ForceFulfillmentAttempt,omitempty"`

// Used only for forwarded txs, tracks the original destination address.
// When this is set, it indicates tx is forwarded through To address.
FwdrDestAddress *ADDR `json:"ForwarderDestAddress,omitempty"`
Expand Down
Loading
Loading