Skip to content
forked from dvinubius/posther

Angular dApp to post text on Ethereum with ultra low gas fees. Proof of concept.

Notifications You must be signed in to change notification settings

ARMC0DE/posther

 
 

Repository files navigation

Posther

This project is a proof of concept for a dApp to persist text data on Ethereum while keeping gas fees very low. Instead of explicitly storing the text in the EVM storage, we merely keep it as part of the calldata.

The contract has an owner and can be configured to take user fees, such that it does cost ETH to post. But the fee can be also set to 0.

The project has been deployed to the Kovan Test Network.

Live here.

In order to post you'll need some testnet ETH. Use this faucet which is kindly maintained by Chainlink.

For Developers

Advanced Sample Hardhat Project

This project demonstrates an advanced Hardhat use case, integrating other tools commonly used alongside Hardhat in the ecosystem.

The project includes a web frontend which is optimized to be developed within a hardhat project, making use of the deployment information.

Smart Contract Development

The hardhat.config.js is optimized for development with a local ganache running in a deterministic fashion and "real-world" deployment on the kovan testnet. Start ganache with ganache-cli --deterministic

Some useful custom tasks are included in tasks/general.js

Deployment history is handled in a simple fashion. We keep track of deployments in order to use the most recently deployed contract address in specific hardhat tasks and the frontend configuration. The hardhat deploy plugin can be useful if there are more complex demands.

General Hardhat Information

Try running some of the following tasks:

npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat run scripts/deploy.js
node scripts/deploy.js
npx eslint '**/*.js'
npx eslint '**/*.js' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix

Etherscan verification

To try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Ropsten.

In this project, copy the .env.template file to a file named .env, and then edit it to fill in the details. Enter your Etherscan API key, your Ropsten node URL (eg from Alchemy), and the private key of the account which will send the deployment transaction. With a valid .env file in place, first deploy your contract. Then, copy the deployment address and paste it in to replace DEPLOYED_CONTRACT_ADDRESS in this command:

npx hardhat verify --network ropsten DEPLOYED_CONTRACT_ADDRESS "Hello, Hardhat!"

About

Angular dApp to post text on Ethereum with ultra low gas fees. Proof of concept.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 43.3%
  • SCSS 26.1%
  • JavaScript 17.6%
  • HTML 10.0%
  • Solidity 3.0%