embark 2 upcoming features and goals
TRANSCRIPT
EMBARK
@IURIMATIAS
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
EMBARK
INTERDEPENDENT CONTRACTS
EMBARK
INTERDEPENDENT CONTRACTS
# config/contracts.yml Token:
args:
supply: 1000
DAO:
args:
tokenAddress: $Token
LiquidDemocracy:
args:
daoAddress: $DAO
EMBARK
CONTRACT INSTANCES PeggedToken:
args:
- supply: 1000
UsdToken:
instanceOf: PeggedToken
args:
- request: « oracle/usd.json »
EuroToken:
instanceOf: Currency
args:
- request: « oracle/euro.json »
EMBARK
EXISTING CONTRACTS AND ON DEPLOY COMMANDS
DgxTokenInterface:
address: 0x1234567
AccountManager:
args:
- $DgxTokenInterface
onDeploy:
- DgxTokenInterface.transfer($AccountManager, 1000)
EMBARK
EMBARK 2.0 GOALS
- Facilitate communication between dapps
- Make it easy to store and access decentralized data
- More deployment options
- Facilitate distribution
EMBARK
EMBARK 2.0 DASHBOARD
EMBARK
EMBARK 2.0 DASHBOARD
EMBARK
EMBARK 2.0 DASHBOARD
EMBARK
EMBARK 2.0 DASHBOARD
EMBARK
INTRODUCING EMBARKJS
EMBARK
EMBARKJS - PROMISES AND NAMED PARAMETERS
SimpleStorage.set(100, function(err, result) { })
becomes:
SimpleStorage.set({num: 100}).then(function(result) {})
EMBARK
EMBARKJS - AUTOMATIC TYPE CONVERSION
SimpleStorage.get(function(err, result) { console.log(result.toNumber()); })
becomes:
SimpleStorage.get().then(function(result) { console.log(result);})
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 »}
EMBARK
EMBARKJS - CLIENT SIDE DEPLOYMENT
Token.deploy({supply: 1000}).then(function(token) {});
EMBARK
EMBARKJS: COMMUNICATION
EMBARK
EMBARKJS: COMMUNICATION
EmbarkJS.messages.sendMessage({
topic: [‘myChannel’],
data: ‘hello world’
});
EmbarkJS.messages.listenTo({topic: [‘myChannel’]).then(function(packet) {
console.log(packet.data);
});
EMBARK
EMBARKJS: COMMUNICATIONEmbarkJS.Messages.setProvider(EmbarkJS.whisper);
Supported providers:
Message ContractWhisper Telehash
EMBARK
EMBARKJS: STORAGE
EMBARK
EMBARKJS: STORAGE - SAVING DATA
EmbarkJS.Storage.saveText(text).then(function(hash) {
});
EmbarkJS.Storage.get(hash).then(function(data) {
});
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)
EMBARK
EMBARKJS: STORAGE - PROVIDERS
EmbarkJS:
Storage.setProvider(EmbarkJS.IPFS, {server: ‘localhost’, port: ‘5001’});
EMBARK
EMBARKJS: STORAGE - PROVIDERS
Providers supported:
Storage ContractSwarm IPFS
EMBARK
EMBARKJS: STORAGE - PROVIDERS
Providers supported:
Storage ContractSwarm IPFS
Maidsafe Storj
EMBARK
DAPP DISTRIBUTION
EMBARK
DAPP DISTRIBUTION TO IPFS
$ embark deploy ipfs
EMBARK
DAPP DISTRIBUTION TO DECENTRALIZED STORAGES
Distribution storages supported:
Swarm IPFS
Maidsafe Storj
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)
EMBARK
MORE INFORMATION
http://github.com/iurimatias/embark-framework
http://gitter.im/iurimatias/embark-framework
@IURIMATIAS