Giter Club home page Giter Club logo

ethereum-contracts's Introduction

Pylon token contract v0.2.0 (alpha)

Pylon token is a smart-contract-based token, which enables to invest in renewable energy installations.

Total Supply: 3750000000000000000000000
Token name: Pylon Token
Decimal Units: 18
Token symbol: PYLNT
Max percentage: 10
Minutes for investment: 46770

Warning

Pylon token is a work in progress. Make sure you understand the risks before using it.

The Smart Token Standard

Motivation

This smart contract allow to invest in future installations.

Specification

SmartToken

First and foremost, a Smart Token is also an ERC-20 compliant token. As such, it implements both the standard token methods and the standard token events.

Methods

Note that these methods can only be executed by the token owner.

transferOwnership

function transferOwnership(address newOwner)

Transfer the owner ship of the contract to other address.


freezeAccount

function freezeAccount(address target, bool freeze)

Lock account for not allow transfers.


Events

FrozenFunds

event FrozenFunds(address target, bool frozen)

Triggered when account is locked.


FrozenFunds

event FrozenFunds(address target, bool frozen)

Triggered when account is locked.


Pylon Token contract stantard functions

The following section describes standard functions a Pylon Token user can implement.

Motivation

Those will allow dapps and wallets to buy, sell the token and invest in new renewable energy installations using the token.

The most important here is change.

Specification

Methods

transfer

function transfer(address _to, uint256 _value)

Transfer tokens to other address.


approve

function approve(address _spender, uint256 _value)

Allow another contract to spend some tokens in your behalf.


reserves

function approveAndCall(address _spender, uint256 _value, bytes _extraData)

Approve and then communicate the approved contract in a single tx.


transferFrom

function transferFrom(address _from, address _to, uint256 _value)

Transfer from an address to other address.


transferFrom

function transferFrom(address _from, address _to, uint256 _value)

Transfer from an address to other address.


panic

function panic(uint256 panicWallU)

Declare panic mode or not.


status

function status(uint256 sellAmount, uint256 buyAmount)

Recalculate the price.


buy

function buy()

Buy tokens to a seller.


sell

function sell()

Sell tokens.


deposit

function deposit()

Add ethers to contract.


checkInvestmentOfferCode

function checkInvestmentOfferCode( uint investmentNumber, address beneficiary, uint etherAmount, bytes transactionBytecode)

Function to check if a investment offer code matches.


invest

function invest(uint investmentNumber, string justificationText, address target)

Invest ethers to a new investment offer and get tokens and part of a renewable energy installation.


Events

LogDeposit

event LogDeposit(address sender, uint amount)

Triggered when a deposit is done.


LogWithdrawal

event LogWithdrawal(address receiver, uint amount)

Triggered when a withdrawal is done.


LogBuy

event LogBuy(address receiver, uint amount)

Triggered when a buy is done.


LogTransfer

event LogTransfer(address sender, address to, uint amount)

Triggered when a transfer is done.


Transfer

event Transfer(address indexed from, address indexed to, uint256 value)

This generates a public event on the blockchain that will notify clients.


Testing

Testing mode.

LINKS

License

Pylon token is open source and distributed under the Apache License v2.0

ethereum-contracts's People

Contributors

marcfeliu avatar

Watchers

AshKh 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.