Skip to content

Commit

Permalink
Merge pull request #27 from smartcontractkit/update-contract-paths
Browse files Browse the repository at this point in the history
Updates contract paths and functions
  • Loading branch information
thodges-gh authored Jul 30, 2024
2 parents d85dbda + 065d4b4 commit 00cb5e5
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/chainlink-brownie-contracts
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 64 files
+1 −0 .gitattributes
+128 −0 .github/workflows/ci.yml
+31 −0 .github/workflows/sync.yml
+0 −26 .github/workflows/tests.yml
+1 −1 .gitignore
+0 −3 .gitmodules
+1 −1 LICENSE-APACHE
+1 −1 LICENSE-MIT
+9 −5 README.md
+21 −0 foundry.toml
+0 −1 lib/ds-test
+16 −0 package.json
+635 −0 scripts/vm.py
+35 −0 src/Base.sol
+21 −33 src/Script.sol
+669 −0 src/StdAssertions.sol
+259 −0 src/StdChains.sol
+817 −0 src/StdCheats.sol
+15 −0 src/StdError.sol
+122 −0 src/StdInvariant.sol
+179 −0 src/StdJson.sol
+43 −0 src/StdMath.sol
+473 −0 src/StdStorage.sol
+333 −0 src/StdStyle.sol
+179 −0 src/StdToml.sol
+226 −0 src/StdUtils.sol
+31 −777 src/Test.sol
+1,829 −175 src/Vm.sol
+401 −382 src/console.sol
+1 −1,535 src/console2.sol
+105 −0 src/interfaces/IERC1155.sol
+12 −0 src/interfaces/IERC165.sol
+43 −0 src/interfaces/IERC20.sol
+190 −0 src/interfaces/IERC4626.sol
+164 −0 src/interfaces/IERC721.sol
+73 −0 src/interfaces/IMulticall3.sol
+234 −0 src/mocks/MockERC20.sol
+231 −0 src/mocks/MockERC721.sol
+13,248 −0 src/safeconsole.sol
+0 −12 src/test/Script.t.sol
+0 −599 src/test/StdAssertions.t.sol
+0 −226 src/test/StdCheats.t.sol
+0 −200 src/test/StdMath.t.sol
+0 −321 src/test/StdStorage.t.sol
+145 −0 test/StdAssertions.t.sol
+226 −0 test/StdChains.t.sol
+618 −0 test/StdCheats.t.sol
+14 −18 test/StdError.t.sol
+49 −0 test/StdJson.t.sol
+212 −0 test/StdMath.t.sol
+471 −0 test/StdStorage.t.sol
+110 −0 test/StdStyle.t.sol
+49 −0 test/StdToml.t.sol
+342 −0 test/StdUtils.t.sol
+15 −0 test/Vm.t.sol
+10 −0 test/compilation/CompilationScript.sol
+10 −0 test/compilation/CompilationScriptBase.sol
+10 −0 test/compilation/CompilationTest.sol
+10 −0 test/compilation/CompilationTestBase.sol
+187 −0 test/fixtures/broadcast.log.json
+8 −0 test/fixtures/test.json
+6 −0 test/fixtures/test.toml
+441 −0 test/mocks/MockERC20.t.sol
+721 −0 test/mocks/MockERC721.t.sol
2 changes: 1 addition & 1 deletion lib/foundry-chainlink-toolkit
2 changes: 1 addition & 1 deletion lib/solmate
14 changes: 7 additions & 7 deletions src/APIConsumer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ contract APIConsumer is ChainlinkClient {
address _link
) {
if (_link == address(0)) {
setPublicChainlinkToken();
_setPublicChainlinkToken();
} else {
setChainlinkToken(_link);
_setChainlinkToken(_link);
}
oracle = _oracle;
jobId = _jobId;
Expand All @@ -40,14 +40,14 @@ contract APIConsumer is ChainlinkClient {
* @return requestId - id of the request
*/
function requestVolumeData() public returns (bytes32 requestId) {
Chainlink.Request memory request = buildChainlinkRequest(
Chainlink.Request memory request = _buildChainlinkRequest(
jobId,
address(this),
this.fulfill.selector
);

// Set the URL to perform the GET request on
request.add(
request._add(
"get",
"https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD"
);
Expand All @@ -64,14 +64,14 @@ contract APIConsumer is ChainlinkClient {
// }
// Chainlink node versions prior to 1.0.0 supported this format
// request.add("path", "RAW.ETH.USD.VOLUME24HOUR");
request.add("path", "RAW,ETH,USD,VOLUME24HOUR");
request._add("path", "RAW,ETH,USD,VOLUME24HOUR");

// Multiply the result by 1000000000000000000 to remove decimals
int256 timesAmount = 10**18;
request.addInt("times", timesAmount);
request._addInt("times", timesAmount);

// Sends the request
return sendChainlinkRequestTo(oracle, request, fee);
return _sendChainlinkRequestTo(oracle, request, fee);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/KeepersCounter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@chainlink/contracts/src/v0.8/interfaces/KeeperCompatibleInterface.sol";
import "@chainlink/contracts/src/v0.8/automation/interfaces/KeeperCompatibleInterface.sol";

contract KeepersCounter is KeeperCompatibleInterface {
uint256 public counter;
Expand Down
2 changes: 1 addition & 1 deletion src/PriceFeedConsumer.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol";

/**
* @title The PriceConsumerV3 contract
Expand Down
6 changes: 3 additions & 3 deletions src/VRFConsumerV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// An example of a consumer contract that relies on a subscription for funding.
pragma solidity ^0.8.7;

import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@chainlink/contracts/src/v0.8/shared/interfaces/LinkTokenInterface.sol";
import "@chainlink/contracts/src/v0.8/vrf/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/vrf/VRFConsumerBaseV2.sol";

/**
* @title The VRFConsumerV2 contract
Expand Down
2 changes: 1 addition & 1 deletion src/test/KeepersCounter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract KeepersCounterTest is Test {
KeepersCounter public counter;
uint256 public staticTime;
uint256 public INTERVAL;
Cheats internal constant cheats = Cheats(HEVM_ADDRESS);
Cheats internal constant cheats = Cheats(VM_ADDRESS);

function setUp() public {
staticTime = block.timestamp;
Expand Down
2 changes: 1 addition & 1 deletion src/test/VRFConsumerV2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract VRFConsumerV2Test is Test {
LinkToken public linkToken;
MockVRFCoordinatorV2 public vrfCoordinator;
VRFConsumerV2 public vrfConsumer;
Cheats internal constant cheats = Cheats(HEVM_ADDRESS);
Cheats internal constant cheats = Cheats(VM_ADDRESS);

uint96 constant FUND_AMOUNT = 1 * 10**18;

Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/MockOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.0;

import "@chainlink/contracts/src/v0.8/interfaces/ChainlinkRequestInterface.sol";
import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
import "@chainlink/contracts/src/v0.8/shared/interfaces/LinkTokenInterface.sol";

/**
* @title The LinkTokenReceiver contract - used for the MockOracle below
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/MockVRFCoordinatorV2.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@chainlink/contracts/src/v0.8/mocks/VRFCoordinatorV2Mock.sol";
import "@chainlink/contracts/src/v0.8/vrf/mocks/VRFCoordinatorV2Mock.sol";

contract MockVRFCoordinatorV2 is VRFCoordinatorV2Mock {
uint96 constant MOCK_BASE_FEE = 100000000000000000;
Expand Down

0 comments on commit 00cb5e5

Please sign in to comment.