# The road to mainnet

**URL:** <https://community.kosmos.org/t/the-road-to-mainnet/115>\
**Category:** Kredits\
**Created:** [June 1, 2021, 12:57pm UTC](https://community.kosmos.org/t/the-road-to-mainnet/115 "2021-06-01T12:57:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raucao](https://community.kosmos.org/user_avatar/community.kosmos.org/raucao/32/138_2.png) [@raucao](https://community.kosmos.org/u/raucao)\
**Post date:** [June 1, 2021, 12:57pm UTC](https://community.kosmos.org/t/the-road-to-mainnet/115/1 "2021-06-01T12:57:09Z")

</div>

@bumi and I are talking about this topic in person in Berlin currently, so we’ll try to keep notes of the steps/requirements that we’re discussing. Could be random, might organize more later.

## Mainnet choice

As discussed in multiple [weekly calls](https://community.kosmos.org/t/kosmos-weekly-call/36/5) before, we’d like to try deploying to RSK, as it’s both tied to bitcoin as well as compatible with Solidity contracts (which we’re currently using).

### Challenges

- No Aragon registry, no ENS available (Question: can we get rid of the AragonPM dependency somehow?)
  - [Hardhat plugin for contract upgrades](https://hardhat.org/plugins/hardhat-upgrades.html)

- …

## Required features

- [Kredits withdrawals](https://github.com/67P/kredits-contracts/issues/184)
- [Reimbursement app](https://github.com/67P/kredits-contracts/pull/198)
- [Data migration](https://github.com/67P/kredits-contracts/issues/197) (without ERC20 tokens)

## Ideas

- Use [OpenZeppelin upgradable contracts](https://docs.openzeppelin.com/upgrades-plugins/1.x/) with [hardhat plugin](https://hardhat.org/plugins/hardhat-upgrades.html)
- Upgrades can currently be managed by one admin key - can be changed later to a multisig or voting contract
- permissions can be hardcoded in the contracts - we use only 4-5 different roles/permissions
- contracts can manually be linked together (the contribution contract knows the address to the contributor proxy contract address - those do not need to be changed)
- …

---

<div class="post-metadata">

**Author:** ![raucao](https://community.kosmos.org/user_avatar/community.kosmos.org/raucao/32/138_2.png) [@raucao](https://community.kosmos.org/u/raucao)\
**Post date:** [June 1, 2021, 1:22pm UTC](https://community.kosmos.org/t/the-road-to-mainnet/115/2 "2021-06-01T13:22:36Z")

</div>

> [@raucao](#):
>
> No Aragon registry, no ENS available (Question: can we get rid of the AragonPM dependency somehow?)

After looking into it for a while, we’re fairly certain that using the Aragon parts of our setup will not be feasible on RSK. We’ll have to look into replacing that functionality with either custom code and/or other, perhaps more specialized libraries or contracts.

---

<div class="post-metadata">

**Author:** ![raucao](https://community.kosmos.org/user_avatar/community.kosmos.org/raucao/32/138_2.png) [@raucao](https://community.kosmos.org/u/raucao)\
**Post date:** [June 2, 2021, 4:46pm UTC](https://community.kosmos.org/t/the-road-to-mainnet/115/3 "2021-06-02T16:46:56Z")

</div>

Quick update:

We had some nice, and fairly easy wins today, removing the Aragon parts from the Contributor contract, and using OpenZeppelin upgradeable contracts instead, then deploying to a local chain using Hardhat instead of Truffle.

> <https://github.com/67P/kredits-contracts/commit/1425c3664a8dda0af935ea0321873fa1448c0f16>

Still completely WIP, but looking promising.

---

<div class="post-metadata">

**Author:** ![raucao](https://community.kosmos.org/user_avatar/community.kosmos.org/raucao/32/138_2.png) [@raucao](https://community.kosmos.org/u/raucao)\
**Post date:** [June 8, 2021, 1:57pm UTC](https://community.kosmos.org/t/the-road-to-mainnet/115/4 "2021-06-08T13:57:02Z")

</div>

> <https://github.com/67P/kredits-contracts/pull/213>
>
> byebye aragon apps
> 
> refactoring the contracts for usage with hardhat
> 
> https:…//community.kosmos.org/t/the-road-to-mainnet/115
> 
> \### ToDos:
> \- \[x\] convert scripts to hardhat scripts
> \- \[x\] test contract upgrading
> \- \[x\] implement permissions
> \- \[x\] update readme
