SlideShare a Scribd company logo
Service Tokens
alex.batlin@trustology.io
https://github.com/Trustology/ServiceToken
Alex Batlin
Founder & CEO of Trustology
Before starting Trustology, Alex Batlin was the Global
Head of Emerging Business & Technology team and
the Global Blockchain Lead at BNY Mellon,
responsible for research and development of
emerging technology enabled business strategy,
business models, products and services.
Previously, Alex was a Senior Innovation Manager at
UBS, a founding head of both UBS's FinTech
Innovation Lab based in UK's Level 39 accelerator and
UBS's Crypto 2.0 Pathfinder research programme into
blockchain technology and its impact on business
models.
Alex is the founding member of EEA, USC, Trusted IoT
and R3 consortias.
Trustology
safeguarding crypto assets
Trustology is building a custody platform to
safeguard your crypto assets.
Our smart accounts will be customisable to satisfy
the diverse needs of individual, corporate, exchange
and institutional clients, now and in the future.
Problem
Consultancy
Q1 Q2 Q3 Q4
Budget Approval Consultancy NeedBudget Risk
Consultant Client
Service Units
Consultant
100
82
010
Client
100
91
19
Service Tokens
Consultant
100
82
010
Client
100
82
010
Service Token Components
Service Token Contracts
ServiceAgreement Workflow
ServiceTask Workflow
AgreementFactory
contract AgreementFactory {
event Agreement(ServiceAgreement agreement, ...);
ServiceAgreement[] public agreements; // registry of agreements
...
function createAgreement(...) {
ServiceAgreement agreement = new ServiceAgreement(...);
agreements.push(agreement);
Agreement(agreement, msg.sender, issuer, beneficiary);
}
function getAgreements() returns (ServiceAgreement[] _agreements) {
return agreements;
}
...
}
ServiceAgreement
contract ServiceAgreement {
enum States { Created, Proposed, Withdrawn, Accepted, Rejected }
event StateChange(States indexed oldState, States indexed newState);
States public state;
ServiceToken public token; // link to the created token
AgreementFactory public factory; // validatecontract is recognised by factory
... modifier onlyIssuer { require(msg.sender == issuer); _; } ...
function ServiceAgreement(...) {
... factory = AgreementFactory(msg.sender);
state = States.Created;
}
function propose(bytes32 hashedHash) onlyIssuer onlyCreated {
contentHash = hashedHash;
state = States.Proposed;
StateChange(States.Created, States.Proposed);
}
}
ServiceToken
contract ServiceToken {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
ServiceAgreement public agreement; // Backlink to agreement
ServiceTask[] public tasks; // Stores the registry of creating task contracts
...
function balanceOf(address _addr) constant returns (uint256 balance) {
if ((now > agreement.validFrom()) && (now < agreement.expiresEnd())) {
return balances[_addr]; // otherwise return the balance as is
} else {
return 0;
}
}
...
function transfer(address _to, uint256 _value) {
... require(now > agreement.validFrom());
require(now < agreement.expiresEnd()); ...
}
}

More Related Content

Similar to Service Token QCON Presentation

Blockchain architected
Blockchain architectedBlockchain architected
Blockchain architected
IBM Sverige
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on Azure
Nuri Cankaya
 
“Create your own cryptocurrency in an hour” - Sandip Pandey
“Create your own cryptocurrency in an hour” - Sandip Pandey“Create your own cryptocurrency in an hour” - Sandip Pandey
“Create your own cryptocurrency in an hour” - Sandip Pandey
EIT Digital Alumni
 
Hello world contract
Hello world contractHello world contract
Hello world contract
Gene Leybzon
 
Ethereum Smart Contracts 101 with Cryptizens.io
Ethereum Smart Contracts 101 with Cryptizens.ioEthereum Smart Contracts 101 with Cryptizens.io
Ethereum Smart Contracts 101 with Cryptizens.io
Thomas Charles Vanderstraeten
 
Blockchain envisioning - Solution brief
Blockchain envisioning  - Solution briefBlockchain envisioning  - Solution brief
Blockchain envisioning - Solution brief
Pablo Junco
 
Building and deploying microservices with event sourcing, CQRS and Docker (Me...
Building and deploying microservices with event sourcing, CQRS and Docker (Me...Building and deploying microservices with event sourcing, CQRS and Docker (Me...
Building and deploying microservices with event sourcing, CQRS and Docker (Me...
Chris Richardson
 
Working with Smart contracts in Javascript
Working with Smart contracts in JavascriptWorking with Smart contracts in Javascript
Working with Smart contracts in Javascript
Mikhail Kuznetcov
 
Blockchain on Azure
Blockchain on AzureBlockchain on Azure
Blockchain on Azure
Nuri Cankaya
 
Stacks 2.0 Introduction ($STX)
Stacks 2.0 Introduction ($STX)Stacks 2.0 Introduction ($STX)
Stacks 2.0 Introduction ($STX)
Trevor Owens
 
Using Queryable State for Fun and Profit
Using Queryable State for Fun and ProfitUsing Queryable State for Fun and Profit
Using Queryable State for Fun and Profit
Flink Forward
 
Brugu Blockchain Services
Brugu Blockchain ServicesBrugu Blockchain Services
Brugu Blockchain Services
laurastephen7
 
Blockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton SitnikovBlockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton Sitnikov
DataFest Tbilisi
 
Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...
Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...
Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...
Daniel Riceberg
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Codemotion
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Codemotion
 
Blockchain development services
Blockchain development servicesBlockchain development services
Blockchain development services
Vishvendra Saini
 
Blokpark - Decentralized SaaS Property Management System
Blokpark - Decentralized SaaS Property Management SystemBlokpark - Decentralized SaaS Property Management System
Blokpark - Decentralized SaaS Property Management System
Daniel Riceberg
 
P8 a blockchain framework for insurance processes
P8 a blockchain framework for insurance processesP8 a blockchain framework for insurance processes
P8 a blockchain framework for insurance processes
devid8
 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchain
Bellaj Badr
 

Similar to Service Token QCON Presentation (20)

Blockchain architected
Blockchain architectedBlockchain architected
Blockchain architected
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on Azure
 
“Create your own cryptocurrency in an hour” - Sandip Pandey
“Create your own cryptocurrency in an hour” - Sandip Pandey“Create your own cryptocurrency in an hour” - Sandip Pandey
“Create your own cryptocurrency in an hour” - Sandip Pandey
 
Hello world contract
Hello world contractHello world contract
Hello world contract
 
Ethereum Smart Contracts 101 with Cryptizens.io
Ethereum Smart Contracts 101 with Cryptizens.ioEthereum Smart Contracts 101 with Cryptizens.io
Ethereum Smart Contracts 101 with Cryptizens.io
 
Blockchain envisioning - Solution brief
Blockchain envisioning  - Solution briefBlockchain envisioning  - Solution brief
Blockchain envisioning - Solution brief
 
Building and deploying microservices with event sourcing, CQRS and Docker (Me...
Building and deploying microservices with event sourcing, CQRS and Docker (Me...Building and deploying microservices with event sourcing, CQRS and Docker (Me...
Building and deploying microservices with event sourcing, CQRS and Docker (Me...
 
Working with Smart contracts in Javascript
Working with Smart contracts in JavascriptWorking with Smart contracts in Javascript
Working with Smart contracts in Javascript
 
Blockchain on Azure
Blockchain on AzureBlockchain on Azure
Blockchain on Azure
 
Stacks 2.0 Introduction ($STX)
Stacks 2.0 Introduction ($STX)Stacks 2.0 Introduction ($STX)
Stacks 2.0 Introduction ($STX)
 
Using Queryable State for Fun and Profit
Using Queryable State for Fun and ProfitUsing Queryable State for Fun and Profit
Using Queryable State for Fun and Profit
 
Brugu Blockchain Services
Brugu Blockchain ServicesBrugu Blockchain Services
Brugu Blockchain Services
 
Blockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton SitnikovBlockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton Sitnikov
 
Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...
Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...
Blokpark - Decentralized SaaS Property Management System Backed by Real Estat...
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
Blockchain development services
Blockchain development servicesBlockchain development services
Blockchain development services
 
Blokpark - Decentralized SaaS Property Management System
Blokpark - Decentralized SaaS Property Management SystemBlokpark - Decentralized SaaS Property Management System
Blokpark - Decentralized SaaS Property Management System
 
P8 a blockchain framework for insurance processes
P8 a blockchain framework for insurance processesP8 a blockchain framework for insurance processes
P8 a blockchain framework for insurance processes
 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchain
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

Service Token QCON Presentation

  • 2. Alex Batlin Founder & CEO of Trustology Before starting Trustology, Alex Batlin was the Global Head of Emerging Business & Technology team and the Global Blockchain Lead at BNY Mellon, responsible for research and development of emerging technology enabled business strategy, business models, products and services. Previously, Alex was a Senior Innovation Manager at UBS, a founding head of both UBS's FinTech Innovation Lab based in UK's Level 39 accelerator and UBS's Crypto 2.0 Pathfinder research programme into blockchain technology and its impact on business models. Alex is the founding member of EEA, USC, Trusted IoT and R3 consortias.
  • 3. Trustology safeguarding crypto assets Trustology is building a custody platform to safeguard your crypto assets. Our smart accounts will be customisable to satisfy the diverse needs of individual, corporate, exchange and institutional clients, now and in the future.
  • 4. Problem Consultancy Q1 Q2 Q3 Q4 Budget Approval Consultancy NeedBudget Risk Consultant Client
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. AgreementFactory contract AgreementFactory { event Agreement(ServiceAgreement agreement, ...); ServiceAgreement[] public agreements; // registry of agreements ... function createAgreement(...) { ServiceAgreement agreement = new ServiceAgreement(...); agreements.push(agreement); Agreement(agreement, msg.sender, issuer, beneficiary); } function getAgreements() returns (ServiceAgreement[] _agreements) { return agreements; } ... }
  • 17. ServiceAgreement contract ServiceAgreement { enum States { Created, Proposed, Withdrawn, Accepted, Rejected } event StateChange(States indexed oldState, States indexed newState); States public state; ServiceToken public token; // link to the created token AgreementFactory public factory; // validatecontract is recognised by factory ... modifier onlyIssuer { require(msg.sender == issuer); _; } ... function ServiceAgreement(...) { ... factory = AgreementFactory(msg.sender); state = States.Created; } function propose(bytes32 hashedHash) onlyIssuer onlyCreated { contentHash = hashedHash; state = States.Proposed; StateChange(States.Created, States.Proposed); } }
  • 18. ServiceToken contract ServiceToken { event Transfer(address indexed _from, address indexed _to, uint256 _value); ServiceAgreement public agreement; // Backlink to agreement ServiceTask[] public tasks; // Stores the registry of creating task contracts ... function balanceOf(address _addr) constant returns (uint256 balance) { if ((now > agreement.validFrom()) && (now < agreement.expiresEnd())) { return balances[_addr]; // otherwise return the balance as is } else { return 0; } } ... function transfer(address _to, uint256 _value) { ... require(now > agreement.validFrom()); require(now < agreement.expiresEnd()); ... } }