Skip to content

Commit

Permalink
feat: add @celo/contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
therealharpaljadeja committed Jun 13, 2023
1 parent 638d149 commit 570770d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/hardhat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ You can get a local copy of mainnet by forking with Ganache. Learn more about [f

There is a script provided (`yarn fork-mainnet`) to fork mainnet and fund the same test accounts that come with Celo devchain. Sometimes sending transactions from the first account (which defaults to `0x5409ED021D9299bf6814279A6A1411A7e866A631`) is delayed and sending test transactions from the other accounts works better for some reason. :shrug: The private keys of the associated test accounts are printed in `account_keys.json`.

## Celo Core Contracts

You can easily import Celo Core contracts to be used by your contracts like so:

```solidity
import '@celo/contracts/common/Accounts.sol';
```

## Verify your contracts

### hardhat-celo
Expand Down
1 change: 1 addition & 0 deletions packages/hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"typechain": "^8.1.0"
},
"dependencies": {
"@celo/contracts": "^9.0.0",
"@openzeppelin/contracts": "^4.9.1",
"ganache": "^7.5.0",
"typescript": "^4.8.4"
Expand Down
5 changes: 5 additions & 0 deletions packages/hardhat/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
semver "^7.3.5"
web3 "1.3.6"

"@celo/contracts@^9.0.0":
version "9.0.0"
resolved "https://registry.yarnpkg.com/@celo/contracts/-/contracts-9.0.0.tgz#1465d685c4b48515c09ca81fdd41b1d06142dbc5"
integrity sha512-+DLFoV6mYQh4vLoYlcyArrgcU1zJAbb5BbBLKTbUnNkuGSYCoNqvik0OfpujhJ44SHlX+BERbW3ydzdj+kFVpg==

"@celo/ganache-cli@git+https://github.com/celo-org/ganache-cli.git#e933297":
version "6.6.1"
resolved "git+https://github.com/celo-org/ganache-cli.git#e93329707efbe899ac2f32a30ccf2badbbec8bdf"
Expand Down

0 comments on commit 570770d

Please sign in to comment.