불편함을 무릎쓰고 토큰 발행 샘픔을 한번 돌려 보기로 한다.

솔리디티는 그냥 바로 코드를 직관적으로 볼수 있지만 ,,,, 아이콘은 python 부분인데

zip파일로 압축되어서 deploy되어 다운로드 받아서 열어 볼수 있다.

 

솔리디티 제작이 꽤나 어려워서 그런지,,, 결국 WASM을 컴파일?! 되어서 올라가지 싶

싶은 왜 이렇게 개발자가 불편하게 제작하였는지 모르겠다.

 

여튼 token소스로 한번 POC해보고 샘픔을 하나 하나 뜯어볼 생각이다.

블로그 이미지

iesay

,

https://www.icondev.io/docs/part-1-helloworld-on-local-emulated-environment

 

Part 1. HelloWorld on local emulated environment

## Install T-Bears (Docker) - Install Docker [[Get Started with Docker](https://www.docker.com/get-started)] - Install T-Bears and run the container. Below command will download tbears docker image, create a container, start the container, and attach your

www.icondev.io

 

snap install docker

docker run -it -p 127.0.0.1:9000:9000 -p 127.0.0.1:5000:5000 --rm ibriz/icon-workshop:latest

 

아이콘 테스트넷(여이도)를 버추얼박스에 구동한 것이다.

 

지갑은 알아서 잘 설치 하시고 ㅎㅎ  ICONex  크롬 플러그인 형태로 되어 있다.

여이도로 테스트넷도 잘 변경 하시고,,

10분 마다 20ICX식 코인을 준다 .

http://52.88.70.222/

 

구글 통해서 메일을 보내면 100 ICX를 보내 준다.

구글에서 생성한 키스토어는 잘 백업을 해놓아야 된다. 나중에 docker 내부에서 deploy 할떄 사용 된다.

 

이더리움은 MetaMask와 remix에서 ropstone테스트넷을 편하게 작업 할수 있는데 ,,

더 최신으로 나온 메인넷이 더 불편하다.

파란색 부분이 tx이고   u 뒷부분은 테스트넷을 가르친다. 매번 해주는게 속편하다.

config에서 파일 내용을 수정했음에도 불그구고 반영이 잘 안되는거 같다.

root@e3c558b878a6:/tbears# tbears deploy hello_world -k keystore_test1 -p 패스워드
Send deploy request successfully.
If you want to check SCORE deployed successfully, execute txresult command
transaction hash: 0x05eb7c6a2896dd663ae9b1b7dcfa000302408ef6a5deb0030dec589d1bbfdf72

 

 

 

root@e58bee10c63d:/tbears/icon-dice-roll# tbears txresult 0xb61f94a8f4edde2929eb 6d4909a7a2689eebca418f8549ca84057bedb0f8a9ee -u https://bicon.net.solidwallet.io /api/v3

 


Transaction result: {
"jsonrpc": "2.0",
"result": {
"txHash": "0xb61f94a8f4edde2929eb6d4909a7a2689eebca418f8549ca84057bedb0f 8a9ee",
"blockHeight": "0x6ffbb",
"blockHash": "0x8c7a1b8afdb3aa45e5770ee536e7de54e0465047cde1462854d1d438 30d5d32b",
"txIndex": "0x0",
"to": "cx0000000000000000000000000000000000000000",
"scoreAddress": "cx03ae895604c327a423db7c6b479bf7df3f2ad65d",
"stepUsed": "0x3ebd4208",
"stepPrice": "0x2540be400",
"cumulativeStepUsed": "0x3ebd4208",
"eventLogs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000",
"status": "0x1"
},
"id": 1
}

 

 

https://bicon.tracker.solidwallet.io/transaction/0xb61f94a8f4edde2929eb6d4909a7a2689eebca418f8549ca84057bedb0f8a9ee

 

 

 

 

 

scoreAddress가 스마트컨트렉 주소에 해당 되는걸 알수 있다.

https://bicon.tracker.solidwallet.io/contract/cx03ae895604c327a423db7c6b479bf7df3f2ad65d

 

잔액 조회

tbears balance hx040fe47c7a7827684aa4c0bfcfdbbbdbb3ec3b6a -u https://bicon.net.solidwallet.io/api/v3
balance in hex: 0x56bc75e2d63100000
balance in decimal: 100   000000000000000000
root@52ff571eb880:/tbears/icon-dice-roll/keystores#

소수점은 18자리 까지 있다. 너무 좀 과도 한거 같기도 하다.

 

icon-dice -roll에 hello_world 출력하는 구문을 작성해 보았다.

/tbears/icon-dice-roll에

keystore_test1

tbears_cli_config.json

가져다 놓고

 

packge.json


"version": "0.0.1",
"main_file": "diceroll",
"main_score": "diceroll"
}

diceroll.py

from iconservice import *

class diceroll(IconScoreBase):

def __init__(self, db: IconScoreDatabase) -> None:
super().__init__(db)

def on_install(self) -> None:
super().on_install()

def on_update(self) -> None:
super().on_update()

@external(readonly=True)
def hello(self) -> str:
return "Hello"

dice_roll로 디렉토리를 두고 실행은

tbears deploy dice_roll -k keystore_test1 -p 패스워드

실행하면 된다.

처음 디플로이 할때 디렉토리를 디플로이 해주는 형태인거 같다.

 

 

 

 

 

 

 

 

 

'아이콘(ICON)' 카테고리의 다른 글

Python(파이썬) 웹프레임워크 - Django(장고)  (0) 2019.06.26
아이콘 DB  (0) 2019.05.30
아이콘 개발환경(윈도우)  (0) 2019.05.29
아이콘 스마트컨트렉 분석(dice_roll)  (0) 2019.05.27
클라우드 세일  (0) 2019.05.23
블로그 이미지

iesay

,

시놀리지 NAS 구매한 사람은 시놀리지 쓰고

해놀리지라도 쓰고 싶은분은 빈 PC에 해놀리지 구축 하면 된다.

https://blog.djjproject.com/202

 

 

설치가 다 끝나면 아래와 같은 모습을 볼수 있다.

http://192.168.0.146:5000/

admin // 패스워드

 

 

putty로 ROOT권한을 받을러면

admin // 패스워드

sudo su -

admin패스워드와 동일하게 입력한다.

 

 

 

1] ckeditor 설치

https://github.com/a-ono/redmine_ckeditor

 

레드마인은 시놀리지에서 패키지에서 설치하면 된다.

http://192.168.0.146:30002/  접속이 가능하다 초기 패스워드는 admin // admin 이다.

 

 

버전에 맞는걸 설치하고

 

 

데스크탑에서 경로

/home/redmine/data/plugins

 

 

레드마인 플러그인이 설치될 경로

/home/redmine/redmine/plugins

아래 경로에 git clone에서 받아도 된다.

 

cd .. 한단계 위로 와서

 

bundle install --without development test


rake redmine:plugins:migrate RAILS_ENV=production

두개의 명령어를 설치 해주고

 

레드마인을 재실행 하면 된다.

 

가끔 nginx 에러라고 보는데 브라우저 쿠키를 삭제하고 재시작 하면 된다.

 

 

 


클립보드 이미지를 곧바로 첨부하기                                      
https://github.com/peclik/clipboard_image_paste
git clone https://github.com/peclik/clipboard_image_paste.gitplugins/clipboard_image_paste

애자일 : http://www.redmine.org/plugins/redmine_agile   

체크리스트 : http://www.redmine.org/plugins/redmine_checklists     O

ckeditor https://github.com/a-ono/redmine_ckeditor/releases/tag/1.1.7

일감 닫기 버튼 : http://www.redmine.org/plugins/redmine_close_button

 

문서 화면 심플하게 표시 : http://www.redmine.org/plugins/redmine_documents_short

 

관리 로그                                                              
https://github.com/haru/redmine_logs

 

모든 설치시 저 위에 명령어 두개를 치고

레드마인 restart 하면 된다.

 

 mv redmine_checklists-3_1_15-l ight.zip ../../redmine/plugins/
 

 

 

 

'시스템' 카테고리의 다른 글

vscode , 버추얼박스  (0) 2019.11.05
버추얼박스 VT-x is not available 오류  (1) 2019.07.18
pm2  (0) 2019.03.28
nodejs - form submit  (0) 2019.01.22
nodejs + mariadb 연동  (0) 2019.01.14
블로그 이미지

iesay

,