Table of Contents
Smart contracts are immutable, which means they can not be changed once it's deployed into the blockchain network. There are some patterns to make the smart contract be edited, and one of these patterns is the Proxy Pattern
.
We made an upgradable smart contract using Proxy Pattern
, where you can upgrade the smart contract, and add or delete some functionalities, by changing the address of the contract the Proxy
will refer to. This is helpful as you will not lose any data, as the Proxy
address will not change.
We used blockchain technology, the Ethereum network, and smart contract development technology to achieve our goal.
The smart contract is written in solidity, and we used JS/TS to test and interact with the contract.
The smart contract is built using hardhat framework, ethersjs, and some other packages and dependencies that speed up in development process.
This is an example of how to run the smart contract locally on your computer.
You need to check if nodejs and npm are installed on your computer first.
npm --version
node --version
If you don't have node, you can install it from there official website
Below is an example of how to start interacting with the smart contract locally.
- Clone the repo
git clone https://github.com/Al-Qa-qa/upgradable-proxy.git
- Install NPM packages (remember to move to the directory
upgradable-proxy
first)npm install
- Code installed successfully, you can start testing it.
You can interact with the smart contract on the local network now.
npm run compile
to compile the solidity codenpm run deploy
to deploy the contract on the hardhat networknpm run test
to run the unit testing of the contract
This project is under the MIT License. See LICENSE
for more information.
Al-Qa'qa' - @Al_Qa_qa - alqaqa.fighter@gmail.com
Project Link: https://github.com/Al-Qa-qa/upgradable-proxy
We used some web services, open-source projects, and packages that helped us in our development process, which will be listed below.
We would like to apologize if we used a free package or service and forgot to mention it.