Smart Contract info

Smart Contract info

  • Contracts
  • TodoList
  • Help
  • Github
  • Blog

›UNCATEGORIZED

BASIC

  • A
  • Factory
  • Marriage
  • MyContract
  • BugSquash
  • HelloWorld

BASIC / ECOM

  • Customer
  • Supplier

COMPLEXGAMES

  • Ownable
  • blackJack
  • PowerEther
  • Buffer
  • CBOR
  • OraclizeAddrResolverI
  • OraclizeI
  • Ownable
  • PowerEtherBase
  • PowerEtherHelper
  • PowerFour
  • PowerOne
  • PowerTwo
  • SafeMath
  • strings
  • usingOraclize

DATASTRUCT

  • LinkedList
  • Stack

FINANCE

  • CrowdBank
  • Mortgage

GAMES

  • CasinoRoulette
  • Itontine
  • Cplayer
  • Ctontine
  • PredictionMarket
  • RNGLottery
  • RecurringLottery
  • Roulette
  • SatoshiDice
  • SimpleLottery
  • WhatDoesNadiaThink

OTHER

  • e0x

OTHER / CREDVERT

  • ApplicantFactory
  • CredentialOrgFactory
  • CredentialFactory
  • CredentialOrgFactory
  • CredentialOrgFactory
  • Ownable
  • Pausable
  • SafeMath32

OTHER / MARKETPLACE

  • DigitalLocker
  • WorkbenchBase

SCHEMES

  • Government
  • GradualPonzi
  • SimplePonzi
  • SimplePyramid

TOKENS

  • BasicToken
  • ERC20
  • TokenSale

TOKENS / ATTENDANCETOKEN

  • EIP20
  • EIP20Interface
  • Migrations
  • ApproveAndCallFallBack
  • AttendanceCoinMembers
  • ERC20Interface
  • FixedSupplyToken
  • Owned
  • SafeMath
  • ApproveAndCallFallBack
  • ERC20Interface
  • FixedSupplyToken
  • Owned
  • SafeMath

UTIL

  • MarriageInvestment
  • Stock
  • SafeMath
  • Welfare
  • PromiseBox

UNCATEGORIZED

  • Authentication
  • TodoList
  • Users

Authentication

contract Authentication

Basic authentication contract, tracks list of all users.

Source: contracts/Authentication.sol
Author: David Li <davidli012345@gmail.com>

Index

  • UserCreated
  • UserDeleted
  • UserUpdated
  • destroy
  • login
  • onlyExistingUser
  • onlyValidName
  • signup
  • update

Reference

Events

  • UserCreated

    event UserCreated(address _address, bytes32 _name, uint256 _created_at)
    Parameters:
    _address - address
    _name - bytes32
    _created_at - uint256
  • UserDeleted

    event UserDeleted(address _address)
    Parameters:
    _address - address
  • UserUpdated

    event UserUpdated(address _address, bytes32 _name)
    Parameters:
    _address - address
    _name - bytes32

Modifiers

  • onlyExistingUser

    modifier onlyExistingUser()
  • onlyValidName

    modifier onlyValidName(bytes32 name)
    Parameters:
    name - bytes32

Functions

  • destroy

    function destroy() public

    Destroy existing username.

    Modifiers:
    onlyExistingUser
  • login

    function login() public view returns (bytes32)
    Modifiers:
    onlyExistingUser
    Returns:
    username
  • signup

    function signup(bytes32 name) public payable returns (bytes32)

    Checks if user exists If yes return user name If no, check if name was sent If yes, create and return user.

    Modifiers:
    onlyValidName
    Parameters:
    name - the username to be created.
    Returns:
    username of created user
  • update

    function update(bytes32 name) public payable returns (bytes32)

    Updating user name.

    Modifiers:
    onlyValidName onlyExistingUser
    Parameters:
    name - updating username
    Returns:
    updated username
← PromiseBoxTodoList →
Smart Contract info
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Copyright © 2019 David Li