Skip to content

Commit

Permalink
reduce solc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thedriftofwords committed May 13, 2024
1 parent f6b221a commit 1229929
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
10 changes: 5 additions & 5 deletions public/samples/VRF/v2-5/SubscriptionConsumer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ contract SubscriptionConsumer is VRFConsumerBaseV2Plus {
public s_requests; /* requestId --> requestStatus */

// Your subscription ID.
uint256 s_subscriptionId;
uint256 public s_subscriptionId;

// Past request IDs.
uint256[] public requestIds;
Expand All @@ -38,7 +38,7 @@ contract SubscriptionConsumer is VRFConsumerBaseV2Plus {
// The gas lane to use, which specifies the maximum gas price to bump to.
// For a list of available gas lanes on each network,
// see https://docs.chain.link/docs/vrf/v2-5/supported-networks
bytes32 keyHash =
bytes32 public keyHash =
0x787d74caea10b2b357790d5b5247c2f63d1d91572a9846f780606e4d953677ae;

// Depends on the number of requested values that you want sent to the
Expand All @@ -47,14 +47,14 @@ contract SubscriptionConsumer is VRFConsumerBaseV2Plus {
// this limit based on the network that you select, the size of the request,
// and the processing of the callback request in the fulfillRandomWords()
// function.
uint32 callbackGasLimit = 100000;
uint32 public callbackGasLimit = 100000;

// The default is 3, but you can set this higher.
uint16 requestConfirmations = 3;
uint16 public requestConfirmations = 3;

// For this example, retrieve 2 random values in one request.
// Cannot exceed VRFCoordinatorV2_5.MAX_NUM_WORDS.
uint32 numWords = 2;
uint32 public numWords = 2;

/**
* HARDCODED FOR SEPOLIA
Expand Down
14 changes: 8 additions & 6 deletions public/samples/VRF/v2-5/SubscriptionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,30 @@ contract VRFv2PlusSubscriptionManager is VRFConsumerBaseV2Plus {

// Sepolia coordinator. For other networks,
// see https://docs.chain.link/docs/vrf/v2-5/subscription-supported-networks#configurations
address vrfCoordinatorV2Plus = 0x9DdfaCa8183c41ad55329BdeeD9F6A8d53168B1B;
address public vrfCoordinatorV2Plus =
0x9DdfaCa8183c41ad55329BdeeD9F6A8d53168B1B;

// Sepolia LINK token contract. For other networks, see
// https://docs.chain.link/docs/vrf-contracts/#configurations
address link_token_contract = 0x779877A7B0D9E8603169DdbD7836e478b4624789;
address public link_token_contract =
0x779877A7B0D9E8603169DdbD7836e478b4624789;

// The gas lane to use, which specifies the maximum gas price to bump to.
// For a list of available gas lanes on each network,
// see https://docs.chain.link/docs/vrf/v2-5/subscription-supported-networks#configurations
bytes32 keyHash =
bytes32 public keyHash =
0x787d74caea10b2b357790d5b5247c2f63d1d91572a9846f780606e4d953677ae;

// A reasonable default is 100000, but this value could be different
// on other networks.
uint32 callbackGasLimit = 100000;
uint32 public callbackGasLimit = 100000;

// The default is 3, but you can set this higher.
uint16 requestConfirmations = 3;
uint16 public requestConfirmations = 3;

// For this example, retrieve 2 random values in one request.
// Cannot exceed VRFCoordinatorV2.MAX_NUM_WORDS.
uint32 numWords = 2;
uint32 public numWords = 2;

// Storage parameters
uint256[] public s_randomWords;
Expand Down
12 changes: 6 additions & 6 deletions public/samples/VRF/v2-5/VRFD20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ contract VRFD20 is VRFConsumerBaseV2Plus {
uint256 private constant ROLL_IN_PROGRESS = 42;

// Your subscription ID.
uint256 s_subscriptionId;
uint256 public s_subscriptionId;

// Sepolia coordinator. For other networks,
// see https://docs.chain.link/vrf/v2-5/supported-networks#configurations
address vrfCoordinator = 0x9DdfaCa8183c41ad55329BdeeD9F6A8d53168B1B;
address public vrfCoordinator = 0x9DdfaCa8183c41ad55329BdeeD9F6A8d53168B1B;

// The gas lane to use, which specifies the maximum gas price to bump to.
// For a list of available gas lanes on each network,
// see https://docs.chain.link/vrf/v2-5/supported-networks#configurations
bytes32 s_keyHash =
bytes32 public s_keyHash =
0x787d74caea10b2b357790d5b5247c2f63d1d91572a9846f780606e4d953677ae;

// Depends on the number of requested values that you want sent to the
Expand All @@ -42,14 +42,14 @@ contract VRFD20 is VRFConsumerBaseV2Plus {
// this limit based on the network that you select, the size of the request,
// and the processing of the callback request in the fulfillRandomWords()
// function.
uint32 callbackGasLimit = 40000;
uint32 public callbackGasLimit = 40000;

// The default is 3, but you can set this higher.
uint16 requestConfirmations = 3;
uint16 public requestConfirmations = 3;

// For this example, retrieve 1 random value in one request.
// Cannot exceed VRFCoordinatorV2_5.MAX_NUM_WORDS.
uint32 numWords = 1;
uint32 public numWords = 1;

// map rollers to requestIds
mapping(uint256 => address) private s_rollers;
Expand Down

0 comments on commit 1229929

Please sign in to comment.