Pylon Token Ethereum Contracts
Switch branches/tags
Nothing to show
Clone or download
Latest commit 2b8d4c1 Sep 27, 2017
Permalink
Failed to load latest commit information.
build/contracts 0.2.0 Sep 8, 2017
contracts 1.2.0 Sep 27, 2017
migrations 0.1.1 Aug 31, 2017
test 0.1.1 Aug 31, 2017
README.md 1.2.0 Sep 27, 2017
truffle.js 0.1.1 Aug 31, 2017

README.md

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