Skip to content

Commit

Permalink
Merge branch 'develop' into chore/BCF-2571/nightly-fuzz-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzaldysanchez authored Feb 6, 2024
2 parents 1a53de8 + 4cb9669 commit 34c2cb2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
17 changes: 17 additions & 0 deletions core/chains/evm/assets/wei_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package assets

import (
"strconv"
"strings"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -74,6 +76,9 @@ func FuzzWei(f *testing.F) {
if len(v) > 1_000 {
t.Skip()
}
if tryParseExp(v) > 4888888 {
t.Skip()
}
var w Wei
err := w.UnmarshalText([]byte(v))
if err != nil {
Expand All @@ -89,3 +94,15 @@ func FuzzWei(f *testing.F) {
require.Equal(t, w, w2, "unequal values after marshal/unmarshal")
})
}

func tryParseExp(v string) int64 {
i := strings.IndexAny(v, "Ee")
if i == -1 {
return -1
}
e, err := strconv.ParseInt(v[i+1:], 10, 32)
if err != nil {
return -1
}
return e
}
9 changes: 4 additions & 5 deletions core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,11 +715,10 @@ func VRFV2PlusDeployUniverse(e helpers.Environment,

formattedVrfV2PlusPrimaryJobSpec := fmt.Sprintf(
jobs.VRFV2PlusJobFormatted,
contractAddresses.CoordinatorAddress, //coordinatorAddress
contractAddresses.BatchCoordinatorAddress, //batchCoordinatorAddress
coordinatorJobSpecConfig.BatchFulfillmentEnabled, //batchFulfillmentEnabled
coordinatorJobSpecConfig.BatchFulfillmentGasMultiplier, //batchFulfillmentGasMultiplier
strings.Join(util.MapToAddressArr(nodesMap[model.VRFPrimaryNodeName].SendingKeys), "\",\""), //fromAddresses
contractAddresses.CoordinatorAddress, //coordinatorAddress
contractAddresses.BatchCoordinatorAddress, //batchCoordinatorAddress
coordinatorJobSpecConfig.BatchFulfillmentEnabled, //batchFulfillmentEnabled
coordinatorJobSpecConfig.BatchFulfillmentGasMultiplier, //batchFulfillmentGasMultiplier
compressedPkHex, //publicKey
coordinatorConfig.MinConfs, //minIncomingConfirmations
e.ChainID, //evmChainID
Expand Down

0 comments on commit 34c2cb2

Please sign in to comment.