Giter Site home page Giter Site logo

foundry-starter-kit's People

Contributors

afrideva avatar alexbakers avatar andrejrakic avatar ether1oop avatar koteld avatar patrickalphac avatar praneshasp avatar qingyangkong avatar rgottleber avatar saadaakash avatar zeuslawyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foundry-starter-kit's Issues

Potentially redundant code in VRFConsumerV2

Hey guys,

I was going through
[LinkTokenInterface ](https://github.com/smartcontractkit/foundry-starter-kit/blob/main/src/VRFConsumerV2.sol)

and noticed that you have initialized two interfaces:
VRFCoordinatorV2Interface , LinkTokenInterface .

I understand that VRFCoordinatorV2Interface needs to be initialized to call the requestRandomWords function in it, but why initialize the LinkTokenInterface ????

Especially since it is not being used anywhere.

Am I missing something?

P.S: If this issue is recognized as legit, can I be the one to push a PR?

Change remappings for @chainlink

Should we modify remappings for @chainlink/contracts to point to the official chainlink repo instead of chainlink-brownie-contracts since the first one is more actively maintained? The change will include removing chainlink-brownie-contracts and forge installing smartcontractkit/chainlink which will increase the size of the lib folder, which is the possible downside of this idea.

TLDR:
Update @chainlink/=lib/chainlink-brownie-contracts/ to @chainlink/=lib/chainlink?

Use Local Memory Type Variable Instead of Global Storage Type Variable in Event to Save Gas

Hi, we recently have conducted a systematic study about Solidity event usage, evolution, and impact, and we are attempting to build a tool to improve the practice of Solidity event use based on our findings. We have tried our prototype tool on some of the most popular GitHub Solidity repositories, and for your repository, we find a potential optimization of gas consumption arisen from event use.

The point is that when we use emit operation to store the value of a certain variable, local memory type variable would be preferable to global storage type (state) variable if they hold the same value. The reason is that an extra SLOAD operation would be needed to access the variable if it is storage type, and the SLOAD operation costs 800 gas.

For your repository, we find that the following event use can be improved:

  • APIConsumer.sol
    function name:fulfill
    event name:  DataFullfilled
    variable:    volume->_volume
    function fulfill(bytes32 _requestId, uint256 _volume)
        public
        recordChainlinkFulfillment(_requestId)
    {
        volume = _volume;
        emit DataFullfilled(volume);
    }

Do you find our results useful? Your reply and invaluable suggestions would be greatly appreciated, and are vital for improving our tool. Thanks a lot for your time!

error- after running make

Error:
Compiler run failed:
Error (2333): Identifier already declared.
--> script/APIConsumer.s.sol:7:1:
|
7 | import "../src/test/mocks/MockOracle.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: The previous declaration is here:
--> lib/chainlink-brownie-contracts/contracts/src/v0.8/shared/interfaces/LinkTokenInterface.sol:4:1:
|
4 | interface LinkTokenInterface {
| ^ (Relevant source part starts here and spans across multiple lines).

Add CLA

We want to bring this in line with the HH Starter Kit in terms of products demonstrated.

Currently CLA appears to be missing here, and AnyAPI should be removed from here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.