├── CV ├── blackyak │ └── AlexeyChernyak.md ├── .DS_Store ├── andresag │ └── andresag.md ├── panamantis │ ├── intro.md │ └── wallet.md ├── Бадалян Арсен │ ├── Резюме.md │ └── Wallet.md ├── Халилов У.А │ ├── Plasma.bankex.md │ ├── wallet.md │ └── Khalilov resume.md ├── ymilovidova │ ├── cv_ Yana Milovidova.pdf │ └── ymilovidova.txt ├── deniskulakov │ ├── task2-readme.md │ ├── task2.md │ ├── wallet.md │ ├── resume.md │ └── task1.md ├── artem-vorobev │ ├── wallet.md │ └── cv.md ├── Павлова П.С │ ├── Павлова П-С.md │ └── wallet.md ├── wadmilionikus │ ├── Wallet.md │ └── Ataev_Vadim.md ├── IrKor │ ├── wallet.md │ └── Королева-И-С.md ├── Petrov Vasiliy │ ├── wallet.md │ └── Petrov Vasiliy - Resume.md ├── sergeibershadsky │ └── profile.txt ├── aivanouski │ └── resume.md ├── Жарков Д.И │ ├── wallet.md │ └── Zharkov resume.md ├── Timur Taov │ ├── wallet.md │ └── resume.md ├── Панков Павел │ ├── wallet.md │ ├── Панков-П-В.md │ ├── Задание 2.md │ └── Задание 1.md ├── Кузьмин Е.Н │ ├── Wallet.md │ └── Kuzmin resume.md ├── Руденко В.А │ ├── Wallet.md │ └── Resume.md ├── Konovalov Ilya │ └── Коновалов-И-Д.md ├── madiyarov │ └── resume.txt ├── Ровенский │ ├── Задание 0.Wallet.md │ ├── Задание 1. Contract.md │ └── Резюме.md ├── CryptoCoinsX │ └── Resume.md ├── Кукушкин А.А │ ├── Wallet.md │ └── Резюме Кукушкин А.А.md ├── Степанов А. С │ ├── Wallet.md │ ├── Резюме.md │ ├── Task 2.md │ └── Task 1.md ├── Selemenev Alexey │ └── резюме.txt ├── ohanjelique │ └── Соболева А.И.md ├── Арчаков │ └── Арчаков А.М..mdown ├── nemelnikov │ └── Melnikov_CV.md └── wovvan │ └── resume.txt ├── EDU_Materials ├── tasks │ └── CarMarketTask │ │ ├── .gitignore │ │ ├── migrations │ │ └── 1_car_market.js │ │ ├── truffle-config.js │ │ ├── contracts │ │ ├── Migrations.sol │ │ └── CarMarket.sol │ │ ├── package.json │ │ ├── helpers │ │ └── expectThrow.js │ │ ├── truffle.js │ │ ├── web3 │ │ ├── index.html │ │ ├── index.js │ │ └── contractData.js │ │ ├── README.md │ │ └── test │ │ └── CarMarketTest.js ├── examples │ ├── .DS_Store │ ├── test_in_truffle │ │ ├── .DS_Store │ │ ├── sol │ │ │ └── .DS_Store │ │ ├── truffle-config.js │ │ ├── migrations │ │ │ └── 1_initial_migration.js │ │ ├── truffle.js │ │ ├── contracts │ │ │ ├── Migrations.sol │ │ │ └── Demo.sol │ │ └── test │ │ │ └── Demo.js │ └── multi_argue │ │ ├── truffle-config.js │ │ ├── frontend │ │ ├── initialiseWeb3.js │ │ ├── index.js │ │ ├── contracts.js │ │ ├── index.html │ │ ├── account.js │ │ ├── ethereum.js │ │ └── contractData.js │ │ ├── truffle.js │ │ ├── migrations │ │ └── 1_initial_migration.js │ │ ├── contracts │ │ ├── Migrations.sol │ │ ├── SimpleArgue.sol │ │ └── MultiArgue.sol │ │ ├── test │ │ └── Demo.js │ │ └── README.md └── solidity_materials │ ├── .DS_Store │ ├── Master-class7.sol │ ├── Master-class1.sol │ ├── Master-class5.sol │ ├── Master-class3.sol │ ├── ERC20andICO │ ├── ICO-1.sol │ ├── ICO-2.sol │ ├── ERC20.txt │ ├── ERC20.sol │ ├── ICO+RefTokenREADME.sol │ ├── ERC20Auto.sol │ └── ICO+RefToken.sol │ ├── Master-class6.sol │ ├── Master-class2.sol │ └── Master-class4.sol ├── README.md └── README_EN.md /CV/blackyak/AlexeyChernyak.md: -------------------------------------------------------------------------------- 1 | #Alexey Chernyak 2 | founder at blockchainfounder.ru 3 | -------------------------------------------------------------------------------- /CV/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BANKEX/bankex_foundation_education/HEAD/CV/.DS_Store -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | .DS_Store 4 | .idea 5 | build -------------------------------------------------------------------------------- /CV/andresag/andresag.md: -------------------------------------------------------------------------------- 1 | Andrés Alonso 2 | ============= 3 | 4 | VoIP Developer & Blockchain enthusiast. 5 | -------------------------------------------------------------------------------- /CV/panamantis/intro.md: -------------------------------------------------------------------------------- 1 | Panamantis 2 | ======= 3 | **Toronto based 4 | 5 | Creating smart asset for gold. 6 | -------------------------------------------------------------------------------- /CV/Бадалян Арсен/Резюме.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BANKEX/bankex_foundation_education/HEAD/CV/Бадалян Арсен/Резюме.md -------------------------------------------------------------------------------- /CV/Халилов У.А/Plasma.bankex.md: -------------------------------------------------------------------------------- 1 | https://rinkeby.etherscan.io/tx/0x34502d300ba77d0a0608c48233d30a6e2ab7f408327b4ebd11074d4d5e99f3d2 -------------------------------------------------------------------------------- /EDU_Materials/examples/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BANKEX/bankex_foundation_education/HEAD/EDU_Materials/examples/.DS_Store -------------------------------------------------------------------------------- /CV/ymilovidova/cv_ Yana Milovidova.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BANKEX/bankex_foundation_education/HEAD/CV/ymilovidova/cv_ Yana Milovidova.pdf -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BANKEX/bankex_foundation_education/HEAD/EDU_Materials/solidity_materials/.DS_Store -------------------------------------------------------------------------------- /CV/Халилов У.А/wallet.md: -------------------------------------------------------------------------------- 1 | metamask: 0x3BA188e423D640BF35853508d27933669f277851 2 | facebook: https://www.facebook.com/umid.privet/posts/1355626394546613?pnref=story -------------------------------------------------------------------------------- /CV/deniskulakov/task2-readme.md: -------------------------------------------------------------------------------- 1 | ## Small example of how to use https://dkstoken.herokuapp.com/ to send DKS non-fungible token: 2 | 3 | https://yadi.sk/i/yDMrmaMS3SJKZL -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BANKEX/bankex_foundation_education/HEAD/EDU_Materials/examples/test_in_truffle/.DS_Store -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/sol/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BANKEX/bankex_foundation_education/HEAD/EDU_Materials/examples/test_in_truffle/sol/.DS_Store -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/truffle-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // See 3 | // to customize your Truffle configuration! 4 | }; 5 | -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/migrations/1_car_market.js: -------------------------------------------------------------------------------- 1 | var CarMarket = artifacts.require("./CarMarket.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(CarMarket); 5 | }; -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/truffle-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // See 3 | // to customize your Truffle configuration! 4 | }; 5 | -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/truffle-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // See 3 | // to customize your Truffle configuration! 4 | }; 5 | -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | var Migrations = artifacts.require("./Migrations.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /CV/artem-vorobev/wallet.md: -------------------------------------------------------------------------------- 1 | 0x9A75BCcb9046827A9Ee9C5038b9aF16E3044b629 2 | Пост: https://plus.google.com/+ArtemVorobev/posts/MofTApSePDG 3 | Транзакция в etherscan: https://rinkeby.etherscan.io/tx/0xfd98eb61d9def80c134881f6f6d160a0237015e89b04cd4a8b4a369cdf75ee2e -------------------------------------------------------------------------------- /CV/Павлова П.С/Павлова П-С.md: -------------------------------------------------------------------------------- 1 | **ФИО:** Павлова Полина Сергеевна 2 | **Уровень английского: ** Upper-Intermediate 3 | **Знания** C, C++, C#, HTML, CSS, PHP 4 | **Направление:** Blockchain 5 | **Контакты** 6 | 1. juststuttering@yandex.ru 7 | 2. +7 (985) 783-95-07 -------------------------------------------------------------------------------- /CV/wadmilionikus/Wallet.md: -------------------------------------------------------------------------------- 1 | Metamask wallet: 0x6203f62Ce77d58E0E85BEF5AF457bEFe6aE65C30 2 | 3 | etherscan link: https://etherscan.io/address/0x6203f62Ce77d58E0E85BEF5AF457bEFe6aE65C30 4 | 5 | post: https://plus.google.com/111564446033858014745/posts/ENw5F9YDTVX 6 | -------------------------------------------------------------------------------- /CV/IrKor/wallet.md: -------------------------------------------------------------------------------- 1 | https://rinkeby.etherscan.io/address/0x519836d44b2b4a0a3b6d41759308f1227fdd3f4d 2 | https://plus.google.com/u/0/100317116052215692152/posts/bLjBtaNYvBh 3 | https://rinkeby.etherscan.io/tx/0xb2e552dee4d6edacf5c9505ca39794c41a3a0381c5dced0e0c970a56b89d8293 -------------------------------------------------------------------------------- /CV/deniskulakov/task2.md: -------------------------------------------------------------------------------- 1 | # Task 2. DKS nft token 2 | 3 | ## ERC-721 contract: 4 | https://rinkeby.etherscan.io/address/0xa3af1cac819ff4c7385a869193b5507d91cfd189 5 | 6 | ## Simple app which allows you to mint and send DKS tokens 7 | https://dkstoken.herokuapp.com/ 8 | -------------------------------------------------------------------------------- /CV/panamantis/wallet.md: -------------------------------------------------------------------------------- 1 | https://rinkeby.etherscan.io/address/0x3dd8a3d860fA7fF5b664b96846D3afC3049cfF0D 2 | https://plus.google.com/108029174393032497871/posts/4WRWWGZphsB 3 | https://rinkeby.etherscan.io/tx/0xe6003865f8180e935b5f3c6931f86281d7223679479f11628e7aac83084d7851 4 | -------------------------------------------------------------------------------- /CV/Petrov Vasiliy/wallet.md: -------------------------------------------------------------------------------- 1 | https://rinkeby.etherscan.io/address/0xa1fe60ab79ac45393dfc033da10046c507d8d02d 2 | https://plus.google.com/u/0/113609701686763356611/posts/ekCauuDAJN1 3 | https://rinkeby.etherscan.io/tx/0x8ee5ac00ebdb45a73a5ecf58e11aa7e1cb8164f28fe3027121bcae440cdd4223 4 | -------------------------------------------------------------------------------- /CV/sergeibershadsky/profile.txt: -------------------------------------------------------------------------------- 1 | Бершадский Сергей Игоревич 2 | 3 | Веб-девелопер в 3D4Medical 4 | 5 | Закончил Кубанский Государственный Технологический Университет, информатика в экономике. 6 | 7 | Занимаюсь Python/Django, Postgresql, Node.js 8 | 9 | https://telegram.me/sergeibershadsky 10 | -------------------------------------------------------------------------------- /CV/deniskulakov/wallet.md: -------------------------------------------------------------------------------- 1 | 0x5F873c07ED0A2668b9F36cE6F162f0E24a6a153f 2 | 3 | https://rinkeby.etherscan.io/address/0x5f873c07ed0a2668b9f36ce6f162f0e24a6a153f 4 | 5 | https://plus.google.com/u/0/115668487889558170287/posts/11VF5LjjNrY 6 | 7 | https://rinkeby.etherscan.io/tx/0x57657eaa834f9539e8660dcb6587ea04b07296c60357046e41416875ca4d1068 -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/frontend/initialiseWeb3.js: -------------------------------------------------------------------------------- 1 | function setWeb3Provider() { 2 | if (typeof web3 !== 'undefined') 3 | web3 = new Web3(web3.currentProvider); 4 | else 5 | web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); 6 | 7 | return web3; 8 | } 9 | 10 | 11 | setWeb3Provider(); 12 | -------------------------------------------------------------------------------- /CV/aivanouski/resume.md: -------------------------------------------------------------------------------- 1 | # Ивановский Андрей 2 | ## Experience 3 | * 9 years web development (Dev, Lead, CTO) 4 | 5 | ## Interests 6 | * world communication systems 7 | * body, soul and spirit union 8 | * integration blockchain to web and life 9 | 10 | ## Contacts 11 | * Telegram: @aivanouski 12 | * Skype: kydesnik_by 13 | * Email: aivanouski@gmail.com 14 | -------------------------------------------------------------------------------- /CV/Жарков Д.И/wallet.md: -------------------------------------------------------------------------------- 1 | Адрес Metamask - 0xebeAC18B8E10568069a7FE9c38B5D8B0B4426d5F 2 | Rinkeby - https://rinkeby.etherscan.io/address/0xebeAC18B8E10568069a7FE9c38B5D8B0B4426d5F 3 | Ссылка на пост - https://plus.google.com/u/0/109337048109185225009/posts/PLyMCbVpfkH 4 | Транзакция в Plasma - https://rinkeby.etherscan.io/tx/0x3dea83ad5bb62c6b2fc410465736dd05b389d4ebbcb2097877bed3017c09bf5f -------------------------------------------------------------------------------- /CV/Timur Taov/wallet.md: -------------------------------------------------------------------------------- 1 | # Task 0 2 | **wallet:** 0xC7be7EDF283ec1C510db3dC54ea5e5F5ddb1400F 3 | 4 | [LINK to wallet](https://rinkeby.etherscan.io/address/0xc7be7edf283ec1c510db3dc54ea5e5f5ddb1400f) 5 | 6 | [LINK to facebook post](https://www.facebook.com/juashik/posts/1518008968276217) 7 | 8 | Plasma transaction (probably): 0x9319556191152c3c99402854112f36ae1bb39ea2e086cd815fadbaa3e8ebfbf6 -------------------------------------------------------------------------------- /CV/Павлова П.С/wallet.md: -------------------------------------------------------------------------------- 1 | **Адрес:** 0x0f4918ab27f48ce4ad15a5535b6ff72b13af5ab4 2 | **Ссылка:** https://rinkeby.etherscan.io/address/0x0f4918ab27f48ce4ad15a5535b6ff72b13af5ab4 3 | **Ссылка на пост:** https://plus.google.com/108789716953873659786/posts/V478Dfd8GPT 4 | **Ссылка на транзакцию:** https://rinkeby.etherscan.io/tx/0x527b14dc8b4988ddfcc851d5d8ef02853f79900af1eb529c1bfe1a4e1182c2a7 5 | -------------------------------------------------------------------------------- /CV/Панков Павел/wallet.md: -------------------------------------------------------------------------------- 1 | Адрес metamask-кошелька: 0xd26c792cb9D0b2e527af3bb067Aa3Ba3993856B8 2 | Адрес на сайте: https://rinkeby.etherscan.io/address/0xd26c792cb9D0b2e527af3bb067Aa3Ba3993856B8 3 | Адрес поста: https://plus.google.com/105712169534871697906/posts/DsEAn4VnjoR 4 | Адрес транзакции: https://rinkeby.etherscan.io/tx/0x794248144d071ccaf41ca35989ab09d4d5cf1e0d365ddc83ea118c3984fe12c0 -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/truffle.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // See 3 | // to customize your Truffle configuration! 4 | networks: { 5 | ganache: { 6 | host: '127.0.0.1', 7 | port: 8545, 8 | network_id: 5777, 9 | gas: 6721975 10 | }, 11 | }, 12 | migrations_directory: './migrations' 13 | }; 14 | -------------------------------------------------------------------------------- /CV/Кузьмин Е.Н/Wallet.md: -------------------------------------------------------------------------------- 1 | Адрес MetaMask: 0xea3d45844e4480333acd72aa7ae0ff662a78ef94 2 | Rinkeby: https://rinkeby.etherscan.io/address/0xea3d45844e4480333acd72aa7ae0ff662a78ef94 3 | Ссылка на репост в Google+: https://plus.google.com/109553606429479807978/posts/dbo7zo1NRzc?hl=ru 4 | Ссылка на транзакцию в плазму: https://rinkeby.etherscan.io/tx/0xe788d73043e62dd90d8b51eae96e1ba3a0be27bfe8add5540bd7e0f4022b28a8 5 | -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/truffle.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // See 3 | // to customize your Truffle configuration! 4 | networks: { 5 | ganache: { 6 | host: '127.0.0.1', 7 | port: 8545, 8 | network_id: 5777, 9 | gas: 6721975 10 | }, 11 | }, 12 | migrations_directory: './migrations' 13 | }; 14 | -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/frontend/index.js: -------------------------------------------------------------------------------- 1 | function getValues() { 2 | var prvtKey = document.getElementById("prvtKey").value; 3 | var endTime = document.getElementById("endTime").value; 4 | var argueType = document.getElementById("argueType").value; 5 | var contractAddress = document.getElementById("contractAddress").value; 6 | createArgue(prvtKey, endTime, argueType, contractAddress); 7 | } 8 | -------------------------------------------------------------------------------- /CV/artem-vorobev/cv.md: -------------------------------------------------------------------------------- 1 | # Воробьёв Артем 2 | 3 | Разрабочик в компании 3CX 4 | Навыки в хронологическом порядке :-) 5 | * Frontend: TS, JS, RxJS, Node, Anular, AngualaJS, Webpack, Gulp, HTML, CSS, LESS 6 | * .Net C#, WPF, Net Core, ASP.NET Core 7 | * C/C++ Qt4, Boos, POCO, OpenCV 8 | 9 | Интересуюсь Blockchain и связанными технологиями 10 | Вы можете связаться со мной в телеграм @artall64 или по почте artall64@gmail.com -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | var Migrations = artifacts.require("./Migrations.sol"); 2 | var MultiArgue = artifacts.require("./MultiArgue.sol"); 3 | var SimpleArgue = artifacts.require("./SimpleArgue.sol"); 4 | 5 | module.exports = async function(deployer) { 6 | await deployer.deploy(Migrations); 7 | await deployer.deploy(MultiArgue); 8 | await deployer.deploy(SimpleArgue); 9 | }; -------------------------------------------------------------------------------- /CV/Руденко В.А/Wallet.md: -------------------------------------------------------------------------------- 1 | Задача 0.0 2 | Номер кошелька - 0xf6CcA204d367F0F3D2BaDD7721a0769945D92580 3 | Ссылка на rinkeby https://rinkeby.etherscan.io/address/0xf6CcA204d367F0F3D2BaDD7721a0769945D92580 4 | 5 | Задача 0.1 6 | https://plus.google.com/105036902714131702928/posts/aNK3FFSYMWj?hl=ru 7 | 8 | Задача 0.2 9 | https://rinkeby.etherscan.io/tx/0x5b7d3dc3bcb3603d2a91c05c5e7ef6c3cdb3859647bacec3161fb9f6b32f71d7 10 | 11 | -------------------------------------------------------------------------------- /CV/Petrov Vasiliy/Petrov Vasiliy - Resume.md: -------------------------------------------------------------------------------- 1 | Петров Василий 2 | ======= 3 | **О себе:** Люблю паять и кодить. 5 лет работаю в НИИЧАВО младшим научным сотрудником. Люблю петь, играть на гитаре и собирать грибы. 4 | **Языки программирования:** Fortran, Ассемблер - продвинутый пользователь. 5 | **Знание языков:** Английский - почти как родной, немецкий - хэндэ хох. 6 | 7 | Хочу научиться разбираться в технологии блокчейн и кодить для неё. 8 | -------------------------------------------------------------------------------- /CV/Konovalov Ilya/Коновалов-И-Д.md: -------------------------------------------------------------------------------- 1 | Коновалов Илья Дмитриевич,18 лет 2 | ==================== 3 | 4 | **Навыки:** 5 | Уровень знания английского языка - pre-intermediate. 6 | 7 | **Знаю следующие языки программирования:** 8 | C++, C#, PHP, JS(основы), знание верстки (html, css) 9 | 10 | **ОС:** Windows 11 | 12 | Хотел бы заниматься Backend разработкой. 13 | 14 | **Контактная информация:** 15 | тел: 8(977)645-25-10 16 | e-mail: 09.i@bk.ru 17 | skype: ilya0923 -------------------------------------------------------------------------------- /CV/madiyarov/resume.txt: -------------------------------------------------------------------------------- 1 | Мадияров Айдар Маратович 2 | 3 | Сводка: 4 | 5 | - 15.08.1995 г.р 6 | - Закончил бакалавриат КФУ по специальности "Экономика предприятий" 7 | - Работаю в BankEx аккаунт-менеджером 8 | - Очень интересуюсь блокчейном 9 | - С программированием знаком несильно 10 | - Английский люблю и знаю хорошо (advanced) 11 | - Контактная информация: aydarmm@gmail.com 12 | t.me/madiyarov 13 | +7 962 573 2016 -------------------------------------------------------------------------------- /CV/Бадалян Арсен/Wallet.md: -------------------------------------------------------------------------------- 1 | Adress of ETH wallet: 2 | 0xF8502B0BA7872F46ba27d1cf579FdAAdB8004a1D 3 | 4 | URL of Wallet on Rinkeby: 5 | https://rinkeby.etherscan.io/address/0xf8502b0ba7872f46ba27d1cf579fdaadb8004a1d 6 | 7 | URL of post on Facebook: 8 | https://www.facebook.com/arsen.badalyan.1048/posts/2142329202661322?pnref=story 9 | 10 | URL of Sent to Plasma: 11 | https://rinkeby.etherscan.io/tx/0x3ff0d73ae6887751e5325a96e68ed27c08723bde3a4ecd4c37fcf5079e7647aa 12 | -------------------------------------------------------------------------------- /CV/Ровенский/Задание 0.Wallet.md: -------------------------------------------------------------------------------- 1 | задание 0 2 | 3 | адрес 4 | 0x93b2fD6E6DF4306B08c9Ea5776B64a2E497D5d11 5 | 6 | задание 0.1 7 | 8 | Адрес на etherscan 9 | https://rinkeby.etherscan.io/address/0x93b2fD6E6DF4306B08c9Ea5776B64a2E497D5d 10 | 11 | задние 0.2 12 | 13 | https://rinkeby.etherscan.io/tx/0xd4b455b9fb77d1f79f6c11df79928d8dcdcd37dc01bba739067292617550cff6 14 | 15 | ссылка на пост 16 | 17 | https://plus.google.com/u/0/112312158054985082653/posts/NprfcgVem7t -------------------------------------------------------------------------------- /CV/CryptoCoinsX/Resume.md: -------------------------------------------------------------------------------- 1 | Кузьменко Олег, 34 года 2 | 3 | О себе: Программирую более 15 лет, за это время писал на многих языках. С 2017 заинтересовался технологией блокчейна и на данный момент изучаю смартконтракты для Ethereum. 4 | 5 | Языки программирования: Assembler, C++, Java, JavaScript, ActionScript 3.0, Haxe 6 | 7 | Уровень английского: Intermediate 8 | 9 | E-mail: cryptocoinsx@gmail.com 10 | 11 | P.S. Узнал о курсе с подкаста "Базовый блок: блокчейн без буллшита" 12 | -------------------------------------------------------------------------------- /CV/Кукушкин А.А/Wallet.md: -------------------------------------------------------------------------------- 1 | ***Kukushkin Aleksey*** (alex97xx)
2 | 3 | Adress of ETH wallet 0xDF7f81c83CA4701d83D582CD78FF4964a44bc277
4 | 5 | URL of Wallet on Rinkeby 6 | 7 | URL of post 'g+'
8 | 9 | URL of Sent to Plasma -------------------------------------------------------------------------------- /CV/Timur Taov/resume.md: -------------------------------------------------------------------------------- 1 | Таов Тимур Денисович 2 | ==================== 3 | 4 | 19 лет, Колледж информатики и программирования 5 | 6 | **Английский:** Pre-Intermediate. 7 | 8 | **Языки программирования:** C#, C++, PHP, JavaScript. Базовые знания вёрстки (html + css). Пытался разбираться с Python и GO. 9 | 10 | **Hardware/Software:** Ноутбук (Windows). 11 | 12 | Чем конкретно заниматься пока не определился. Возможно, front-end или mobile, но навыков в этих направлениях пока не так много -------------------------------------------------------------------------------- /CV/Степанов А. С/Wallet.md: -------------------------------------------------------------------------------- 1 | # Задача 0 2 | ### Задача 0.0 3 | **Адрес MetaMask кошелька:** 0x1ABa1CD1A9A77081918E8243A5c631EFa7817Cf6 4 | 5 | **Ссылка:** https://rinkeby.etherscan.io/address/0x1aba1cd1a9a77081918e8243a5c631efa7817cf6 6 | ### Задача 0.1 7 | **Ссылка на репост:** https://plus.google.com/u/0/111338581182871774899/posts/cDD2XU3pjZf 8 | ### Задача 0.2 9 | **Ссылка с индексом транзакции:** https://rinkeby.etherscan.io/tx/0x30ee3df6d5ee117083a5b220d92e26223908d45b393a35aa9d50e42c702e16c7 -------------------------------------------------------------------------------- /CV/Selemenev Alexey/резюме.txt: -------------------------------------------------------------------------------- 1 | Алексей Селеменев 2 | 08.01.1986 г. 3 | +79100088111 4 | https://t.me/hariets 5 | Серийный предприниматель, инвестор. 6 | Решил погрузится в тему на хайпе крипты и ICO... 7 | #Резюме 8 | Уровень англиского: Pre-Intermediate 9 | Образование: Неоконченное высшее (юриспруденция). 10 | 11 | Видел ещё III-ки и IV-ки, а продвинутым пользователем стал на маковском Pentium I (таком с ушами), затем был у меня Pentium II, с внушительной частотой процессора в 333 мГц, эх...))) -------------------------------------------------------------------------------- /CV/ohanjelique/Соболева А.И.md: -------------------------------------------------------------------------------- 1 | Резюме 2 | 3 | ФИО: Соболева Анжелика Игоревна 4 | Дата рождения: 13.02.1998 5 | 6 | Контактная информация: 7 | E-mail: ohanjelique@gmail.com 8 | Тел.: +79393308484 9 | 10 | Уровень английского: Advanced 11 | 12 | Общая информация: 13 | Selected for participation in the YEAR Program, a program of the U.S. Embassy, Moscow and 14 | administered by American Councils for International Education: 15 | ACTR/ACCELS 16 | Аккаунт-менеджер в Bankex; 17 | 18 | Цель:очень базовое понимание блокчейна, 19 | которое необходимо углубить для работы 20 | и личных интересов. 21 | -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/frontend/contracts.js: -------------------------------------------------------------------------------- 1 | 2 | var MultiArgue = web3.eth.contract(CONTRACT1_ABI_ARRAY); 3 | var MultiArgueInstance = MultiArgue.at(CONTRACT1_ADDRESS); 4 | 5 | var SimpleArgue = web3.eth.contract(CONTRACT2_ABI_ARRAY); 6 | var SimpleArgueInstance = SimpleArgue.at(CONTRACT2_ADDRESS); 7 | 8 | function createArgue(prvtKey, endTime, argueType, simpleArgueAddress) { 9 | let account = addAccount(prvtKey); 10 | MultiArgueInstance.createArgueVote(Number(endTime), Number(argueType), simpleArgueAddress, {from: account}, (err, txHash) => { 11 | console.log(txHash); 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /CV/IrKor/Королева-И-С.md: -------------------------------------------------------------------------------- 1 | Меня зовут Королева Ирина. 2 | Я закончила физический факультет МГУ(2009-2015гг). К моменту написания дипломной работы заинтересовалась IT и устроилась тестировщиком. Уже больше 3 лет контролирую качество ПО на разных проектах. Мне нравится автоматизировать и оптимизировать процессы, так что я рада, что на текущем проекте принято решение внедрять автотесты параллельно разработке по BDD подходу (на Java). Вместе с этим курирую стажера. 3 | В работе активно использую sql. Есть опыт написания автотестов на java. English level: intermediate. 4 | Хочу получить представление о работе с блокчейн технологиями. -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.23; 2 | contract Migrations { 3 | address public owner; 4 | uint public last_completed_migration; 5 | 6 | modifier restricted() { 7 | if (msg.sender == owner) _; 8 | } 9 | 10 | constructor() public { 11 | owner = msg.sender; 12 | } 13 | 14 | function setCompleted(uint completed) restricted public { 15 | last_completed_migration = completed; 16 | } 17 | 18 | function upgrade(address new_address) restricted public { 19 | Migrations upgraded = Migrations(new_address); 20 | upgraded.setCompleted(last_completed_migration); 21 | } 22 | } -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 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 | constructor() public { 12 | owner = msg.sender; 13 | } 14 | 15 | function setCompleted(uint completed) public restricted { 16 | last_completed_migration = completed; 17 | } 18 | 19 | function upgrade(address new_address) public restricted { 20 | Migrations upgraded = Migrations(new_address); 21 | upgraded.setCompleted(last_completed_migration); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 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 | constructor() public { 12 | owner = msg.sender; 13 | } 14 | 15 | function setCompleted(uint completed) public restricted { 16 | last_completed_migration = completed; 17 | } 18 | 19 | function upgrade(address new_address) public restricted { 20 | Migrations upgraded = Migrations(new_address); 21 | upgraded.setCompleted(last_completed_migration); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /CV/Арчаков/Арчаков А.М..mdown: -------------------------------------------------------------------------------- 1 | Резюме 2 | 3 | Арчаков Артём Михайлович,19 лет 4 | 5 | Вводная информация: 6 | Я студент четвертого курса в Колледже Информатики и Программирования. Предлагаю вам свою кандидатуру для прохождения производственной практики. 7 | 8 | Навыки и опыт: 9 | Уровень английского: Intermediate. 10 | Языки программирования: C#; C++ . Языки верстки html и css. 11 | Имею опыт в работе с 3D моделями. Работаю в программе Blender 3D. 12 | 13 | Интересно заниматься разработкой мобильных приложений. Я был бы очень рад попасть на направление mobile development. 14 | 15 | Контактная информация: 16 | тел.: 8(925)610-74-76 17 | e-mail: SplitFeer@gmail.com 18 | -------------------------------------------------------------------------------- /CV/Кузьмин Е.Н/Kuzmin resume.md: -------------------------------------------------------------------------------- 1 | #Резюме 2 | 3 | Кузьмин Евгений Николаевич 4 | 19 лет 5 | Контактная информация: 6 | Телефон:+7(916)035-47-19 7 | Email:fsegges1@yandex.ru 8 | 9 | Образование: 2014-2018 Колледж Информатики и программирования при Правительстве РФ. Факультет: Программирования в компьютерных системах. 10 | 11 | Уровень знания англ. языка: Pre-intermediate 12 | Знание языков программирования: 13 | C/С++, С#, HTML5, CSS, PHP(основы),JavaScript(основы),SQL. 14 | Также знаю основы разрабки 1C приложений. 15 | Фреймворки:.NET Framework, Bootstrap. 16 | Интересует все, что связано с программированием и не только :) 17 | Цель: Хотелось бы развиваться в направлениях, таких как Blockchain и Mobile Development. -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isao", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "truffle-config.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git@git.bankex.team:proof_of_asset/ISAO.git" 15 | }, 16 | "author": "", 17 | "license": "ISC", 18 | "dependencies": { 19 | "bignumber.js": "^7.2.1", 20 | "dotenv": "^5.0.1", 21 | "ethereumjs-util": "^5.1.5", 22 | "ethereumjs-wallet": "^0.6.0", 23 | "solium": "^1.1.6", 24 | "truffle-wallet-provider": "0.0.5" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ssc 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /CV/Халилов У.А/Khalilov resume.md: -------------------------------------------------------------------------------- 1 | #Резюме 2 | 3 | ФИО: Халилов Умид Алишерович 4 | Дата рождения: 30.05.1998 5 | Телефон: 8(999)992-21-84 6 | E-mail: 02100680@gmail.com 7 | Уровень англиского: Pre-Intermediate 8 | Образование: 2014-2018 Колледж Информатики и программирования при Правительстве РФ. Факультет: Программирования в компьютерных системах. 9 | О себе: Перейдя на 2 курс я понял что программирование это мое, и я начал изучение языков программирования такие как C/C++, C#, javaScript, web-верстка(HTML, CSS, PHP). Писал разные программы в рамках учебного процесса, но эти программы никогда не видел мир, хочется создавать для пользы человечества. Хочу работать с Blockchain и Mobile Development, тк они сейчас самые востребовательные. -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/test/Demo.js: -------------------------------------------------------------------------------- 1 | const MultiArgue = artifacts.require("./contracts/MultiArgue.sol"); 2 | const SimpleArgue = artifacts.require("./contracts/SimpleArgue.sol"); 3 | 4 | contract('MultiArgue', (accounts) => { 5 | 6 | //initial params for testing 7 | 8 | beforeEach(async function() { 9 | multi_argue = await MultiArgue.new({from: accounts[0]}); 10 | simple_argue = await SimpleArgue.new(multi_argue.address, {from: accounts[1]}); 11 | }); 12 | 13 | it("should createArgueVote", async function() { 14 | console.log(simple_argue.address); 15 | await multi_argue.createArgueVote(Date.now(), 0, simple_argue.address); 16 | // assert(); 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /CV/Панков Павел/Панков-П-В.md: -------------------------------------------------------------------------------- 1 | Резюме 2 | 3 | Панков Павел Валерьевич,18 лет 4 | 5 | Вводная информация: 6 | Я студент четвертого курса в Колледже Информатики и Программирования. Предлагаю вам свою кандидатуру для прохождения производственной практики. 7 | 8 | Навыки и опыт: 9 | Уровень английского: Intermediate. 10 | Языки программирования: C#; PHP; Blueprint и C++ в Unreal Engine 4. Языки верстки(html + css). 11 | Имею опыт в работе с 3D моделями. Работаю в программе Maya. 12 | 13 | Интересно заниматься разработкой мобильных приложений. Я был бы очень рад попасть на направление mobile development. 14 | 15 | Контактная информация: 16 | тел.: 8(967)079-95-29 17 | e-mail: ppashaa626@yandex.ru 18 | skype: ppashaa999 -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/Master-class7.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | contract One { 4 | 5 | uint256 constant internal ONE = 1; 6 | 7 | function getOne() external view returns(uint256) { 8 | return(ONE); 9 | } 10 | 11 | } 12 | 13 | contract Two { 14 | 15 | address internal oneContractAddress; 16 | 17 | function setOneContractAddress_(address _contract) public returns(bool) { 18 | oneContractAddress = _contract; 19 | return true; 20 | } 21 | 22 | function getDataFromOneContract() public view returns(uint256) { 23 | require(oneContractAddress == 0); 24 | One myContract = One(oneContractAddress); 25 | return(myContract.getOne()); 26 | } 27 | } -------------------------------------------------------------------------------- /CV/Жарков Д.И/Zharkov resume.md: -------------------------------------------------------------------------------- 1 | #Резюме 2 | 3 |
Жарков Денис Игоревич, 19 лет
4 | 5 | Контактная информация: 6 | Телефон: +79776087638 7 | Email: denis.zharkov98@yandex.ru 8 | 9 | Образование: 10 | Среднее специальное 11 | Колледж Информатики и программирования при Правительстве РФ. 12 | Факультет: Программирования в компьютерных системах. 13 | 14 | Уровень знания англ.яз: Pre-Intermediate 15 | Знания программирование: C/C++, C#, PHP(основы), JavaScript(основы), SQL 16 | Верстка: HTML, CSS 17 | Навыки: MS Word/Excel, Unity 3D, Adobe Photoshop, Sony Vegas, 1С 18 | 19 | Интересует все связанное с программированием и solidity - blockchain, mobile development. 20 | А также хотелось бы развиваться и дальше в данных направлениях. 21 | -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/contracts/Demo.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | contract Demo { 4 | 5 | address public owner; 6 | 7 | constructor() { 8 | owner = msg.sender; 9 | } 10 | 11 | mapping(bytes32=>string) table; 12 | 13 | modifier onlyOwner() { 14 | assert(owner == msg.sender); 15 | _; 16 | } 17 | 18 | function changeOwner(address _newOwner) onlyOwner returns(bool) { 19 | owner = _newOwner; 20 | return true; 21 | } 22 | 23 | function getValue(string _key) view returns(string) { 24 | return table[keccak256(_key)]; 25 | } 26 | 27 | function setValue(string _key, string _value) onlyOwner returns(bool) { 28 | table[keccak256(_key)] = _value; 29 | return true; 30 | } 31 | } -------------------------------------------------------------------------------- /CV/deniskulakov/resume.md: -------------------------------------------------------------------------------- 1 | # Kulakov Denis Sergeevich, 30 years old 2 | ## Experience 3 | 9+ years experience in IT, 4+ years of bank card processing experience (support, delivery), 2+ years of QA automation experience, 1+ year of project management experience 4 | 5 | ## Programming languages (hands on experience) 6 | * Apple Swift 7 | * JS (Node.js) 8 | 9 | ## Foreign languages 10 | * English - upper intermediate 11 | * Greek - basic 12 | 13 | ## Certificates 14 | * Certified Associate in Project Management (CAPM) 15 | * IBM Blockchain Essentials 16 | 17 | ## Courses 18 | Developing iOS 9 Apps with Swift (CS193p) 19 | 20 | ## Interests 21 | * Blockchain 22 | * Mobile apps 23 | * FinTech (payment systems) 24 | 25 | ## Contacts 26 | * Telegram: @askformusic 27 | * Skype: deniskulakov87 28 | * Email: denisskulakov@gmail.com 29 | -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/Master-class1.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | 4 | contract HelloWorld { // объявление контракта + Имя 5 | 6 | function getData() view returns (string) { // имя() описание того, меняет ли состояние и возвращаемое значение 7 | return "Hello, world!"; // возвращает Hello, world! 8 | } 9 | } 10 | 11 | contract HelloworldNext { 12 | 13 | string ourString = "Hello, world!"; // создание строки ourString и присваение значения по умолчению 14 | 15 | function getData() view returns (string) {// имя() описание, меняет ли она состояние и возвращаемое значение 16 | return ourString; // возвращает ourString 17 | } 18 | 19 | function setData(string _input) { // имя(тип данных название) 20 | ourString = _input; // присваиваем нашей переменной ourString значение входной строки newData 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /EDU_Materials/examples/test_in_truffle/test/Demo.js: -------------------------------------------------------------------------------- 1 | const Demo = artifacts.require("./contracts/Demo.sol"); 2 | 3 | contract('Demo', (accounts) => { 4 | 5 | //initial params for testing 6 | 7 | beforeEach(async function() { 8 | d = await Demo.new( {from: accounts[0]}); 9 | }); 10 | 11 | it("should == owner to acconts [0]", async function() { 12 | assert.equal((await d.owner()), accounts[0]); 13 | }) 14 | 15 | it("should allow change owner", async function() { 16 | await d.changeOwner(accounts[1], {from: accounts[0]}); 17 | assert.equal((await d.owner()), accounts[1]); 18 | }) 19 | 20 | it("should allow owner to set value by key and return it", async function() { 21 | await d.setValue("1", "demo"); 22 | assert.equal("demo", (await d.getValue("1"))); 23 | }) 24 | 25 | }) 26 | -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/Master-class5.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | contract Own { 4 | 5 | address owner; 6 | 7 | constructor() { 8 | owner = msg.sender; 9 | } 10 | 11 | modifier onlyOwner() { // создали модификатор доступа 12 | require(msg.sender == owner); 13 | _; 14 | } 15 | 16 | function sendNewOwner(address _newOwner) onlyOwner { // создаем функцию переопределения владельца 17 | owner = _newOwner; // меняем на адрес нового 18 | } 19 | 20 | } 21 | 22 | 23 | contract InfoSender is Own { // наследуем контракт доступа 24 | 25 | mapping (bytes32 => string) data; 26 | 27 | function setData(string _key, string _info) onlyOwner { 28 | data[keccak256(_key)] = _info; 29 | } 30 | 31 | function getData(string _key) constant returns(string) { 32 | return data[keccak256(_key)]; 33 | } 34 | } -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/Master-class3.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | // возникает проблема того, что кто-то может изменить значения в нашем контракте. 4 | // Мы хотим, чтобы только мы или нужные нам люди могли это делать. 5 | // давайте это решим: 6 | 7 | contract MyInfo { 8 | 9 | mapping (bytes32 => string) data; 10 | 11 | address owner; // тип переменной адрес, создаем переменную обладатель 12 | 13 | function MyInfo() { 14 | owner = msg.sender; // присваиваем обладателю адрес создателя контракта, через структуру msg 15 | } 16 | 17 | function setData(string _key, string _info) { 18 | require(msg.sender == owner); // если условие не выполняется, то вылетаем из функции 19 | data[keccak256(_key)] = _info; 20 | } 21 | 22 | function getData(string _key) constant returns(string) { 23 | return data[keccak256(_key)]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /CV/wadmilionikus/Ataev_Vadim.md: -------------------------------------------------------------------------------- 1 | /*Резюме*/ 2 | 3 | Атаев Вадим Петрович, 18; 4 | 5 | Образование: 6 | Колледж информатики и программирование при Финансовом университете, 7 | Факультет Программирования в компьютерных системах(ПКС), 4 КУРС; 8 | 9 | Языки программирования: C/C++, C#, Java, PHP, JavaScript, HTML/CSS, Python; 10 | 11 | Знаю: 12 | ООП, структурое и модульное тестирование, рефакторинг кода, clang C++, 13 | ADO.NET, ASP.NET; 14 | 15 | Умею: 16 | Создавать сайты при помощи HTML/CSS/PHP/JavaScript/MySQL, есть навыки работы с Bootstrap, Jquery; 17 | Создавать прикладные решения с помошью C++, C#; 18 | Применять запросы LinkToObjects C#; 19 | Создавать плагины для MS word/excel; 20 | Создавать чат-бота с помошью python; 21 | 22 | Было бы интересно развиваться в сфере block-chain и программированию на solidity, 23 | а так же узнать побольше о Charity; -------------------------------------------------------------------------------- /CV/Руденко В.А/Resume.md: -------------------------------------------------------------------------------- 1 | Здравствуйте! Меня зовут Руденко Владислав. Мне 20 лет. Учусь на пятом курсе, на специальность "программирование в компьютерных системах, профессиональное обучение". В последнее время увлекаюсь криптовалютами, смарт-контрактами, блокчейном, майнингом и биржами. Изучал ЯП такие как: C, C#, python. Также занимался разработкой веб-сайтов. Но английский выучить так и не удалось, остался на базовом уровне. После поисков себя, ко мне пришла мысль, что пора бы углубиться в криптомир. Это и привело меня к тому, что я попал к вам. 2 | Хочу научиться писать качественные смарт-контракты. Приложу все усилия для достижения поставленной задачи. 3 | Личные качества: коммуникабельность, ответственность, пунктуальность. 4 | Контактная информация: телефон: +7(999)460-83-06 5 | e-mail: vladislav.or.rudenko@gmail.com 6 | telegram: https://t.me/Shelder 7 | -------------------------------------------------------------------------------- /CV/Степанов А. С/Резюме.md: -------------------------------------------------------------------------------- 1 | # Резюме 2 | Степанов Александр Сергеевич 3 | 18 лет 4 | Способы связи: 5 | - Telegram - http://t.me/rr_amr (предпочтительный) 6 | - E-mail - rr.amr@ya.ru 7 | 8 | Студент четвертого курса Колледжа информатики и программирования. Предлагаю рассмотреть мою кандидатуру для работы на вашем предприятии на период прохождения производственной преддипломной практики в качестве стажера. Интересуюсь Front-end разработкой. 9 | 10 | Среднее профессиональное образование 2014 - 2018 Колледж Информатики и программирования. Факультет "Программирования в компьютерных системах". Уровень знания английского языка - pre-intermediate. 11 | 12 | Знание языков: С/С++, C#, HTML, CSS, PHP, JS(основы), SQL(базовый уровень). 13 | Фреймворки: .NET Framework, Bootstrap, jQuery. 14 | Опыт работы с: Adobe Photoshop. 15 | Среда разработки приложений MS Visual Studio 2017, 1C Предприятие, СУБД MS SQL Server. -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/helpers/expectThrow.js: -------------------------------------------------------------------------------- 1 | module.exports = async promise => { 2 | try { 3 | await promise; 4 | } catch (error) { 5 | // TODO: Check jump destination to destinguish between a throw 6 | // and an actual invalid jump. 7 | const invalidOpcode = error.message.search('invalid opcode') >= 0; 8 | // TODO: When we contract A calls contract B, and B throws, instead 9 | // of an 'invalid jump', we get an 'out of gas' error. How do 10 | // we distinguish this from an actual out of gas event? (The 11 | // testrpc log actually show an 'invalid jump' event.) 12 | const outOfGas = error.message.search('out of gas') >= 0; 13 | const revert = error.message.search('revert') >= 0; 14 | assert( 15 | invalidOpcode || outOfGas || revert, 16 | 'Expected throw, got \'' + error + '\' instead', 17 | ); 18 | return; 19 | } 20 | assert.fail('Expected throw not received'); 21 | }; 22 | -------------------------------------------------------------------------------- /CV/Степанов А. С/Task 2.md: -------------------------------------------------------------------------------- 1 | # Задача 2 2 | ### Исходный код 3 | ```sh 4 | pragma solidity ^0.4.19; 5 | 6 | contract ERC721 { 7 | uint256 id = 1; 8 | mapping(address => uint) private balances; 9 | 10 | function balanceOf(address _owner) constant returns (uint){ 11 | return balances[_owner]; 12 | } 13 | 14 | function transfer(address _to, uint256 _tokenId){ 15 | address currentOwner = msg.sender; 16 | address newOwner = _to; 17 | require(currentOwner != newOwner); 18 | require(newOwner != address(0)); 19 | balances[currentOwner] -= 1; 20 | balances[newOwner] += 1; 21 | Transfer(currentOwner, newOwner, _tokenId); 22 | } 23 | 24 | event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); 25 | } 26 | ``` 27 | ### Адрес контракта: 0x68d5B82F8e900A353852bF85a7567bA52Bb07033 28 | 29 | ### Ссылка: https://rinkeby.etherscan.io/address/0x68d5b82f8e900a353852bf85a7567ba52bb07033 -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/ERC20andICO/ICO-1.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.18; 2 | 3 | 4 | contract Sale { 5 | 6 | address owner; // Владелец контракта 7 | 8 | SimpleCoinToken public token = new SimpleCoinToken(); 9 | 10 | uint start = 1511604000; // время начала продажи токенов в unix формате ( секунды от 1 января 1970 ) 11 | 12 | uint interval = 31; // количество дней - длительность нашего ICO 13 | 14 | uint kof = 60*60*24; //  проеобразуем дни в секунды 15 | 16 | constructor() { 17 | owner = msg.sender; 18 | } 19 | 20 | function() external payable { // модификатор payable, который говорит о том, что наша функция принимает деньги 21 | require(now > start && now < start + kof*interval); // проверяем, что функция вызвана в промежуток между стартом и окончанием 22 | owner.transfer(msg.value); // пересылаем содержимое на счет создателя 23 | token.mint(msg.sender, msg.value); // создаем токены на аккаунте 24 | } 25 | 26 | 27 | } -------------------------------------------------------------------------------- /CV/Ровенский/Задание 1. Contract.md: -------------------------------------------------------------------------------- 1 | задание 1. Простейший смарт контрак и работа с токеноми 2 | 3 | pragma solidity ^0.4.11; 4 | 5 | import "./ERC20.sol"; // подключение стандарта ERC20 6 | 7 | contract NewToken is ERC20Standard { 8 | 9 | function OurToken() { 10 | totalSupply = 50; //кол-во токенов 11 | name = "Our First Tokens"; // имя 12 | decimals = 2; //кол-во чисел после запятой 13 | symbol = "Tok"; // символ (Типа Rub,EU ect) 14 | version = "1.0"; // версия 15 | } 16 | 17 | } 18 | 19 | ссылка: 20 | https://rinkeby.etherscan.io/tx/0x05d5208927ef9b51c01432267d1c3aff27f57b9d18b20c9b3dda55d012aad513 21 | 22 | Transaction Information 23 | 24 | Transaction 0x05d5208927ef9b51c01432267d1c3aff27f57b9d18b20c9b3dda55d012aad513 25 | From: 0x93b2fd6e6df4306b08c9ea5776b64a2e497d5d11 26 | To: [Contract 0x2795eb10c808718a63bf4663944d704876201d3c Created] 27 | 28 | 29 | https://rinkeby.etherscan.io/address/0x2795eb10c808718a63bf4663944d704876201d3c 30 | https://rinkeby.etherscan.io/address/0xb4786aabd24d132d327eb2b5bf27efb96d77ae16#code -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Multi Argue Smart Contract 3 | Multi Argue Smart Contract позволяет абстрагироваться от деталей споров 4 | и построить универсальную платформу для создания любого формулизированного спора. 5 | 6 | Multi Argue Smart Contract отвечает за создание споров и распределение наград. 7 | 8 | Созданный спор должен ссылаться на детализированный контракт с условиями спора. 9 | 10 | ## Необходимое ПО 11 | 1) NodeJS + npm 12 | Ubuntu: 13 | sudo apt-get update 14 | sudo apt-get install build-essential libssl-dev 15 | sudo apt-get install curl 16 | curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh 17 | bash install_nvm.sh 18 | source ~/.profile 19 | nvm install 8.11.1 20 | npm -v 21 | 22 | Windows: 23 | https://nodejs.org/en/ 24 | 25 | 2) Truffle 26 | npm install -g truffle 27 | 28 | 3) Ganache 29 | http://truffleframework.com/ganache/ 30 | 31 | 4) Web3 32 | npm i -s web3 33 | -------------------------------------------------------------------------------- /CV/nemelnikov/Melnikov_CV.md: -------------------------------------------------------------------------------- 1 | # Why am I here 2 | I need more blockchain in my life and I want to tokenize my apparment 3 | # Languages 4 | English&Russian 5 | 6 | # Personal profile 7 | - Seven years experience encompassing diverse areas of web development; 8 | - Strengths include in-depth knowledge of project management and system/business analysis; 9 | - Blockchain experience. 10 | 11 | ### Projects overview 12 | I have worked on different complex projects including startups and government services as well as small web applications. 13 | 14 | I will help with understanding business value and managing overall project. I'm experienced with writing user stories, software requirements specifications and agile practices. 15 | I also developed few projects individually. So I can speak the developers' language and understand technical details. 16 | 17 | I can create for you: 18 | - business requirement document; 19 | - software requirement specification; 20 | - full UX-cycle for your project including: personas, customer journey map, informational architecture and wireframes; 21 | - competitive analysis. 22 | 23 | If you have any questions just drop me a line. I will be glad to help you! -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/Master-class6.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | contract Visability { 4 | 5 | uint256 constant internal ONE = 1; 6 | uint256 constant internal TWO = 2; 7 | uint256 constant internal THREE = 3; 8 | uint256 constant internal FOUR = 3; 9 | 10 | function getConstantOne() public view returns(uint256) { 11 | return ONE; 12 | } 13 | 14 | function getConstantTwo_() internal view returns(uint256) { 15 | return TWO; 16 | } 17 | 18 | function getConstantThree_() private view returns(uint256) { 19 | return THREE; 20 | } 21 | 22 | function getConstantFour() external view returns(uint256) { 23 | return FOUR; 24 | } 25 | 26 | /** 27 | * @dev good example 28 | */ 29 | function getTwoAndThree() public view returns(uint256, uint256) { 30 | return(getConstantTwo_(), getConstantThree_()); 31 | } 32 | 33 | /** 34 | * @dev bad example 35 | */ 36 | function getOneBad() public view returns(uint256) { 37 | return(getConstantOne()); 38 | } 39 | 40 | // /** 41 | // * @dev didn't work at all 42 | // */ 43 | // function getFour() view public returns(uint256) { 44 | // return(getConstantFour()); 45 | // } 46 | 47 | } -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/Master-class2.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | 4 | contract SimpleInfoCard { 5 | 6 | string name; 7 | string email; 8 | uint age; 9 | 10 | function getName() view returns(string) { 11 | return name; 12 | } 13 | 14 | function setName(string _input) { 15 | name = _input; 16 | } 17 | 18 | function getEmail() view returns(string) { 19 | return email; 20 | } 21 | 22 | function setEmail(string _input) { 23 | email = _input; 24 | } 25 | 26 | function getAge() view returns(uint) { 27 | return age; 28 | } 29 | 30 | function setAge(uint _input) { 31 | age = _input; 32 | } 33 | } 34 | 35 | // Каждый раз при добавлени новых данных - требуется новый контракт => создавать новый контракт =>  плохая идея 36 | // Поэтому решили создать специальный массив, который позволяет по идентификатору (ключу) добавлять новые переменные 37 | // Ну и вот демонстрация 38 | 39 | contract SimpleInfo2 { 40 | 41 | mapping (bytes32 => string) data; // массив data, в котором по ключу тип bytes32 существует строка 42 | 43 | function setData(string _key, string _info) { 44 | data[keccak256(_key)] = _info; // присваиваем по ключу значение 45 | } 46 | 47 | function getData(string _key) constant returns(string) { 48 | return data[keccak256(_key)]; // возвращаем по ключу значение 49 | } 50 | } -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/frontend/account.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Make random string 3 | * @returns {string} Random string 4 | */ 5 | 6 | function randomString() { 7 | var text = ""; 8 | var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()"; 9 | 10 | for (var i = 0; i < 14; i++) 11 | text += possible.charAt(Math.floor(Math.random() * possible.length)); 12 | 13 | return text; 14 | } 15 | 16 | /** 17 | * Add account to local storage 18 | * @param {string} prvtKey 19 | * @returns {Object} Account instance 20 | */ 21 | 22 | function addAccount(prvtKey) { 23 | return web3.personal.importRawKey(String(prvtKey), randomString()); 24 | } 25 | 26 | /** 27 | * Login owner 28 | * @returns Acoount 29 | */ 30 | function loginOwner() { 31 | if (!web3.eth.accounts[0]) { 32 | let privateKey = prompt("Enter your private key", ''); 33 | let password = prompt('Enter your password', ''); 34 | 35 | var address = addAccount(privateKey); 36 | web3.personal.lockAccount(address, password); 37 | alert('Account successfully added'); 38 | } else { 39 | // unlockAccount(web3.eth.accounts[0], 'qwe123'); 40 | return web3.eth.accounts[0]; 41 | } 42 | } 43 | 44 | function unlockAccount(account, password) { 45 | web3.personal.unlockAccount(account, password); 46 | } 47 | -------------------------------------------------------------------------------- /CV/Кукушкин А.А/Резюме Кукушкин А.А.md: -------------------------------------------------------------------------------- 1 | Kukushkin Alex Alexeevich 2 | Мужчина, 20 лет, родился 12 декабря 1997 3 | 4 | +7 (965) 1337091 5 | alex97xx@gmail.com — предпочитаемый способ связи 6 | 7 | Проживает: Москва, м. Щукинская 8 | 9 | Гражданство: Россия, есть разрешение на работу: Россия 10 | 11 |
Опыт работы
12 | "Брокерский дом открытие" Декабрь 2015 — Январь 2017 13 | 1 год 1 месяц 14 | Россия, www.open-broker.ru 15 |
    Задачи:
16 | Тестировщик ПО 17 | Тестирование разработки личного кабинета . 18 | Разработка автотестов для внутреннего контура данных (backend/frontend).. (apl) ;тестирование наработок по внутреннему ПО 19 |
Образование
20 | Среднее специальное 21 | 2018 Финансовый университет при Правительстве Российской Федерации, Москва 22 | Колледж информатики и программирования, 23 | 24 | Направление - Программирование в компьютерных системах 25 |
Ключевые навыки
26 |
    Знание языков
27 | 28 | Русский — родной 29 | 30 | Английский — базовые знания 31 |
    Навыки
32 | C++ //MS Word// MS Excel // Adobe Photoshop // 1С программирование// Visual Studio C#//SQL// C# // MS Outlook// Тестирование // Ведение переговоров// HTML5 //SOAP // REST// 33 | Дополнительная информация 34 | 35 |
Обо мне
36 | Студент 4-ого курса колледжа информатики и программирования; люблю спорт ; увлекаюсь фотографией; коммуникабелен; 37 | 38 | -------------------------------------------------------------------------------- /CV/wovvan/resume.txt: -------------------------------------------------------------------------------- 1 | Efanov Vladimir 2 | +79002940064 3 | efanov1993@gmail.com 4 | 5 | About myself: 6 | Have over 4 years of experience in web development 7 | Graduated with excellence Kuban State Technological University 8 | Took part in competitions ACM-ICPC 9 | Know many algorithms. And I understand, how write cleaner and faster code 10 | Try not to stagnate and to learn new things 11 | 12 | FrontEnd: 13 | Deep knowledge of JavaScript, CSS and DOM 14 | Worked with that frameworks / libraries: AngularJS(2 years), 15 | Backbone/Marionette (6 months), now I am working with React (1 year) 16 | Worked on client with MV*, flux, but prefer redux, and understand MobX 17 | Experience using AJAX to consume JSON APIs, WebSocket 18 | Experience using main pre/postprocessors. Work with flexbox and grid. 19 | mobile and cross-browser markup 20 | Experience using development methodology web apps: BEM, MCSS, but I like to 21 | use CSS Modules. 22 | Have experience XSLT transformation 23 | 24 | Mobile: 25 | Experience using React Native (You can search my app in playMarket and appleStore RNDMradio) 26 | Unity3d (simple game Flappy Santa) 27 | 28 | BackEnd: 29 | know NodeJS(Express), little bit C# (Entity Framework) 30 | ORM: Sequelize 31 | DB: Postgresql, MySQL, Redis, Oracle (PL/SQL) 32 | 33 | Testing: Protractor(Jasmine), Karma 34 | Task runner/builder: webpack(2), grunt, gulp 35 | Preferred methodology works with team: Agile(scrum) 36 | 37 | 38 | -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/Master-class4.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | 4 | contract SimpleInfo { 5 | 6 | address owner; 7 | 8 | mapping (bytes32 => string) data; 9 | 10 | constructor() { 11 | owner = msg.sender; 12 | } 13 | 14 | function sendNewOwner(address _newOwner) { // создаем функцию переопределения владельца 15 | require(msg.sender == owner); // проверяем обладателя 16 | owner = _newOwner; // меняем на адрес нового 17 | } 18 | 19 | function getData(string _key) returns (string) { 20 | return data[keccak256(_key)]; 21 | } 22 | 23 | function setData(string _key, string _info) { 24 | require(msg.sender == owner); 25 | data[keccak256(_key)] = _info; 26 | } 27 | } 28 | 29 | 30 | contract SimpleInfo2 { 31 | 32 | address owner; 33 | 34 | mapping (bytes32 => string) data; 35 | 36 | function SimpleInfo2() { 37 | owner = msg.sender; 38 | } 39 | 40 | modifier onlyOwner() { // создали модификатор доступа 41 | require(msg.sender == owner); 42 | _; 43 | } 44 | 45 | function sendNewOwner(address _newOwner) onlyOwner { // создаем функцию переопределения владельца 46 | owner = _newOwner; // меняем на адрес нового 47 | } 48 | 49 | function getData(string _key) returns (string) { 50 | return data[keccak256(_key)]; 51 | } 52 | 53 | function setData(string _key, string _info) onlyOwner { 54 | require(msg.sender == owner); 55 | data[keccak256(_key)] = _info; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /CV/Панков Павел/Задание 2.md: -------------------------------------------------------------------------------- 1 | Задание №2: 2 | Код токена на solution: 3 | pragma solidity ^0.4.18; 4 | 5 | contract ERC721 { 6 | 7 | //поле токена 8 | uint256 id = 13425; 9 | 10 | //остальные поля 11 | mapping (address => uint256) balances; 12 | mapping (address => uint) remainingToAdd; 13 | 14 | function getTokens(address _to,uint token)public { 15 | assert(remainingToAdd[_to]+token<=500); 16 | balances[_to]+=token; 17 | remainingToAdd[_to]+=token; 18 | } 19 | 20 | function transfer(address _to, uint _token) public { 21 | assert(balances[msg.sender]>=_token); 22 | balances[_to]+=_token; 23 | balances[msg.sender]-=_token; 24 | Transfer(msg.sender, _to, _token); 25 | } 26 | 27 | function transferFrom(address _from, address _to, uint _token) public { 28 | assert(balances[_from]>=_token && balances[_to]+_token>balances[_to]); 29 | balances[_to] += _token; 30 | balances[_from]-=_token; 31 | Transfer(_from, _to, _token); 32 | } 33 | 34 | function balanceOf(address _owner) public view returns (uint256 _balance){ 35 | return balances[_owner]; 36 | } 37 | 38 | event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); 39 | } 40 | 41 | Адресс контракта: https://rinkeby.etherscan.io/address/0xb6076be6dfadf02faf68d02db1f3d4f831597bf3 42 | 43 | Расширенное задание не выполнено, так как по нему есть вопросы: 44 | 1)если скрипты для такой страницы пишутся на javascript, какой HttpProvider использовать, что бы найти адресс контракта? 45 | 2)может быть нужны еще другие технологии во 2 задании, помимо Web3,Remix и Metamask? 46 | -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/frontend/ethereum.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Should create random ethereum private key 3 | * @return {string} ethereum private key 4 | */ 5 | function createNewAccount() { 6 | let params = { 7 | keyBytes: 32, 8 | ivBytes: 16 9 | }; 10 | let dk = keythereum.create(params); 11 | 12 | return "0x" + dk.privateKey.reduce((memo, i) => { 13 | return memo + ('0' + i.toString(16)).slice(-2); 14 | }, ''); 15 | } 16 | 17 | /** 18 | * Should create address from private key 19 | * @param {string} prvtKey ethereum privateKey 20 | * @return {string} ethereum address 21 | */ 22 | function getAddress(prvtKey) { 23 | let privateKey = ""; 24 | for(i = 2; i < prvtKey.length; i++) { 25 | privateKey += prvtKey[i]; 26 | } 27 | return keythereum.privateKeyToAddress(privateKey); 28 | } 29 | 30 | /** 31 | * Allows to get balance in Wei 32 | * @param {string} address ethereum address 33 | * @return {number} account balance in Wei 34 | */ 35 | function getBalance(address) { 36 | return web3.eth.getBalance(address).toNumber(); 37 | } 38 | 39 | 40 | /** 41 | * Allows send eth transaction in ethereum blockchain 42 | * @param {string} from Sender's privateKey 43 | * @param {string} to Recipient address 44 | * @param {number} amount Amount of ETH for send 45 | * @param {function(Error, string)} callback If succes - returns transaction hash, else - error 46 | */ 47 | function sendTransaction(from, to, amount, callback) { 48 | let account = addAccount(from); 49 | web3.eth.sendTransaction({ 50 | from: account, 51 | to: to, 52 | value: web3.toWei(Number(amount), 'ether'), 53 | gasLimit: 21000, 54 | gasPrice: 20000000000 55 | }, (err, txHash) => { 56 | // deleteAccount(); 57 | callback(err, txHash); 58 | }) 59 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![bkx-blockchain-education-github](https://user-images.githubusercontent.com/3356474/34314177-29174edc-e782-11e7-8efd-1f26e35c3398.png) 2 | 3 | # Course01: Basics of smart contracts 4 | [English version](https://github.com/BANKEX/bankex_foundation_education/blob/master/README_EN.md) 5 | --- 6 | ## Это обучающая программа BANKEX Foundation по основам работы с блокчейн технологиями 7 | Для прохождения курса не нужно быть опытным программистом - достаточно базовых знаний работы с компьютером. 8 | 9 | ## Что вы узнаете: 10 | 1. Основы работы в open-source сообществах:octocat: 11 | 1. Как оперировать с криптовалютой (эфиром) и токенами :money_with_wings: 12 | 1. Узнаете что такое ERC20 и Open Zeppelin :balloon: 13 | 1. Научитесь работать с Remix & Etherscan :computer: 14 | 15 | # Что сделаем: 16 | 1. Создадим свои собственные именные крипто-монеты :moneybag: 17 | 1. Научимся делать крипто-котиков! :cat: 18 | 19 | ## Регистрация на курс: 20 | 1. Для регистрации и отправки задач вам нужно: 21 | 1. Сделать форк репозитория https://github.com/BankEx/bankex_foundation_education 22 | 1. Создать новую папку в вашем репозитории, название новой папки должно совпадать с username'ом вашего Github аккаунта 23 | 1. Создать там небольшое резюме в формате txt или markdown. 24 | 1. Закомитить его в ваш репозиторий 25 | 1. Сделать pull request в репозиторий https://github.com/BankEx/bankex_foundation_education 26 | 1. Ожидайте рассмотрения вашей заявки. :+1: 27 | 28 | ## Контакты: 29 | 30 | - По вопросам/предложениям/улучшениям курса писать [@skywinder](https://github.com/skywinder/): 31 | [www.t.me/skywinder](www.t.me/skywinder) 32 | - Общий чат курса где можно обсуждать задания: 33 | [Телеграм Группе](https://t.me/joinchat/BQeMJ09hr3kRTiR8yTTuTA) 34 | - Если есть вопросы по курсу - смело открывайте [Issue](https://github.com/BANKEX/bankex_foundation_education/issues/new) 35 | - Детальная информация с дальнейшими заданиями будет в [Телеграм Группе](https://t.me/joinchat/BQeMJ09hr3kRTiR8yTTuTA) и по [по ссылке](https://docs.google.com/document/d/1gxaN8wzCra_V3aMdQTvXFv6UaMUXop42C_4C70hxQM4) -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/truffle.js: -------------------------------------------------------------------------------- 1 | const ethUtil = require("ethereumjs-util"); 2 | const env = process.env; 3 | 4 | // don't load .env file in prod 5 | if (env.NODE_ENV !== 'production') { 6 | require('dotenv').load(); 7 | } 8 | 9 | 10 | 11 | module.exports = { 12 | // See 13 | // to customize your Truffle configuration! 14 | networks: { 15 | development: { 16 | host: "127.0.0.1", 17 | port: 8545, 18 | network_id: "*", // Match any network id, 19 | gas: 4600000 20 | }, 21 | ganache: { 22 | host: '127.0.0.1', 23 | port:8545, 24 | network_id: 5777, 25 | gas: 6721975 26 | }, 27 | kovan: { 28 | host: 'localhost', 29 | port: 8545, 30 | network_id: 42, 31 | gas: 4700000, 32 | gasPrice: 20000000000 33 | }, 34 | rinkeby: { 35 | provider: function() { 36 | let WalletProvider = require("truffle-wallet-provider"); 37 | let wallet = require('ethereumjs-wallet').fromPrivateKey(Buffer.from(env.ETH_KEY, 'hex')); 38 | return new WalletProvider(wallet, "https://rinkeby.infura.io/" + env.INFURA_TOKEN) 39 | }, 40 | network_id: 4 41 | }, 42 | rinkeby_localhost: { 43 | host: "localhost", // Connect to geth on the specified 44 | port: 8545, 45 | network_id: 4, 46 | gas: 4612388, 47 | gasPrice: 20000000000, 48 | from: "0xf17f52151EbEF6C7334FAD080c5704D77216b732" 49 | }, 50 | geth_dev: { 51 | host: "localhost", // Connect to geth on the specified 52 | port: 8545, 53 | network_id: 5777, 54 | gas: 4700000, 55 | gasPrice: 20000000000 56 | }, 57 | solc: { 58 | optimizer: { 59 | enabled: true, 60 | runs: 200 61 | } 62 | }, 63 | migrations_directory: './migrations' 64 | } 65 | }; 66 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | ![bkx-blockchain-education-github](https://user-images.githubusercontent.com/3356474/34314177-29174edc-e782-11e7-8efd-1f26e35c3398.png) 2 | 3 | # Course01: Basics of smart contracts 4 | 5 | 6 | ## This is the BANKEX Foundation training course to provide basics skills, how to work with blockchain technologies 7 | 8 | ### [Russian version of this course](https://github.com/BANKEX/bankex_foundation_education/blob/master/README.md) 9 | 10 | 11 | 12 | 13 | To complete the course, you do not need to be an experienced programmer - enough basic knowledge of working with a computer. 14 | 15 | ## What you will learn: 16 | 17 | 1. Basics of working in open-source communities :octocat: 18 | 19 | 1. How to operate with a cryptocurrency (ether) and tokens :money_with_wings: 20 | 21 | 1. Learn what ERC20 and Open Zeppelin :balloon: 22 | 23 | 1. Learn how to work with Remix & Etherscan :computer: 24 | 25 | ## What will we do: 26 | 27 | 1. Create your own personal crypto-coins :moneybag: 28 | 29 | 1. Learn how to make your personal crypto-kittens! :cat: 30 | 31 | ### Registration to the course: 32 | 33 | 1. To register and send tasks, you need: 34 | 35 | 1. Make a fork of the repository https://github.com/BankEx/bankex_foundation_education 36 | 37 | 1. Create a new folder in your repository, the name of the new folder must match the username of your Github account 38 | 39 | 1. Create a short summary in the markdown format. 40 | 41 | 1. Get it into your repository 42 | 43 | 1. Make a pull request to the repository https://github.com/BankEx/bankex_foundation_education 44 | 45 | 1. As soon as we accept your Pull Request - you're in! :+1: 46 | 47 | ## Contacts: 48 | 49 | - For questions / suggestions / improvements, contact [@skywinder](https://github.com/skywinder/): 50 | [skywinder](www.t.me/skywinder) 51 | 52 | - Here is telegram chat where you can discuss your questions: 53 | [Telegram Chat](https://t.me/joinchat/BQeMJ09hr3kRTiR8yTTuTA). Feel free to contact me with any queries about this course! 54 | 55 | - If you have any questions about the course - feel free to open [Issue](https://github.com/BANKEX/bankex_foundation_education/issues/new) 56 | 57 | 58 | - Detailed information with further tasks will be posted in the [Telegram Chat](https://t.me/joinchat/C199gE65M4nTH-omQMr8aw) and available [by the link](https://docs.google.com/document/d/1f7e7bvI0okNhjefN5723x2ijcffZTXEltaOscUPkyCI/edit?usp=sharing) 59 | -------------------------------------------------------------------------------- /CV/Ровенский/Резюме.md: -------------------------------------------------------------------------------- 1 | Ровенский Александр Витальевич 2 | 19 лет 3 | 4 | 8 (916) 459 11 92 — желаемый способ связи 5 | AVRovenskiy@mail.ru 6 | 7 | Проживает: Москва, м. Петровско-Разумовская 8 | Гражданство: Россия, есть разрешение на работу: Россия 9 | Сопроводительное письмо 10 | Являюсь студентом четвертого курса Колледжа «Информатики и программирования» при Правительстве РФ. 11 | Предлагаю рассмотреть мою кандидатуру для работы на вашем предприятии на период прохождения производственной преддипломной практики в качестве стажера. Интересуюсь новыми разработками в технологии Blockchain, а также изучением языка solidity. 12 | Буду рад ответить на Ваши вопросы на собеседовании. 13 | С уважением, Ровенский Александр. 14 | Желаемая должность и зарплата 15 | Техник-Программист 16 | • Программирование, Разработка, Тестирование. 17 | 18 | Полная занятость, полный день 19 | Желательное время в пути до работы: не имеет значения 20 | Зарплата по договореняности. 21 | 22 | Среднее техническое образование 23 | 2014-2018 Колледж Информатики и программирования при Правительстве РФ. 24 | Факультет Программирования в компьютерных системах 25 | Ключевые навыки 26 | Знание языков Английский — базовые знания 27 | 28 | Навыки Знание языков: С, С++, C#, PHP, Pascal, 1C, HTML, CSS, SQL(базовый уровень); 29 | Опыт работы с: QT Creator, Unity 3D, Adobe Photoshop, Vegas Pro; 30 | Среда разработки приложений MS Visual Studio 2012/2017, Qt Creator,1C предприятие, 31 | СУБД MS SQL Server; 32 | 33 | Дополнительная информация 34 | 35 | Обо мне 36 | Учился в школе с углубленным изучением английского языка. Сейчас заканчиваю обучение в колледже информатики и программирования.Программирую в основном на языке C++,C#. Предпочитаю MS Visual Studio 2012/2017 и Qt Creator, также работал с Eclipse(html). 37 | 38 | Являлся разработкчиком интерактивного информационного стенда исспользуя HTML верстку. Участвовал во многих научных мероприятиях таких как: «Шаг в будущем», «Научная ярмарка и бизнес-идей», XXIII Региональных Научных сообщество «Искатели», Принимал участие разработке научного проекта "Российская Инновационная энциклопедия". Получил диплом 1ой степени на всероссийском конкурсе «ЮНОСТЬ, НАУКА, КУЛЬТУРА». 39 | Быстро вникаю в особенности неизученных языков программирования. Легко нахожу общий язык с новыми людьми. Развитое чувство конкуренции. Пунктуален. Ответственен. 40 | 41 | Дополнительная информация 42 | Рекомендации Колледж информатики и программирования 43 | Новокшонова Елена Валерьевна (Заместитель директора).+7 (915)1598793 44 | 45 | -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/web3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example 6 | 7 | 8 |

Car owner:

9 |





10 |
11 |

Cars

12 |
13 |
14 |
15 |

Owners

16 |
17 |
18 |




19 |
20 |

Add car

21 | 22 | 23 |

24 | 25 | 26 |

27 | 28 | 29 |

30 | 31 | 32 |

33 | 34 | 35 |

36 | 37 | 38 |

39 |

Presence:

40 |
41 | 42 | 43 | 44 | 45 |
46 |
47 | 48 |
49 |
50 |

Buy car

51 | 52 | 53 | 54 | 55 | 56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/contracts/SimpleArgue.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.23; 2 | 3 | contract IMultiArgue { 4 | function createArgueVote(uint256 _endTime, uint8 _argueType, address _argueContract) public returns(uint256); 5 | function approvedAddress(uint256 _argueNum, address _approvedAddress) public returns(bool); 6 | function setInvestSum(uint256 _argueNum, address _sender, uint256 _investSum) public returns(bool); 7 | function vote(uint256 _argueNum, uint8 _vote) public returns(bool); 8 | function getVote(uint256 _argueNum, address _voter) public view returns(uint8); 9 | function getGain(uint256 _argueNum) public view returns(uint256); 10 | function setWinners(uint256 _argueNum, uint8 _winner) public returns(bool); 11 | function releaseInterest(uint256 _argueNum, uint256 _value) public returns(bool); 12 | 13 | event CreateArgueVote(uint256 indexed argueNum, address indexed creater); 14 | event ApproveAddress(uint256 indexed argueNum, address indexed approvedAddress); 15 | event Vote(uint256 indexed argueNum, address indexed voter, uint8 indexed vote); 16 | event SetWinners(uint256 indexed argueNum, uint8 indexed winner); 17 | event ReleaseInterest(uint256 indexed argueNum, address indexed reciever, uint256 indexed value); 18 | } 19 | 20 | contract ISimpleArgue { 21 | function setArgueNum(uint256 _argueNum) public returns(bool); 22 | function setWinners(uint8 _winner) public returns(bool); 23 | function pay(address _reciever, uint256 _value) public returns(bool); 24 | } 25 | 26 | contract SimpleArgue is ISimpleArgue { 27 | address owner; 28 | address public multiArgueContractAddress; 29 | uint256 public argueNum; 30 | 31 | constructor(address _multiArgueContractAddress) { 32 | owner = msg.sender; 33 | multiArgueContractAddress = _multiArgueContractAddress; 34 | } 35 | 36 | function () payable { 37 | IMultiArgue multiArgue_contract = IMultiArgue(multiArgueContractAddress); 38 | require(multiArgue_contract.getVote(argueNum, msg.sender) == 0); 39 | multiArgue_contract.setInvestSum(argueNum, msg.sender, msg.value); 40 | } 41 | 42 | function setArgueNum(uint256 _argueNum) public returns(bool) { 43 | require(msg.sender == multiArgueContractAddress); 44 | argueNum = _argueNum; 45 | return true; 46 | } 47 | 48 | function setWinners(uint8 _winner) public returns(bool) { 49 | require(msg.sender == owner); 50 | IMultiArgue multiArgue_contract = IMultiArgue(multiArgueContractAddress); 51 | multiArgue_contract.setWinners(argueNum, _winner); 52 | return true; 53 | } 54 | 55 | function pay(address _reciever, uint256 _value) public returns(bool) { 56 | require(msg.sender == multiArgueContractAddress); 57 | _reciever.transfer(_value); 58 | return true; 59 | } 60 | } -------------------------------------------------------------------------------- /CV/Панков Павел/Задание 1.md: -------------------------------------------------------------------------------- 1 | Адрес созданного контракта в тестовой сети rinkeby: https://rinkeby.etherscan.io/address/0xa305eab93c03c9adbed919629e01d9ac5c72635d#code 2 | 3 | 4 | Контракт позволяет создавать много токенов, с разным названием, символом и стоимостью. Код приклеплен на rinkeby. 5 | 6 | pragma solidity ^0.4.11; 7 | 8 | contract TestTokenCoin{ 9 | 10 | 11 | uint public totalsupplies; 12 | 13 | mapping (string => uint) totalSupplies; 14 | mapping (string => uint32) decimals; 15 | mapping (string => string) symbols; 16 | mapping (address => mapping(string => uint)) balances; 17 | mapping (address => mapping(address => mapping(string=> uint))) Allowance; 18 | 19 | function createToken(string newname,string newsymbol, uint32 newdecimal) public{ 20 | decimals[newname] = newdecimal; 21 | symbols[newsymbol] = newname; 22 | totalSupplies[newsymbol]=0; 23 | } 24 | 25 | function balanceOf(address _owner,string symbol) public constant returns (uint balance) { 26 | return balances[_owner][symbols[symbol]]; 27 | } 28 | 29 | function mint(address _to, uint _value,string symbol) public { 30 | assert(totalSupplies[symbol] + _value >= totalSupplies[symbol] && balances[_to][symbols[symbol]] + _value >= balances[_to][symbols[symbol]]); 31 | balances[_to][symbols[symbol]] += _value; 32 | totalSupplies[symbol] += _value; 33 | totalsupplies += _value; 34 | } 35 | function transfer(address _to, uint _value,string symbol) public returns (bool success) { 36 | 37 | if((balances[msg.sender][symbols[symbol]] >= _value)&&(Allowance[msg.sender][_to][symbol]>=_value)){ 38 | 39 | balances[msg.sender][symbols[symbol]] -= _value; 40 | balances[_to][symbols[symbol]] += _value; 41 | Transfer(msg.sender, _to, _value , symbol); 42 | return true; 43 | } 44 | else return false; 45 | } 46 | 47 | function transferFrom(address _from, address _to, uint _value,string symbol) public returns (bool success) { 48 | if( balances[_from][symbols[symbol]] >= _value 49 | && balances[_to][symbols[symbol]] + _value >= balances[_to][symbols[symbol]] 50 | && Allowance[_from][_to][symbol]>=_value) { 51 | 52 | balances[_from][symbols[symbol]] -= _value; 53 | balances[_to][symbols[symbol]] += _value; 54 | Transfer(_from, _to, _value,symbol); 55 | return true; 56 | } 57 | else return false; 58 | } 59 | 60 | function totalSupplyes(string symbol) public constant returns (uint){ 61 | return totalSupplies[symbol]; 62 | } 63 | 64 | function totalsupply() public constant returns (uint){ 65 | return totalsupplies; 66 | } 67 | 68 | 69 | function approve(address spender, uint amount,string symbol) public returns (bool success){ 70 | if(balances[msg.sender][symbols[symbol]]>amount){ 71 | Allowance[msg.sender][spender][symbol] = amount; 72 | return true; 73 | } 74 | else return false; 75 | 76 | 77 | } 78 | 79 | function approveFrom(address _owner,address spender, uint amount,string symbol) public returns (bool success){ 80 | 81 | if(balances[_owner][symbols[symbol]]> amount){ 82 | Allowance[_owner][spender][symbol] = amount; 83 | return true; 84 | } 85 | else return false; 86 | 87 | } 88 | 89 | 90 | 91 | function allowance(address tokenOwner, address spender,string symbol) public constant returns (uint remaining){ 92 | return Allowance[tokenOwner][spender][symbol]; 93 | 94 | } 95 | 96 | 97 | event Transfer(address indexed _from, address indexed _to, uint _value,string symbol); 98 | event Approval(address indexed tokenOwner, address indexed spender, uint tokens); 99 | 100 | } 101 | -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/ERC20andICO/ICO-2.sol: -------------------------------------------------------------------------------- 1 | 2 | pragma solidity ^0.4.18; 3 | 4 | 5 | contract Sale { 6 | 7 | address owner; // Владелец контракта 8 | address ethacc; 9 | uint hardcap; 10 | 11 | SimpleTokenCoin public token = new SimpleTokenCoin(); 12 | 13 | uint start = 1511601091; // время начала продажи токенов в unix формате ( секунды от 1 января 1970 ) 14 | uint interval = 31; // количество дней - длительность нашего ICO 15 | 16 | constructor() { 17 | owner = msg.sender; 18 | } 19 | 20 | modifier goodSale() { 21 | require(now > start && now < start + interval * 1 days); // проверяем, что функция вызвана в промежуток между стартом и окончанием 22 | _; 23 | 24 | } 25 | 26 | modifier belowhardcap() { 27 | require(ethacc.balance <= hardcap); // смотрим, когда баланс на нужном аккаунте станет hardcap и потом выкидываем 28 | _; 29 | } 30 | 31 | function makeTokens() belowhardcap goodSale payable { 32 | owner.transfer(msg.value); // пересылаем содержимое на счет создателя 33 | token.mint(msg.sender, msg.value); // создаем токены на аккаунте владельца 34 | } 35 | 36 | 37 | function() external payable { // модификатор payable, который говорит о том, что наша функция принимает деньги 38 | makeTokens(); 39 | } 40 | 41 | 42 | } 43 | 44 | contract Ownable { 45 | 46 | address owner; 47 | 48 | function Ownable() { 49 | owner = msg.sender; 50 | } 51 | 52 | modifier onlyOwner() { 53 | require(msg.sender == owner); 54 | _; 55 | } 56 | 57 | function transferOwnership(address newOwner) onlyOwner { 58 | owner = newOwner; 59 | } 60 | 61 | } 62 | 63 | contract SimpleTokenCoin is Ownable { 64 | string public constant name = "Simple Coin Token"; 65 | string public constant symbol = "SCT"; 66 | uint32 public constant decimals = 18; 67 | uint public totalSupply = 0; // Basic amount of money 68 | mapping (address => uint) balances; // list of balances of our token 69 | mapping (address => mapping(address => uint)) allowed; // list if accounts who are allowed to make operation with account 70 | 71 | function mint(address _to, uint _value) onlyOwner { 72 | assert(totalSupply + _value >= totalSupply && balances[_to] + _value >= balances[_to]); //assert do the same as require but for internal errors 73 | balances[_to] += _value; 74 | totalSupply += _value; 75 | } 76 | 77 | function balanceOf(address _owner) constant returns (uint balance) { 78 | return balances[_owner]; 79 | } 80 | 81 | function transfer(address _to, uint _value) returns (bool success) { 82 | if(balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { // check that accouts have that money and there aren't any problems with negative balances on both sides 83 | balances[msg.sender] -= _value; 84 | balances[_to] += _value; 85 | Transfer(msg.sender, _to, _value); 86 | return true; 87 | } 88 | return false; 89 | } 90 | 91 | function transferFrom(address _from, address _to, uint _value) returns (bool success) { 92 | if( allowed[_from][msg.sender] >= _value && balances[_from] >= _value && balances[_to] + _value >= balances[_to]) { 93 | allowed[_from][msg.sender] -= _value; 94 | balances[_from] -= _value; 95 | balances[_to] += _value; 96 | Transfer(_from, _to, _value); 97 | return true; 98 | } 99 | return false; 100 | } 101 | 102 | function approve(address _spender, uint _value) returns (bool success) { 103 | allowed[msg.sender][_spender] = _value; 104 | Approval(msg.sender, _spender, _value); 105 | return true; 106 | } 107 | 108 | function allowance(address _owner, address _spender) constant returns (uint remaining) { 109 | return allowed[_owner][_spender]; 110 | } 111 | 112 | event Transfer(address indexed _from, address indexed _to, uint _value); 113 | event Approval(address indexed _owner, address indexed _spender, uint _value); 114 | // ERC20 TOKEN 115 | } -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/ERC20andICO/ERC20.txt: -------------------------------------------------------------------------------- 1 | function totalSupply() constant returns (uint256 totalSupply) 2 | 3 | Возвращает общее количество выпущенных монет, каждый может вызвать эту функцию. 4 | 5 | ____________________________________________________________________________________________________________________________________ 6 | 7 | 8 | 9 | function balanceOf(address _owner) constant returns (uint256 balance) 10 | 11 | Возвращает количество монет принадлежащих аккаунту _owner, каждый может вызвать эту функцию, используется для вызова нашего токена. 12 | 13 | ____________________________________________________________________________________________________________________________________ 14 | 15 | function transfer(address _to, uint256 _value) returns (bool success) 16 | 17 | Передает _value монет на адрес _to. Когда владелец перемещает монеты на адрес, использюут именно эту функцию. Соответственно монеты должны браться с баланса пользователя, который вызвал эту функцию. Метод должен создавать событие Transfer (описан будет далее) в случае успешного перемещения монет. 18 | 19 | ____________________________________________________________________________________________________________________________________ 20 | 21 | 22 | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) 23 | 24 | Передает _ value монет от _from к _to. Пользователь должен иметь разрешение на перемещение монеток между адресами, дабы любой желающий не смог управлять чужими кошельками. Фактически эта функция позволяет вашему доверенному лицу распоряжаться определенным объемом монеток на вашем счету. Дать разрешение на управление средствами можно следующей функцией. Метод должен создавать событие Transfer (описан будет далее) в случае успешного перемещения монет. 25 | 26 | ____________________________________________________________________________________________________________________________________ 27 | 28 | function approve(address _spender, uint256 _value) returns (bool success) 29 | 30 | Разрешает пользователю _spender снимать с вашего счета (точнее со счета вызвавшего функцию пользователя) средства не более чем _value. На основе этого разрешения должна работать функция transferFrom. Метод должен создавать событие Approval (описан будет далее). 31 | 32 | ____________________________________________________________________________________________________________________________________ 33 | 34 | function allowance(address _owner, address _spender) constant returns (uint256 remaining) 35 | 36 | Возвращает сколько монет со своего счета разрешил снимать пользователь _owner пользователю _spender. 37 | 38 | ____________________________________________________________________________________________________________________________________ 39 | 40 | event Transfer(address indexed _from, address indexed _to, uint256 _value) 41 | 42 | Событие, которое должно возникать при любом перемещении монет. Т.е. его нужно создавать внутри функций transfer и transferFrom в случае успешного перемещения монет. 43 | 44 | ____________________________________________________________________________________________________________________________________ 45 | 46 | 47 | event Approval(address indexed _owner, address indexed _spender, uint256 _value) 48 | 49 | Событие должно возникать при получении разрешения на снятие монет. Фактически должно создаваться внутри функции approve. 50 | 51 | ____________________________________________________________________________________________________________________________________ 52 | 53 | string public constant name; 54 | 55 | Хранит полное название вашей монеты 56 | 57 | ____________________________________________________________________________________________________________________________________ 58 | 59 | 60 | string public constant symbol; 61 | 62 | Хранит короткое название вашей монеты. Иначе говоря — символ. С этим символом ваша валюта будет отображаться на биржах и в кошельках. 63 | 64 | ____________________________________________________________________________________________________________________________________ 65 | 66 | uint8 public constant decimals = 18; 67 | 68 | Количество знаков после запятой. 18 — это наиболее распространенное значение. 69 | 70 | 71 | 72 | ____________________________________________________________________________________________________________________________________ 73 | 74 | http://inaword.ru - источник 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/ERC20andICO/ERC20.sol: -------------------------------------------------------------------------------- 1 | 2 | pragma solidity ^0.4.22; 3 | 4 | // Контракт для авторских прав 5 | contract Ownable { 6 | 7 | address public owner; // Создаём адрес владельца контракта 8 | 9 | // Определяем конструктор контракта, где указываем, что владелец контракта тот, кто его первый раз запустил (ваш кэп) 10 | constructor() public { 11 | owner = msg.sender; 12 | } 13 | 14 | // Создаём модификатор для разрешения прав доступа 15 | modifier onlyOwner() { 16 | require(msg.sender == owner); 17 | _; 18 | } 19 | 20 | // Создаём функцию, которая позволяет сменить владельца контракта 21 | function transferOwnership(address newOwner) public onlyOwner { 22 | owner = newOwner; 23 | } 24 | 25 | } 26 | 27 | // Собственно сам контракт токена по стандарту ERC20 28 | contract SimpleTokenCoin is Ownable { 29 | 30 | string public constant name = "Simple Coin Token"; // Название токена 31 | string public constant symbol = "SCT"; // Сокращённое название монетки 32 | uint256 public constant decimals = 18; // Кол-во знаков после запятой 33 | 34 | uint public totalSupply = 0; // Текущее предложение 35 | mapping(address => uint) balances; // Балансы пользователей 36 | mapping(address => mapping (address => uint256)) allowed; // Разрешения на пользование своими средствами другим людям 37 | 38 | // Чеканим монеточки. Это может сделать только владелец контракта 39 | function mint(address _to, uint _value) public onlyOwner { 40 | assert(totalSupply + _value >= totalSupply && balances[_to] + _value >= balances[_to]); // Проверяем на переполнение переменных 41 | balances[_to] += _value; // Прибавляем токены к аккаунту 42 | totalSupply += _value; // Прибавляем это же кол-во к общему предложению 43 | } 44 | 45 | // Функция для проверки балансов 46 | function balanceOf(address _owner) public constant returns (uint balance) { 47 | return balances[_owner]; 48 | } 49 | 50 | // Функция, с помощью которой ты можешь отправить кому-то средства 51 | function trasfer(address _to, uint256 _value) public returns (bool success) { 52 | // Проверяем в начале на наличие таких средств, которые хочешь отправить. Потом на переполнение переменной 53 | if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { 54 | balances[msg.sender] -= _value; // Отнимаем баланс отправителя 55 | balances[_to] += _value; // Добавялем к балансу, который получает 56 | Transfer(msg.sender, _to, _value); // Создаём событие трансфера 57 | return true; 58 | } 59 | return false; 60 | } 61 | 62 | // Функция отправки с другого адреса, если есть к нему доступ 63 | function transferFrom (address _from, address _to, uint256 _value) public returns(bool success) { 64 | // Проверяем на наличие средств на адресе, на переполнение и на доступ к средствам на адресе 65 | if (balances[_from] >= _value && balances[_to] + _value >= balances[_to] && allowed[_from][_to] >= _value) { 66 | allowed[_from][_to] -= _value; // Отнимаем доступные нам средства адреса 67 | balances[_from] -= _value; // Уменьшаем баланс адреса 68 | balances[_to] += _value; // Увеличиваем балан адреса, которому отсылаем 69 | Transfer(_from, _to, _value); // Создаём событие передачи от одного адреса к другому _value штук токенов 70 | return true; 71 | } 72 | return false; 73 | } 74 | 75 | // Функция, которая даёт право другому адресу пользоваться определённым кол-вом токенов 76 | function approve(address _sender, uint _value) public returns (bool success) { 77 | allowed[msg.sender][_sender] = _value; // Ограничиваем кол-во токенов лицу, которому доверяешь свои средства 78 | Approval(msg.sender, _sender, _value); // Создаём событие передачи прав на токены 79 | return true; 80 | } 81 | 82 | // Функция, которая показывает сколько средств осталось доступно адресу A с адреса Б 83 | function allowance(address _owner, address _sender) public constant returns (uint remaining) { 84 | return allowed[_owner][_sender]; 85 | } 86 | 87 | event Transfer(address indexed _fron, address _to, uint256 _value); 88 | event Approval(address indexed _owner, address indexed _sender, uint _value); 89 | } -------------------------------------------------------------------------------- /CV/ymilovidova/ymilovidova.txt: -------------------------------------------------------------------------------- 1 | YANA MILOVIDOVA 2 | telephone: +7 968 455 8456 • email: ydmilovidova@gmail.com 3 | MOSCOW, RUSSIA 12/2017 – PRESENT 4 | Fintech-startup focused on international investments, tokenisation, trading and technology 5 | Finance Assistant 6 | • ICO preparation 7 | • Negotiations with potential investors in Russia, retention of the existing ones 8 | • Analyzing opportunities across the Globe with the focus on Singapore and China 9 | • Technical support and product consulting 10 | PRUDENTIAL FINANCIAL LONDON, UK 01/2017 – 13/05/2017 11 | American Fortune Global 500 and Fortune 500 company whose subsidiaries provide insurance, investment management, and other financial products and services to both retail and institutional customers throughout the United States and over thirty other countries. Finance department provides a complete financial support to the whole of the company, addressing all issues of financial management and providing all relevant information to meet the external demands. These services include but are not limited to any of the following: budget setting, internal reporting and control, income management, financial reporting to external bodies, annual accounts preparation, and debt management 12 | • Production of financial statements, applications, spreadsheets, reports, and correspondence 13 | • Financial modelling 14 | • Finance engineering (securitization, finance project management, SPE, SPV) 15 | • Resolution of Finance related queries from the external auditors, financial support to the team, invoice processing 16 | • Work closely with auditors from PWC on year-end financial statements’ audit 17 | • Procedure outsourcing to Ireland 18 | GOOD STANDING PARTNERS MOSCOW, RUSSIA 07/2015 – PRESENT 19 | Co-Founder, Lead Supply Chain Logistics Consultant 20 | Intern 21 | Sales and Account Manager 22 | Global supply chain solution provider focused on transport of raw materials, FMCG, oil and gas, consumer goods and automotive products, transportation of petroleum and derivatives 23 | • Responsibility for all business activity of the firm 24 | • Development and implementation of corporate strategy 25 | • Acquisition of new customers and retention of existing 26 | • Benchmarking, valuation and forecasting, financial modeling, risk management, supervision of the team of twelve supply 27 | chain logistics managers and a call center 28 | • Secured contracts with Haier Group, Kamaz Group, Sony, Ford Motor Company and others with a total value of $8,7 M 29 | • Sold 80% of the company’s portfolio in August 2017 to the venture capital investors from Mail Group 30 | SOTHEBY’S NEW YORK, USA 05/2014 – 08/2014 31 | Internship program in one of the major auction houses in the World aimed to deliver universal outlook the private equity market in a global context 32 | • Auctions assistance 33 | • Formation of the investment recommendations on the basis of the market data to the management team 34 | • Financial modeling and forecasting, technical identification of meaningful patterns and trends of a particular market, art movement or an artist 35 | • Conducted the original research on the work of the German abstractionist Gerhard Richter used to develop marketing materials 36 | FOTOLOFT GALLERY MOSCOW, RUSSIA 03/2013 – 03/2015 37 | Commerical private gallery that aims to provide forum for contemporary art and classic photography presenting unique platform for their collaboration 38 | • Organization of exhibitions, media events, capital requirements calculation and budgeting for each project 39 | • Public and private sales, negotiations of sales terms and conditions tailored to each contacts specifications and needs 40 | • Work with documentation (insurance and legal support, underwriting contracts creation, etc.) 41 | • Creation of exhibition infrastructure, interaction with artists, sponsors, public authorities (i.e., Customs, Ministry of Culture, 42 | Foreign Affairs and various partners) 43 | • Led creation of sponsorship agreements with Sony, Konica Minolta and Embassy of Iceland 44 | • Negotiated partnerships with Future Shorts, Shnit International Shortfilm Festival and 2morrow Festival 45 | EDUCATION AND CERTIFICATION 46 | OXFORD BROOKES UNIVERSITY 47 | Bachelor (with honors) in Applied Accounting 48 | • Research and Analysis project in collaboration with ACCA 49 | HULT INTERNATIONAL BUSINESS SCHOOL 50 | Master in Finance 51 | • GPA 3.5 out of 4.00 52 | • Member, Hult Investment Club 53 | • Member, Italian Speakers Club 54 | MOSCOW STATE UNIVERSITY 55 | Bachelor (with honors) of Fine Arts 56 | • Graduated with ‘Red Diploma’, GPA 4.00 / 4.00 57 | • Member, Italian Club 58 | • Intern at Pisa University, Summer 2011 59 | Oxford, UK 2016 - Present 60 | Languages: Russian (native), English (fluent), Italian (advanced), French (basic) 61 | Computer Literacy: Oracle (advanced), Lotus Notes (advanced), SQB (advanced), VBA (advanced), Matlab (advanced) Finance: FRM, CFA candidate 62 | -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/ERC20andICO/ICO+RefTokenREADME.sol: -------------------------------------------------------------------------------- 1 | /* 2 | Примечания: 3 | 1) Pure означает, что функция не будет считывать или записывать данные. 4 | 2) Библиотека SafeMath предназначена для того, чтобы исключить перегрузку переменных. 5 | 3) Internal - означает, что функция может вызываться только внутри контракта или в контрактах, унаследованных от данного. 6 | 4) В Solidity деление на 0 автоматически выдаёт ошибку. 7 | */ 8 | 9 | /* 10 | 1. Реализовать интерфейс стандарта токена ERC20Basic. 11 | Что должен включать в себя стандарт ERC20Basic? 12 | 1) Общее предложение токенов. 13 | 2) Функция получения баланса счёта конкреткого участника сети. 14 | 3) Функция передачи токенов другому лицу. 15 | 4) Событие передачи токенов другому лицу. 16 | 2. Реализовать интерфейс стандарта токена ERC20. 17 | ERC20 - это ERC20Basic + возможность доверять свои токены другому адресу сети. 18 | Что должени включать в себя стандарт ERC20Basic? 19 | 1) Функция, которая предоставляет право пользоваться определённым количеством средств чужому счёту. 20 | 2) Функция, которая позволяет проверить сколько средств предоставлено другому адресу сети. 21 | 3) Функция для осуществления транзакций с доверенных адресов. 22 | 4) Событие предоставления права пользования средствами чужого счёта. 23 | 3. Написать библиотеку безопасной матиматики. 24 | Когда переменная перегружается - она начинает отсчёт сначала. 25 | 1) Функция, перемножающая числа a и b. 26 | a) Всё работает хорошо, если c/a=b или если a=0. 27 | 2) Функция, делющая a на b. В любом случае число будет меньше и переменная не перегрузится. 28 | a) Деление на 0. Проверяется автоматически EVM. 29 | 3) Функция, вычитающа b из a. 30 | a) Всё работает хорошо, если a<=b. 31 | 4) Функция, складывающая a и b. 32 | a) Всё работет хорошо, если c>=a 33 | 4. Создать контракт токена по стандарту ERC20. 34 | 1) Использовать библиотеку SafeMath. 35 | 2) Реализовать стандарт токена ERC20Basic. 36 | a) Определить переменную балансов. 37 | б) Реализовать интерфейс ERC20Basic. 38 | 1. Функция для того, чтобы узнать баланс. 39 | 1.1. Возвращает баланс. 40 | 2. Функция передачи токенов. 41 | 2.1. Сделать проверку на пустой адрес. 42 | 2.2. Проверка на наличие средств на кошельке. 43 | 2.3. Отнимаем средства у отправителя и добавляем получателю. 44 | 2.4. Добавляем событие трансфера. 45 | 2.5. Возвращаем true. 46 | 3) Реализовать стандарт токена ERC20 47 | а) Определить переменную доступа. 48 | б) Реализовать интерфейс ERC20. 49 | 1. Функция разрешения использования определённого кол-ва средств на аккаунте чужому адресу. 50 | 1.1. Записываем в переменную доступа нужную сумму. 51 | 1.2. Записываем сообытие доступа. 52 | 1.3. Возвращаем полученное значение. 53 | 2. Функции добавления (вычитания) доступных средств дял использования чужому аккаунту. 54 | 2.1. Добавляем (вычитаем) средства, использую SafeMath. 55 | 2.2. В вычитании прописать условие при b>a, которое гласит: сумма станет 0. 56 | 2.3. Добавляем событие доступа. 57 | 2.4. Возвращаем успех. 58 | 3. Функция проверки доступной суммы для использования с чужого адреса. 59 | 3.1.Возвратить переменную доступа. 60 | 5. Создать контракт на проверку владельца. 61 | 5.1. Создать переменную владельца. 62 | 5.2. Создать конструктор для владельца. 63 | 5.3. Создать функцию только для владельца. 64 | 5.4. Создать событие передачи прав владения контрактом. 65 | 5.5. Создать функцию изменения владельца. 66 | 5.5.1. Проверка на пустой адрес. 67 | 5.5.2. Создание события передачи прав. 68 | 5.5.3. Передача прав. 69 | 6. Создать контракт для чеканки токена с правами owner'a. 70 | 6.1. Создание событие чеканки. 71 | 6.2. Общее предложение добавляем. 72 | 6.3. К балансу добавляем. 73 | 6.4. Событие чеканки. 74 | 6.5. Вощвращаем true. 75 | 7. Создать контракт наименования токена. 76 | 7.1. Имя. Сокращённое название. Кол-во знаков после запятой. 77 | 8. Создать контракт распродажи токенов. 78 | 8.1. Переменная владельца. 79 | 8.2. Создаём публичный объект токена. 80 | 8.3. Создаём переменные текущей даты и периода. 81 | 8.3. Создаём конструктор. Там пишем owner'a. 82 | 8.4. Пишем функцию payable. 83 | 8.4.1. Проверка на дату. 84 | 8.4.2. owner.transfer(msg.value) - отправляем криптвалюту владельцу смартконтракта. 85 | 8.4.2. token.mint(msg.sender, msg.value) - производим чеканку токенов 86 | */ 87 | -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/README.md: -------------------------------------------------------------------------------- 1 | # Car Market contract 2 | ### Task 1: Data structures 3 | 1. Create **Car** and **CarOwner** structures. 4 | The first one should includes the following properties: 5 | ``` 6 | 1) price 7 | 2) manufacturer 8 | 3) configOfModel as mapping (model => number of config) 9 | 4) petrolConsumptionPerMile 10 | 5) signature 11 | 6) presence 12 | ``` 13 | The second one should contains the following properties: 14 | ``` 15 | 1) addr 16 | 2) discount 17 | 3) carIDs 18 | ``` 19 | 2. Create next variables: 20 | ``` 21 | 1) carDealer 22 | 2) carID (this variable should starts from 1) 23 | 3) carOwnerID (this variable should starts from 1) 24 | 4) cars mapping (carID => car) 25 | 5) carOwners mapping (carOwnerID => car owner) 26 | 6) carOwner mapping (owner's address => carOwnerID) 27 | ``` 28 | **Prompt:** `carIDs` property in `CarOwner` structure should stores only `MAX_CARS_PER_PERSON` unique identifiers. 29 | ### Task 2: Library 30 | Add `SafeMath` library to `CarMarket` contract. 31 | ### Task 3: Setter function 32 | Create function which will creates new Car object. Call it as `addCar`. 33 | 1. Get `c` variable type `Car` declared as a storage pointer. 34 | 2. Add all properties to `Car` object. 35 | 3. Increment `carID` variable. 36 | ### Task 4: Modifier. Require statement. 37 | Create `onlyCarDealer` modifier that will allows to give access only for `carDealer`. 38 | Add this modifier to `addCar` function. 39 | ### Task 5: Payable function. Msg.sender, msg.value. Conditional statements. Loop. Transfer method. 40 | Create `payable` function called `buyCar` with one parameter called `_carID`. This function will accept ETH from buyers. 41 | 42 | First, we prepare the variables for our function: 43 | 1. Let's say that `carID == 0` is a empty index that doesn't contain any car. It will come in handy in the future to get buyer's cars. Create variable `NULL_CAR` with zero value. 44 | 2. Create `NOT_CAR_OWNER` variable with zero value. 45 | And `CAR_OWNER` variable with value `1`. 46 | Create mapping `isCarOwner` there person address => person state. 47 | If person has never bought any car his person state will be NOT_CAR_OWNER, else - CAR_OWNER. 48 | 3. Create `DECIMAL_MULTIPLIER` variable with value `1e18`. This variable will need us for calculating later. 49 | 4. Create `IN_STOCK` and `OUT_OF_STOCK` variables with values `true` and `false` respectively. 50 | 51 | Let's start to code our `buyCar` function: 52 | 1. The `carDealer` can't buy a car. 53 | 2. Parameter `_carID` should be less or equal last `carID`. 54 | **Prompt:** `carID` variable contains future car unique identifier. 55 | 3. Parameter `_carID` shouldn't be equals to `NULL_CAR`. 56 | 4. Create car instance by `_carID` unique identifier. 57 | 5. Car should be `IN_STOCK`. 58 | 6. Create local variable called `_carPrice` that will contains the price of selected car. 59 | 7. Let's check: if `msg.sender` buy car at first time. 60 | **Prompt:** remember the `isCarOwner` variable and `NOT_CAR_OWNER` person state. 61 | 62 | 8. Let's start with person who has never bought a car. 63 | a. Check if send ETH >= `_carPrice`. 64 | b. Create local variable `_newCarOwnerID` with value `carOwnerID`. 65 | c. Now person has bought a car. Set CAR_OWNER state. 66 | d. Create `_newCarOwner` instance of `CarOwner` object with `_newCarOwnerID` unique identifier. 67 | e. Set `carOwner` properties `addr` and `carIDs`. **Prompt:** `carIDs` should be array with one element. 68 | f. Add buyer to `carOwner` variable. 69 | g. Increment `carOwnerID`. 70 | What about person who has already bought a car: 71 | a. Create `_carOwnerID` local variable with value of `carOwner` unique identifier. 72 | b. Create variable `_carOwner` - instance of `CarOwner` with `_carOwnerID` unique identifier. 73 | c. Check `discount` of buyer. If it's more than zero than calculate new `carPrice` given the discount. **Prompt:** Get `_carPrice` and subtract it from (`_carPrice` multiply by discount and divide by DECIMAL_MULTIPLIER). Discount should equal from `1e16` to `1e18` because solidity doesn't have floating-point numbers. 74 | d. Check if send ETH >= `_carPrice`. 75 | e. Check last item of `_carOwner.carIDs` for `NULL_CAR` value. If it's false than person has already bought `MAX_CARS_PER_PERSON`. 76 | f. Next you should use loop for adding new car ID for `_carOwner`. 77 | 78 | 9. Buyer can send more ETH than is the car worth. You should calculate remain value out of conditional statement like `msg.value` without `_carPrice`. 79 | 10. And if remain value more than zero return remain ETH to car buyer. 80 | 81 | ### Task 6: Getter function 82 | You have to create `getOwnerCars` function that will returns all cars which `carOwner` has already buy. 83 | 84 | ### Task 7: Events 85 | Create: 86 | ```javascript 87 | event AddCar(address carDealer, uint carID); 88 | event NewCarOwner(uint carOnwerID, address carOwnerAddress); 89 | event BuyCar(uint carID, uint carOwnerID); 90 | ``` 91 | And arrange it in the right places. 92 | 93 | ___ 94 | 95 | ### Additional assignment 96 | Create `setCarOwnerDiscount` and `editPresence` functions. 97 | Create Interface `ICarMarket`. 98 | Add here all constant variables modifiers and functions without body. 99 | Inherit `CarMarket` contract from `ICarMarket` interface. 100 | 101 | -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/ERC20andICO/ERC20Auto.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | contract ERC20Basic { 4 | uint256 public totalSupply; 5 | function balanceOf(address who) public constant returns (uint256); 6 | function transfer(address to, uint256 value) public returns (bool); 7 | event Transfer(address indexed from, address indexed to, uint256 value); 8 | } 9 | 10 | contract ERC20 is ERC20Basic { 11 | function allowance(address owner, address spender) public constant returns (uint256); 12 | function transferFrom(address from, address to, uint256 value) public returns (bool); 13 | function approve(address spender, uint256 value) public returns (bool); 14 | event Approval(address indexed owner, address indexed spender, uint256 value); 15 | } 16 | 17 | library SafeMath { 18 | function mul(uint256 a, uint256 b) internal pure returns (uint256) { 19 | uint256 c = a * b; 20 | assert(a == 0 || c / a == b); 21 | return c; 22 | } 23 | 24 | function div(uint256 a, uint256 b) internal pure returns (uint256) { 25 | // assert(b > 0); // Solidity automatically throws when dividing by 0 26 | uint256 c = a / b; 27 | // assert(a == b * c + a % b); // There is no case in which this doesn't hold 28 | return c; 29 | } 30 | 31 | function sub(uint256 a, uint256 b) internal pure returns (uint256) { 32 | assert(b <= a); 33 | return a - b; 34 | } 35 | function add(uint256 a, uint256 b) internal pure returns (uint256) { 36 | uint256 c = a + b; 37 | assert(c >= a); 38 | return c; 39 | } 40 | } 41 | 42 | contract BasicToken is ERC20 { 43 | 44 | using SafeMath for uint256; 45 | 46 | mapping(address => uint256) balances; 47 | mapping(address => mapping (address => uint256) ) allowed; 48 | 49 | function transfer(address _to, uint256 _value) public returns (bool) { 50 | require(_to != address(0)); 51 | require(_value <= balances[msg.sender]); 52 | } 53 | 54 | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { 55 | require(_to != address(0)); 56 | require(_value <= balances[_from]); 57 | require(_value <= allowed[_from][msg.sender]); 58 | balances[_from] = balances[_from].sub(_value); 59 | balances[_to] = balances[_to].add(_value); 60 | allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); 61 | Transfer(_from, _to, _value); 62 | return true; 63 | } 64 | 65 | function approve(address _spender, uint256 _value) public returns (bool) { 66 | allowed[msg.sender][_spender] = _value; 67 | Approval(msg.sender, _spender, _value); 68 | return true; 69 | } 70 | 71 | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { 72 | return allowed[_owner][_spender]; 73 | } 74 | 75 | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { 76 | allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); 77 | Approval(msg.sender, _spender, allowed[msg.sender][_spender]); 78 | return true; 79 | } 80 | 81 | function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { 82 | uint oldValue = allowed[msg.sender][_spender]; 83 | if (_subtractedValue > oldValue) { 84 | allowed[msg.sender][_spender] = 0; 85 | } 86 | else { 87 | allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); 88 | } 89 | Approval(msg.sender, _spender, allowed[msg.sender][_spender]); 90 | return true; 91 | } 92 | 93 | function () public payable { 94 | revert(); 95 | } 96 | 97 | } 98 | 99 | contract Ownable { 100 | address public owner; 101 | 102 | event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); 103 | 104 | constructor() public { 105 | owner = msg.sender; 106 | } 107 | 108 | modifier onlyOwner() { 109 | require(msg.sender == owner); 110 | _; 111 | } 112 | 113 | function transferOwnership(address newOwner) onlyOwner public { 114 | require(newOwner != address(0)); 115 | OwnershipTransferred(owner, newOwner); 116 | owner = newOwner; 117 | } 118 | } 119 | 120 | contract MintableToken is BasicToken, Ownable { 121 | 122 | event Mint(address indexed to, uint256 amount); 123 | 124 | event MintFinished(); 125 | 126 | bool public mintingFinished = false; 127 | 128 | address public saleAgent; 129 | 130 | function setSaleAgent(address newSaleAgnet) public { 131 | require(msg.sender == saleAgent || msg.sender == owner); 132 | saleAgent = newSaleAgnet; 133 | } 134 | 135 | function mint(address _to, uint256 _amount) public returns (bool) { 136 | require(msg.sender == saleAgent && !mintingFinished); 137 | totalSupply = totalSupply.add(_amount); 138 | balances[_to] = balances[_to].add(_amount); 139 | Mint(_to, _amount); 140 | return true; 141 | } 142 | 143 | function finishMinting() public returns (bool) { 144 | require((msg.sender == saleAgent || msg.sender == owner) && !mintingFinished); 145 | mintingFinished = true; 146 | MintFinished(); 147 | return true; 148 | } 149 | 150 | 151 | } 152 | 153 | contract SimpleTokenCoin is MintableToken { 154 | 155 | string public constant name = "Simple Coin Token"; 156 | 157 | string public constant symbol = "SCT"; 158 | 159 | uint32 public constant decimals = 18; 160 | 161 | } -------------------------------------------------------------------------------- /EDU_Materials/solidity_materials/ERC20andICO/ICO+RefToken.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.22; 2 | 3 | contract ERC20Basic { 4 | 5 | uint256 public totalSupply; 6 | function balanceOf(address who) public constant returns (uint256); 7 | function transfer(address to, uint256 value) public returns (bool); 8 | event Transfer(address indexed from, address indexed to, uint256 value); 9 | 10 | } 11 | 12 | contract ERC20 is ERC20Basic { 13 | 14 | function allowance(address owner, address spender) public constant returns (uint256); 15 | function transferFrom(address from, address to, uint256 value) public returns (bool); 16 | function approve(address spender, uint256 value) public returns (bool); 17 | event Approval(address indexed owner, address indexed spender, uint256 value); 18 | 19 | } 20 | 21 | library SafeMath { 22 | 23 | function mul(uint256 a, uint256 b) internal pure returns (uint256) { 24 | uint256 c = a * b; 25 | assert(a == 0 || c / a == b); 26 | return c; 27 | } 28 | 29 | function div(uint256 a, uint256 b) internal pure returns (uint256) { 30 | // assert(b > 0); // Solidity automatically throws when dividing by 0 31 | uint256 c = a / b; 32 | // assert(a == b * c + a % b); // There is no case in which this doesn't hold 33 | return c; 34 | } 35 | 36 | function sub(uint256 a, uint256 b) internal pure returns (uint256) { 37 | assert(b <= a); 38 | return a - b; 39 | } 40 | function add(uint256 a, uint256 b) internal pure returns (uint256) { 41 | uint256 c = a + b; 42 | assert(c >= a); 43 | return c; 44 | } 45 | 46 | } 47 | 48 | contract BasicToken is ERC20 { 49 | 50 | using SafeMath for uint256; 51 | 52 | mapping(address => uint256) balances; 53 | mapping(address => mapping (address => uint256) ) allowed; 54 | 55 | function balanceOf(address who) public constant returns (uint256) { 56 | return balances[who]; 57 | } 58 | 59 | function transfer(address _to, uint256 _value) public returns (bool) { 60 | require(_to != address(0)); 61 | require(_value <= balances[msg.sender]); 62 | balances[msg.sender] = balances[msg.sender].sub(_value); 63 | balances[_to] = balances[_to].add(_value); 64 | Transfer(msg.sender, _to, _value); 65 | return true; 66 | } 67 | 68 | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { 69 | require(_to != address(0)); 70 | require(_value <= balances[_from]); 71 | require(_value <= allowed[_from][msg.sender]); 72 | balances[_from] = balances[_from].sub(_value); 73 | balances[_to] = balances[_to].add(_value); 74 | allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); 75 | Transfer(_from, _to, _value); 76 | return true; 77 | } 78 | 79 | function approve(address _spender, uint256 _value) public returns (bool) { 80 | allowed[msg.sender][_spender] = _value; 81 | Approval(msg.sender, _spender, _value); 82 | return true; 83 | } 84 | 85 | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { 86 | return allowed[_owner][_spender]; 87 | } 88 | 89 | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { 90 | allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); 91 | Approval(msg.sender, _spender, allowed[msg.sender][_spender]); 92 | return true; 93 | } 94 | 95 | function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { 96 | uint oldValue = allowed[msg.sender][_spender]; 97 | if (_subtractedValue > oldValue) { 98 | allowed[msg.sender][_spender] = 0; 99 | } 100 | else { 101 | allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); 102 | } 103 | Approval(msg.sender, _spender, allowed[msg.sender][_spender]); 104 | return true; 105 | } 106 | 107 | function () public payable { 108 | revert(); 109 | } 110 | 111 | } 112 | 113 | contract Ownable { 114 | address public owner; 115 | 116 | event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); 117 | 118 | constructor() public { 119 | owner = msg.sender; 120 | } 121 | 122 | modifier onlyOwner() { 123 | require(msg.sender == owner); 124 | _; 125 | } 126 | 127 | function transferOwnership(address newOwner) onlyOwner public { 128 | require(newOwner != address(0)); 129 | OwnershipTransferred(owner, newOwner); 130 | owner = newOwner; 131 | } 132 | 133 | } 134 | 135 | contract MintableToken is BasicToken, Ownable { 136 | 137 | event Mint(address indexed to, uint256 amount); 138 | 139 | function mint(address _to, uint256 _amount) public returns (bool) { 140 | totalSupply = totalSupply.add(_amount); 141 | balances[_to] = balances[_to].add(_amount); 142 | Mint(_to, _amount); 143 | return true; 144 | } 145 | 146 | } 147 | 148 | contract SimpleTokenCoin is MintableToken { 149 | 150 | string public constant name = "Simple Coin Token"; 151 | string public constant symbol = "SCT"; 152 | uint32 public constant decimals = 18; 153 | 154 | } 155 | 156 | contract Crowdsale { 157 | 158 | address owner; 159 | 160 | SimpleTokenCoin public token = new SimpleTokenCoin(); 161 | 162 | uint start = 1500379200; 163 | uint period = 300; 164 | 165 | constructor() { 166 | owner = msg.sender; 167 | } 168 | 169 | function() external payable { 170 | require(now > start && now < start + period*24*60*60); 171 | owner.transfer(msg.value); 172 | token.mint(msg.sender, msg.value); 173 | } 174 | 175 | } 176 | -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/test/CarMarketTest.js: -------------------------------------------------------------------------------- 1 | const CarMarket = artifacts.require("./CarMarket.sol"); 2 | 3 | const web3 = global.web3; 4 | 5 | const tbn = v => web3.toBigNumber(v); 6 | const fbn = v => v.toString(); 7 | const tw = v => web3.toBigNumber(v).mul(1e18); 8 | const fw = v => web3._extend.utils.fromWei(v).toString(); 9 | 10 | const cars = [ 11 | { 12 | price: tw('23'), 13 | manufacturer: 'BMW', 14 | model: 'x5', 15 | config: 5, 16 | petrolConsumptionPerMile: 9, 17 | signature: 0x24243231342314313423213, 18 | presence: true 19 | }, 20 | { 21 | price: tw('12'), 22 | manufacturer: 'FIAT', 23 | model: 'a3', 24 | config: 2, 25 | petrolConsumptionPerMile: 3, 26 | signature: 0x2345342344313423213, 27 | presence: true 28 | }, 29 | { 30 | price: tw('30'), 31 | manufacturer: 'Bentley', 32 | model: '98', 33 | config: 10, 34 | petrolConsumptionPerMile: 12, 35 | signature: 0x354675432434523234, 36 | presence: true 37 | }, 38 | ]; 39 | 40 | const gasPrice = tw('3e-7'); 41 | 42 | contract('CarMarket', (accounts) => { 43 | const carDealer = accounts[1]; 44 | 45 | const buyers = { 46 | account2: accounts[2], 47 | account3: accounts[3], 48 | account4: accounts[4], 49 | account5: accounts[5], 50 | account6: accounts[6], 51 | account7: accounts[7], 52 | account8: accounts[8] 53 | }; 54 | 55 | beforeEach(async function () { 56 | carMarket = await CarMarket.new({from: carDealer}); 57 | }); 58 | 59 | describe('MAIN TEST', () => { 60 | // it("should add new car to Market", async function () { 61 | // let firstCar = cars[0]; 62 | // let createdCar = await carMarket.addCar( 63 | // firstCar.price, 64 | // firstCar.manufacturer, 65 | // firstCar.model, 66 | // firstCar.config, 67 | // firstCar.petrolConsumptionPerMile, 68 | // firstCar.signature, 69 | // firstCar.presence, 70 | // {from: carDealer} 71 | // ); 72 | // console.log(` 73 | // Car price: ${fw(createdCar[0])} 74 | // Car manufacturer: ${createdCar[1]} 75 | // Car petrolConsumption: ${createdCar[2].toNumber()} 76 | // Car signature: ${createdCar[3]} 77 | // Car presence: ${createdCar[4]} 78 | // `); 79 | // assert( 80 | // createdCar[0].eq(firstCar.price), 81 | // firstCar.manufacturer == createdCar[1], 82 | // createdCar[2].eq(firstCar.petrolConsumptionPerMile), 83 | // createdCar[3] == firstCar.signature, 84 | // firstCar.presence == createdCar[4] 85 | // ); 86 | // }); 87 | 88 | it("should buy car", async function () { 89 | let firstCar = cars[0]; 90 | let tx = await carMarket.addCar( 91 | firstCar.price, 92 | firstCar.manufacturer, 93 | firstCar.model, 94 | firstCar.config, 95 | firstCar.petrolConsumptionPerMile, 96 | firstCar.signature, 97 | firstCar.presence, 98 | {from: carDealer} 99 | ); 100 | 101 | await carMarket.buyCar(tx.logs[0].args.carID, {value: firstCar.price, from: buyers.account2}); 102 | let carOwnerID = await carMarket.carOwner(buyers.account2, {from: buyers.account2}); 103 | let carOwner = await carMarket.carOwners(carOwnerID, {from: buyers.account2}); 104 | console.log( 105 | 'Buyer address: ' + carOwner[0], 106 | // 'Buyer\'s cars: ' + carOwner[1] 107 | ); 108 | assert( 109 | carOwner[0] == buyers.account2 110 | ); 111 | }); 112 | it("should release ETH to carDealer", async function () { 113 | let firstCar = cars[0]; 114 | let tx = await carMarket.addCar( 115 | firstCar.price, 116 | firstCar.manufacturer, 117 | firstCar.model, 118 | firstCar.config, 119 | firstCar.petrolConsumptionPerMile, 120 | firstCar.signature, 121 | firstCar.presence, 122 | {from: carDealer} 123 | ); 124 | 125 | await carMarket.buyCar(tx.logs[0].args.carID, {value: firstCar.price, from: buyers.account2}); 126 | let balanceBefore = await web3.eth.getBalance(carDealer); 127 | console.log(fw(balanceBefore)); 128 | let tx1 = await carMarket.releaseETH({from: carDealer, gasPrice: gasPrice}); 129 | let gasUsed = tx1.receipt.gasUsed; 130 | let gasCost = gasPrice.mul(gasUsed); 131 | let balanceAfter = await web3.eth.getBalance(carDealer); 132 | console.log(fw(balanceAfter)); 133 | console.log(fw(balanceAfter.minus(balanceBefore))) 134 | assert(balanceAfter.eq(balanceBefore.minus(gasCost).plus(firstCar.price))); 135 | }); 136 | 137 | it("should edit presence", async function () { 138 | let firstCar = cars[0]; 139 | let carID = 1; 140 | let tx = await carMarket.addCar( 141 | firstCar.price, 142 | firstCar.manufacturer, 143 | firstCar.model, 144 | firstCar.config, 145 | firstCar.petrolConsumptionPerMile, 146 | firstCar.signature, 147 | firstCar.presence, 148 | {from: carDealer} 149 | ); 150 | await carMarket.buyCar(tx.logs[0].args.carID, {value: firstCar.price, from: buyers.account2}); 151 | await carMarket.releaseETH({from: carDealer, gasPrice: gasPrice}); 152 | await carMarket.editPresence(carID, false, {from: carDealer}); 153 | let createdCar = await carMarket.cars(carID); 154 | console.log(createdCar[4]); 155 | assert(createdCar[4] == false); 156 | }) 157 | }); 158 | 159 | describe('CALC TEST', () => { 160 | 161 | }); 162 | 163 | describe('OVERDRAFT TEST', () => { 164 | 165 | }); 166 | 167 | describe('NEGATIVE TEST', () => { 168 | 169 | }); 170 | }); 171 | -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/web3/index.js: -------------------------------------------------------------------------------- 1 | if (typeof web3 !== 'undefined') 2 | web3 = new Web3(web3.currentProvider); 3 | else 4 | web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io/1u84gV2YFYHHTTnh8uVl')); 5 | 6 | const instance = new web3.eth.Contract(CONTRACT_ABI, CONTRACT_ADDRESS); 7 | 8 | function getCarDiller() { 9 | instance.methods.carDealer().call({from: web3.eth.accounts[2]}, (err, doc) => { 10 | console.log(err, doc); 11 | document.getElementById('car-owner').innerText = doc; 12 | }); 13 | } 14 | instance.events.AddCar({ 15 | fromBlock: 0 16 | }, function(error, event){ console.log(error, event); }) 17 | .on('data', function(event){ 18 | console.log(event); // same results as the optional callback above 19 | }) 20 | .on('changed', function(event){ 21 | console.log(changed) 22 | // remove event from local database 23 | }) 24 | .on('error', console.error); 25 | console.log(web3.eth.getTransactionCount(getAddress("0x5a8fe2151d9ab0fddbdc3f85a71b056129ed85dc8fc66400227393d5ac817ded"))) 26 | async function addCar() { 27 | 28 | const car = { 29 | price: document.getElementById('price').value, 30 | manufacturer: document.getElementById('manufacturer').value, 31 | model: document.getElementById('model').value, 32 | config: document.getElementById('config').value, 33 | petrolConsumptionPerMile: document.getElementById('petrolConsumptionPerMile').value, 34 | signature: web3.utils.keccak256(web3.utils.stringToHex(document.getElementById('signature').value)), 35 | presence: $('input[name=presence]:checked', '#config').val() 36 | }; 37 | 38 | let data = instance.methods.addCar( 39 | car.price, 40 | car.manufacturer, 41 | car.model, 42 | car.config, 43 | car.petrolConsumptionPerMile, 44 | car.signature, 45 | car.presence 46 | ).encodeABI(); 47 | 48 | signAndSendRawTx(await web3.eth.getTransactionCount(getAddress("0x5a8fe2151d9ab0fddbdc3f85a71b056129ed85dc8fc66400227393d5ac817ded")), data, "0x5a8fe2151d9ab0fddbdc3f85a71b056129ed85dc8fc66400227393d5ac817ded", (err, result) => { 49 | console.log(err, result) 50 | }) 51 | 52 | // instance.methods.addCar( 53 | // car.price, 54 | // car.manufacturer, 55 | // car.model, 56 | // car.config, 57 | // car.petrolConsumptionPerMile, 58 | // car.signature, 59 | // car.presence 60 | // ).send({from: (await web3.eth.getAccounts())[0], gas: 99999999999, gasPrice: 9999}) 61 | // .on('transactionHash', function(hash){ 62 | // alert(`Tx Hash: ${hash}`); 63 | // }) 64 | // .on('receipt', function(receipt){ 65 | // console.log(receipt); 66 | // alert(`Car Dealer: ${receipt.events.AddCar.returnValues.carDealer}`); 67 | // alert(`Car ID: ${receipt.events.AddCar.returnValues.carID}`); 68 | // }) 69 | // .on('confirmation', function(confirmationNumber, receipt){ 70 | // console.log(confirmationNumber, receipt) 71 | // }) 72 | // .on('error', console.error); 73 | } 74 | 75 | async function buyCar() { 76 | const carID = document.getElementById('car-id').value; 77 | const value = document.getElementById('price-to-buy').value 78 | 79 | console.log(carID) 80 | console.log(value) 81 | 82 | console.log((await web3.eth.getAccounts())[8]) 83 | 84 | instance.methods.buyCar(Number(carID)).send({from: (await web3.eth.getAccounts())[2], value: Number(value), gas: 99999999999999, gasPrice: 9999}) 85 | .on('transactionHash', function(hash){ 86 | alert(`TX Hash: ${hash}`); 87 | }) 88 | .on('receipt', function(receipt){ 89 | console.log(receipt); 90 | alert(`Car ID: ${receipt.events.BuyCar.returnValues.carID}`); 91 | alert(`Car owner ID: ${receipt.events.BuyCar.returnValues.carOwnerID}`); 92 | if (receipt.events.NewCarOwner) { 93 | alert(`Car owner ID: ${receipt.events.NewCarOwner.returnValues.carOwnerID}`); 94 | alert(`Car owner address: ${receipt.events.NewCarOwner.returnValues.carOwnerAddress}`); 95 | } 96 | 97 | }) 98 | .on('confirmation', function(confirmationNumber, receipt){ 99 | console.log(confirmationNumber, receipt) 100 | }) 101 | .on('error', console.error); 102 | } 103 | 104 | /** 105 | * Should create random ethereum private key 106 | * @return {string} ethereum private key 107 | */ 108 | function createNewAccount() { 109 | let params = { 110 | keyBytes: 32, 111 | ivBytes: 16 112 | }; 113 | let dk = keythereum.create(params); 114 | 115 | return "0x" + dk.privateKey.reduce((memo, i) => { 116 | return memo + ('0' + i.toString(16)).slice(-2); 117 | }, ''); 118 | } 119 | 120 | /** 121 | * Should create address from private key 122 | * @param {string} prvtKey ethereum privateKey 123 | * @return {string} ethereum address 124 | */ 125 | function getAddress(prvtKey) { 126 | let privateKey = ""; 127 | for(i = 2; i < prvtKey.length; i++) { 128 | privateKey += prvtKey[i]; 129 | } 130 | return keythereum.privateKeyToAddress(privateKey); 131 | } 132 | 133 | /** 134 | * Allows to get balance in Wei 135 | * @param {string} address ethereum address 136 | * @return {number} account balance in Wei 137 | */ 138 | function getBalance(address) { 139 | return web3.eth.getBalance(address).toNumber(); 140 | } 141 | 142 | function signAndSendRawTx(nonce, data, from, callback) { 143 | const txParam = { 144 | // nonce: web3.eth.getTransactionCount(getAddress(from)), 145 | nonce: nonce, 146 | to: CONTRACT_ADDRESS, 147 | from: getAddress(from), 148 | data: data, 149 | gasPrice: 0x3b9bca00, 150 | // gasLimit: 4000000, 151 | gas: 210000 152 | }; 153 | 154 | const tx = new ethereumjs.Tx(txParam); 155 | const privateKeyBuffer = ethereumjs.Buffer.Buffer.from(from.substring(2), 'hex'); 156 | tx.sign(privateKeyBuffer); 157 | const serializedTx = tx.serialize(); 158 | 159 | web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'), (err, transactionHash) => { 160 | if (err) { 161 | console.log(err); 162 | callback(err, null); 163 | return; 164 | } 165 | callback(err, transactionHash); 166 | }); 167 | } 168 | 169 | // let a = createNewAccount(); 170 | // console.log(a); 171 | let b = getAddress("0x44feb5684e374aa2f120af20dd058141389d40b2cce4f137eac60ffa213b443a"); 172 | console.log(b) 173 | 174 | const balance = web3.eth.getBalance("0x8242c6e34db36082eb07806bc8fae086927b3279").then(a=>console.log(a)); 175 | // console.log(balance); 176 | -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/contracts/CarMarket.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.21; 2 | 3 | library SafeMath { 4 | 5 | function mul(uint256 a, uint256 b) internal pure returns (uint256) { 6 | uint256 c = a * b; 7 | assert(a == 0 || c / a == b); 8 | return c; 9 | } 10 | 11 | function div(uint256 a, uint256 b) internal pure returns (uint256) { 12 | // assert(b > 0); // Solidity automatically throws when dividing by 0 13 | uint256 c = a / b; 14 | // assert(a == b * c + a % b); // There is no case in which this doesn't hold 15 | return c; 16 | } 17 | 18 | function sub(uint256 a, uint256 b) internal pure returns (uint256) { 19 | assert(b <= a); 20 | return a - b; 21 | } 22 | function add(uint256 a, uint256 b) internal pure returns (uint256) { 23 | uint256 c = a + b; 24 | assert(c >= a); 25 | return c; 26 | } 27 | 28 | } 29 | 30 | contract ICarMarket { 31 | uint8 constant public MAX_CARS_PER_PERSON = 6; 32 | uint8 constant internal NULL_CAR = 0; 33 | uint constant internal DECIMAL_MULTIPLIER = 1e18; 34 | uint8 constant internal NOT_CAR_OWNER = 0x0; 35 | uint8 constant internal CAR_OWNER = 0x1; 36 | bool constant internal IN_STOCK = true; 37 | bool constant internal OUT_OF_STOCK = false; 38 | 39 | address public carDealer; 40 | 41 | modifier onlyCarDealer() { 42 | require(carDealer == msg.sender); 43 | _; 44 | } 45 | 46 | function buyCar(uint _carID) payable public; 47 | function addCar( 48 | uint _price, 49 | string _manufacturer, 50 | string _model, 51 | uint _config, 52 | uint _petrolConsumptionPerMile, 53 | bytes32 _signature, 54 | bool _presence 55 | ) external returns (uint); 56 | function setCarOwnerDiscount(uint _carOwnerID, uint _discount) external returns (bool); 57 | function getOwnerCars(uint _carOwnerID) external view returns (uint[MAX_CARS_PER_PERSON]); 58 | function editPresence(uint _carID, bool _presence) external returns (bool); 59 | 60 | event AddCar(address carDealer, uint carID); 61 | event NewCarOwner(uint carOwnerID, address carOwnerAddress); 62 | event BuyCar(uint carID, uint carOwnerID); 63 | event SetDiscount(uint carOwnerID, uint discount); 64 | event EditPresence(uint carID, bool presence); 65 | } 66 | 67 | contract CarMarket is ICarMarket { 68 | using SafeMath for uint256; 69 | 70 | uint carID = 1; 71 | uint carOwnerID = 1; 72 | mapping (uint => Car) public cars; 73 | mapping (uint => CarOwner) public carOwners; 74 | mapping (address => uint) public carOwner; 75 | mapping (address => uint8) public isCarOwner; 76 | 77 | constructor () public { 78 | carDealer = msg.sender; 79 | } 80 | 81 | struct CarOwner { 82 | address addr; 83 | uint discount; 84 | uint[MAX_CARS_PER_PERSON] carIDs; 85 | } 86 | 87 | struct Car { 88 | uint price; 89 | string manufacturer; 90 | mapping (bytes32 => uint) configOfModel; 91 | uint petrolConsumptionPerMile; 92 | bytes32 signature; 93 | bool presence; 94 | } 95 | 96 | function buyCar(uint _carID) payable public { 97 | require(carDealer != msg.sender); 98 | require(_carID != NULL_CAR); 99 | require(_carID < carID); 100 | Car storage c = cars[_carID]; 101 | require(c.presence == IN_STOCK); 102 | uint _carPrice = c.price; 103 | uint _carOwnerID; 104 | if (isCarOwner[msg.sender] == NOT_CAR_OWNER) { 105 | require(msg.value >= _carPrice); 106 | _carOwnerID = carOwnerID; 107 | isCarOwner[msg.sender] = CAR_OWNER; 108 | CarOwner storage _newCarOwner = carOwners[_carOwnerID]; 109 | _newCarOwner.addr = msg.sender; 110 | _newCarOwner.carIDs = [_carID]; 111 | carOwner[msg.sender] = _carOwnerID; 112 | emit NewCarOwner(_carOwnerID, msg.sender); 113 | carOwnerID = carOwnerID.add(0x1); 114 | } else { 115 | _carOwnerID = carOwner[msg.sender]; 116 | CarOwner storage _carOwner = carOwners[_carOwnerID]; 117 | if (_carOwner.discount > 0) 118 | _carPrice = _carPrice.sub(_carPrice.mul(_carOwner.discount).div(DECIMAL_MULTIPLIER)); 119 | require(msg.value >= _carPrice); 120 | require(_carOwner.carIDs[MAX_CARS_PER_PERSON-1] == NULL_CAR); 121 | for (uint i = 0; i < MAX_CARS_PER_PERSON; i++) { 122 | if (_carOwner.carIDs[i] != NULL_CAR) 123 | continue; 124 | _carOwner.carIDs[i] = _carID; 125 | break; 126 | } 127 | } 128 | uint _remainValue = msg.value.sub(_carPrice); 129 | if (_remainValue > 0) 130 | msg.sender.transfer(_remainValue); 131 | emit BuyCar(_carID, _carOwnerID); 132 | } 133 | 134 | function addCar( 135 | uint _price, 136 | string _manufacturer, 137 | string _model, 138 | uint _config, 139 | uint _petrolConsumptionPerMile, 140 | bytes32 _signature, 141 | bool _presence 142 | ) external onlyCarDealer returns (uint) { 143 | uint _carIF = carID; 144 | Car storage c = cars[_carIF]; 145 | c.price = _price; 146 | c.manufacturer = _manufacturer; 147 | c.configOfModel[keccak256(abi.encodePacked(_model))] = _config; 148 | c.petrolConsumptionPerMile = _petrolConsumptionPerMile; 149 | c.signature = _signature; 150 | c.presence = _presence; 151 | emit AddCar(msg.sender, carID); 152 | carID = _carIF.add(0x1); 153 | return _carIF; 154 | } 155 | 156 | function releaseETH() external onlyCarDealer returns (bool) { 157 | carDealer.transfer(address(this).balance); 158 | return true; 159 | } 160 | 161 | function setCarOwnerDiscount(uint _carOwnerID, uint _discount) external onlyCarDealer returns (bool) { 162 | require(_discount >= DECIMAL_MULTIPLIER/100 && _discount <= DECIMAL_MULTIPLIER); 163 | require(_carOwnerID < carID); 164 | carOwners[_carOwnerID].discount = _discount; 165 | emit SetDiscount(_carOwnerID, _discount); 166 | return true; 167 | } 168 | 169 | function editPresence(uint _carID, bool _presence) external onlyCarDealer returns (bool) { 170 | Car storage c = cars[_carID]; 171 | require(c.presence != _presence); 172 | c.presence = _presence; 173 | emit EditPresence(_carID, _presence); 174 | return true; 175 | } 176 | 177 | function getOwnerCars(uint _carOwnerID) external view returns (uint[MAX_CARS_PER_PERSON]) { 178 | return carOwners[_carOwnerID].carIDs; 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/contracts/MultiArgue.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.23; 2 | 3 | library SafeMath { 4 | function mul(uint256 a, uint256 b) internal pure returns (uint256) { 5 | if (a == 0) { 6 | return 0; 7 | } 8 | uint256 c = a * b; 9 | assert(c / a == b); 10 | return c; 11 | } 12 | 13 | function div(uint256 a, uint256 b) internal pure returns (uint256) { 14 | // assert(b > 0); // Solidity automatically throws when dividing by 0 15 | uint256 c = a / b; 16 | assert(a == b * c + a % b); // There is no case in which this doesn't hold 17 | return c; 18 | } 19 | 20 | function sub(uint256 a, uint256 b) internal pure returns (uint256) { 21 | assert(b <= a); 22 | return a - b; 23 | } 24 | 25 | function add(uint256 a, uint256 b) internal pure returns (uint256) { 26 | uint256 c = a + b; 27 | assert(c >= a); 28 | return c; 29 | } 30 | } 31 | 32 | contract IMultiArgue { 33 | function createArgueVote(uint256 _endTime, uint8 _argueType, address _argueContract) public returns(uint256); 34 | function approvedAddress(uint256 _argueNum, address _approvedAddress) public returns(bool); 35 | function setInvestSum(uint256 _argueNum, address _sender, uint256 _investSum) public returns(bool); 36 | function vote(uint256 _argueNum, uint8 _vote) public returns(bool); 37 | function getVote(uint256 _argueNum, address _voter) public view returns(uint8); 38 | function getGain(uint256 _argueNum) public view returns(uint256); 39 | function setWinners(uint256 _argueNum, uint8 _winner) public returns(bool); 40 | function releaseInterest(uint256 _argueNum, uint256 _value) public returns(bool); 41 | 42 | event CreateArgueVote(uint256 indexed argueNum, address indexed creater); 43 | event ApproveAddress(uint256 indexed argueNum, address indexed approvedAddress); 44 | event Vote(uint256 indexed argueNum, address indexed voter, uint8 indexed vote); 45 | event SetWinners(uint256 indexed argueNum, uint8 indexed winner); 46 | event ReleaseInterest(uint256 indexed argueNum, address indexed reciever, uint256 indexed value); 47 | } 48 | 49 | contract ISimpleArgue { 50 | function setArgueNum(uint256 _argueNum) public returns(bool); 51 | function setWinners(uint8 _winner) public returns(bool); 52 | function pay(address _reciever, uint256 _value) public returns(bool); 53 | } 54 | 55 | contract MultiArgue is IMultiArgue { 56 | using SafeMath for uint256; 57 | 58 | uint256 argueCount; 59 | uint8 constant NO_VOTE = 0; 60 | uint8 constant VOTE_NO = 1; 61 | uint8 constant VOTE_YES = 2; 62 | 63 | mapping (uint256 => uint256) startTime; 64 | mapping (uint256 => uint256) endTime; 65 | mapping (uint256 => uint8) argueType; 66 | mapping (uint256 => address) argueContract; 67 | mapping (uint256 => address) argueOwner; 68 | 69 | mapping (uint256 => mapping (address => bool)) public approvedAddress; 70 | mapping (uint256 => mapping (address => uint8)) public votes; 71 | mapping (uint256 => uint8) public voteWin; 72 | 73 | mapping (uint256 => uint256) totalInvestSumNo; 74 | mapping (uint256 => uint256) totalInvestSumYes; 75 | mapping (uint256 => mapping (address => uint256)) public investSum; 76 | mapping (uint256 => mapping (address => uint256)) releasedSum; 77 | 78 | function createArgueVote(uint256 _endTime, uint8 _argueType, address _argueContract) public returns(uint256) { 79 | uint256 currenctArgue = argueCount.add(1); 80 | startTime[currenctArgue] = now; 81 | endTime[currenctArgue] = _endTime; 82 | argueContract[currenctArgue] = _argueContract; 83 | address owner = msg.sender; 84 | argueOwner[currenctArgue] = owner; 85 | argueType[currenctArgue] = _argueType; 86 | argueCount = currenctArgue; 87 | ISimpleArgue simpleArgue_contract = ISimpleArgue(_argueContract); 88 | simpleArgue_contract.setArgueNum(currenctArgue); 89 | emit CreateArgueVote(currenctArgue, owner); 90 | return currenctArgue; 91 | } 92 | 93 | function approvedAddress(uint256 _argueNum, address _approvedAddress) public returns(bool) { 94 | require(msg.sender == argueOwner[_argueNum]); 95 | approvedAddress[_argueNum][_approvedAddress] = true; 96 | emit ApproveAddress(_argueNum, _approvedAddress); 97 | return true; 98 | } 99 | 100 | function setInvestSum(uint256 _argueNum, address _sender, uint256 _investSum) public returns(bool) { 101 | require(msg.sender == argueContract[_argueNum]); 102 | investSum[_argueNum][_sender] = investSum[_argueNum][_sender].add(_investSum); 103 | return true; 104 | } 105 | 106 | function vote(uint256 _argueNum, uint8 _vote) public returns(bool) { 107 | require(now < endTime[_argueNum]); 108 | if (argueType[_argueNum] == 1) { 109 | require(approvedAddress[_argueNum][msg.sender] == true); 110 | } 111 | require(votes[_argueNum][msg.sender] == NO_VOTE); 112 | require(_vote == VOTE_YES || _vote == VOTE_NO); 113 | uint256 _investSum = investSum[_argueNum][msg.sender]; 114 | require(_investSum > 0); 115 | if (_vote == VOTE_NO) { 116 | totalInvestSumNo[_argueNum] = totalInvestSumNo[_argueNum].add(_investSum); 117 | } else { 118 | totalInvestSumYes[_argueNum] = totalInvestSumYes[_argueNum].add(_investSum); 119 | } 120 | votes[_argueNum][msg.sender] = _vote; 121 | emit Vote(_argueNum, msg.sender, _vote); 122 | return true; 123 | } 124 | 125 | function getVote(uint256 _argueNum, address _voter) public view returns(uint8) { 126 | require(msg.sender == argueContract[_argueNum]); 127 | return votes[_argueNum][_voter]; 128 | } 129 | 130 | function getGain_(uint256 _argueNum, address _reciever) internal view returns(uint256) { 131 | require(votes[_argueNum][msg.sender] == voteWin[_argueNum]); 132 | if (voteWin[_argueNum] == VOTE_NO) { 133 | return investSum[_argueNum][_reciever].mul(totalInvestSumNo[_argueNum].add(totalInvestSumYes[_argueNum])).div(totalInvestSumNo[_argueNum]).sub(releasedSum[_argueNum][_reciever]); 134 | } else { 135 | return investSum[_argueNum][_reciever].mul(totalInvestSumNo[_argueNum].add(totalInvestSumYes[_argueNum])).div(totalInvestSumYes[_argueNum]).sub(releasedSum[_argueNum][_reciever]); 136 | } 137 | } 138 | 139 | function getGain(uint256 _argueNum) public view returns(uint256) { 140 | require(now > endTime[_argueNum]); 141 | return getGain_(_argueNum, msg.sender); 142 | } 143 | 144 | function setWinners(uint256 _argueNum, uint8 _winner) public returns(bool) { 145 | require(now > endTime[_argueNum]); 146 | require(msg.sender == argueContract[_argueNum]); 147 | voteWin[_argueNum] = _winner; 148 | emit SetWinners(_argueNum, _winner); 149 | return true; 150 | } 151 | 152 | function releaseInterest(uint256 _argueNum, uint256 _value) public returns(bool) { 153 | require(now >= endTime[_argueNum]); 154 | require(votes[_argueNum][msg.sender] == voteWin[_argueNum]); 155 | require(getGain_(_argueNum, msg.sender) > 0); 156 | ISimpleArgue simpleArgue_contract = ISimpleArgue(argueContract[_argueNum]); 157 | simpleArgue_contract.pay(msg.sender, _value); 158 | releasedSum[_argueNum][msg.sender] = releasedSum[_argueNum][msg.sender].add(_value); 159 | emit ReleaseInterest(_argueNum, msg.sender, _value); 160 | return true; 161 | } 162 | } -------------------------------------------------------------------------------- /EDU_Materials/tasks/CarMarketTask/web3/contractData.js: -------------------------------------------------------------------------------- 1 | const CONTRACT_ABI = [ 2 | { 3 | "constant": true, 4 | "inputs": [], 5 | "name": "carDealer", 6 | "outputs": [ 7 | { 8 | "name": "", 9 | "type": "address" 10 | } 11 | ], 12 | "payable": false, 13 | "stateMutability": "view", 14 | "type": "function" 15 | }, 16 | { 17 | "constant": true, 18 | "inputs": [ 19 | { 20 | "name": "", 21 | "type": "address" 22 | } 23 | ], 24 | "name": "carOwner", 25 | "outputs": [ 26 | { 27 | "name": "", 28 | "type": "uint256" 29 | } 30 | ], 31 | "payable": false, 32 | "stateMutability": "view", 33 | "type": "function" 34 | }, 35 | { 36 | "constant": true, 37 | "inputs": [ 38 | { 39 | "name": "", 40 | "type": "address" 41 | } 42 | ], 43 | "name": "isCarOwner", 44 | "outputs": [ 45 | { 46 | "name": "", 47 | "type": "uint8" 48 | } 49 | ], 50 | "payable": false, 51 | "stateMutability": "view", 52 | "type": "function" 53 | }, 54 | { 55 | "constant": true, 56 | "inputs": [ 57 | { 58 | "name": "_carOwnerID", 59 | "type": "uint256" 60 | } 61 | ], 62 | "name": "getOwnerCars", 63 | "outputs": [ 64 | { 65 | "name": "", 66 | "type": "uint256[6]" 67 | } 68 | ], 69 | "payable": false, 70 | "stateMutability": "view", 71 | "type": "function" 72 | }, 73 | { 74 | "constant": false, 75 | "inputs": [ 76 | { 77 | "name": "_carOwnerID", 78 | "type": "uint256" 79 | }, 80 | { 81 | "name": "_discount", 82 | "type": "uint256" 83 | } 84 | ], 85 | "name": "setCarOwnerDiscount", 86 | "outputs": [ 87 | { 88 | "name": "", 89 | "type": "bool" 90 | } 91 | ], 92 | "payable": false, 93 | "stateMutability": "nonpayable", 94 | "type": "function" 95 | }, 96 | { 97 | "constant": false, 98 | "inputs": [ 99 | { 100 | "name": "_price", 101 | "type": "uint256" 102 | }, 103 | { 104 | "name": "_manufacturer", 105 | "type": "string" 106 | }, 107 | { 108 | "name": "_model", 109 | "type": "string" 110 | }, 111 | { 112 | "name": "_config", 113 | "type": "uint256" 114 | }, 115 | { 116 | "name": "_petrolConsumptionPerMile", 117 | "type": "uint256" 118 | }, 119 | { 120 | "name": "_signature", 121 | "type": "bytes32" 122 | }, 123 | { 124 | "name": "_presence", 125 | "type": "bool" 126 | } 127 | ], 128 | "name": "addCar", 129 | "outputs": [ 130 | { 131 | "name": "", 132 | "type": "uint256" 133 | } 134 | ], 135 | "payable": false, 136 | "stateMutability": "nonpayable", 137 | "type": "function" 138 | }, 139 | { 140 | "constant": false, 141 | "inputs": [], 142 | "name": "releaseETH", 143 | "outputs": [ 144 | { 145 | "name": "", 146 | "type": "bool" 147 | } 148 | ], 149 | "payable": false, 150 | "stateMutability": "nonpayable", 151 | "type": "function" 152 | }, 153 | { 154 | "constant": false, 155 | "inputs": [ 156 | { 157 | "name": "_carID", 158 | "type": "uint256" 159 | } 160 | ], 161 | "name": "buyCar", 162 | "outputs": [], 163 | "payable": true, 164 | "stateMutability": "payable", 165 | "type": "function" 166 | }, 167 | { 168 | "constant": false, 169 | "inputs": [ 170 | { 171 | "name": "_carID", 172 | "type": "uint256" 173 | }, 174 | { 175 | "name": "_presence", 176 | "type": "bool" 177 | } 178 | ], 179 | "name": "editPresence", 180 | "outputs": [ 181 | { 182 | "name": "", 183 | "type": "bool" 184 | } 185 | ], 186 | "payable": false, 187 | "stateMutability": "nonpayable", 188 | "type": "function" 189 | }, 190 | { 191 | "constant": true, 192 | "inputs": [], 193 | "name": "MAX_CARS_PER_PERSON", 194 | "outputs": [ 195 | { 196 | "name": "", 197 | "type": "uint8" 198 | } 199 | ], 200 | "payable": false, 201 | "stateMutability": "view", 202 | "type": "function" 203 | }, 204 | { 205 | "constant": true, 206 | "inputs": [ 207 | { 208 | "name": "", 209 | "type": "uint256" 210 | } 211 | ], 212 | "name": "carOwners", 213 | "outputs": [ 214 | { 215 | "name": "addr", 216 | "type": "address" 217 | }, 218 | { 219 | "name": "discount", 220 | "type": "uint256" 221 | } 222 | ], 223 | "payable": false, 224 | "stateMutability": "view", 225 | "type": "function" 226 | }, 227 | { 228 | "constant": true, 229 | "inputs": [ 230 | { 231 | "name": "", 232 | "type": "uint256" 233 | } 234 | ], 235 | "name": "cars", 236 | "outputs": [ 237 | { 238 | "name": "price", 239 | "type": "uint256" 240 | }, 241 | { 242 | "name": "manufacturer", 243 | "type": "string" 244 | }, 245 | { 246 | "name": "petrolConsumptionPerMile", 247 | "type": "uint256" 248 | }, 249 | { 250 | "name": "signature", 251 | "type": "bytes32" 252 | }, 253 | { 254 | "name": "presence", 255 | "type": "bool" 256 | } 257 | ], 258 | "payable": false, 259 | "stateMutability": "view", 260 | "type": "function" 261 | }, 262 | { 263 | "inputs": [], 264 | "payable": false, 265 | "stateMutability": "nonpayable", 266 | "type": "constructor" 267 | }, 268 | { 269 | "anonymous": false, 270 | "inputs": [ 271 | { 272 | "indexed": false, 273 | "name": "carDealer", 274 | "type": "address" 275 | }, 276 | { 277 | "indexed": false, 278 | "name": "carID", 279 | "type": "uint256" 280 | } 281 | ], 282 | "name": "AddCar", 283 | "type": "event" 284 | }, 285 | { 286 | "anonymous": false, 287 | "inputs": [ 288 | { 289 | "indexed": false, 290 | "name": "carOnwerID", 291 | "type": "uint256" 292 | }, 293 | { 294 | "indexed": false, 295 | "name": "carOwnerAddress", 296 | "type": "address" 297 | } 298 | ], 299 | "name": "NewCarOwner", 300 | "type": "event" 301 | }, 302 | { 303 | "anonymous": false, 304 | "inputs": [ 305 | { 306 | "indexed": false, 307 | "name": "carID", 308 | "type": "uint256" 309 | }, 310 | { 311 | "indexed": false, 312 | "name": "carOwnerID", 313 | "type": "uint256" 314 | } 315 | ], 316 | "name": "BuyCar", 317 | "type": "event" 318 | }, 319 | { 320 | "anonymous": false, 321 | "inputs": [ 322 | { 323 | "indexed": false, 324 | "name": "carOwnerID", 325 | "type": "uint256" 326 | }, 327 | { 328 | "indexed": false, 329 | "name": "discount", 330 | "type": "uint256" 331 | } 332 | ], 333 | "name": "SetDiscount", 334 | "type": "event" 335 | }, 336 | { 337 | "anonymous": false, 338 | "inputs": [ 339 | { 340 | "indexed": false, 341 | "name": "carID", 342 | "type": "uint256" 343 | }, 344 | { 345 | "indexed": false, 346 | "name": "presence", 347 | "type": "bool" 348 | } 349 | ], 350 | "name": "EditPresence", 351 | "type": "event" 352 | } 353 | ]; 354 | 355 | const CONTRACT_ADDRESS = '0x159e7af9b7eb3b7f27ed93055b3bf7db07d12bd5'; -------------------------------------------------------------------------------- /CV/Степанов А. С/Task 1.md: -------------------------------------------------------------------------------- 1 | # Задача 1 2 | ### Исходный код 3 | ```sh 4 | pragma solidity ^0.4.11; 5 | 6 | //------------------------------------------------------------------------------------------------ 7 | // ERC20 Standard Token Implementation, based on ERC Standard: 8 | // https://github.com/ethereum/EIPs/issues/20 9 | // With some inspiration from ConsenSys HumanStandardToken as well 10 | // Copyright 2017 BattleDrome 11 | //------------------------------------------------------------------------------------------------ 12 | 13 | //------------------------------------------------------------------------------------------------ 14 | // LICENSE 15 | // 16 | // This file is part of BattleDrome. 17 | // 18 | // BattleDrome is free software: you can redistribute it and/or modify 19 | // it under the terms of the GNU General Public License as published by 20 | // the Free Software Foundation, either version 3 of the License, or 21 | // (at your option) any later version. 22 | // 23 | // BattleDrome is distributed in the hope that it will be useful, 24 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | // GNU General Public License for more details. 27 | // 28 | // You should have received a copy of the GNU General Public License 29 | // along with BattleDrome. If not, see . 30 | //------------------------------------------------------------------------------------------------ 31 | 32 | contract ERC20Standard { 33 | uint public totalSupply; 34 | 35 | string public name; 36 | uint8 public decimals; 37 | string public symbol; 38 | string public version; 39 | 40 | mapping (address => uint256) balances; 41 | mapping (address => mapping (address => uint)) allowed; 42 | 43 | //Fix for short address attack against ERC20 44 | modifier onlyPayloadSize(uint size) { 45 | assert(msg.data.length == size + 4); 46 | _; 47 | } 48 | 49 | function balanceOf(address _owner) constant returns (uint balance) { 50 | return balances[_owner]; 51 | } 52 | 53 | function transfer(address _recipient, uint _value) onlyPayloadSize(2*32) { 54 | require(balances[msg.sender] >= _value && _value > 0); 55 | balances[msg.sender] -= _value; 56 | balances[_recipient] += _value; 57 | Transfer(msg.sender, _recipient, _value); 58 | } 59 | 60 | function transferFrom(address _from, address _to, uint _value) { 61 | require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0); 62 | balances[_to] += _value; 63 | balances[_from] -= _value; 64 | allowed[_from][msg.sender] -= _value; 65 | Transfer(_from, _to, _value); 66 | } 67 | 68 | function approve(address _spender, uint _value) { 69 | allowed[msg.sender][_spender] = _value; 70 | Approval(msg.sender, _spender, _value); 71 | } 72 | 73 | function allowance(address _spender, address _owner) constant returns (uint balance) { 74 | return allowed[_owner][_spender]; 75 | } 76 | 77 | //Event which is triggered to log all transfers to this contract's event log 78 | event Transfer( 79 | address indexed _from, 80 | address indexed _to, 81 | uint _value 82 | ); 83 | 84 | //Event which is triggered whenever an owner approves a new allowance for a spender. 85 | event Approval( 86 | address indexed _owner, 87 | address indexed _spender, 88 | uint _value 89 | ); 90 | 91 | 92 | } 93 | 94 | contract NewToken is ERC20Standard { 95 | function NewToken() { 96 | totalSupply = 5000; 97 | name = "Bnkx Education Coin"; 98 | decimals = 5; 99 | symbol = "BEC"; 100 | version = "1.0"; 101 | balances[msg.sender] = totalSupply; 102 | } 103 | } 104 | ``` 105 | ### Адрес контракта: 0x72eedfa073dc26f3aeb51e5d92be3ba183d3237d 106 | 107 | ### Ссылка: https://rinkeby.etherscan.io/address/0x72eedfa073dc26f3aeb51e5d92be3ba183d3237d 108 | 109 | ### Код контракта: 110 | ```sh 111 | 0x6060604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063095ea7b31461013757806318160ddd1461017957806323b872dd146101a2578063313ce5671461020357806354fd4d501461023257806370a08231146102c057806395d89b411461030d578063a9059cbb1461039b578063dd62ed3e146103dd575b600080fd5b34156100b457600080fd5b6100bc610449565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fc5780820151818401526020810190506100e1565b50505050905090810190601f1680156101295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014257600080fd5b610177600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104e7565b005b341561018457600080fd5b61018c6105d1565b6040518082815260200191505060405180910390f35b34156101ad57600080fd5b610201600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105d7565b005b341561020e57600080fd5b610216610847565b604051808260ff1660ff16815260200191505060405180910390f35b341561023d57600080fd5b61024561085a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028557808201518184015260208101905061026a565b50505050905090810190601f1680156102b25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102cb57600080fd5b6102f7600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108f8565b6040518082815260200191505060405180910390f35b341561031857600080fd5b610320610941565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610360578082015181840152602081019050610345565b50505050905090810190601f16801561038d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103a657600080fd5b6103db600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109df565b005b34156103e857600080fd5b610433600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b51565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104df5780601f106104b4576101008083540402835291602001916104df565b820191906000526020600020905b8154815290600101906020018083116104c257829003601f168201915b505050505081565b80600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35050565b60005481565b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156106a2575080600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156106ae5750600081115b15156106b957600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600260009054906101000a900460ff1681565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f05780601f106108c5576101008083540402835291602001916108f0565b820191906000526020600020905b8154815290600101906020018083116108d357829003601f168201915b505050505081565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109d75780601f106109ac576101008083540402835291602001916109d7565b820191906000526020600020905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60406004810160003690501415156109f357fe5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610a425750600082115b1515610a4d57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3505050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a723058207f0ec2cbbf58e909c508db78ea22bbf306c1161c367c058db3731e7b6c821d070029 112 | ``` -------------------------------------------------------------------------------- /CV/deniskulakov/task1.md: -------------------------------------------------------------------------------- 1 | # Task 1. DKS token 2 | 3 | ## Created smart contract in Rinkeby: 4 | https://rinkeby.etherscan.io/address/0x5d02b9f7f8ea7d9f0cea61d7d9a12086f97bb461 5 | 6 | ## Contract source code: 7 | ``` 8 | pragma solidity ^0.4.17; 9 | 10 | import '../node_modules/zeppelin-solidity/contracts/token/StandardToken.sol'; 11 | 12 | contract DksToken is StandardToken { 13 | string public name = "DksToken"; 14 | string public symbol = "DKS"; 15 | uint8 public decimals = 2; 16 | uint public INITIAL_SUPPLY = 5000; 17 | 18 | function DksToken() public { 19 | totalSupply = INITIAL_SUPPLY; 20 | balances[msg.sender] = INITIAL_SUPPLY; 21 | } 22 | } 23 | ``` 24 | ## DKS token transfer to 0xc011bf81E3F88931cf331856E45FaB6B6450E54C: 25 | https://rinkeby.etherscan.io/tx/0x0fee5d3bdb753cfef47d01ab8392de49d0ae47b2e8cf8b4df8cecb265c48c556 26 | 27 | ## Contract Bytecode: 28 | 60606040526040805190810160405280600881526020017f446b73546f6b656e000000000000000000000000000000000000000000000000815250600390805190602001906200005192919062000123565b506040805190810160405280600381526020017f444b530000000000000000000000000000000000000000000000000000000000815250600490805190602001906200009f92919062000123565b506002600560006101000a81548160ff021916908360ff1602179055506113886006553415620000ce57600080fd5b600654600081905550600654600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550620001d2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200016657805160ff191683800117855562000197565b8280016001018555821562000197579182015b828111156200019657825182559160200191906001019062000179565b5b509050620001a69190620001aa565b5090565b620001cf91905b80821115620001cb576000816000905550600101620001b1565b5090565b90565b6112e680620001e26000396000f3006060604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100bf578063095ea7b31461014d57806318160ddd146101a757806323b872dd146101d05780632ff2e9dc14610249578063313ce5671461027257806366188463146102a157806370a08231146102fb57806395d89b4114610348578063a9059cbb146103d6578063d73dd62314610430578063dd62ed3e1461048a575b600080fd5b34156100ca57600080fd5b6100d26104f6565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101125780820151818401526020810190506100f7565b50505050905090810190601f16801561013f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015857600080fd5b61018d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610594565b604051808215151515815260200191505060405180910390f35b34156101b257600080fd5b6101ba610686565b6040518082815260200191505060405180910390f35b34156101db57600080fd5b61022f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061068c565b604051808215151515815260200191505060405180910390f35b341561025457600080fd5b61025c610a4b565b6040518082815260200191505060405180910390f35b341561027d57600080fd5b610285610a51565b604051808260ff1660ff16815260200191505060405180910390f35b34156102ac57600080fd5b6102e1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a64565b604051808215151515815260200191505060405180910390f35b341561030657600080fd5b610332600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cf5565b6040518082815260200191505060405180910390f35b341561035357600080fd5b61035b610d3e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561039b578082015181840152602081019050610380565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103e157600080fd5b610416600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ddc565b604051808215151515815260200191505060405180910390f35b341561043b57600080fd5b610470600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611000565b604051808215151515815260200191505060405180910390f35b341561049557600080fd5b6104e0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111fc565b6040518082815260200191505060405180910390f35b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561058c5780601f106105615761010080835404028352916020019161058c565b820191906000526020600020905b81548152906001019060200180831161056f57829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156106c957600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561071757600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107a257600080fd5b6107f482600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461128390919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061088982600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461129c90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061095b82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461128390919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60065481565b600560009054906101000a900460ff1681565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610b75576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c09565b610b88838261128390919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610dd45780601f10610da957610100808354040283529160200191610dd4565b820191906000526020600020905b815481529060010190602001808311610db757829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610e1957600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610e6757600080fd5b610eb982600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461128390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f4e82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461129c90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061109182600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461129c90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600082821115151561129157fe5b818303905092915050565b60008082840190508381101515156112b057fe5b80915050929150505600a165627a7a7230582076927ff3c8599471f773ace5627d36f886b23729c111e3d6f500404af12a7cc10029 29 | 30 | ## Contract ABI: 31 | [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"INITIAL_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}] -------------------------------------------------------------------------------- /EDU_Materials/examples/multi_argue/frontend/contractData.js: -------------------------------------------------------------------------------- 1 | const CONTRACT1_ABI_ARRAY = [ 2 | { 3 | "constant": false, 4 | "inputs": [ 5 | { 6 | "name": "_argueNum", 7 | "type": "uint256" 8 | }, 9 | { 10 | "name": "_approvedAddress", 11 | "type": "address" 12 | } 13 | ], 14 | "name": "approvedAddress", 15 | "outputs": [ 16 | { 17 | "name": "", 18 | "type": "bool" 19 | } 20 | ], 21 | "payable": false, 22 | "stateMutability": "nonpayable", 23 | "type": "function" 24 | }, 25 | { 26 | "constant": false, 27 | "inputs": [ 28 | { 29 | "name": "_endTime", 30 | "type": "uint256" 31 | }, 32 | { 33 | "name": "_argueType", 34 | "type": "uint8" 35 | }, 36 | { 37 | "name": "_argueContract", 38 | "type": "address" 39 | } 40 | ], 41 | "name": "createArgueVote", 42 | "outputs": [ 43 | { 44 | "name": "", 45 | "type": "uint256" 46 | } 47 | ], 48 | "payable": false, 49 | "stateMutability": "nonpayable", 50 | "type": "function" 51 | }, 52 | { 53 | "anonymous": false, 54 | "inputs": [ 55 | { 56 | "indexed": true, 57 | "name": "argueNum", 58 | "type": "uint256" 59 | }, 60 | { 61 | "indexed": true, 62 | "name": "creater", 63 | "type": "address" 64 | } 65 | ], 66 | "name": "CreateArgueVote", 67 | "type": "event" 68 | }, 69 | { 70 | "anonymous": false, 71 | "inputs": [ 72 | { 73 | "indexed": true, 74 | "name": "argueNum", 75 | "type": "uint256" 76 | }, 77 | { 78 | "indexed": true, 79 | "name": "approvedAddress", 80 | "type": "address" 81 | } 82 | ], 83 | "name": "ApproveAddress", 84 | "type": "event" 85 | }, 86 | { 87 | "constant": false, 88 | "inputs": [ 89 | { 90 | "name": "_argueNum", 91 | "type": "uint256" 92 | }, 93 | { 94 | "name": "_value", 95 | "type": "uint256" 96 | } 97 | ], 98 | "name": "releaseInterest", 99 | "outputs": [ 100 | { 101 | "name": "", 102 | "type": "bool" 103 | } 104 | ], 105 | "payable": false, 106 | "stateMutability": "nonpayable", 107 | "type": "function" 108 | }, 109 | { 110 | "constant": false, 111 | "inputs": [ 112 | { 113 | "name": "_argueNum", 114 | "type": "uint256" 115 | }, 116 | { 117 | "name": "_sender", 118 | "type": "address" 119 | }, 120 | { 121 | "name": "_investSum", 122 | "type": "uint256" 123 | } 124 | ], 125 | "name": "setInvestSum", 126 | "outputs": [ 127 | { 128 | "name": "", 129 | "type": "bool" 130 | } 131 | ], 132 | "payable": false, 133 | "stateMutability": "nonpayable", 134 | "type": "function" 135 | }, 136 | { 137 | "constant": false, 138 | "inputs": [ 139 | { 140 | "name": "_argueNum", 141 | "type": "uint256" 142 | }, 143 | { 144 | "name": "_winner", 145 | "type": "uint8" 146 | } 147 | ], 148 | "name": "setWinners", 149 | "outputs": [ 150 | { 151 | "name": "", 152 | "type": "bool" 153 | } 154 | ], 155 | "payable": false, 156 | "stateMutability": "nonpayable", 157 | "type": "function" 158 | }, 159 | { 160 | "constant": false, 161 | "inputs": [ 162 | { 163 | "name": "_argueNum", 164 | "type": "uint256" 165 | }, 166 | { 167 | "name": "_vote", 168 | "type": "uint8" 169 | } 170 | ], 171 | "name": "vote", 172 | "outputs": [ 173 | { 174 | "name": "", 175 | "type": "bool" 176 | } 177 | ], 178 | "payable": false, 179 | "stateMutability": "nonpayable", 180 | "type": "function" 181 | }, 182 | { 183 | "anonymous": false, 184 | "inputs": [ 185 | { 186 | "indexed": true, 187 | "name": "argueNum", 188 | "type": "uint256" 189 | }, 190 | { 191 | "indexed": true, 192 | "name": "voter", 193 | "type": "address" 194 | }, 195 | { 196 | "indexed": true, 197 | "name": "vote", 198 | "type": "uint8" 199 | } 200 | ], 201 | "name": "Vote", 202 | "type": "event" 203 | }, 204 | { 205 | "anonymous": false, 206 | "inputs": [ 207 | { 208 | "indexed": true, 209 | "name": "argueNum", 210 | "type": "uint256" 211 | }, 212 | { 213 | "indexed": true, 214 | "name": "winner", 215 | "type": "uint8" 216 | } 217 | ], 218 | "name": "SetWinners", 219 | "type": "event" 220 | }, 221 | { 222 | "anonymous": false, 223 | "inputs": [ 224 | { 225 | "indexed": true, 226 | "name": "argueNum", 227 | "type": "uint256" 228 | }, 229 | { 230 | "indexed": true, 231 | "name": "reciever", 232 | "type": "address" 233 | }, 234 | { 235 | "indexed": true, 236 | "name": "value", 237 | "type": "uint256" 238 | } 239 | ], 240 | "name": "ReleaseInterest", 241 | "type": "event" 242 | }, 243 | { 244 | "constant": true, 245 | "inputs": [ 246 | { 247 | "name": "_argueNum", 248 | "type": "uint256" 249 | } 250 | ], 251 | "name": "getGain", 252 | "outputs": [ 253 | { 254 | "name": "", 255 | "type": "uint256" 256 | } 257 | ], 258 | "payable": false, 259 | "stateMutability": "view", 260 | "type": "function" 261 | }, 262 | { 263 | "constant": true, 264 | "inputs": [ 265 | { 266 | "name": "_argueNum", 267 | "type": "uint256" 268 | }, 269 | { 270 | "name": "_voter", 271 | "type": "address" 272 | } 273 | ], 274 | "name": "getVote", 275 | "outputs": [ 276 | { 277 | "name": "", 278 | "type": "uint8" 279 | } 280 | ], 281 | "payable": false, 282 | "stateMutability": "view", 283 | "type": "function" 284 | }, 285 | { 286 | "constant": true, 287 | "inputs": [ 288 | { 289 | "name": "", 290 | "type": "uint256" 291 | }, 292 | { 293 | "name": "", 294 | "type": "address" 295 | } 296 | ], 297 | "name": "investSum", 298 | "outputs": [ 299 | { 300 | "name": "", 301 | "type": "uint256" 302 | } 303 | ], 304 | "payable": false, 305 | "stateMutability": "view", 306 | "type": "function" 307 | }, 308 | { 309 | "constant": true, 310 | "inputs": [ 311 | { 312 | "name": "", 313 | "type": "uint256" 314 | }, 315 | { 316 | "name": "", 317 | "type": "address" 318 | } 319 | ], 320 | "name": "votes", 321 | "outputs": [ 322 | { 323 | "name": "", 324 | "type": "uint8" 325 | } 326 | ], 327 | "payable": false, 328 | "stateMutability": "view", 329 | "type": "function" 330 | }, 331 | { 332 | "constant": true, 333 | "inputs": [ 334 | { 335 | "name": "", 336 | "type": "uint256" 337 | } 338 | ], 339 | "name": "voteWin", 340 | "outputs": [ 341 | { 342 | "name": "", 343 | "type": "uint8" 344 | } 345 | ], 346 | "payable": false, 347 | "stateMutability": "view", 348 | "type": "function" 349 | } 350 | ]; 351 | 352 | const DATA1 = '0x608060405234801561001057600080fd5b5061156b806100206000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630d7adbc0146100b45780631dadcc45146101035780632dcd4e41146101645780638ffbb9b1146101a5578063928e1ece146101f7578063943e82161461026557806395df45e4146102b7578063bbbf46221461031c578063bc3f931f1461038b578063c1441b09146103f2578063d23254b414610439575b600080fd5b3480156100c057600080fd5b506100e960048036038101908080359060200190929190803590602001909291905050506104a0565b604051808215151515815260200191505060405180910390f35b34801561010f57600080fd5b5061014e60048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061078a565b6040518082815260200191505060405180910390f35b34801561017057600080fd5b5061018f600480360381019080803590602001909291905050506107af565b6040518082815260200191505060405180910390f35b3480156101b157600080fd5b506101dd60048036038101908080359060200190929190803560ff1690602001909291905050506107e3565b604051808215151515815260200191505060405180910390f35b34801561020357600080fd5b5061024f60048036038101908080359060200190929190803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108da565b6040518082815260200191505060405180910390f35b34801561027157600080fd5b5061029d60048036038101908080359060200190929190803560ff169060200190929190505050610b01565b604051808215151515815260200191505060405180910390f35b3480156102c357600080fd5b5061030260048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e07565b604051808215151515815260200191505060405180910390f35b34801561032857600080fd5b5061037160048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f2d565b604051808215151515815260200191505060405180910390f35b34801561039757600080fd5b506103d660048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061105e565b604051808260ff1660ff16815260200191505060405180910390f35b3480156103fe57600080fd5b5061041d60048036038101908080359060200190929190505050611133565b604051808260ff1660ff16815260200191505060405180910390f35b34801561044557600080fd5b5061048460048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611153565b604051808260ff1660ff16815260200191505060405180910390f35b600080600260008581526020019081526020016000205442101515156104c557600080fd5b6008600085815260200190815260200160002060009054906101000a900460ff1660ff166007600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614151561055657600080fd5b60006105628533611182565b11151561056e57600080fd5b6004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663c407687633856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b505050506040513d602081101561067157600080fd5b8101908080519060200190929190505050506106e683600c600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149890919063ffffffff16565b600c600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550823373ffffffffffffffffffffffffffffffffffffffff16857f0b8d5a44a2545cef7e6d187400188ca406b29ee6ee13303f89458d662eac3d4760405160405180910390a4600191505092915050565b600b602052816000526040600020602052806000526040600020600091509150505481565b60006002600083815260200190815260200160002054421115156107d257600080fd5b6107dc8233611182565b9050919050565b600060026000848152602001908152602001600020544211151561080657600080fd5b6004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561087357600080fd5b816008600085815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508160ff16837f658d038dfd3a1248782e747e27e13157957a201c5b567ff7ec376ea1f905f80d60405160405180910390a36001905092915050565b6000806000806108f6600160005461149890919063ffffffff16565b9250426001600085815260200190815260200160002081905550866002600085815260200190815260200160002081905550846004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550339150816005600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550856003600085815260200190815260200160002060006101000a81548160ff021916908360ff160217905550826000819055508490508073ffffffffffffffffffffffffffffffffffffffff16639cce4ff4846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015610a7457600080fd5b505af1158015610a88573d6000803e3d6000fd5b505050506040513d6020811015610a9e57600080fd5b8101908080519060200190929190505050508173ffffffffffffffffffffffffffffffffffffffff16837f3f0f16b69bc1f17eeff2fd2759a38c1b3a42ab71480444bc84310c24e9c84d4e60405160405180910390a38293505050509392505050565b600080600260008581526020019081526020016000205442101515610b2557600080fd5b60016003600086815260200190815260200160002060009054906101000a900460ff1660ff161415610bc257600115156006600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141515610bc157600080fd5b5b600060ff166007600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff16141515610c3457600080fd5b600260ff168360ff161480610c4f5750600160ff168360ff16145b1515610c5a57600080fd5b600b600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081111515610cbc57600080fd5b600160ff168360ff161415610d0d57610cf181600960008781526020019081526020016000205461149890919063ffffffff16565b6009600086815260200190815260200160002081905550610d4b565b610d3381600a60008781526020019081526020016000205461149890919063ffffffff16565b600a6000868152602001908152602001600020819055505b826007600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508260ff163373ffffffffffffffffffffffffffffffffffffffff16857fe4cb5fdde90708dcd00ddb58b9b33a631db90db5fc195227ff5c7657700115b460405160405180910390a4600191505092915050565b60006005600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e7657600080fd5b60016006600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16837fe412586c0d1a0dbe4ea2dc6f4da5c45aeb8c9ffc1147a5421fb2febfd3b189a760405160405180910390a36001905092915050565b60006004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f9c57600080fd5b610fff82600b600087815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149890919063ffffffff16565b600b600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190509392505050565b60006004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110cd57600080fd5b6007600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60086020528060005260406000206000915054906101000a900460ff1681565b60076020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60006008600084815260200190815260200160002060009054906101000a900460ff1660ff166007600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff1614151561121557600080fd5b600160ff166008600085815260200190815260200160002060009054906101000a900460ff1660ff16141561136d57611366600c600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611358600960008781526020019081526020016000205461134a6112eb600a60008a815260200190815260200160002054600960008b81526020019081526020016000205461149890919063ffffffff16565b600b60008a815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b6114f190919063ffffffff16565b61152690919063ffffffff16565b9050611492565b61148f600c600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611481600a600087815260200190815260200160002054611473611414600a60008a815260200190815260200160002054600960008b81526020019081526020016000205461149890919063ffffffff16565b600b60008a815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b6114f190919063ffffffff16565b61152690919063ffffffff16565b90505b92915050565b60008082840190508381101515156114ac57fe5b8091505092915050565b60008060008414156114cb57600091506114ea565b82840290508284828115156114dc57fe5b041415156114e657fe5b8091505b5092915050565b60008082848115156114ff57fe5b049050828481151561150d57fe5b06818402018414151561151c57fe5b8091505092915050565b600082821115151561153457fe5b8183039050929150505600a165627a7a72305820f9173c68e86f558cb875fa62f0bd3fda805061d858801435b0ca1e377b9c7ee90029'; 353 | 354 | 355 | const CONTRACT1_ADDRESS = '0xcbdc7188f747c2ebe94a582f9dfe9a89b36f28e9'; 356 | 357 | const CONTRACT2_ABI_ARRAY = [ 358 | { 359 | "constant": false, 360 | "inputs": [ 361 | { 362 | "name": "_reciever", 363 | "type": "address" 364 | }, 365 | { 366 | "name": "_value", 367 | "type": "uint256" 368 | } 369 | ], 370 | "name": "pay", 371 | "outputs": [ 372 | { 373 | "name": "", 374 | "type": "bool" 375 | } 376 | ], 377 | "payable": false, 378 | "stateMutability": "nonpayable", 379 | "type": "function" 380 | }, 381 | { 382 | "constant": false, 383 | "inputs": [ 384 | { 385 | "name": "_argueNum", 386 | "type": "uint256" 387 | } 388 | ], 389 | "name": "setArgueNum", 390 | "outputs": [ 391 | { 392 | "name": "", 393 | "type": "bool" 394 | } 395 | ], 396 | "payable": false, 397 | "stateMutability": "nonpayable", 398 | "type": "function" 399 | }, 400 | { 401 | "constant": false, 402 | "inputs": [ 403 | { 404 | "name": "_winner", 405 | "type": "uint8" 406 | } 407 | ], 408 | "name": "setWinners", 409 | "outputs": [ 410 | { 411 | "name": "", 412 | "type": "bool" 413 | } 414 | ], 415 | "payable": false, 416 | "stateMutability": "nonpayable", 417 | "type": "function" 418 | }, 419 | { 420 | "inputs": [], 421 | "payable": false, 422 | "stateMutability": "nonpayable", 423 | "type": "constructor" 424 | }, 425 | { 426 | "payable": true, 427 | "stateMutability": "payable", 428 | "type": "fallback" 429 | }, 430 | { 431 | "constant": true, 432 | "inputs": [], 433 | "name": "argueNum", 434 | "outputs": [ 435 | { 436 | "name": "", 437 | "type": "uint256" 438 | } 439 | ], 440 | "payable": false, 441 | "stateMutability": "view", 442 | "type": "function" 443 | }, 444 | { 445 | "constant": true, 446 | "inputs": [], 447 | "name": "multiArgueContractAddress", 448 | "outputs": [ 449 | { 450 | "name": "", 451 | "type": "address" 452 | } 453 | ], 454 | "payable": false, 455 | "stateMutability": "view", 456 | "type": "function" 457 | } 458 | ]; 459 | 460 | const CONTRACT2_ADDRESS = '0xc492c7c93693bba0f0ff3dbb00ffc3d648b94bef'; 461 | --------------------------------------------------------------------------------