Skip to content

Commit

Permalink
Merge pull request #12072 from smartcontractkit/vrf-changes-rebased2.…
Browse files Browse the repository at this point in the history
…9.1-vrf-20240216

make billing more flexible in VRF 2.5 (#11909)
  • Loading branch information
snehaagni authored Feb 20, 2024
2 parents 17f967f + 972e8e8 commit 902f3e7
Show file tree
Hide file tree
Showing 67 changed files with 6,095 additions and 3,105 deletions.
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

0 comments on commit 902f3e7

Please sign in to comment.