s b t e t he r eu m
play

s b t-e t he r eu m > a terminal for the world computer s teve r - PowerPoint PPT Presentation

s b t-e t he r eu m > a terminal for the world computer s teve r andy w aldman s waldma n@m change .c om h ttps ://w ww .s bt -e thereu m.i o / h ttps ://w ww .i nterfm u idity .c om / @i nterfm u idity t h e b lo c kc h ai n i s


  1. s b t-e t he r eu m > a terminal for the world computer s teve r andy w aldman — s waldma n@m change .c om — h ttps ://w ww .s bt -e thereu m.i o / — h ttps ://w ww .i nterfm u idity .c om / — @i nterfm u idity

  2. t h e b lo c kc h ai n i s t h e d Ap p R emembe r t his ? ...The Times 03/Jan/2009 Chancellor on brink of second bailout for banks...

  3. m e an w hi l e... 4 W e 'v e i nterna l ized t h e i nfanti l izing n orms of c ontemp o rary S ilicon V alley . 4 J ust wa i t f o r "u s " (t he "d evs !", t h e "t eam !", "V Cs !") to b uild y o u ("e nd u sers !") s omethi n g c omplic a ted a n d a wesome !

  4. m e an w hi l e... 4 I t 's g onna ta k e a l o t of ti m e a n d m oney , b ecause "e nd u sers !" ne e d an a wesome "U X !" 4 E very e xperim e nt r equire s a f u nded s tartup a n d s cale s uffj c ient to j ustify t hat 4 S o we r u n te n s of b ig , e xpensi v e e xperim e nts r ather th a n t housan d s of s mall , c heap o nes

  5. t h e b lo c kc h ai n i s t h e d Ap p B ut ... 4 E thereu m s mart c ontrac t s e xpose a UI a utomat i cally 4 I t 's c alled an A BI 4 S mart c ontrac t s ta k e an o rder of m agnitu d e le s s e fg o rt to w rite th a n t h e W eb , m obile , a n d UX s tufg in w hich p eople s urroun d t hem 4 W e s hould p refer a w orld wi t h ma n y s mall -s cale e conomi c a rrange m ents to o n e wi t h a f ew , s tandar d l arge -s cale o nes

  6. t h e b lo c kc h ai n i s t h e d Ap p 4 S ophist i cated "e nd u sers " c a n d eploy a n d i nterac t wi t h s mart c ontrac t s d irectl y, a n d ta k e fu l l c ontrol 4 L ess s ophist i cated u sers c a n re l y up o n h umans wh o m th e y d irectl y kn o w as h elpers a n d i nterme d iaries 4 E ventua l ly , i nterme d iary r oles c a n be s moothe d a n d a utomat e d a way . B u t t hat 's e ventua l ly .

  7. s b t-e t he r eu m 4 A c onveni e nt , h igh -l evel , t ext -b ased us e r i nterfa c e f o r i nterac t ing wi t h E thereu m a n d c ompati b le b lockch a ins 4 A s mart -c ontrac t d evelop m ent a n d d eploym e nt t ool 4 A h igh -p erform a nce f ramewo r k f o r i ntegra t ing s mart c ontrac t s in t o S cala a pplica t ions 4 A p latfor m f o r d evelop i ng a pp -s pecifj c C LIs

  8. v e ry s ta t ef u l s bt -e thereu m c ollect s a n d r etains ... 4 N ode U RLs 4 W allets , a ddress e s , a n d a ddress a liases 4 A BIs a n d A B I a liases 4 D efault m apping s of AB I s to s mart c ontrac t s 4 C omplet e c ompila t ion in f o a bout d eploye d c ontrac t s

  9. f r ie n dl y (s o rt o f) 4 T ab -c omplet e y 4 O ften i nterac t ive 4 V ery lo n g b u t d escrip t ive n ames 4 C onsist e nt i nterna l c onvent i ons 4 D efault v alues a n d s ession o verrid e s 4 S et , D rop , P rint

  10. f r ie n dl y (s o rt o f) G et s tarted wi t h a f e w b asic c ommand s > ethContractAbiImport <address-as-hex-alias-or-ens> > ethTransactionView <address-as-hex-alias-or-ens> <function-args>* > ethTransactionInvoke <address-as-hex-alias-or-ens> <function-args>* > ethTransactionEtherSend <address-as-hex-alias-or-ens> > ethAddressBalance [optional-address-as-hex-alias-or-ens] > ethAddressAliasSet <alias-name> <address-as-hex-alias-or-ens>

  11. b a tt e ri e s i nc l ud e d E NS 4 E NS c a n be us e d in p lace of a ddress e s a n d a ddress a liases 4 A cts as a f ull E N S c lient , i ncludi n g r egiste r ing n ames , e xtendi n g r egistr a tions , c reatin g s ubnode s, t ransfe r ing o wnersh i p , e tc .

  12. b a tt e ri e s i nc l ud e d E RC -2 0 4 B uilt in s upport f o r m anagin g E RC -2 0 t okens u sing h uman -f riendl y v alues as d efj n ed in t h e decimals() f unctio n E thersc a n 4 A utoimp o rt AB I s of v erifj e d c ontrac t s if an E thersc a n A P I k e y h a s b e e s et .

  13. p o we r fu l 4 F ull s mart -c ontrac t d evelop m ent e nviron m ent 4 S upport s s igning f o r E IP -1 55 c hain I D s a n d s eamles s s witchi n g b etween c hains 4 O ffm i ne t ransac t ion -s igning f o r co l d w allets 4 S ophist i cated c ontrol of g a s a n d n onces 4 N ame a n d s tore r eusabl e A BIs 4 O verlay a rbitra r y AB I s on t o p of a n y c ontrac t

  14. p r og r am m in g (S c al a -c e nt r ic) 4 A utomat i c st u b g enerat i on 4 T hread -p ool m anaged a sync s tubs or e asy -t o - u nderst a nd s ynchro n ous s tubs 4 S olidit y-l ike e mbedde d D SL 4 S olidit y e vents b ecome t ypesaf e, p attern - m atchab l e S cala o bjects 4 S tandar d "r eactiv e" fj l ter -f ree e vent s ubscri p tions

  15. p r og r am m in g (S c al a -c e nt r ic) contract DocHashStore { event Stored( bytes32 docHash, uint timestamp, string name, string description, address filer ); event Amended( bytes32 docHash, string name, string description, address updater, uint priorUpdateBlockNumber ); event Opened( address admin, uint timestamp ); event Closed( address closer, uint timestamp ); event Authorized( address user ); event Deauthorized( address user ); address public admin; bytes32[] public docHashes; mapping ( address => bool ) public authorized; uint public openTime; uint public closeTime; bool public closed; function close() public; function authorize( address filer ) public; function deauthorize( address filer ) public; function canUpdate( address user ) public view returns (bool); function store( bytes32 docHash, string memory name, string memory description ) public; function amend( bytes32 docHash, string memory name, string memory description ) public; function isStored( bytes32 docHash ) public view returns (bool); function timestamp( bytes32 docHash ) public view returns (uint); function name( bytes32 docHash ) public view returns (string memory); function description( bytes32 docHash ) public view returns (string memory); function filer( bytes32 docHash ) public view returns (address); function size() public view returns (uint); }

  16. p r og r am m in g (S c al a -c e nt r ic) // for simplicity, this example builds a synchronous DocStoreHash // if we called AsyncDocStoreHash.build(...) instead, the same code would work // but all stub return values would be Futures val docstore = DocHashStore.build( jsonRpcUrl = "https://mainnet.infura.com/v3/20963efa809b0178", chainId = Some(EthChainId.Mainnet), contractAddress = EthAddress("0x1a4934109b54911a724dfa0e45d5370dbbe923b0") ) implicit val sender = stub.Sender.Basic( somePrivateKey ) val sz = docstore.view.size() val docHash = sol.Bytes32( "0x00e2b1120d2c76a3b44640c325681c892dd3a1fcb33bf412169a2c17f5e0c171".decodeHex ) val txnInfo = docstore.txn.store( docHash, "ImportantDocument.pdf", "This is a really important document" )

  17. p r og r am m in g (S c al a -c e nt r ic) // inside a standard org.reactivestreams.Subscriber[DocHashStore.Event] def onNext(evt : DocHashStore.Event) = { evt match { case _ : Stored | _ : Amended => markDirtyDocRecordSeq( address ) case _ : Closed => { markDirtyOpenClose( address ) subscriptionRef.get.foreach( _.cancel() ) drop( address ) } case evt @ Authorized( userAddress ) => markDirtyUserCanUpdate( evt.sourceAddress, userAddress ) case evt @ Deauthorized( userAddress ) => markDirtyUserCanUpdate( evt.sourceAddress, userAddress ) case _ => DEBUG.log( s"${this} encountered and ignored event ${evt}" ) } }

  18. d e mo

  19. s u pp o rt 4 D ecent d ocumen t ation at w ww .s bt -e thereu m.i o 4 T ag sbt-ethereum on e thereu m.s tackex c hange .c om 4 D M @interfluidity on T witter 4 E-m ail swaldman@mchange.com 4 swaldman/sbt-ethereum on G itHub

  20. s u pp o rt m e 4 U se t h e s oftwar e 4 T ell me wh a t s ucks so I c a n fj x i t 4 e specia l ly if a nythin g s ucks r elated to s ecurit y 4 I f y o u wa n t to o fg e r fj n ancial s upport , g e t in t ouch , or c ontrib u te to sbt-ethereum.eth

  21. a c kn o wl e dg m en t s W aiting f o r G odot i mage n icked f rom 4 h ttps ://w ww .o necolu m biasc .c om /e vent /w aiting -f or -g odot /

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend