전체 글40 [Docker] 명령어 이미지 올리기 docker-compose up 로그 보기 sudo docker-compose logs -f --tail 200 -f : 실시간으로 로그를 화면에 띄움 --tail : 마지막로그로부터 몇줄까지 화면에 띄울것인지 2023. 6. 12. [Solidity] 다른 contract 와 상호작용하기 contract 내부에서 블록체인 안에서 내가 소유하고 있지않은 다른 contract 와 상호작용(함수 호출 등)하는 방법 먼저 사용하고자 하는 contract 의 interface 를 정의해야 한다. contract NumberInterface { function getNum(address _myAddress) public view returns (uint); } 위와 같이 getNum 함수의 body(구현부)가 없다. 함수 마지막 (; 세미콜론)으로 바로 끝낸다. contract MyContract { address NumberInterfaceAddress = 0xab38... // ^ The address of the FavoriteNumber contract on Ethereum NumberInt.. 2022. 12. 9. [Solidity] internal vs private, external vs public internal contract의 해당 내용을 비공개 한다는 의미이다. contract 의 내부에서만 사용한다는 의미이다. stage variable 은 기본이 internal 이다. 상속받은 contract 에서 사용할 수 있다.(protected 와 비슷) private contract의 해당 내용을 비공개 한다는 의미이다. contract 의 내부에서만 사용한다는 의미이다. 상속받은 contract 에서 사용할 수 없다. external contract 의 interface 로 외부 공개 contract 의 외부에서 사용한다는 의미이다. state variable 은 external 이 될 수 없다. contract 내부에서 사용하려면 this 키워들를 이용해야 한다. contract MyExamp.. 2022. 12. 9. [Solidity] view 와 pure view storage state 를 읽을 수 있다. storage state 값을 변경할 수 없다. contract MyExample { uint myValue = 123; // storage state function testfunc() public view returns(uint) { uint newValue = myValue + 1; return newValue; } } pure storage state 를 읽을 수 없다. storage state 를 변경할 수 없다. contract MyExample { uint myValue = 123; // storage state function testfunc() public pure returns(uint) { //uint newValue = myVal.. 2022. 12. 8. [Ethereum] geth Private Network 계정을 MetaMask로 가져오기 METAMASK 설치는 아래 링크 참조 https://smilemugi.tistory.com/11 [Ethereum] 개발 환경 설정 이더리움(Ethereum) 이란, 스마트 컨트랙트(Smart Contract)를 실행할 수 있는 플랫폼이다. go,c++,python 등 다양한 언어로 이더리움을 구동할 수 있는 클라이언트가 개발되고 있으며, 현재 가장 많이 사용 smilemugi.tistory.com geth private network 설정은 아래 링크 참조 https://smilemugi.tistory.com/12 [Ethereum] Geth 로 Private Network 만들기 #1 Geth는 이더리움재단(Ethereum Foundation)이 제공하는 공식 클라이언트 소프트웨어로써, Go언어로 .. 2022. 12. 7. [Ethereum] Geth - 채굴 #2 Geth 로 Private Network 를 구성하고 https://smilemugi.tistory.com/12 [Ethereum] Geth 로 Private Network 만들기 #1 Geth는 이더리움재단(Ethereum Foundation)이 제공하는 공식 클라이언트 소프트웨어로써, Go언어로 개발되었다. Geth를 처음 시작하면 네트워크 내의 다른 이더리움 클라이언트(노드, node 라고도 함)에 smilemugi.tistory.com 채굴시 보상 받는 계정 설정 miner.setEtherbase(personal.listAccounts[0]) 채굴 시작(인자로 채굴에 사용될 쓰레드 수) miner.start(1) : null 이나 true 가 출력되면 정상적으로 시작된 것이다. 채굴 상태를 확인 .. 2022. 12. 7. 이전 1 2 3 4 5 6 7 다음