Giter Club home page Giter Club logo

validatedtoken's Introduction

Validated Token Example Contracts

Status: DRAFT

CircleCI

Example code for the Vaidated Token EIP

Architecture

The basic relationship of this protocol is very simple: there are validators that expose two check functions:

  • check(address token, address user) returns (byte status)
  • check(address token, address to, address from, uint256 amout) returns (byte status)
    +------+
    │Caller|
    +------+
      │  ↑
check │  │ status
      ↓  │
  +---------+
  |Validator|
  +---------+

Why list this as a Caller and not Token? Because validators may be arranged into a DAG of validation dependencies. They may check any and all of their dependencies, or have more complex logic, change which dependencies are required based on who they're validating, and so on.

Example

A somewhat contrived example is for purchasing a holiday via the blockchain. Here, we have TravelToken, which is your travel package (flight & hotel details, &c). In order to purchase such a token, you need to be able to have a valid travel visa, have all of your immunizations up to date, and prove that you are who you say you are. In turn, the travel visa requires that you're not a crminal on a government watch list.

Each of these validation services may be operated variously by the travel agency, governments, and identity services. By implementing the TokenValidator interface, these validation services can interact with other validators to check information that they don't own.

Links

validatedtoken's People

Contributors

bmann avatar expede avatar naumenkogs avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

validatedtoken's Issues

Refactoring and tests

  • refactor dependencies
  • general cleanup
  • remove weird inherited functions we don't really need
  • simple validator test
  • reference token test
  • truffle overload issue

Restrict mutability when supported by Solidity

Expected Behavior

Imbue a function with fewer mutability rights than super

Current Behavior

Solidity complains that the ABI changes.

Possible Solution

  1. Wait for Solidity to support this feature
  2. Update our contracts

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.