Embark 2 Upcoming Features and Goals

30
EMBARK @IURIMATIAS

Transcript of Embark 2 Upcoming Features and Goals

Page 1: Embark 2 Upcoming Features and Goals

EMBARK

@IURIMATIAS

Page 2: Embark 2 Upcoming Features and Goals

EMBARK

EMBARK FEATURES

- Compatible with any build pipeline

- Supports contracts TDD using Javascript.

- Manages deployed contracts, deploy only when needed

- Manages different chains (e.g testnet, private net, livenet)

- Support for both Solidity AND serpent

Page 3: Embark 2 Upcoming Features and Goals

EMBARK

INTERDEPENDENT CONTRACTS

Page 4: Embark 2 Upcoming Features and Goals

EMBARK

INTERDEPENDENT CONTRACTS

# config/contracts.yml Token:

args:

supply: 1000

DAO:

args:

tokenAddress: $Token

LiquidDemocracy:

args:

daoAddress: $DAO

Page 5: Embark 2 Upcoming Features and Goals

EMBARK

CONTRACT INSTANCES PeggedToken:

args:

- supply: 1000

UsdToken:

instanceOf: PeggedToken

args:

- request: « oracle/usd.json »

EuroToken:

instanceOf: Currency

args:

- request: « oracle/euro.json »

Page 6: Embark 2 Upcoming Features and Goals

EMBARK

EXISTING CONTRACTS AND ON DEPLOY COMMANDS

DgxTokenInterface:

address: 0x1234567

AccountManager:

args:

- $DgxTokenInterface

onDeploy:

- DgxTokenInterface.transfer($AccountManager, 1000)

Page 7: Embark 2 Upcoming Features and Goals

EMBARK

EMBARK 2.0 GOALS

- Facilitate communication between dapps

- Make it easy to store and access decentralized data

- More deployment options

- Facilitate distribution

Page 8: Embark 2 Upcoming Features and Goals

EMBARK

EMBARK 2.0 DASHBOARD

Page 9: Embark 2 Upcoming Features and Goals

EMBARK

EMBARK 2.0 DASHBOARD

Page 10: Embark 2 Upcoming Features and Goals

EMBARK

EMBARK 2.0 DASHBOARD

Page 11: Embark 2 Upcoming Features and Goals

EMBARK

EMBARK 2.0 DASHBOARD

Page 12: Embark 2 Upcoming Features and Goals

EMBARK

INTRODUCING EMBARKJS

Page 13: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS - PROMISES AND NAMED PARAMETERS

SimpleStorage.set(100, function(err, result) { })

becomes:

SimpleStorage.set({num: 100}).then(function(result) {})

Page 14: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS - AUTOMATIC TYPE CONVERSION

SimpleStorage.get(function(err, result) { console.log(result.toNumber()); })

becomes:

SimpleStorage.get().then(function(result) { console.log(result);})

Page 15: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS - AUTOMATIC TYPE CONVERSION

struct Post { address author; string title; }

mapping(uint256 => Post) posts

———

Submissions.posts(1) //=> [0x123, « hello world »]

becomes

Submissions.posts(1) //=> {author: 0x123, title: « hello world »}

Page 16: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS - CLIENT SIDE DEPLOYMENT

Token.deploy({supply: 1000}).then(function(token) {});

Page 17: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: COMMUNICATION

Page 18: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: COMMUNICATION

EmbarkJS.messages.sendMessage({

topic: [‘myChannel’],

data: ‘hello world’

});

EmbarkJS.messages.listenTo({topic: [‘myChannel’]).then(function(packet) {

console.log(packet.data);

});

Page 19: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: COMMUNICATIONEmbarkJS.Messages.setProvider(EmbarkJS.whisper);

Supported providers:

Message ContractWhisper Telehash

Page 20: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: STORAGE

Page 21: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: STORAGE - SAVING DATA

EmbarkJS.Storage.saveText(text).then(function(hash) {

});

EmbarkJS.Storage.get(hash).then(function(data) {

});

Page 22: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: STORAGE - UPLOADING AND RETRIEVING FILES

<input id=‘’upload’’ type=‘’file’’>

var file = $(‘#upload’);EmbarkJS.Storage.uploadFile(file).then(function(hash) {

});

var imageUrl = EmbarkJS.Storage.getUrl(hash)

Page 23: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: STORAGE - PROVIDERS

EmbarkJS:

Storage.setProvider(EmbarkJS.IPFS, {server: ‘localhost’, port: ‘5001’});

Page 24: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: STORAGE - PROVIDERS

Providers supported:

Storage ContractSwarm IPFS

Page 25: Embark 2 Upcoming Features and Goals

EMBARK

EMBARKJS: STORAGE - PROVIDERS

Providers supported:

Storage ContractSwarm IPFS

Maidsafe Storj

Page 26: Embark 2 Upcoming Features and Goals

EMBARK

DAPP DISTRIBUTION

Page 27: Embark 2 Upcoming Features and Goals

EMBARK

DAPP DISTRIBUTION TO IPFS

$ embark deploy ipfs

Page 28: Embark 2 Upcoming Features and Goals

EMBARK

DAPP DISTRIBUTION TO DECENTRALIZED STORAGES

Distribution storages supported:

Swarm IPFS

Maidsafe Storj

Page 29: Embark 2 Upcoming Features and Goals

EMBARK

DAPP DISTRIBUTION AS A DESKTOP APP

$ Embark build --desktop

- Creates a full desktop app ready to use

- Includes necessary binaries (e.g geth, ipfs)

Page 30: Embark 2 Upcoming Features and Goals

EMBARK

MORE INFORMATION

http://github.com/iurimatias/embark-framework

http://gitter.im/iurimatias/embark-framework

@IURIMATIAS