Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .history/README_20240317034304.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Smart Contract Challenge

## A) Challenge

### 1) Setup a project and create a contract

#### Summary

ETHPool provides a service where people can deposit ETH and they will receive weekly rewards. Users must be able to take out their deposits along with their portion of rewards at any time. New rewards are deposited manually into the pool by the ETHPool team each week using a contract function.

#### Requirements

- Only the team can deposit rewards.
- Deposited rewards go to the pool of users, not to individual users.
- Users should be able to withdraw their deposits along with their share of rewards considering the time when they deposited.

Example:

> Let say we have user **A** and **B** and team **T**.
>
> **A** deposits 100, and **B** deposits 300 for a total of 400 in the pool. Now **A** has 25% of the pool and **B** has 75%. When **T** deposits 200 rewards, **A** should be able to withdraw 150 and **B** 450.
>
> What if the following happens? **A** deposits then **T** deposits then **B** deposits then **A** withdraws and finally **B** withdraws.
> **A** should get their deposit + all the rewards.
> **B** should only get their deposit because rewards were sent to the pool before they participated.

#### Goal

Design and code a contract for ETHPool, take all the assumptions you need to move forward.

You can use any development tools you prefer: Hardhat, Truffle, Brownie, Solidity, Vyper.

Useful resources:

- Solidity Docs: https://docs.soliditylang.org/en/v0.8.4
- Educational Resource: https://github.com/austintgriffith/scaffold-eth
- Project Starter: https://github.com/abarmat/solidity-starter

### 2) Write tests

Make sure that all your code is tested properly

### 3) Deploy your contract

Deploy the contract to any Ethereum testnet of your preference. Keep record of the deployed address.

Bonus:

- Verify the contract in Etherscan

### 4) Interact with the contract

Create a script (or a Hardhat task) to query the total amount of ETH held in the contract.

_You can use any library you prefer: Ethers.js, Web3.js, Web3.py, eth-brownie_

### 5) Contact
If you want to apply to this position, please share your solution to our Solidity Challenge to the following email: [email protected]
40 changes: 40 additions & 0 deletions .history/README_20240317034603.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
This is a [Next.js](https://nextjs.org/) project solving the solidity challenge (https://github.com/exactly/solidity-challenge), which I transformed into somekind of ETH Pool marketplace.

Many more features to come in the future: stay tuned!

## Overview

Project has dependencies on multiple technologies.

- [Pinata](https://app.pinata.cloud/) - store images, and ETH Pool metadata
- [Ganache](https://trufflesuite.com/ganache/) - private Blockchain, to run application localy

## How To

1. Clone the repository code.

2. cd to the root directory of the project and run npm install.

3. Configure the .env.development or .env.production file properly.

4. Since we are deploying the demo on Sepolia Test Network, make sure you register for one and configure the file keys.json properly.

5. I used Ganache to test the smart contracts locally: therefore remember to link truffle with your Ganache.

6. While at the root directory of the project, use truffle to migrate and deploy the smart contracts on the Sepolia Test Network of the Ethereum blockchain.

7. Then, use npm build to build the app.

8. Finally, deploy the app and start enjoying your ETH Pool marketplace.

## In Action

![GAC Logo](https://geniusandcourage.com/favicon.ico)

ETH Pool Market Place by [GAC DEV](https://geniusandcourage.com)

![ETH Pool Market Place](https://hlwsdtech.com:8081/images/ETHPool.jpg)

### 6) Where is the code?

Email [email protected] or [email protected] to get the code.
40 changes: 40 additions & 0 deletions .history/README_20240317034620.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
This is a [Next.js](https://nextjs.org/) project solving the solidity challenge (https://github.com/exactly/solidity-challenge), which I transformed into somekind of ETH Pool marketplace.

Many more features to come in the future: stay tuned!

## Overview

Project has dependencies on multiple technologies.

- [Pinata](https://app.pinata.cloud/) - store images, and ETH Pool metadata
- [Ganache](https://trufflesuite.com/ganache/) - private Blockchain, to run application localy

## How To

1. Clone the repository code.

2. cd to the root directory of the project and run npm install.

3. Configure the .env.development or .env.production file properly.

4. Since we are deploying the demo on Sepolia Test Network, make sure you register for one and configure the file keys.json properly.

5. I used Ganache to test the smart contracts locally: therefore remember to link truffle with your Ganache.

6. While at the root directory of the project, use truffle to migrate and deploy the smart contracts on the Sepolia Test Network of the Ethereum blockchain.

7. Then, use npm build to build the app.

8. Finally, deploy the app and start enjoying your ETH Pool marketplace.

## In Action

![GAC Logo](https://geniusandcourage.com/favicon.ico)

ETH Pool Market Place by [GAC DEV](https://geniusandcourage.com)

![ETH Pool Market Place](https://hlwsdtech.com:8081/images/ETHPool.jpg)

### Where is the code?

Email [email protected] or [email protected] to get the code.
46 changes: 46 additions & 0 deletions .history/README_20240317093719.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
This is a [Next.js](https://nextjs.org/) project solving the solidity challenge (https://github.com/exactly/solidity-challenge), which I transformed into somekind of ETH Pool marketplace.

## Contract Details

Contract deployed on Euthereum Sepolia Test Network.

transaction hash: 0x053f4d857be021a5a526f10dd364fb5d04234bf60f6c60a7f7cc6f667d5006e8

Many more features to come in the future: stay tuned!

## Overview

Project has dependencies on multiple technologies.

- [Pinata](https://app.pinata.cloud/) - store images, and ETH Pool metadata
- [Ganache](https://trufflesuite.com/ganache/) - private Blockchain, to run application localy

## How To

1. Clone the repository code.

2. cd to the root directory of the project and run npm install.

3. Configure the .env.development or .env.production file properly.

4. Since we are deploying the demo on Sepolia Test Network, make sure you register for one and configure the file keys.json properly.

5. I used Ganache to test the smart contracts locally: therefore remember to link truffle with your Ganache.

6. While at the root directory of the project, use truffle to migrate and deploy the smart contracts on the Sepolia Test Network of the Ethereum blockchain.

7. Then, use npm build to build the app.

8. Finally, deploy the app and start enjoying your ETH Pool marketplace.

## In Action

![GAC Logo](https://geniusandcourage.com/favicon.ico)

ETH Pool Market Place by [GAC DEV](https://geniusandcourage.com)

![ETH Pool Market Place](https://hlwsdtech.com:8081/images/ETHPool.jpg)

### Where is the code?

Email [email protected] or [email protected] to get the code.
46 changes: 46 additions & 0 deletions .history/README_20240317102300.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
This is a [Next.js](https://nextjs.org/) project solving the solidity challenge (https://github.com/exactly/solidity-challenge), which I transformed into somekind of ETH Pool marketplace.

## Contract Details

Contract deployed on Euthereum Sepolia Test Network and verified on Etherscan: https://sepolia.etherscan.io/

transaction hash: 0x053f4d857be021a5a526f10dd364fb5d04234bf60f6c60a7f7cc6f667d5006e8

Many more features to come in the future: stay tuned!

## Overview

Project has dependencies on multiple technologies.

- [Pinata](https://app.pinata.cloud/) - store images, and ETH Pool metadata
- [Ganache](https://trufflesuite.com/ganache/) - private Blockchain, to run application localy

## How To

1. Clone the repository code.

2. cd to the root directory of the project and run npm install.

3. Configure the .env.development or .env.production file properly.

4. Since we are deploying the demo on Sepolia Test Network, make sure you register for one and configure the file keys.json properly.

5. I used Ganache to test the smart contracts locally: therefore remember to link truffle with your Ganache.

6. While at the root directory of the project, use truffle to migrate and deploy the smart contracts on the Sepolia Test Network of the Ethereum blockchain.

7. Then, use npm build to build the app.

8. Finally, deploy the app and start enjoying your ETH Pool marketplace.

## In Action

![GAC Logo](https://geniusandcourage.com/favicon.ico)

ETH Pool Market Place by [GAC DEV](https://geniusandcourage.com)

![ETH Pool Market Place](https://hlwsdtech.com:8081/images/ETHPool.jpg)

### Where is the code?

Email [email protected] or [email protected] to get the code.
46 changes: 46 additions & 0 deletions .history/README_20240317111245.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
This is a [Next.js](https://nextjs.org/) project solving the solidity challenge (https://github.com/exactly/solidity-challenge), which I transformed into somekind of ETH Pool marketplace.

## Contract Details

Contract deployed on Euthereum Sepolia Test Network and verified on Etherscan: https://sepolia.etherscan.io/

Contract: 0x57F5a2cF6127240257c953E2237f52e2F17E62a5

Many more features to come in the future: stay tuned!

## Overview

Project has dependencies on multiple technologies.

- [Pinata](https://app.pinata.cloud/) - store images, and ETH Pool metadata
- [Ganache](https://trufflesuite.com/ganache/) - private Blockchain, to run application localy

## How To

1. Clone the repository code.

2. cd to the root directory of the project and run npm install.

3. Configure the .env.development or .env.production file properly.

4. Since we are deploying the demo on Sepolia Test Network, make sure you register for one and configure the file keys.json properly.

5. I used Ganache to test the smart contracts locally: therefore remember to link truffle with your Ganache.

6. While at the root directory of the project, use truffle to migrate and deploy the smart contracts on the Sepolia Test Network of the Ethereum blockchain.

7. Then, use npm build to build the app.

8. Finally, deploy the app and start enjoying your ETH Pool marketplace.

## In Action

![GAC Logo](https://geniusandcourage.com/favicon.ico)

ETH Pool Market Place by [GAC DEV](https://geniusandcourage.com)

![ETH Pool Market Place](https://hlwsdtech.com:8081/images/ETHPool.jpg)

### Where is the code?

Email [email protected] or [email protected] to get the code.
46 changes: 46 additions & 0 deletions .history/README_20240317111817.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
This is a [Next.js](https://nextjs.org/) project solving the solidity challenge (https://github.com/exactly/solidity-challenge), which I transformed into somekind of ETH Pool marketplace.

## Contract Details

Contract deployed on Euthereum Sepolia Test Network and verified on Etherscan: https://sepolia.etherscan.io/

Contract: 0x57F5a2cF6127240257c953E2237f52e2F17E62a5

Many more features to come in the future: stay tuned!

## Overview

Project has dependencies on multiple technologies.

- [Pinata](https://app.pinata.cloud/) - store images, and ETH Pool metadata
- [Ganache](https://trufflesuite.com/ganache/) - private Blockchain, to run application localy

## How To

1. Clone the repository code.

2. cd to the root directory of the project and run npm install.

3. Configure the .env.development or .env.production file properly.

4. Since we are deploying the demo on Sepolia Test Network, make sure you register for one and configure the file keys.json properly.

5. I used Ganache to test the smart contracts locally: therefore remember to link truffle with your Ganache.

6. While at the root directory of the project, use truffle to migrate and deploy the smart contracts on the Sepolia Test Network of the Ethereum blockchain.

7. Then, use npm build to build the app.

8. Finally, deploy the app and start enjoying your ETH Pool marketplace.

## In Action

![GAC Logo](https://geniusandcourage.com/favicon.ico)

ETH Pool Market Place by [GAC DEV](https://geniusandcourage.com)

![ETH Pool Market Place](https://hlwsdtech.com:8081/images/ETHPool.jpg)

### Where is the code?

Email [email protected] or [email protected] to get the code.
46 changes: 46 additions & 0 deletions .history/README_20240317111900.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
This is a [Next.js](https://nextjs.org/) project solving the solidity challenge (https://github.com/exactly/solidity-challenge), which I transformed into somekind of ETH Pool marketplace.

## Contract Details

Contract deployed on Euthereum Sepolia Test Network and verified on Etherscan: https://sepolia.etherscan.io/

Contract: 0x57F5a2cF6127240257c953E2237f52e2F17E62a5

Many more features to come in the future: stay tuned!

## Overview

Project has dependencies on multiple technologies.

- [Pinata](https://app.pinata.cloud/) - store images, and ETH Pool metadata
- [Ganache](https://trufflesuite.com/ganache/) - private Blockchain, to run application localy

## How To

1. Clone the repository code.

2. cd to the root directory of the project and run npm install.

3. Configure the .env.development or .env.production file properly.

4. Since we are deploying the demo on Sepolia Test Network, make sure you register for one and configure the file keys.json properly.

5. I used Ganache to test the smart contracts locally: therefore remember to link truffle with your Ganache.

6. While at the root directory of the project, use truffle to migrate and deploy the smart contracts on the Sepolia Test Network of the Ethereum blockchain.

7. Then, use npm build to build the app.

8. Finally, deploy the app and start enjoying your ETH Pool marketplace.

## In Action

![GAC Logo](https://geniusandcourage.com/favicon.ico)

ETH Pool Market Place by [GAC DEV](https://geniusandcourage.com)

![ETH Pool Market Place](https://hlwsdtech.com:8081/images/ETHPool.jpg)

### Where is the code?

Email [email protected] or [email protected] to get the code.
Loading