# Question about Forking using Ganache?

**URL:** <https://forum.openzeppelin.com/t/question-about-forking-using-ganache/256>\
**Category:** SDK\
**Created:** [February 4, 2019, 2:26pm UTC](https://forum.openzeppelin.com/t/question-about-forking-using-ganache/256 "2019-02-04T14:26:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dennison](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/dennison/32/100_2.png) [@Dennison](https://forum.openzeppelin.com/u/Dennison)\
**Post date:** [February 4, 2019, 2:26pm UTC](https://forum.openzeppelin.com/t/question-about-forking-using-ganache/256/1 "2019-02-04T14:26:04Z")

</div>

I just read @spalladino’s new post:

> **[Testing real-world contract upgrades - ZeppelinOS Blog](https://blog.zeppelinos.org/testing-real-world-contract-upgrades/?utm_campaign=zos-technical-testing-contract-upgrades&utm_medium=social&utm_source=twitter)**
>
> In this post, we’ll use Ganache to create a fork of a chain and set up a playground to test our contract upgrades using ZeppelinOS, before we actually execute them in production. Deploying to production can be a stressful experience, especially if...

What a great way to test out if your contract upgrades are going to work on the main-net, prior to actually DOING it on the main net. Forking allows you to test out your upgrade on the current status of your smart contracts.

What is the best way to connet to a Rinkeby node? The tutorial says:

```auto
$ ganache-cli --fork $RINKEBYNODE --unlock "$USER" --unlock "$ADMIN" --port 9545 --networkId 1004 --deterministic

```

What should we use for $RINKEBYNODE ? For example if we connet via infura:

```auto
--fork 'https://rinkeby.infura.io/v3/<<infura API key here>>'

```

but how do we then unlock $USER and $ADMIN? (and be sure we have those private keys in ganace?) Should we rather than use --deterministic, should we use --mnemonic and then use our development memonic? To be be sure we have access to $USER and $ADMIN?

---

<div class="post-metadata">

**Author:** ![spalladino](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/spalladino/32/22_2.png) [@spalladino](https://forum.openzeppelin.com/u/spalladino)\
**Post date:** [February 4, 2019, 7:18pm UTC](https://forum.openzeppelin.com/t/question-about-forking-using-ganache/256/2 "2019-02-04T19:18:26Z")

</div>

Hey @Dennison! Thanks for the questions.

> [@Dennison](#):
>
> What is the best way to connet to a Rinkeby node?

I used a private node I run myself, but you could very well connect to Infura as you say! In that case, the `'https://rinkeby.infura.io/v3/<<infura API key here>>'` string should work perfectly.

> [@Dennison](#):
>
> how do we then unlock $USER and $ADMIN? (and be sure we have those private keys in ganache?)

That's the beauty of ganache! Since ganache is not a real node but a testing tool, you can ask it to `--unlock` an account **without having its private keys**. You just instruct it to unlock the $USER and $ADMIN addresses, and then you can freely send transactions `from` those addresses!
