Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickAlphaC committed Jan 11, 2022
2 parents 498916e + c4f2b34 commit 8efc3d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/smartcontractkit/chainlink-mix.svg)](http://isitmaintained.com/project/smartcontractkit/chainlink-mix "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/smartcontractkit/chainlink-mix.svg)](http://isitmaintained.com/project/smartcontractkit/chainlink-mix "Percentage of issues still open")

This is a repo to work with and use Chainlink smart contracts in a python environment. If you're brand new to Chainlink, check out the beginner walkthroughs in remix to [learn the basics.](https://docs.chain.link/docs/beginners-tutorial)
This is a repo to work with and use Chainlink smart contracts in a python environment. If you're brand new to Chainlink, check out the beginner walk-through in remix to [learn the basics.](https://docs.chain.link/docs/beginners-tutorial)

You can also check out the more advanced Chainlink tutorials there as well.

Expand Down Expand Up @@ -60,7 +60,7 @@ Or, if that doesn't work, via pip
pip install eth-brownie
```

2. Download the mix and install dependancies.
2. Download the mix and install dependencies.

```bash
brownie bake chainlink-mix
Expand Down Expand Up @@ -93,7 +93,7 @@ export PRIVATE_KEY=<PRIVATE_KEY>
```

AND THEN RUN `source .env` TO ACTIVATE THE ENV VARIABLES
(You'll need to do this everytime you open a new terminal, or [learn how to set them easier](https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html))
(You'll need to do this every time you open a new terminal, or [learn how to set them easier](https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html))


![WARNING](https://via.placeholder.com/15/f03c15/000000?text=+) **WARNING** ![WARNING](https://via.placeholder.com/15/f03c15/000000?text=+)
Expand Down Expand Up @@ -172,7 +172,7 @@ brownie run scripts/chainlink_api_scripts/03_read_data.py --network kovan
### Chainlink Keeper Deployment


This is just to show you how to deploy the Keepers, you can learn more about registering them in the [Chainlink Keeper](https://docs.chain.link/docs/chainlink-keepers/compatible-contracts/) documenation.
This is just to show you how to deploy the Keepers, you can learn more about registering them in the [Chainlink Keeper](https://docs.chain.link/docs/chainlink-keepers/compatible-contracts/) documentation.
```
brownie run scripts/keeper_scripts/01_deploy_keeper_counter.py --network kovan
brownie run scripts/keeper_scripts/02_check_upkeep.py --network kovan
Expand All @@ -193,7 +193,7 @@ For more information on effective testing with Chainlink, check out [Testing Sma

Tests are really robust here! They work for local development and testnets. There are a few key differences between the testnets and the local networks. We utilize mocks so we can work with fake oracles on our testnets.

There is a `test_unnecessary` folder, which is a good exersize for learning some of the nitty-gritty of smart contract development. It's overkill, so pytest will skip them intentionally. It also has a `test_samples` folder, which shows an example Chainlink API call transaction receipt.
There is a `test_unnecessary` folder, which is a good exercise for learning some of the nitty-gritty of smart contract development. It's overkill, so pytest will skip them intentionally. It also has a `test_samples` folder, which shows an example Chainlink API call transaction receipt.


### To test development / local
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
eth-brownie
python-dotenv
eth-brownie
6 changes: 3 additions & 3 deletions scripts/helpful_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ def get_account(index=None, id=None):

def get_contract(contract_name):
"""If you want to use this function, go to the brownie config and add a new entry for
the contract that you want to be able to 'get'. Then add an entry in the in the variable 'contract_to_mock'.
the contract that you want to be able to 'get'. Then add an entry in the variable 'contract_to_mock'.
You'll see examples like the 'link_token'.
This script will then either:
- Get a address from the config
- Or deploy a mock to use for a network that doesn't have it
Args:
contract_name (string): This is the name that is refered to in the
contract_name (string): This is the name that is referred to in the
brownie config and 'contract_to_mock' variable.
Returns:
brownie.network.contract.ProjectContract: The most recently deployed
Contract of the type specificed by the dictonary. This could be either
Contract of the type specificed by the dictionary. This could be either
a mock or the 'real' contract on a live network.
"""
contract_type = contract_to_mock[contract_name]
Expand Down

0 comments on commit 8efc3d9

Please sign in to comment.