일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- vue기초
- cloud hsm 서명
- 오블완
- ethers websocket
- Vue.js
- SBT표준
- cloud hsm
- 러스트 기초 학습
- redux toolkit 설명
- git rebase
- Vue
- 스마트컨트렉트 예약어 함수이름 중복
- 체인의정석
- 러스트 기초
- erc4337
- ethers type
- 머신러닝기초
- 스마트컨트렉트 함수이름 중복 호출
- ethers v6
- erc4337 contract
- 러스트기초
- ethers typescript
- 스마트 컨트렉트 함수이름 중복
- redux 기초
- ambiguous function description
- 계정추상화
- rust 기초
- cloud hsm 사용하기
- 티스토리챌린지
- 컨트렉트 동일한 함수이름 호출
- Today
- Total
목록전체 글 (526)
체인의정석
오픈씨의 wyvern Exchange 2.2 버전을 배포해야 하는데 solidity 0.4 버전의 오픈제플린이 필요했다. 0.4 대의 버전의 오픈 제플린 코드는 현재있는 npm에서 지원하지 않기 때문에 이미 deprecated 된 npm에서 설치해 주어야 한다. https://www.npmjs.com/package/openzeppelin-solidity?activeTab=versions openzeppelin-solidity Secure Smart Contract library for Solidity. Latest version: 4.6.0, last published: 2 months ago. Start using openzeppelin-solidity in your project by running ..
일단 개발환경으로는 자바스크립트 및 caver.js를 사용하였으며, 공식문서 구글 등등을 살펴봐도 계속해서 에러가 발생하여 깃허브의 코드를 참고 하였다. https://github.com/klaybank/arbitrager/blob/a2b82b9c6db933fd93968bd89a5a714dcfb02aa9/index.js GitHub - klaybank/arbitrager Contribute to klaybank/arbitrager development by creating an account on GitHub. github.com 1. ABI 에 대한 선언 ABI를 선언할 때 다양한 방법이 있겠지만 결국 JSON.parse를 하면서 공백을 제거해 주어야 한다. 내가 선택한 방법은 우선 따로 ABI를 모아..
EIP 1559 업데이트 이후 가스비 계산 방법이 매우 복잡해졌다. 근데 생각보다 해결방법은 간단한데 그 이유는 가스비를 계산해주는 모듈들이 나온 가스비에 곱하면 되는 가스비 상수들을 모두 실시간으로 지원해 주기 때문이다. 실제로 메인네트워크 배포까지 했는데 예측 가스비와 거의 근접한 값이 나오는 것을 확인하였다. 그렇다면 스마트컨트렉트를 작성하고 나서 테스트 코드를 작성하고. 실제 배포 전에 사용되는 가스비를 업데이트 하고 관리하려면? 상용화된 가스비를 계산해주는 api를 하나가져와서 실제 작성한 함수의 가스비를 곱해주면 되는 것이다. https://www.npmjs.com/package/eth-gas-reporter eth-gas-reporter Mocha reporter which shows gas..
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..