├── LICENSE ├── README.md ├── doc ├── xwhep-admin-guide.odt ├── xwhep-prog-guide.odt └── xwhep-user-guide.odt ├── docker ├── README.md ├── client │ ├── Dockerfile │ ├── README.md │ └── build.sh ├── deployment │ ├── README.md │ ├── docker-compose.sh │ └── docker.sh ├── geth-poco-1.0.14 │ ├── Dockerfile │ ├── deploy.txt │ ├── devnet.json │ ├── giveRlc.js │ ├── node1 │ │ ├── accounts.txt │ │ ├── keystore │ │ │ ├── 0_UTC--2018-04-18T14-18-32.728814650Z--1fa8602668d4bda4f45a25c8def0a619499457db.json │ │ │ ├── 1_UTC--2018-02-14T08-32-12.500000000Z--8bd535d49b095ef648cd85ea827867d358872809.json │ │ │ ├── 2_UTC--2018-02-14T11-15-48.411000000Z--70a1bebd73aef241154ea353d6c8c52d420d4f5b.json │ │ │ ├── 3_UTC--2018-03-02T08-49-16.972000000Z--55b541c70252aa3eb1581b8e74ce1ec17126b33a.json │ │ │ ├── 4_UTC--2018-05-25T08-44-55.730773081Z--9f1c94f78d7e95647a070acbee34d83836552dab │ │ │ ├── 5_UTC--2018-05-25T08-47-41.853206287Z--474502e32df734afb087692d306a13ef72ff68a1 │ │ │ └── 6_UTC--2018-05-25T08-48-28.720896918Z--56cb96342b7a3045934894bd72ddcf330ecc4108 │ │ └── password.txt │ ├── premine.sh │ └── start.sh ├── iexec-geth-local │ ├── extractPrivateKey.js │ ├── geth-local-Dockerfile │ ├── geth-local-genesis.json │ ├── geth-local.docker-compose-dockerhub.yml │ ├── geth-local.docker-compose.yml │ ├── startGeth.sh │ ├── startupDev.sh │ └── startupGeth.sh ├── iexec-robot │ ├── Dockerfile │ └── iexec-robot-aws.sh ├── master │ ├── Dockerfile │ ├── README.md │ ├── build.sh │ └── xwconfigure.values ├── server │ ├── Dockerfile │ ├── README.md │ └── build.sh └── worker │ ├── Dockerfile │ ├── README.md │ └── build.sh ├── gitcloneall.sh ├── poc ├── stockfish │ ├── bridge │ │ ├── package.json │ │ ├── run_stockfish_with_replication.sh │ │ └── stockfish.js │ └── front │ │ ├── README.md │ │ ├── app │ │ ├── css │ │ │ └── app.css │ │ ├── index.html │ │ └── js │ │ │ ├── app.js │ │ │ └── chess.js │ │ ├── buildAndDeploy.sh │ │ ├── contracts │ │ ├── Migrations.sol │ │ ├── stockfish.sol │ │ └── strings.sol │ │ ├── migrations │ │ ├── 1_initial_migration.js │ │ └── 2_deploy_contracts.js │ │ ├── package.json │ │ ├── test │ │ └── stockfishSimpleTest.txt │ │ ├── truffle.js │ │ └── webpack.config.js └── vanitygen │ ├── bridge │ ├── README.md │ ├── buildAndDevDeploy.sh │ ├── package.json │ ├── run_vanitygen_with_replication.sh │ ├── vanitybin │ │ └── vanitygen_linux_amd64.bin │ └── vanitygen.js │ └── front │ ├── .editorconfig │ ├── .eslintrc │ ├── .gitignore │ ├── README.md │ ├── buildAndDevDeploy.sh │ ├── config │ ├── env.js │ ├── jest │ │ ├── cssTransform.js │ │ └── fileTransform.js │ ├── paths.js │ ├── polyfills.js │ ├── webpack.config.dev.js │ ├── webpack.config.prod.js │ └── webpackDevServer.config.js │ ├── contracts │ ├── ERC20.sol │ ├── Faucet.sol │ ├── Migrations.sol │ ├── Ownable.sol │ ├── RLC.sol │ ├── SafeMath.sol │ ├── Task.sol │ ├── TokenSpender.sol │ └── VanityGen.sol │ ├── migrations │ ├── 1_initial_migration.js │ └── 2_deploy_contracts.js │ ├── package.json │ ├── public │ ├── address.js │ ├── base58.js │ ├── biginteger.js │ ├── bitcoinjs.min.js │ ├── crypto.js │ ├── ecdsa.js │ ├── eckey.js │ ├── ellipticcurve.js │ ├── favicon.ico │ ├── font-awesome.min.css │ ├── index.html │ ├── manifest.json │ ├── ripemd160.js │ ├── securerandom.js │ ├── sha256.js │ └── util.js │ ├── scripts │ ├── build.js │ ├── start.js │ └── test.js │ ├── src │ ├── build │ │ └── contracts │ │ │ ├── ERC20.json │ │ │ ├── Faucet.json │ │ │ ├── Migrations.json │ │ │ ├── Ownable.json │ │ │ ├── RLC.json │ │ │ ├── SafeMath.json │ │ │ ├── Task.json │ │ │ ├── Token.json │ │ │ ├── TokenSpender.json │ │ │ └── VanityGen.json │ └── client │ │ ├── actions │ │ ├── address.js │ │ ├── index.js │ │ ├── letters.js │ │ ├── redux.js │ │ └── rlc.js │ │ ├── components │ │ ├── Footer │ │ │ ├── Footer.css │ │ │ └── index.js │ │ ├── Input │ │ │ ├── Input.css │ │ │ └── index.js │ │ ├── Navbar │ │ │ ├── Navbar.css │ │ │ └── index.js │ │ └── install │ │ │ ├── Install.css │ │ │ └── index.js │ │ ├── constants │ │ └── truffle.js │ │ ├── containers │ │ ├── Address │ │ │ ├── Address.css │ │ │ └── index.js │ │ ├── Home │ │ │ ├── Home.css │ │ │ └── index.js │ │ ├── Result │ │ │ ├── Result.css │ │ │ └── index.js │ │ └── Run │ │ │ ├── Run.css │ │ │ └── index.js │ │ ├── generateStore.js │ │ ├── index.js │ │ ├── reducers │ │ ├── address.js │ │ ├── index.js │ │ ├── letters.js │ │ └── rlc.js │ │ ├── registerServiceWorker.js │ │ ├── styles │ │ └── index.css │ │ └── vanity │ │ ├── generateVanity.js │ │ ├── getRlc.js │ │ ├── utils.js │ │ ├── vanity.js │ │ └── vanityPublicPrivate.js │ ├── truffle-config.js │ ├── truffle.js │ └── yarn.lock ├── tests └── rf │ ├── Dockerfile │ ├── Ping │ ├── dappNonRegOnRemoteEnv.robot │ └── isKatacodaScenarioAlive.robot │ ├── README.md │ ├── Resources │ ├── DB │ │ ├── MySql.robot │ │ └── MySqlDocker.robot │ ├── DappNonReg.robot │ ├── DockerHelper.robot │ ├── ETHGeth.robot │ ├── ETHGethDocker.robot │ ├── ETHTestrpc.robot │ ├── GethPocoDocker.robot │ ├── IexecCallbackTestUtils.robot │ ├── IexecCommon.robot │ ├── IexecPocoAPI.robot │ ├── IexecScheduler.robot │ ├── IexecSchedulerMock.robot │ ├── IexecSdk.robot │ ├── IexecWorker.robot │ ├── IexecWorkerMock.robot │ ├── Xtremweb.robot │ ├── bin │ │ └── Stockfishbin.robot │ ├── cli │ │ ├── XWClient.robot │ │ └── XWClientDocker.robot │ └── smartcontracts │ │ ├── IexceOracleSmartContract.robot │ │ ├── IexceOracleSmartContractDocker.robot │ │ ├── IexecOracleAPIimplSmartContract.robot │ │ └── IexecOracleAPIimplSmartContractDocker.robot │ ├── Results │ ├── log.html │ ├── output.xml │ └── report.html │ ├── TODO │ ├── helloWorldSuiteOnTestRpc.robot │ ├── init-jenkins-geth.sh │ ├── init-jenkins-xw.sh │ ├── interfaceSuite.robot │ ├── launchOBXOnTestRpc.robot │ ├── launchXtremWeb.robot │ └── stockfishSuiteOnTestRpc.robot │ ├── Tests │ ├── 00-iexec-1order-1worker-callback.robot │ ├── 00-iexec-1order-1worker.robot │ ├── 01-iexec-2orders-seq-1worker.robot │ ├── 02-iexec-1order-2workers.robot │ ├── 03-iexec-2orders-2workers.robot │ ├── 04-iexec-2orders-parallel-1worker-with-workaround.robot │ ├── 04-iexec-2orders-parallel-1worker.robot │ ├── 05-iexec-2orders-seq-1worker-with-stop-server.robot │ ├── 06-iexec-2orders-5workers.robot │ ├── dappNonRegOnLocalXtremweb.robot │ ├── iexec-poco-lib.robot │ ├── iexec-poco-mock.robot │ └── poco-ready-check.robot │ └── deprecated │ ├── NonRegOBXW.robot │ ├── Resources │ ├── IexecBridge.robot │ ├── IexecBridgeDocker.robot │ ├── IexecCommon.robot │ ├── IexecOracle.robot │ ├── IexecOracleDocker.robot │ ├── XWCommon.robot │ ├── XWCommonDocker.robot │ ├── XWServer.robot │ ├── XWServerDocker.robot │ ├── XWWorker.robot │ └── XWWorkerDocker.robot │ ├── truffleTestsOnLocalGeth.robot │ ├── truffleTestsOnLocalGethDocker.robot │ ├── truffleTestsOnTestrpc.robot │ ├── xwcommandsSuite.robot │ └── xwcommandsSuiteDocker.robot ├── vagrant ├── README.md ├── Vagrantfile ├── bootstrap.sh ├── discoverTruffleTestRpcGeth.md ├── discoverXtremweb.md ├── dotscreenrc ├── geth │ ├── attachRinkeby.sh │ ├── attachRopsten.sh │ ├── launchRinkebyGeth.sh │ ├── launchRinkebyGethUnlock.sh │ ├── launchRopstenGeth.sh │ └── launchRopstenGethUnlock.sh ├── gethUtils │ ├── attach42.sh │ ├── createAccounts42.sh │ ├── genesis42.json │ ├── getBlockNumber42.sh │ ├── geth42background.sh │ ├── giveMeFive42.sh │ ├── init42.sh │ ├── killGeth.sh │ ├── makedag42.sh │ ├── mine42.sh │ ├── mine42background.sh │ ├── mine42externalexposed.sh │ ├── resetANewChain42AndMine.sh │ ├── truncateChain42.sh │ └── unlockAccounts42.sh ├── parity │ ├── launchParityKovan.sh │ ├── launchParityKovanUnlock.sh │ ├── launchParityRopsten.sh │ └── launchParityRopstenUnlock.sh ├── testrpcUtils │ ├── balance.js │ ├── giveMeFive.js │ ├── isCoinbaseUnlock.js │ └── package.json └── xwconfigure.values.vagrant └── xwhep-server ├── AUTHORS ├── ChangeLog ├── INSTALL ├── License ├── License.bouncycastle ├── License.smartsockets-1.4 ├── bin ├── db-maintenance │ ├── xwcheckdb-05.7.3.sql │ ├── xwcheckdb-05.8.0.sql │ ├── xwcheckdb-06.0.1.sql │ ├── xwcheckdb-07.0.0.sql │ ├── xwcheckdb-07.2.0.sql │ ├── xwcheckdb-07.4.1.sql │ ├── xwcheckdb-07.5.0.sql │ ├── xwcheckdb-08.0.0.sql │ ├── xwcheckdb-08.2.0.sql │ ├── xwcheckdb-08.3.1.sql │ ├── xwcheckdb-09.1.0.sql │ ├── xwcheckdb-10.0.0.sql │ ├── xwcheckdb-10.2.0.sql │ ├── xwcheckdb-10.6.0.sql │ ├── xwhep-core-tables-count.sql │ ├── xwhep-core-tables-create-tables.sql │ ├── xwhep-core-tables-create-triggers-for-data-coming-from-8.sql │ ├── xwhep-core-tables-create-triggers-for-history-coming-from-8.sql │ ├── xwhep-core-tables-create-users-views.sql │ ├── xwhep-core-tables-create-views-for-offering-and-billing.sql │ ├── xwhep-core-tables-create-views-for-relationships.sql │ ├── xwhep-core-tables-create-views-for-sessions-and-groups.sql │ ├── xwhep-core-tables-create-views-for-tables.sql │ ├── xwhep-core-tables-create-views-hosts-matching-works.sql │ ├── xwhep-core-tables-create-views-works-matching-hosts.sql │ ├── xwhep-core-tables-drop-triggers-and-tables.sql │ ├── xwhep-core-tables-foreign-keys-history.sql │ ├── xwhep-core-tables-foreign-keys-live.sql │ ├── xwhep-core-tables-from-8-create-initial-tables.sql │ ├── xwhep-core-tables-from-8-create-new-tables-columns-fk.sql │ ├── xwhep-core-tables-from-8-move-to-history-objects-having-bad-references.sql │ ├── xwhep-core-tables-populate-new-columns-for-data-copied-from-8.sql │ ├── xwhep-core-tables-populate-new-columns-for-history-copied-from-8.sql │ ├── xwhep-core-tables-query-for-copy-contents-from-source-schema.sql │ ├── xwhep-core-tables-query-for-create-users-views.sql │ ├── xwhep-core-tables-query-for-create-views.sql │ ├── xwhep-core-tables-set-not-null-fk-referencing-new-tables.sql │ ├── xwhep-core-tables-set-users-uid-lowercase.sql │ ├── xwrunnings.sql │ ├── xwsetversion.sql │ ├── xwstatus.sql │ ├── xwtasks.sql │ ├── xwupdatedb-05.7.3.sql │ ├── xwupdatedb-05.8.0.sql │ ├── xwupdatedb-06.0.1.sql │ ├── xwupdatedb-07.0.0.sql │ ├── xwupdatedb-07.2.0.sql │ ├── xwupdatedb-07.4.1.sql │ ├── xwupdatedb-07.5.0.sql │ ├── xwupdatedb-08.0.0.sql │ ├── xwupdatedb-08.2.0.sql │ ├── xwupdatedb-08.3.1.sql │ ├── xwupdatedb-09.1.0.sql │ ├── xwupdatedb-10.0.0.sql │ ├── xwupdatedb-10.2.0.sql │ ├── xwupdatedb-10.6.0.sql │ ├── xwusers.sql │ ├── xwuserstotal.sql │ └── xwwaiting.sql ├── xtremweb ├── xtremweb.ganglia ├── xtremweb.gmond.pl ├── xtremweb.server └── xtremwebconf.sh ├── doc ├── apple.png ├── background.png ├── background2.png ├── binary.png ├── cernvm.png ├── client.png ├── client2.png ├── clientgui.png ├── cloud.png ├── community.png ├── connected.png ├── connectionerror.png ├── debian.png ├── draft.png ├── edgesmonitoring.png ├── flyinggrid-arch.png ├── flyinggrid-custimization.png ├── ganglia.png ├── grouping.png ├── grouping2.png ├── ibis-logo.png ├── icon_plane.png ├── jemeuso.png ├── jobdetails.png ├── jobs.png ├── jobs2.png ├── jobs3.png ├── jobs4.png ├── jobsretreived.png ├── jobsretreiving.png ├── jobstategraph.png ├── jobviewer.png ├── linux.png ├── login.png ├── logindlg.png ├── loginerr.png ├── macvhd.png ├── mainframe.png ├── menulogin.png ├── pilotjobs2.png ├── pkg.png ├── putty_connect00.png ├── putty_connect01.png ├── putty_connect02.png ├── putty_exportkey00.png ├── putty_exportkey01.png ├── putty_exportkey02.png ├── scientific_linux_logo-large.png ├── scientific_linux_logo-small.png ├── secrecy-icon.png ├── server.png ├── servererr.png ├── submit0.png ├── submit1.png ├── submit2.png ├── submit2stdin.png ├── submit3.png ├── submit4.png ├── submit5.png ├── submited.png ├── ubuntu-logo-large.png ├── ubuntu-logo-small.png ├── userrights.png ├── vb.png ├── virtualized.png ├── webitf_cert.png ├── winvhd00.png ├── winvhd01.png ├── winvhd02.png ├── winvhd04.png ├── winvhd05.png ├── winvhd06.png ├── winvhd07.png ├── winvhd08.png ├── winvhd09.png ├── winvhd15.png ├── winvhd16.png ├── winvhd17.png ├── winvhdconvertfromraw.png ├── wmw.png ├── worker.png ├── workerctrl2.png ├── xwdarwindock.png ├── xwdarwindow.png ├── xwdarwinmenu.png ├── xwhep-livecd-vbdiscwizard2.png ├── xwhep.client │ └── doc │ │ ├── apple.png │ │ ├── background.png │ │ ├── background2.png │ │ ├── binary.png │ │ ├── cernvm.png │ │ ├── client.png │ │ ├── client2.png │ │ ├── clientgui.png │ │ ├── cloud.png │ │ ├── community.png │ │ ├── connected.png │ │ ├── connectionerror.png │ │ ├── debian.png │ │ ├── draft.png │ │ ├── edgesmonitoring.png │ │ ├── flyinggrid-arch.png │ │ ├── flyinggrid-custimization.png │ │ ├── ganglia.png │ │ ├── grouping.png │ │ ├── grouping2.png │ │ ├── ibis-logo.png │ │ ├── icon_plane.png │ │ ├── jemeuso.png │ │ ├── jobdetails.png │ │ ├── jobs.png │ │ ├── jobs2.png │ │ ├── jobs3.png │ │ ├── jobs4.png │ │ ├── jobsretreived.png │ │ ├── jobsretreiving.png │ │ ├── jobstategraph.png │ │ ├── jobviewer.png │ │ ├── linux.png │ │ ├── login.png │ │ ├── logindlg.png │ │ ├── loginerr.png │ │ ├── macvhd.png │ │ ├── mainframe.png │ │ ├── menulogin.png │ │ ├── pilotjobs2.png │ │ ├── pkg.png │ │ ├── putty_connect00.png │ │ ├── putty_connect01.png │ │ ├── putty_connect02.png │ │ ├── putty_exportkey00.png │ │ ├── putty_exportkey01.png │ │ ├── putty_exportkey02.png │ │ ├── scientific_linux_logo-large.png │ │ ├── scientific_linux_logo-small.png │ │ ├── secrecy-icon.png │ │ ├── server.png │ │ ├── servererr.png │ │ ├── submit0.png │ │ ├── submit1.png │ │ ├── submit2.png │ │ ├── submit2stdin.png │ │ ├── submit3.png │ │ ├── submit4.png │ │ ├── submit5.png │ │ ├── submited.png │ │ ├── ubuntu-logo-large.png │ │ ├── ubuntu-logo-small.png │ │ ├── userrights.png │ │ ├── vb.png │ │ ├── virtualized.png │ │ ├── webitf_cert.png │ │ ├── winvhd00.png │ │ ├── winvhd01.png │ │ ├── winvhd02.png │ │ ├── winvhd04.png │ │ ├── winvhd05.png │ │ ├── winvhd06.png │ │ ├── winvhd07.png │ │ ├── winvhd08.png │ │ ├── winvhd09.png │ │ ├── winvhd15.png │ │ ├── winvhd16.png │ │ ├── winvhd17.png │ │ ├── winvhdconvertfromraw.png │ │ ├── wmw.png │ │ ├── worker.png │ │ ├── workerctrl2.png │ │ ├── xwdarwindock.png │ │ ├── xwdarwindow.png │ │ ├── xwdarwinmenu.png │ │ ├── xwhep-livecd-vbdiscwizard2.png │ │ ├── xwhepbridge.png │ │ ├── xwinstall0.png │ │ ├── xwinstall1.png │ │ ├── xwinstall2.png │ │ ├── xwnt0.png │ │ ├── xwnt1.png │ │ ├── xwnt2.png │ │ ├── xwnt3.png │ │ ├── xwnt4.png │ │ ├── xwnt5.png │ │ ├── xwnt6.png │ │ └── xwsmartsockets.png ├── xwhepbridge.png ├── xwinstall0.png ├── xwinstall1.png ├── xwinstall2.png ├── xwnt0.png ├── xwnt1.png ├── xwnt2.png ├── xwnt3.png ├── xwnt4.png ├── xwnt5.png ├── xwnt6.png └── xwsmartsockets.png ├── lib ├── JOpenId-1.08.jar ├── JSON-java.jar ├── MinML.jar ├── activation.jar ├── antlr.jar ├── attic-all-0.3.jar ├── bcpkix-jdk15on-151.jar ├── bcprov-jdk15on-151.jar ├── bcprov-jdk16-140.jar ├── commons-codec-1.3.jar ├── commons-fileupload-1.2.jar ├── commons-httpclient-3.0.1.jar ├── commons-io-1.3.2.jar ├── commons-logging-1.1.jar ├── ibis-util-2.1.jar ├── jcert.jar ├── jetty-http-9.3.8.v20160314.jar ├── jetty-io-9.3.8.v20160314.jar ├── jetty-server-9.3.8.v20160314.jar ├── jetty-util-9.3.8.v20160314.jar ├── jose4j-0.5.5.jar ├── junit-4.10.jar ├── log4j-1.2.17.jar ├── mail.jar ├── mysql-connector-java-5.1.6-bin.jar ├── scribejava-apis-3.3.1-SNAPSHOT.jar ├── scribejava-core-3.3.1-SNAPSHOT.jar ├── servlet-api-3.1.jar ├── slf4j-api-1.7.2.jar ├── slf4j-log4j12-1.7.2.jar ├── smartsockets-1.4.jar └── xtremweb.jar └── utils ├── extractPrivateApps.sh ├── extractPrivateAppsd.sh ├── selectAppsUid.sql ├── updateAppsToPublic.sh └── updateAppsToPublicd.sh /README.md: -------------------------------------------------------------------------------- 1 | # iexec-node 2 | 3 | * [vagrant dev env](./vagrant/README.md) : Let Vagrant build an Ubuntu machine with all the developer needs : lib to compile, run, test xtremweb, git, python, truffle, web3, node, parity, geth, testrpc etc ... 4 | * [docker for xtremweb client, server, worker](./docker/master/README.md) 5 | * End to End tests [references](./tests/rf/Tests) and [results](./tests/rf/Results) 6 | * [stockfish poc archived](./poc/stockfish/front/README.md) 7 | * [vanitygen poc archived](./poc/vanitygen/front/README.md) 8 | -------------------------------------------------------------------------------- /doc/xwhep-admin-guide.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iExecBlockchainComputing/iexec-node/d6f49c9bfd76c612d6f63b9ba68e6ee2143859d6/doc/xwhep-admin-guide.odt -------------------------------------------------------------------------------- /doc/xwhep-prog-guide.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iExecBlockchainComputing/iexec-node/d6f49c9bfd76c612d6f63b9ba68e6ee2143859d6/doc/xwhep-prog-guide.odt -------------------------------------------------------------------------------- /doc/xwhep-user-guide.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iExecBlockchainComputing/iexec-node/d6f49c9bfd76c612d6f63b9ba68e6ee2143859d6/doc/xwhep-user-guide.odt -------------------------------------------------------------------------------- /docker/client/README.md: -------------------------------------------------------------------------------- 1 | Docker XWHEP client 2 | =================== 3 | 4 | This directory contains everything to start an XWHEP client inside a container from its Debian package. 5 | 6 | The client Debian package can be generated from [docker/master](../master). 7 | 8 | # Create Docker image 9 | 10 | To create a Docker image for the client, please launch: 11 | ``` 12 | build.sh 13 | ``` 14 | 15 | This script builds a new Docker image for the XWHEP client. 16 | 17 | # Deployment 18 | 19 | You can deploy your platform using [deployment scripts](../deployment/). 20 | -------------------------------------------------------------------------------- /docker/deployment/README.md: -------------------------------------------------------------------------------- 1 | Docker deployment 2 | ================= 3 | 4 | This directory contains everything to deploy an XWHEP platform. 5 | 6 | Docker images for all services must exist. 7 | You can create Docker images there: 8 | - [server image](../server/) 9 | - [worker image](../worker/) 10 | - [client image](../client/) 11 | 12 | 13 | # Docker deployment 14 | 15 | We propose a script to automate a deployment made of a server, a worker and a client 16 | 17 | Make your deployment by launching docker.sh like: 18 | ``` 19 | docker.sh 20 | ``` 21 | 22 | 23 | # Docker-compose deployment 24 | 25 | We propose a script to automate a deployment made of a server, a worker and a client 26 | 27 | Make your deployment by launching docker-compose.sh like: 28 | ``` 29 | docker-compose.sh 30 | ``` 31 | -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | COPY node1 /node1 4 | COPY premine.sh /premine.sh 5 | COPY devnet.json /devnet.json 6 | COPY giveRlc.js /giveRlc.js 7 | 8 | RUN apt-get update 9 | RUN apt-get install -y software-properties-common 10 | RUN add-apt-repository -y ppa:ethereum/ethereum 11 | RUN apt-get update -q 12 | RUN apt-get install -y ethereum 13 | RUN apt-get install -y build-essential 14 | 15 | RUN apt-get install -y curl 16 | RUN apt-get install -y git 17 | 18 | RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 19 | RUN apt-get install -y nodejs 20 | 21 | RUN git clone https://github.com/iExecBlockchainComputing/PoCo.git 22 | 23 | RUN chmod +x premine.sh 24 | RUN ./premine.sh 25 | 26 | ENTRYPOINT geth --datadir node1/ --rpc --rpcaddr '0.0.0.0' --rpcport 8545 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --networkid 1337 --gasprice '1' --unlock '1fa8602668d4bda4f45a25c8def0a619499457db,8bd535d49b095ef648cd85ea827867d358872809,70a1bebd73aef241154ea353d6c8c52d420d4f5b, 55b541c70252aa3eb1581b8e74ce1ec17126b33a, 9f1c94f78d7e95647a070acbee34d83836552dab, 474502e32df734afb087692d306a13ef72ff68a1, 56cb96342b7a3045934894bd72ddcf330ecc4108' --password node1/password.txt --mine 27 | 28 | EXPOSE 8545 29 | -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/accounts.txt: -------------------------------------------------------------------------------- 1 | 1fa8602668d4bda4f45a25c8def0a619499457db 2 | 8bd535d49b095ef648cd85ea827867d358872809 3 | 70a1bebd73aef241154ea353d6c8c52d420d4f5b 4 | 55b541c70252aa3eb1581b8e74ce1ec17126b33a 5 | 9f1c94f78d7e95647a070acbee34d83836552dab 6 | 474502e32df734afb087692d306a13ef72ff68a1 7 | 56cb96342b7a3045934894bd72ddcf330ecc4108 8 | -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/keystore/0_UTC--2018-04-18T14-18-32.728814650Z--1fa8602668d4bda4f45a25c8def0a619499457db.json: -------------------------------------------------------------------------------- 1 | {"address":"1fa8602668d4bda4f45a25c8def0a619499457db","crypto":{"cipher":"aes-128-ctr","ciphertext":"5daacff93e95e3fdd914a1d3a16379a7c273bd65c6cb891f75af837de1355ee1","cipherparams":{"iv":"f422335a3f0b5db0470543d9ef2fd8d3"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"7e86126026f769b66db4ec1f00e33b0a39333cf108da890e958a1bd782b6640c"},"mac":"0d8701ae9ced1b300cd4dcd15c12a66b12c6ea300a4ddf37018164e28ab34b73"},"id":"8139a098-a267-476e-b799-252738533df8","version":3} -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/keystore/1_UTC--2018-02-14T08-32-12.500000000Z--8bd535d49b095ef648cd85ea827867d358872809.json: -------------------------------------------------------------------------------- 1 | {"address":"8bd535d49b095ef648cd85ea827867d358872809","id":"cbe7bd65-fd96-4bb6-a0a3-f406c13a9c3d","version":3,"crypto":{"cipher":"aes-128-ctr","ciphertext":"fd9f934e544a6464372bb305f5d8bdf12be84f527bc2e576cd2b39bcbdba45d2","cipherparams":{"iv":"30b34dc135c5e27104e0fe6308d3a484"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"9a0487ee903daf4730f6b87a635f8ad5044dd4707bcb4c2888405ef7d219b923"},"mac":"0b1e86773d73470d36f26f8f573eb8ed60b7af3fef243f297f8b2890bc3e0493"}} -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/keystore/2_UTC--2018-02-14T11-15-48.411000000Z--70a1bebd73aef241154ea353d6c8c52d420d4f5b.json: -------------------------------------------------------------------------------- 1 | {"address":"70a1bebd73aef241154ea353d6c8c52d420d4f5b","id":"01dca729-89e0-4b53-8412-aa39eff51e08","version":3,"crypto":{"cipher":"aes-128-ctr","ciphertext":"64fdf7d875ea4f40c0b39e84ea2e64f72c697c40c14d7d4c7e5e7759cb79a9c9","cipherparams":{"iv":"2d60ec8cc6a732db876e46cecbc1ed95"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"14922d16118753b6a29c8e614800912af824b8d109ffe4da8a2a4d140b84198a"},"mac":"2e6654d5a38092ec2a652fca2d737214123d3078291750f5ade8a7e9d8f3b57a"}} -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/keystore/3_UTC--2018-03-02T08-49-16.972000000Z--55b541c70252aa3eb1581b8e74ce1ec17126b33a.json: -------------------------------------------------------------------------------- 1 | {"address":"55b541c70252aa3eb1581b8e74ce1ec17126b33a","id":"38c957f9-f6e0-44e4-a90e-aa044924e74d","version":3,"crypto":{"cipher":"aes-128-ctr","ciphertext":"1645eb2f4497860c2ffe61a1bd58b1b340f627d79e617099ff7fc223d6b3e7de","cipherparams":{"iv":"66846aba300186068a3d5ee7b7ba5533"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"a2fc43883b436967290033b22550ffb3db5ce88657b137517d5777b8970b6690"},"mac":"f0e7e29a3e96c13afe1b8c5f1f70ce16d84dcbc757391f7349a89c4902c8feb3"}} -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/keystore/4_UTC--2018-05-25T08-44-55.730773081Z--9f1c94f78d7e95647a070acbee34d83836552dab: -------------------------------------------------------------------------------- 1 | {"address":"9f1c94f78d7e95647a070acbee34d83836552dab","crypto":{"cipher":"aes-128-ctr","ciphertext":"382f278709b723a1b41a4d83a3685bafb031fecbbd84fcdcc2ccef8b0bb4aea2","cipherparams":{"iv":"ea09fd7265b52ffbe430c3f6356b59f0"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"569dc4d0e713c02e91460c0ad01eee599db974604259fadbe841322046a73236"},"mac":"29a4d5f414161448a53c9e696a22a38ff58d86b5d54d7dd92e32a33d8aa82a47"},"id":"b0b16310-fffa-4859-9db6-e03bca205d62","version":3} -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/keystore/5_UTC--2018-05-25T08-47-41.853206287Z--474502e32df734afb087692d306a13ef72ff68a1: -------------------------------------------------------------------------------- 1 | {"address":"474502e32df734afb087692d306a13ef72ff68a1","crypto":{"cipher":"aes-128-ctr","ciphertext":"f21d08c0b6a97e724dfabca77f81d69058fc2c75df0a87f811f92e006f5286b1","cipherparams":{"iv":"bca739e0cfecd734633a985a27a26f62"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"7aff37550856f84ffc923835ba1b1403975d88ef43d14f9166086ce121ddb8ee"},"mac":"b3c4d3660b56047a7b5ce1b906649fa1cdbb82e6c5187f498b901712ec0ec91f"},"id":"296057b6-5166-40dc-8645-c4f8af9ed679","version":3} -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/keystore/6_UTC--2018-05-25T08-48-28.720896918Z--56cb96342b7a3045934894bd72ddcf330ecc4108: -------------------------------------------------------------------------------- 1 | {"address":"56cb96342b7a3045934894bd72ddcf330ecc4108","crypto":{"cipher":"aes-128-ctr","ciphertext":"b1c72a9c5841aa39a87cb9202bc8430775df17d67a6970091ef9660a95b938a8","cipherparams":{"iv":"374fa0e9479802b186487175a847012f"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"fd54475419aa179bb50490f48c228fa809d2264c190474b94bdb7222aabb3501"},"mac":"30fa0c655c1ae1bbf3f8bcd75ce64b05b83c897a7f96ec091f4ac59ad180c941"},"id":"8df27b95-dd31-4490-8fc6-bd65fe49bffe","version":3} -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/node1/password.txt: -------------------------------------------------------------------------------- 1 | whatever 2 | whatever 3 | whatever 4 | whatever 5 | whatever 6 | whatever 7 | whatever 8 | -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/premine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | geth --datadir node1/ init devnet.json 3 | 4 | nohup geth --datadir node1/ --rpc --rpcaddr '0.0.0.0' --rpcport 8545 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --networkid 1337 --gasprice '1' --unlock '1fa8602668d4bda4f45a25c8def0a619499457db,8bd535d49b095ef648cd85ea827867d358872809,70a1bebd73aef241154ea353d6c8c52d420d4f5b, 55b541c70252aa3eb1581b8e74ce1ec17126b33a, 9f1c94f78d7e95647a070acbee34d83836552dab, 474502e32df734afb087692d306a13ef72ff68a1, 56cb96342b7a3045934894bd72ddcf330ecc4108' --password node1/password.txt --mine & 5 | 6 | sleep 2 7 | 8 | cd PoCo && git checkout tags/1.0.14 && npm install && rm -R deployed/ && ./node_modules/.bin/truffle migrate && cd .. 9 | 10 | geth --exec 'loadScript("/giveRlc.js"); giveRlc("0x091233035dcb12ae5a4a4b7fb144d3c5189892e1")' attach http://127.0.0.1:8545 11 | 12 | pkill -INT geth 13 | 14 | sleep 10 -------------------------------------------------------------------------------- /docker/geth-poco-1.0.14/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | nohup geth --datadir node1/ --rpc --rpcaddr '0.0.0.0' --rpcport 8545 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --networkid 1337 --gasprice '1' --unlock '1fa8602668d4bda4f45a25c8def0a619499457db,8bd535d49b095ef648cd85ea827867d358872809,70a1bebd73aef241154ea353d6c8c52d420d4f5b, 55b541c70252aa3eb1581b8e74ce1ec17126b33a, 9f1c94f78d7e95647a070acbee34d83836552dab, 474502e32df734afb087692d306a13ef72ff68a1, 56cb96342b7a3045934894bd72ddcf330ecc4108' --password node1/password.txt --mine & bash -------------------------------------------------------------------------------- /docker/iexec-geth-local/extractPrivateKey.js: -------------------------------------------------------------------------------- 1 | var keythereum = require("keythereum"); 2 | var fs = require('fs'); 3 | const password = "whatever"; 4 | const wallet = JSON.parse(fs.readFileSync(process.argv[2], 'utf8')); 5 | const key = keythereum.recover("whatever", wallet); 6 | console.log(wallet.address+"_"+key.toString('hex')); 7 | 8 | 9 | -------------------------------------------------------------------------------- /docker/iexec-geth-local/geth-local-Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | RUn apt-get update 3 | RUN apt-get install -y software-properties-common 4 | RUN add-apt-repository -y ppa:ethereum/ethereum 5 | RUN apt-get update -q 6 | RUN apt-get install -y ethereum 7 | RUN apt-get install -y build-essential 8 | 9 | #RUN apt-get install -y python-software-properties 10 | RUN apt-get install -y curl 11 | #RUN apt-get install -y git 12 | #RUN apt-get install -y python-pip 13 | RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 14 | RUN apt-get install -y nodejs 15 | 16 | RUN echo "whatever" > password.txt 17 | 18 | COPY geth-local-genesis.json geth-local-genesis.json 19 | COPY startupGeth.sh startupGeth.sh 20 | COPY startupDev.sh startupDev.sh 21 | COPY extractPrivateKey.js extractPrivateKey.js 22 | 23 | RUN chmod 755 startupGeth.sh 24 | RUN chmod 755 startupDev.sh 25 | 26 | RUN rm -rf ~/.ethereum 27 | RUN geth --networkid 1337 --datadir ~/.ethereum/net1337 init geth-local-genesis.json 28 | 29 | 30 | RUN geth --datadir ~/.ethereum/net1337 --networkid 1337 makedag 0 ~/.ethash 31 | RUN geth --datadir ~/.ethereum/net1337 --networkid 1337 makedag 30000 ~/.ethash 32 | 33 | RUN npm install keythereum 34 | 35 | EXPOSE 8545 36 | -------------------------------------------------------------------------------- /docker/iexec-geth-local/geth-local-genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "chainId": 1337, 4 | "homesteadBlock": 0, 5 | "eip155Block": 0, 6 | "eip158Block": 0 7 | }, 8 | "difficulty": "20", 9 | "gasLimit": "21000000", 10 | "alloc": { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /docker/iexec-geth-local/geth-local.docker-compose-dockerhub.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | iexec-geth-local: 4 | image: iexechub/iexec-geth-local:latest 5 | command: sh -c "./startupGeth.sh" 6 | volumes: 7 | - "ethereum-geth-local-volume:/root" 8 | environment: 9 | - VIRTUAL_PORT=8546 10 | 11 | volumes: 12 | ethereum-geth-local-volume: 13 | 14 | networks: 15 | default: 16 | external: 17 | name: webproxy -------------------------------------------------------------------------------- /docker/iexec-geth-local/geth-local.docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | iexec-geth-local: 4 | image: iexec-geth-local:latest 5 | build: 6 | context: . 7 | dockerfile: geth-local-Dockerfile 8 | command: sh -c "./startupGeth.sh" 9 | volumes: 10 | - "ethereum-geth-local-volume:/root" 11 | environment: 12 | - VIRTUAL_PORT=8546 13 | 14 | volumes: 15 | ethereum-geth-local-volume: 16 | 17 | networks: 18 | default: 19 | external: 20 | name: webproxy -------------------------------------------------------------------------------- /docker/iexec-geth-local/startupDev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | nohup geth --dev --ws --wsaddr "0.0.0.0" --wsorigins "*" --rpc --rpcport 8545 --rpcaddr "0.0.0.0" --rpccorsdomain "*" --rpcapi "eth,web3,net,personal" & 6 | 7 | 8 | 9 | while true; do 10 | sleep 5 11 | done -------------------------------------------------------------------------------- /docker/iexec-robot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | USER root 3 | RUN apt-get update 4 | RUN apt-get install -y software-properties-common curl zip unzip wget make ant gcc vim git apt-transport-https 5 | # install java repo 6 | RUN add-apt-repository -y ppa:openjdk-r/ppa 7 | # install docker repo 8 | RUN add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 9 | RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 10 | # install docker compose 11 | RUN curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose 12 | RUN chmod +x /usr/local/bin/docker-compose 13 | RUN apt-get update 14 | # install docker 15 | RUN apt-get install -y docker-ce 16 | 17 | #install python and robot lib 18 | RUN apt-get install -y -qy python-pip groff-base 19 | RUN pip install robotframework 20 | RUN pip install robotframework-selenium2library 21 | RUN pip install robotframework-databaselibrary 22 | RUN pip install robotframework-archivelibrary 23 | RUN pip install pymysql 24 | 25 | #install node 26 | RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 27 | RUN apt-get install -y nodejs 28 | 29 | # install gradle 30 | RUN apt-get -y install openjdk-8-jdk 31 | RUN \ 32 | cd /usr/local && \ 33 | curl -L https://services.gradle.org/distributions/gradle-4.7-bin.zip -o gradle-4.7-bin.zip && \ 34 | unzip gradle-4.7-bin.zip && \ 35 | rm gradle-4.7-bin.zip 36 | 37 | # Export some environment variables 38 | ENV GRADLE_HOME=/usr/local/gradle-4.7 39 | ENV PATH=$PATH:$GRADLE_HOME/bin JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 40 | 41 | ENTRYPOINT ["robot"] 42 | -------------------------------------------------------------------------------- /docker/iexec-robot/iexec-robot-aws.sh: -------------------------------------------------------------------------------- 1 | apt-get update 2 | 3 | apt-get install -y software-properties-common curl zip unzip wget make ant gcc vim git apt-transport-https 4 | add-apt-repository -y ppa:openjdk-r/ppa 5 | 6 | add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 7 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 8 | 9 | curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose 10 | chmod +x /usr/local/bin/docker-compose 11 | apt-get update 12 | apt-get install -y docker-ce 13 | usermod -aG docker ubuntu 14 | 15 | apt-get install -y -qy python-pip groff-base 16 | pip install robotframework 17 | pip install robotframework-selenium2library 18 | pip install robotframework-databaselibrary 19 | pip install robotframework-archivelibrary 20 | pip install pymysql 21 | 22 | 23 | curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 24 | apt-get install -y nodejs 25 | 26 | # install gradle 27 | apt-get -y install openjdk-8-jdk 28 | 29 | cd /usr/local 30 | curl -L https://services.gradle.org/distributions/gradle-4.7-bin.zip -o gradle-4.7-bin.zip 31 | unzip gradle-4.7-bin.zip 32 | rm gradle-4.7-bin.zip 33 | 34 | 35 | export GRADLE_HOME=/usr/local/gradle-4.7 36 | export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 37 | 38 | export PATH=$PATH:$GRADLE_HOME/bin -------------------------------------------------------------------------------- /docker/master/README.md: -------------------------------------------------------------------------------- 1 | Build from source 2 | ================= 3 | 4 | This directory contains everything to build a deployment from [github](https://github.com/lodygens/xtremweb-hep). 5 | 6 | # Security 7 | If you wish to deploy a production platform, don't forget to set your own configuration in _xwconfigure.values_ file. 8 | Please refer to the [administrator guide](../../doc/xwhep-admin-guide.odt). 9 | 10 | # Network 11 | You can set two variables in the _xwconfigure.values_ file: 12 | - XWSERVER : the IP address or resolved name of the server; 13 | - CERTCN : should be equal to XWSERVER. Please refer to [opensll documentation](https://www.openssl.org). 14 | 15 | Default is "xwserver". 16 | 17 | 18 | ## Docker-compose 19 | If you want to use [deployment scripts](../deployment/), you should: 20 | - set XWSERVER and CERTCN to "xwserver" as explained in [network section](#network); 21 | - or modify [docker-compose.sh](../deployment/docker-compose.sh) to reflect server name. 22 | 23 | 24 | # Packages 25 | 26 | Launch build.sh like: 27 | ``` 28 | build.sh 29 | ``` 30 | 31 | This script prepares all Debian packages : server, worker and client. 32 | 33 | These Debian packages can avantageoulsy be used with [docker/server](../server), [docker/worker](../worker) and [docker/client](../client) to 34 | create create Docker images for the worker and the client, respectively. 35 | 36 | -------------------------------------------------------------------------------- /docker/master/xwconfigure.values: -------------------------------------------------------------------------------- 1 | XWUSER='myuseraccount2' 2 | DBVENDOR='mysql' 3 | DBENGINE='InnoDB' 4 | DBHOST='' 5 | DBADMINLOGIN='root' 6 | DBADMINPASSWORD='' 7 | DBNAME='xtremweb' 8 | DBUSERLOGIN='xwuser' 9 | DBUSERPASSWORD='xwuserp' 10 | XWADMINLOGIN='admin' 11 | XWADMINPASSWORD='adminp' 12 | XWWORKERLOGIN='worker' 13 | XWWORKERPASSWORD='workerp' 14 | XWSERVER='xwserver' 15 | CERTCN='xwserver' 16 | CERTOU='' 17 | CERTO='cnrs' 18 | CERTL='orsay' 19 | CERTC='fr' 20 | SSLKEYPASSPHRASE='mypassphrase' 21 | SSLKEYSERVERPASSWORD='serverp' 22 | SSLKEYWORKERPASSWORD='workerp' 23 | SSLKEYCLIENTPASSWORD='clientp' 24 | X509CERTDIR='' 25 | USERCERTDIR='' 26 | XWUPGRADEURL='http://127.0.0.1/~mboleg/XWHEP/download/xtremweb.jar' 27 | -------------------------------------------------------------------------------- /docker/server/README.md: -------------------------------------------------------------------------------- 1 | Docker XWHEP server 2 | =================== 3 | 4 | This directory contains everything to start an XWHEP server inside a container from its Debian package. 5 | 6 | The server Debian package can be generated from [docker/master](../master). 7 | 8 | # Create Docker image 9 | 10 | To create a Docker image for the server, please launch: 11 | ``` 12 | build.sh 13 | ``` 14 | 15 | This script builds a new Docker image for the XWHEP server. 16 | 17 | # Deployment 18 | 19 | You can deploy your platform using [deployment scripts](../deployment/). 20 | -------------------------------------------------------------------------------- /docker/worker/README.md: -------------------------------------------------------------------------------- 1 | Docker XWHEP worker 2 | =================== 3 | 4 | This directory contains everything to start an XWHEP worker inside a container from its Debian package. 5 | 6 | The worker Debian package can be generated from [docker/master](../master). 7 | 8 | # Create Docker image 9 | 10 | To create a Docker image for the worker, please launch: 11 | ``` 12 | build.sh 13 | ``` 14 | 15 | This script builds a new Docker image for the XWHEP worker. 16 | 17 | # Deployment 18 | 19 | You can deploy your platform using [deployment scripts](../deployment/). 20 | -------------------------------------------------------------------------------- /gitcloneall.sh: -------------------------------------------------------------------------------- 1 | rm -rf xtremweb-hep 2 | git clone https://github.com/iExecBlockchainComputing/xtremweb-hep.git 3 | rm -rf iexec-oracle-contract 4 | git clone https://github.com/iExecBlockchainComputing/iexec-oracle-contract.git 5 | rm -rf iexec-bridge 6 | git clone https://github.com/iExecBlockchainComputing/iexec-bridge.git 7 | rm -rf iexec-sdk 8 | git clone https://github.com/iExecBlockchainComputing/iexec-sdk.git 9 | rm -rf Stockfish 10 | git clone https://github.com/iExecBlockchainComputing/Stockfish.git 11 | -------------------------------------------------------------------------------- /poc/stockfish/bridge/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "stockfishback", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "stockfish.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.15.4", 13 | "web3": "^0.18.4" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /poc/stockfish/front/app/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | background: rgb(240,240,240); 5 | } 6 | 7 | #bodycontainer { 8 | min-height: 100vh; 9 | width: 70%; 10 | margin: 0 auto; 11 | background: #fff; 12 | text-align: center; 13 | } 14 | 15 | h1 { 16 | text-align: center; 17 | margin: 0; 18 | padding: 0; 19 | padding-top: 3vh; 20 | padding-bottom: 3vh; 21 | } 22 | 23 | #moveBox { 24 | color: grey; 25 | text-align: center; 26 | } 27 | -------------------------------------------------------------------------------- /poc/stockfish/front/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Stockfish 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

Stockfish

15 |
16 | 17 | 18 | 19 | 20 |
21 |
Moves :
22 |

23 | 
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /poc/stockfish/front/buildAndDeploy.sh: -------------------------------------------------------------------------------- 1 | 2 | rm -rf ./build 3 | ./node_modules/.bin/truffle compile 4 | ./node_modules/.bin/truffle migrate --reset 5 | 6 | export STOCKFISH_CONTRACT_ADDRESS=$(cat ~/iexecdev/iexec-node/poc/stockfish/front/build/contracts/stockfish.json | grep "address\":" | cut -d: -f2 | cut -d\" -f2) 7 | echo "STOCKFISH_CONTRACT_ADDRESS is :$STOCKFISH_CONTRACT_ADDRESS" 8 | echo "update address in ~/iexecdev/iexec-node/poc/stockfish/front/app/js/app.js" 9 | sed -i "s/.*var contract_address =.*/var contract_address =\"${STOCKFISH_CONTRACT_ADDRESS}\";/g" ~/iexecdev/iexec-node/poc/stockfish/front/app/js/app.js 10 | echo "update address in ~/iexecdev/iexec-node/poc/stockfish/bridge/stockfish.js" 11 | sed -i "s/.*var contract_address =.*/var contract_address =\"${STOCKFISH_CONTRACT_ADDRESS}\";/g" ~/iexecdev/iexec-node/poc/stockfish/bridge/stockfish.js 12 | 13 | ./node_modules/.bin/truffle build 14 | 15 | cd ~/iexecdev/iexec-node/poc/stockfish/bridge 16 | npm install 17 | cd - 18 | pm2 stop ~/iexecdev/iexec-node/poc/stockfish/bridge/stockfish.js 19 | pm2 start ~/iexecdev/iexec-node/poc/stockfish/bridge/stockfish.js 20 | 21 | 22 | php -S 0.0.0.0:8000 -t ./build/app 23 | -------------------------------------------------------------------------------- /poc/stockfish/front/contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.4; 2 | 3 | contract Migrations { 4 | address public owner; 5 | uint public last_completed_migration; 6 | 7 | modifier restricted() { 8 | if (msg.sender == owner) _; 9 | } 10 | 11 | function Migrations() { 12 | owner = msg.sender; 13 | } 14 | 15 | function setCompleted(uint completed) restricted { 16 | last_completed_migration = completed; 17 | } 18 | 19 | function upgrade(address new_address) restricted { 20 | Migrations upgraded = Migrations(new_address); 21 | upgraded.setCompleted(last_completed_migration); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /poc/stockfish/front/migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | var Migrations = artifacts.require("./Migrations.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /poc/stockfish/front/migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | var stockfish = artifacts.require("./stockfish.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(stockfish); 5 | }; 6 | -------------------------------------------------------------------------------- /poc/stockfish/front/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "stockfish", 3 | "version": "1.0.0", 4 | "description": "iexec stockfish poc", 5 | "main": "truffle.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/iExecBlockchainComputing/bridge_stockfish.git" 12 | }, 13 | "author": "", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/iExecBlockchainComputing/bridge_stockfish/issues" 17 | }, 18 | "homepage": "https://github.com/iExecBlockchainComputing/bridge_stockfish#readme", 19 | "devDependencies": { 20 | "css-loader": "^0.28.4", 21 | "style-loader": "^0.18.2", 22 | "truffle": "^3.4.7", 23 | "file-loader": "0.11.1", 24 | "webpack": "2.5.1" 25 | }, 26 | "dependencies": { 27 | "web3": "0.18.4" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /poc/stockfish/front/test/stockfishSimpleTest.txt: -------------------------------------------------------------------------------- 1 | position startpos moves e2e4 2 | go 3 | 4 | -------------------------------------------------------------------------------- /poc/stockfish/front/truffle.js: -------------------------------------------------------------------------------- 1 | var Web3 = require("web3"); 2 | 3 | module.exports = { 4 | build: "./node_modules/.bin/webpack", 5 | networks: { 6 | development: { 7 | host: "localhost", 8 | port: 8545, 9 | network_id: "*" // Match any network id 10 | } 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /poc/stockfish/front/webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | entry: { 3 | app: './app/js/app.js' 4 | }, 5 | output: { 6 | path: __dirname + "/build/app/js", 7 | filename: "[name].js" 8 | }, 9 | module: { 10 | loaders: [ 11 | { test: /\.css$/, loader: "style-loader!css-loader" } 12 | ] 13 | } 14 | }; -------------------------------------------------------------------------------- /poc/vanitygen/bridge/README.md: -------------------------------------------------------------------------------- 1 | # bridge_vanity 2 | 3 | to see all the vanity local deployment see front [README here](../front/README.md) -------------------------------------------------------------------------------- /poc/vanitygen/bridge/buildAndDevDeploy.sh: -------------------------------------------------------------------------------- 1 | 2 | export VANITYGEN_CONTRACT_ADDRESS=$(cat ~/iexecdev/iexec-node/poc/vanitygen/front/build/contracts/VanityGen.json | grep "address\":" | cut -d: -f2 | cut -d\" -f2) 3 | echo "VANITYGEN_CONTRACT_ADDRESS is :$VANITYGEN_CONTRACT_ADDRESS" 4 | echo "update address in ~/iexecdev/iexec-node/poc/vanitygen/bridge/vanitygen.js" 5 | sed -i "s/.*var contract_address =.*/var contract_address =\"${VANITYGEN_CONTRACT_ADDRESS}\";/g" ~/iexecdev/iexec-node/poc/vanitygen/bridge/vanitygen.js 6 | 7 | pm2 stop ~/iexecdev/iexec-node/poc/vanitygen/bridge/vanitygen.js 8 | pm2 start ~/iexecdev/iexec-node/poc/vanitygen/bridge/vanitygen.js 9 | -------------------------------------------------------------------------------- /poc/vanitygen/bridge/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "smartcontract", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "dependencies": { 7 | "express": "^4.14.0", 8 | "web3": "^0.18.2" 9 | }, 10 | "devDependencies": {}, 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1" 13 | }, 14 | "author": "", 15 | "license": "ISC" 16 | } 17 | -------------------------------------------------------------------------------- /poc/vanitygen/bridge/vanitybin/vanitygen_linux_amd64.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iExecBlockchainComputing/iexec-node/d6f49c9bfd76c612d6f63b9ba68e6ee2143859d6/poc/vanitygen/bridge/vanitybin/vanitygen_linux_amd64.bin -------------------------------------------------------------------------------- /poc/vanitygen/front/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | indent_style = space 9 | indent_size = 2 10 | 11 | [*.md] 12 | indent_size = 4 13 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /poc/vanitygen/front/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb", 3 | "env": { 4 | "browser": true 5 | }, 6 | "parser": "babel-eslint", 7 | "rules": { 8 | "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], 9 | "react/forbid-prop-types": 0, 10 | "no-console": 0, 11 | "no-global-assign": 0 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /poc/vanitygen/front/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | # misc 11 | .DS_Store 12 | .env.local 13 | .env.development.local 14 | .env.test.local 15 | .env.production.local 16 | 17 | npm-debug.log* 18 | yarn-debug.log* 19 | yarn-error.log* 20 | 21 | pass 22 | run.sh 23 | -------------------------------------------------------------------------------- /poc/vanitygen/front/buildAndDevDeploy.sh: -------------------------------------------------------------------------------- 1 | rm -rf ./build 2 | export NODE_ENV=development 3 | truffle compile 4 | truffle migrate --reset 5 | rm -rf ./src/build/contracts 6 | cp -rf ./build/contracts ./src/build/contracts 7 | 8 | ./node_modules/.bin/webpack --config ./config/webpack.config.dev.js 9 | #node ./scripts/test.js 10 | #node ./script/build.js 11 | pm2 stop ./scripts/start.js 12 | pm2 start ./scripts/start.js 13 | -------------------------------------------------------------------------------- /poc/vanitygen/front/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /poc/vanitygen/front/config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | // This is a custom Jest transformer turning file imports into filenames. 6 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 7 | 8 | module.exports = { 9 | process(src, filename) { 10 | return `module.exports = ${JSON.stringify(path.basename(filename))};`; 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /poc/vanitygen/front/config/polyfills.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (typeof Promise === 'undefined') { 4 | // Rejection tracking prevents a common issue where React gets into an 5 | // inconsistent state due to an error, but it gets swallowed by a Promise, 6 | // and the user has no idea what causes React's erratic future behavior. 7 | require('promise/lib/rejection-tracking').enable(); 8 | window.Promise = require('promise/lib/es6-extensions.js'); 9 | } 10 | 11 | // fetch() polyfill for making API calls. 12 | require('whatwg-fetch'); 13 | 14 | // Object.assign() is commonly used with React. 15 | // It will use the native implementation if it's present and isn't buggy. 16 | Object.assign = require('object-assign'); 17 | -------------------------------------------------------------------------------- /poc/vanitygen/front/contracts/ERC20.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.8; 2 | 3 | contract ERC20 { 4 | uint public totalSupply; 5 | function balanceOf(address who) constant returns (uint); 6 | function allowance(address owner, address spender) constant returns (uint); 7 | 8 | function transfer(address to, uint value) returns (bool ok); 9 | function transferFrom(address from, address to, uint value) returns (bool ok); 10 | function approve(address spender, uint value) returns (bool ok); 11 | event Transfer(address indexed from, address indexed to, uint value); 12 | event Approval(address indexed owner, address indexed spender, uint value); 13 | } 14 | -------------------------------------------------------------------------------- /poc/vanitygen/front/contracts/Faucet.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.8; 2 | 3 | contract Token { 4 | function balanceOf(address _owner) constant returns (uint balance); 5 | function transfer(address _to, uint _value) returns (bool success); 6 | } 7 | 8 | contract Faucet{ 9 | Token public rlc; // RLC contract reference 10 | // Constructor of the contract. 11 | function Faucet(address _token) payable { 12 | rlc = Token(_token); // RLC contract address 13 | } 14 | 15 | function gimmeFive() returns (bool success) { 16 | return rlc.transfer(msg.sender,5000000000); 17 | } 18 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.8; 2 | 3 | import "./Ownable.sol"; 4 | 5 | contract Migrations is Ownable { 6 | uint public lastCompletedMigration; 7 | 8 | function setCompleted(uint completed) onlyOwner { 9 | lastCompletedMigration = completed; 10 | } 11 | 12 | function upgrade(address newAddress) onlyOwner { 13 | Migrations upgraded = Migrations(newAddress); 14 | upgraded.setCompleted(lastCompletedMigration); 15 | } 16 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/contracts/Ownable.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.8; 2 | 3 | contract Ownable { 4 | address public owner; 5 | 6 | function Ownable() { 7 | owner = msg.sender; 8 | } 9 | 10 | modifier onlyOwner() { 11 | if (msg.sender == owner) 12 | _; 13 | } 14 | 15 | function transferOwnership(address newOwner) onlyOwner { 16 | if (newOwner != address(0)) owner = newOwner; 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/contracts/SafeMath.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.8; 2 | 3 | contract SafeMath { 4 | function safeMul(uint a, uint b) internal returns (uint) { 5 | uint c = a * b; 6 | assert(a == 0 || c / a == b); 7 | return c; 8 | } 9 | 10 | function safeSub(uint a, uint b) internal returns (uint) { 11 | assert(b <= a); 12 | return a - b; 13 | } 14 | 15 | function safeAdd(uint a, uint b) internal returns (uint) { 16 | uint c = a + b; 17 | assert(c>=a && c>=b); 18 | return c; 19 | } 20 | 21 | function assert(bool assertion) internal { 22 | if (!assertion) throw; 23 | } 24 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/contracts/Task.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.8; 2 | import "./Ownable.sol"; 3 | contract Task is Ownable{ 4 | function setParam(string, string); // launch process 5 | function pushResult(address userContract, string res, string url); // the Bridge publish the result 6 | function getResult() constant returns (string res, string url); // the user get the result 7 | event Launch(string value, string param, address addr); // special log to launch process 8 | event Logs(string status, address indexed user); // logs for the front-end or smart contract to react correctly 9 | } 10 | -------------------------------------------------------------------------------- /poc/vanitygen/front/contracts/TokenSpender.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.8; 2 | 3 | contract TokenSpender { 4 | function receiveApproval(address _from, uint256 _value, address _token, string _extraData, string _extraData2); 5 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | /* global artifacts */ 2 | // eslint-disable-next-line 3 | var Migrations = artifacts.require("./Migrations.sol"); 4 | // eslint-disable-next-line 5 | module.exports = function(deployer) { 6 | deployer.deploy(Migrations); 7 | }; 8 | -------------------------------------------------------------------------------- /poc/vanitygen/front/migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | /* global artifacts */ 2 | // eslint-disable-next-line 3 | var RLC = artifacts.require("./RLC.sol"); 4 | // eslint-disable-next-line 5 | var Faucet = artifacts.require("./Faucet.sol"); 6 | // eslint-disable-next-line 7 | var VanityGen = artifacts.require("./VanityGen.sol"); 8 | // eslint-disable-next-line 9 | var faucet; 10 | // eslint-disable-next-line 11 | var rlc; 12 | // eslint-disable-next-line 13 | module.exports = function(deployer) { // eslint-disable-next-line 14 | deployer.deploy(RLC).then(function() { // eslint-disable-next-line 15 | return deployer.deploy(Faucet,RLC.address).then(function(){ // eslint-disable-next-line 16 | return Faucet.deployed(); // eslint-disable-next-line 17 | }).then(function(instance){ // eslint-disable-next-line 18 | faucet = instance; 19 | return RLC.deployed(); // eslint-disable-next-line 20 | }).then(function(instance){ 21 | rlc = instance; 22 | return rlc.transfer(faucet.address, 100000000000000); // eslint-disable-next-line 23 | }).then(function(){ // eslint-disable-next-line 24 | return deployer.deploy(VanityGen, rlc.address) // eslint-disable-next-line 25 | }) // eslint-disable-next-line 26 | }); // eslint-disable-next-line 27 | }; 28 | -------------------------------------------------------------------------------- /poc/vanitygen/front/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iExecBlockchainComputing/iexec-node/d6f49c9bfd76c612d6f63b9ba68e6ee2143859d6/poc/vanitygen/front/public/favicon.ico -------------------------------------------------------------------------------- /poc/vanitygen/front/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "VanityGen", 3 | "name": "Simple Vanity Generator", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /poc/vanitygen/front/scripts/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | process.env.NODE_ENV = 'test'; 4 | process.env.PUBLIC_URL = ''; 5 | 6 | // Makes the script crash on unhandled rejections instead of silently 7 | // ignoring them. In the future, promise rejections that are not handled will 8 | // terminate the Node.js process with a non-zero exit code. 9 | process.on('unhandledRejection', err => { 10 | throw err; 11 | }); 12 | 13 | // Ensure environment variables are read. 14 | require('../config/env'); 15 | 16 | const jest = require('jest'); 17 | const argv = process.argv.slice(2); 18 | 19 | // Watch unless on CI or in coverage mode 20 | if (!process.env.CI && argv.indexOf('--coverage') < 0) { 21 | argv.push('--watch'); 22 | } 23 | 24 | 25 | jest.run(argv); 26 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/build/contracts/Ownable.json: -------------------------------------------------------------------------------- 1 | { 2 | "contract_name": "Ownable", 3 | "abi": [ 4 | { 5 | "constant": true, 6 | "inputs": [], 7 | "name": "owner", 8 | "outputs": [ 9 | { 10 | "name": "", 11 | "type": "address" 12 | } 13 | ], 14 | "payable": false, 15 | "type": "function" 16 | }, 17 | { 18 | "constant": false, 19 | "inputs": [ 20 | { 21 | "name": "newOwner", 22 | "type": "address" 23 | } 24 | ], 25 | "name": "transferOwnership", 26 | "outputs": [], 27 | "payable": false, 28 | "type": "function" 29 | }, 30 | { 31 | "inputs": [], 32 | "payable": false, 33 | "type": "constructor" 34 | } 35 | ], 36 | "unlinked_binary": "0x6060604052341561000c57fe5b5b60008054600160a060020a03191633600160a060020a03161790555b5b60ef806100386000396000f300606060405263ffffffff60e060020a6000350416638da5cb5b8114602a578063f2fde38b146053575bfe5b3415603157fe5b6037606e565b60408051600160a060020a039092168252519081900360200190f35b3415605a57fe5b606c600160a060020a0360043516607d565b005b600054600160a060020a031681565b60005433600160a060020a039081169116141560bd57600160a060020a0381161560bd5760008054600160a060020a031916600160a060020a0383161790555b5b5b5b505600a165627a7a723058206f55a422be8735ce41a5445aed28e2ce92b33d8437a3145c102516b878a7ca950029", 37 | "networks": {}, 38 | "schema_version": "0.0.5", 39 | "updated_at": 1496753248505 40 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/src/build/contracts/SafeMath.json: -------------------------------------------------------------------------------- 1 | { 2 | "contract_name": "SafeMath", 3 | "abi": [], 4 | "unlinked_binary": "0x60606040523415600b57fe5b5b60338060196000396000f30060606040525bfe00a165627a7a7230582024ac3660ba74fea3012edcca5c13741d833b0e758202d1133dc4b7401c7b0fa90029", 5 | "networks": {}, 6 | "schema_version": "0.0.5", 7 | "updated_at": 1496753248505 8 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/src/build/contracts/Token.json: -------------------------------------------------------------------------------- 1 | { 2 | "contract_name": "Token", 3 | "abi": [ 4 | { 5 | "constant": true, 6 | "inputs": [ 7 | { 8 | "name": "_owner", 9 | "type": "address" 10 | } 11 | ], 12 | "name": "balanceOf", 13 | "outputs": [ 14 | { 15 | "name": "balance", 16 | "type": "uint256" 17 | } 18 | ], 19 | "payable": false, 20 | "type": "function" 21 | }, 22 | { 23 | "constant": false, 24 | "inputs": [ 25 | { 26 | "name": "_to", 27 | "type": "address" 28 | }, 29 | { 30 | "name": "_value", 31 | "type": "uint256" 32 | } 33 | ], 34 | "name": "transfer", 35 | "outputs": [ 36 | { 37 | "name": "success", 38 | "type": "bool" 39 | } 40 | ], 41 | "payable": false, 42 | "type": "function" 43 | } 44 | ], 45 | "unlinked_binary": "0x", 46 | "networks": {}, 47 | "schema_version": "0.0.5", 48 | "updated_at": 1496753248505 49 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/src/build/contracts/TokenSpender.json: -------------------------------------------------------------------------------- 1 | { 2 | "contract_name": "TokenSpender", 3 | "abi": [ 4 | { 5 | "constant": false, 6 | "inputs": [ 7 | { 8 | "name": "_from", 9 | "type": "address" 10 | }, 11 | { 12 | "name": "_value", 13 | "type": "uint256" 14 | }, 15 | { 16 | "name": "_token", 17 | "type": "address" 18 | }, 19 | { 20 | "name": "_extraData", 21 | "type": "string" 22 | }, 23 | { 24 | "name": "_extraData2", 25 | "type": "string" 26 | } 27 | ], 28 | "name": "receiveApproval", 29 | "outputs": [], 30 | "payable": false, 31 | "type": "function" 32 | } 33 | ], 34 | "unlinked_binary": "0x", 35 | "networks": {}, 36 | "schema_version": "0.0.5", 37 | "updated_at": 1496753248505 38 | } -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/actions/index.js: -------------------------------------------------------------------------------- 1 | import * as letters from './letters'; 2 | import * as address from './address'; 3 | import * as rlc from './rlc'; 4 | 5 | export default { 6 | letters, 7 | address, 8 | rlc, 9 | }; 10 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/actions/letters.js: -------------------------------------------------------------------------------- 1 | import { SET_LETTERS } from './redux'; 2 | 3 | export const setLetters = letters => ({ 4 | type: SET_LETTERS, 5 | payload: { 6 | letters, 7 | }, 8 | }); 9 | 10 | export const setLetters2 = letters => ({ 11 | type: SET_LETTERS, 12 | payload: { 13 | letters, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/actions/redux.js: -------------------------------------------------------------------------------- 1 | export const SET_LETTERS = 'SET_LETTERS'; 2 | export const SET_USER_PUBLIC_KEY = 'SET_USER_PUBLIC_KEY'; 3 | export const GENERATE_BITCOIN_ADDRESS = 'GENERATE_BITCOIN_ADDRESS'; 4 | export const GET_ECKEY = 'GET_ECKEY'; 5 | export const LOAD = 'LOAD'; 6 | export const SET_RLC = 'SET_RLC'; 7 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/actions/rlc.js: -------------------------------------------------------------------------------- 1 | /* global web3 */ 2 | import rlc from '../../build/contracts/RLC.json'; 3 | import { SET_RLC } from './redux'; 4 | import { getSmartContractAddressByJsonNetworks } from '../vanity/utils'; 5 | 6 | export const setRlc = payload => ({ 7 | type: SET_RLC, 8 | payload, 9 | }); 10 | 11 | export const setNewRlc = () => (dispatch) => { 12 | if (window.web3.eth.accounts[0]) { 13 | const rlcContract = web3.eth.contract(rlc.abi); 14 | // ropsten is const rlcInstance = rlcContract.at('0x9978b9a251e2f1b306dde81830c7bc97c5e6e149'); 15 | const rlcInstance = rlcContract.at(getSmartContractAddressByJsonNetworks(rlc.networks)); 16 | rlcInstance.balanceOf(window.web3.eth.accounts[0], (err, result) => { 17 | if (err) console.log(err); 18 | else dispatch(setRlc(Number(window.web3.fromWei(result, 'nano')))); 19 | }); 20 | } 21 | }; 22 | 23 | export default setRlc; 24 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/components/Footer/Footer.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | position: absolute; 3 | bottom: 0; 4 | width: 100%; 5 | height: 50px; 6 | text-align: center; 7 | } 8 | 9 | .container{ 10 | color: #fff; 11 | width: 100%; 12 | } 13 | 14 | .fa-twitter { 15 | color: #4099FF; 16 | } 17 | 18 | .fa-facebook { 19 | color: #3B5998; 20 | } 21 | 22 | .fa-youtube-play { 23 | color: #e52d27; 24 | } 25 | 26 | .fa-rss { 27 | color: #FF6600; 28 | } 29 | 30 | .fa-vine { 31 | color: #00a478; 32 | } 33 | 34 | .fa-flickr { 35 | color: #ff0084; 36 | } 37 | 38 | .fa-twitch { 39 | color: #6441A5; 40 | } 41 | 42 | .fa-linkedin { 43 | color: #007bb6; 44 | } 45 | 46 | .fa { 47 | opacity: 0.7; 48 | transition: 1s; 49 | -webkit-transition: 1s; 50 | } 51 | 52 | .fa:hover{ 53 | opacity: 1; 54 | transition: 1s; 55 | -webkit-transition: 1s; 56 | } 57 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/components/Footer/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './Footer.css'; 3 | 4 | const Footer = () => ( 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | ); 18 | 19 | export default Footer; 20 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/components/Input/Input.css: -------------------------------------------------------------------------------- 1 | .form-group{ 2 | margin-bottom: 15px; 3 | } 4 | 5 | label{ 6 | margin-bottom: 15px; 7 | } 8 | 9 | input, 10 | input::-webkit-input-placeholder { 11 | font-size: 11px; 12 | padding-top: 3px; 13 | } 14 | 15 | .main-login{ 16 | background-color: #fff; 17 | border-radius: 2px; 18 | box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3); 19 | } 20 | 21 | .form-control { 22 | height: auto!important; 23 | padding: 8px 12px !important; 24 | } 25 | 26 | .input-group { 27 | box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.21)!important; 28 | } 29 | 30 | span.input-group-addon i { 31 | color: #009edf; 32 | font-size: 17px; 33 | } 34 | -------------------------------------------------------------------------------- /poc/vanitygen/front/src/client/components/Input/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import './Input.css'; 4 | 5 | const Input = ({ placeholder, label, type, logo, length, onChange, value }) => ( 6 |
7 | 8 |
9 |
10 |