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

feature: add vrf smoke superscript #10739

Merged
merged 3 commits into from
Sep 21, 2023
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
7 changes: 6 additions & 1 deletion core/scripts/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ func explorerLinkPrefix(chainID int64) (prefix string) {
case 1666700000, 1666700001, 1666700002, 1666700003: // Harmony testnet
prefix = "https://explorer.testnet.harmony.one"

case 84531:
prefix = "https://goerli.basescan.org"
case 8453:
prefix = "https://basescan.org"

default: // Unknown chain, return prefix as-is
prefix = ""
}
Expand Down Expand Up @@ -410,7 +415,7 @@ func BinarySearch(top, bottom *big.Int, test func(amount *big.Int) bool) *big.In
return bottom
}

// Get RLP encoded headers of a list of block numbers
// GetRlpHeaders gets RLP encoded headers of a list of block numbers
// Makes RPC network call eth_getBlockByNumber to blockchain RPC node
// to fetch header info
func GetRlpHeaders(env Environment, blockNumbers []*big.Int, getParentBlocks bool) (headers [][]byte, hashes []string, err error) {
Expand Down
8 changes: 7 additions & 1 deletion core/scripts/vrfv2plus/testnet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"encoding/hex"
"flag"
"fmt"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics"
"log"
"math/big"
"os"
"strings"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics"

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -46,12 +47,17 @@ import (

var (
batchCoordinatorV2PlusABI = evmtypes.MustGetABI(batch_vrf_coordinator_v2plus.BatchVRFCoordinatorV2PlusABI)
coordinatorV2PlusABI = evmtypes.MustGetABI(vrf_coordinator_v2plus.VRFCoordinatorV2PlusABI)
)

func main() {
e := helpers.SetupEnv(false)

switch os.Args[1] {
case "smoke":
smokeTestVRF(e)
case "smoke-bhs":
smokeTestBHS(e)
case "manual-fulfill":
cmd := flag.NewFlagSet("manual-fulfill", flag.ExitOnError)
// In order to get the tx data for a fulfillment transaction, you can grep the
Expand Down
Loading
Loading