Giter Club home page Giter Club logo

aeternity-token-sale-example's Introduction

Aeternity Token Sale Example

This repository provides an example of a contribution campaign/token sale conducted on top of aeternity blockchain.

The tokens examples are following the AEX-9 standard for fungible tokens on aeternity.

Documentation

Contracts

Token Sale contract

The token-sale.aes contract is implementing the interface of an aex9 fungible token. Since we only need to call entrypoint mint() in order to issue new tokens for people that contributed to the campaign we are only using this interface:

contract FungibleTokenFullInterface =
  entrypoint mint                 : (address, int)          => unit

The contract also has few more functions - contribute, set_token and withdraw which respectively do the following:

set_token - this should be called in order to specify the address of the token contract which would be issued during the contribution campaign.

contribute - allows people to send value in AE tokens and calls the mint function on the specified token contract in the state of the contract, issuing new tokens amount according to the price ratio speicified in the token sale.

withdraw - allows the owner of the token-sale contract to withdraw the collected amount of AE.

Fungible token contract

This is a slightly modified version of the mintable aex9 contract. The difference is we have specified a new role - minter who is allowed to issue new tokens, increasing the total_supply.

In this case the minter is our token-sale contract.

aeternity-token-sale-example's People

Contributors

dependabot[bot] avatar mradkov avatar thepiwo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.