| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
- cloud hsm 사용하기
- Vue.js
- git rebase
- cloud hsm
- 스마트 컨트렉트 함수이름 중복
- redux toolkit 설명
- 스마트컨트렉트 함수이름 중복 호출
- Vue
- 체인의정석
- ethers websocket
- 머신러닝기초
- ethers v6
- redux 기초
- 계정추상화
- cloud hsm 서명
- 오블완
- ethers typescript
- rust 기초
- 컨트렉트 동일한 함수이름 호출
- vue기초
- erc4337
- 러스트기초
- 티스토리챌린지
- ethers type
- ambiguous function description
- 스마트컨트렉트 예약어 함수이름 중복
- 러스트 기초
- SBT표준
- 러스트 기초 학습
- erc4337 contract
- Today
- Total
목록전체 글 (531)
체인의정석
1. solidity coverage를 사용하여 라인 커버리지를 100%까지 올려야 한다. https://www.npmjs.com/package/solidity-coverage solidity-coverage [][18]  [][20] [ => { expect(await ContractName.fuctionName(input)).to.deep.equal([1]); }) //스마트컨트렉트의 결과 값 : returns (uint256[] memory) 그러나 배열안의 숫자가 Bignumber 형태로 리턴되어서 오류가 났다. A..
클레이튼 환경에서의 개발 및 배포를 위하여 ABI를 모듈로 만들고 이를 불러와서 사용하는 작업을 진행하였다. 먼저 ABI를 모듈로 만드는 부분은 다음과 같이 진행된다. const ExampleABI = [...] module.exports = { ExampleABI } 그럼 이걸 가져오는 파일에서는 아래와 같이 코드를 작성할 수 있다. https://web3js.readthedocs.io/en/v1.7.3/web3-eth-contract.html web3.eth.Contract — web3.js 1.0.0 documentation The web3.eth.Contract object makes it easy to interact with smart contracts on the ethereum blockc..
스마트컨트렉트에서 Encode와 Decode를 할 때는 아래와 같이 encode, decode 함수를 사용하여서 할 수 있다. contract Encode { function encode(string memory _string1, uint _uint, string memory _string2) public pure returns (bytes memory) { return (abi.encode(_string1, _uint, _string2)); } function decode(bytes memory data) public pure returns (string memory _str1, uint _number, string memory _str2) { (_str1, _number, _str2) = abi.de..
한 환경에서 배포를 다양하게 해야할 경우 migration을 사용하여서 배포가 가능하다. https://trufflesuite.com/docs/truffle/reference/truffle-commands/ Truffle Commands - Truffle Suite Truffle Commands This section will describe every command available in the Truffle application. Usage All commands are in the following form: truffle [options] Passing no arguments is equivalent to truffle help, which will display a list of all comm..
가나슈의 경우 UI가 되어 있는 버전도 있지만 CLI에서 사용가능한 버전도 있다고 한다. 특히 최근에는 그냥 기본 rpc test에서 지원이 된다고 한다. https://github.com/trufflesuite/ganache/tree/master GitHub - trufflesuite/ganache: A tool for creating a local blockchain for fast Ethereum development. A tool for creating a local blockchain for fast Ethereum development. - GitHub - trufflesuite/ganache: A tool for creating a local blockchain for fast Ethereu..
이런식으로 작성한 컨트렉트에 대한 UML은 코드로 쉽게 만들 수 있다. 바로 npm link sol2uml --only=production\n sudo npm link sol2uml --only=production\n sol2uml ./ERC721TravelRuleExtension.sol\n 이 순서대로 명령어를 실행하면 된다. sol2uml 명령어는 컨트렉트가 있는 장소로 지정해주어야 해당 장소에 UML이 생성되며 컨트렉트를 직접 지정할 경우 하나의 UML이 나오게 되고 컨트렉트의 최상단 경로에서 사용할 때는 전체 UML 구조가 나오게 된다. 이를 이용해서 산출물을 빠르게 만들 수 있다.
1. 데이터를 bytes 형태로 사용하는 경우 먼저 encode 후에 decode 를 해서 데이터를 컨트렉트 간에 보내지만 다시 풀어내야 하는 경우가 있다. 이 경우 bytes memory Data 이런식으로 bytes 자료형에 memory를 명시하여 데이터를 받는다. solidity에서의 사용 uint256 uintData = abi.decode(bytes(Data), (uint256)); 만약 숫자형의 데이터를 넣어서 풀 경우 위와 같이 풀어서 decode를 하면 원래의 값을 가져와서 사용할 수 있다. 상황에 따라서 다른 데이터를 보내는 컨트렉트 구조를 짤때 위와 같이 응용이 가능하다. (폴리곤 브릿지에서 모든 토큰 유형의 자산을 지원할때도 사용 이러한 경우 데이터를 넣을때는 다음과 같이 코드를 짠다..