zingsurfer / eventblock

EventBlock: A decentralized calendar

Home Page:https://eventblock.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A decentralized calendar

AboutTechProductionDevelopment


About

Coordination is hard. It’s difficult to coordinate all the people, all the places, all the things — we’re here to fix that for you! Collaborate with friends in real time on a public, decentralized, verifiable, on chain calendar dApp.

EventBlock.io is a decentralized calendar dApp with editable and verifiable events stored on-chain. EventBlock can be used by DAOs to mint a calendar for community events, track governance, follow NFT mints, and more!

EventBlock is built with custom solidity, works with MetaMask wallets on multiple networks, is monitored by Open Zeppelin’s Defender, and has a fully functioning frontend in React deployed on Netlify.

The team is applying for various bounties, including creating innovative apps on Fantom, deploying a dApp on an L2 using Infura and Truffle, and deploying a decentralized frontend component for any Ethereum project or hack on Aurora. We started with deploying on Aurora for EthDenver last week. Now, we are branching out to explore other networks, including Opera for Fantom’s hackathon!

BuidlBox submission:

Fantom Devpost hackathon submission:

Demo Gif: EventBlock.io in Action

See the contract update on chain from the GIF demo above here:

Youtube link:

EventBlock.io ETHDenver 2023 Pitch

View the contracts verified on chain here:

View onchain transactions of deployment and update txs: https://explorer.testnet.aurora.dev/address/0xAeb9b07A09EC3c7c604418eC3f6b0CfdA42e0E93/transactions#address-tabs

More info can be viewed here: https://www.notion.so/EventBlock-6a54739789f6489685f0e03f5e533ca9

OpenZeplin Defender: https://defender.openzeppelin.com/#/admin/contracts/auroratest-0xAeb9b07A09EC3c7c604418eC3f6b0CfdA42e0E93

Tech

EventBlock was built with:

Production

This project is deployed on Netlify with contiunuos integration support via GitHub.

Set environment variables in the Netlify Build:

INFURA_KEY=
MNEMONIC=

Netlify build settings:

  • Runtime: Not set
  • Base directory: Not set
  • Build command: cd truffle && yarn install && cd ../client && echo "REACT_APP_CONTRACT_ENV=production" >> .env && yarn install && yarn build
  • Publish directory: client/build

Explanation of the build command:

# Install truffle dependencies
cd truffle && yarn install &&
  # Move to client directory
  cd ../client &&
  # Manually add an env var (this particular one didn't show up without this)
  echo "REACT_APP_CONTRACT_ENV=production" >> .env &&
  # Install client dependencies and build
  yarn install && yarn build

Development

This project includes a Makefile. Run make to list all available commands.

1. Setup

Install dependencies:

make setup

Then update env vars in truffle/.env with your own.

Hereafter, new dependencies can be installed with: make install.

2. Deploy

Devnet

# Open a separate terminal and run Ganache,
# a simulated Ethereum blockchain on your machine.
ganache

# Keep Ganache running and open another terminal.
# Compile and deploy contracts to Ganache.
make dev_deploy

Fantom / Aurora testnet

For Aurora, run: make aurora_test_deploy. For Fantom, run: make fantom_test_deploy.

3. Connect Metamask

Set up a separate browser profile with its own clean extension installation of Metamask for developing than the one you typically use.

Then enable test networks in Metamask:
Settings > Advanced > Toggle "Show test networks"

Devnet

💡 Explorer: Ganache's built in block explorer

Ganache outputs a list of pre-funded test accounts that you can import. Alternately, you can specify an account to fund when you run ganache with an option like -m (docs). Then switch Metamask to the Localhost 8545 network.

Testnet

💡 Explorers: Aurora testnet explorer & Fantom testnet explorer

Add Aurora testnet to metamask. Then get funds from the Aurora faucet (select "devnet").

Add Fantom testnet to metamask. Then get funds from the Fantom faucet.

4. Start Client

Run make start_client.

Testing

Run make test.

Challenges faced

Overall, we enjoyed working with Fantom. The docs were clear, and it was easy to quickly find info on how to deploy, connect Metamask, and get testnet faucet funds.

Our biggest challenge was deploying to mainnet with Truffle. We tried a number of configs before we were able to successfully deploy.

We tried the config in the docs. We also tried changing the timeoutBlocks and gas. It either failed because:

  1. exceeded the block limit (with a gas value you set). and to try sending less gas
  2. transaction underpriced.

We ended up setting the gas price super high to push it through.

Infura, Truffle, and Ganache were very easy to work with. This combo enabled us to get up and running quickly locally, even with no prior experience of working on Solidity. The docs were an excellent resource, and overall we had a great experience with them. Our challenges arose when we were trying to adapt from what we had working locally to deploy to Netlify. As a team new to solidity, getting our contract verified onchain for the OpenZeppelin Defender bounty took some digging to figure out. Deploying also took far more effort than we expected. More docs on deploying and verifying a Solidity contract would be greatly appreciated. We were able to get it working, eventually https://defender.openzeppelin.com/#/admin/contracts/auroratest-0xAeb9b07A09EC3c7c604418eC3f6b0CfdA42e0E93

Bounties

About

EventBlock: A decentralized calendar

https://eventblock.io/

License:MIT License


Languages

Language:JavaScript 96.4%Language:SCSS 2.8%Language:Solidity 0.5%Language:Makefile 0.2%Language:HTML 0.1%