# Solidity Tutorial

### 🚀  Want a shortcut? 🚀&#x20;

[**Start with our boilerplate Solidity smart contract on GitHub**](https://github.com/EveripediaNetwork/oraqle/blob/master/packages/smart-contract-example-consumers/contracts/associated-press/IsPerdueWinner.sol).&#x20;

### Walkthrough&#x20;

1. Install the contract via npm&#x20;

```
npm install oraqle-contracts
# OR
yarn add oraqle-contracts
```

2\. Set `pragma` and import the senate contract at the top of your smart contract

```
pragma solidity 0.6.11;

import "oraqle-contracts/contracts/associated-press/Jan2021SenateRunoffs.sol";
```

3\. Paste in this example code and change the parts your need! Don't forget to change the deployed contract address for production.

```
contract IsPerdueWinner {
    Jan2021SenateRunoffs internal senateRunoffContract;

    constructor() public {
        senateRunoffContract = Jan2021SenateRunoffs(
            0x0792724900B551d200D954a5Ed709d9514d73A9F
        );
    }

    function isPerdueWinner() public view returns (bool) {
        return
            keccak256(
                bytes(senateRunoffContract.winners("U.S. Senate Class II"))
            ) == keccak256(bytes("Perdue"));
    }
}
```

4\. Validate on kovan that you are getting [the following results](https://oraqle.vercel.app/oracles/jan-2021-senate/kovan):

![](https://4237340628-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MKpcvqHmxdH4lqjGSp7%2F-MPrKxSZ8vRpVmb4t3D4%2F-MPrNZmuSqph58oCkXOP%2Fimage.png?alt=media\&token=a0d9038b-2983-458c-abba-2249d7721698)

5\. Replace the smart contract address on line 6 above with [`the production contract address`](https://etherscan.io/address/0x3E961f9A77146F6230709D767d60025f1Ed3Bfef#code) and get ready for January 5th!&#x20;

6\. Still having issues?&#x20;

1. [Refer to our example repo](https://github.com/EveripediaNetwork/oraqle)
2. Tweet to [@dawsonbotsford](https://twitter.com/dawsonbotsford) and [@everipedia](https://twitter.com/Everipedia) any engineering questions (or send a DM on Twitter to [@dawsonbotsford](https://twitter.com/dawsonbotsford))
