Skip to content

cryptoprimitive/simple-Ethereum-Dapp-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple frontend template for Dapp creation

A simple template for making nice-looking Dapps FAST. Provides a ready-made frontend and simple Ethereum contract interaction.

The template is based on CryptoPrimitve's Crowdserve Dapp https://cryptoprimitive.github.io/crowdserve-debut/

Instructions

Adding contracts

You can add contracts through the loadContracts function in web3_contractsLoader.js

For each contract deployed, you must provide a contract address and an ABI.

loadContracts(contract1Address, contract1Abi , contract2Address, contract2Abi, etc...);

Each contract can then be accessed with loadedContracts[i] where i is the ith contract loaded.

loadedContracts[i].myFunction();

By default, a getAllEvents() function is added to the contract that fetches all the events in the contract.

Adding blocks of content to the Dapp

You can easily add blocks of content to the Dapp by copying the default empty block and filling it with what you wish. You can set the amount of space occupied by content by using bootsrap colums (EG: col-3-md, col-6-md, etc...).

<!-- What follows is an examples of an empty block ready to be filled  -->
<h2>This is a custom block</h2>
<div class="mainBlock">
  <div class="row well well-sm">
    <div class="col-md-12">
      <p>You can fill me with content!</p>
    </div>
  </div>
</div>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.4%
  • HTML 12.6%
  • CSS 3.0%