[x] adapter를 조금 더 개선해야합니다. (타입 문제가 자주 발생함) (solgen에서 개선 작업중)
[ ] 에러에 대한 유닛테스트. 지금은 happy path만 체크
[ ] e2e 테스트
[ ] data registry에 대한 고려가 없습니다.
[ ] merkle tree integration에 대한 고려가 없습니다.
[ ] consumer/controller 부분에 대한 개발이 남아있습니다.
[ ] warehouse에 대한 개발이 남아있습니다.
[x] 전반적인 type모델 개선이 남아있습니다.
[ ] p2p에 대한 개선이 남아있습니다.
내용
Ethereum 잔해 제거
Klaytn과 Ethereum을 함께 사용하는 경우, secp256k1 라이브러리가 충돌나면서 빌드가 안되는 문제가 생김.
그래서 모든 dependency에서 Ethereum을 제거했고 (airframe), 쓰더라도 최대한 ethereum의 crypto 라이브러리를 사용하지 않게 변경함.
Adapter구조 완성
Interface
Original Contract Bind => Contract Interface
Contract Manager => Contract Manager Interface
Usage
Contract Manager uses Contract Interface
Api Implementations uses Contract Manager Interface
의존성
ABIEncoderV2를 지원하는 Ethereum에서 abi를 가져온 포크를 사용함.
indexed event topic문제 해결 - Hex값이 거꾸로 되어 오는 이상한 경우
go.mod
replace github.com/klaytn/klaytn to github.com/frostornge/klaytn@custom-abi
replace git.apache.org/thrift.git to github.com/apache/thrift v0.12.0
makeTopics github.com/frostornge/klaytn/accounts/abi/bind/topics.go 참고
parseTopics github.com/frostornge/klaytn/accounts/abi/bind/topics.go 참고
API
에러메시지 수정 - 차후에는 타입을 따로 지정하여 최대한 대응할 수 있는 에러의 범위를 크게 할 것.
트랜잭션 에러를 internal error로 바꿈. 원래는 StatusConflict였음.
모든 리소스를 Create/Register할 때, existence를 체크한 뒤 있다면 StatusConflict를 리턴함.
이제 API의 모든 request, response에서 snake_case를 사용함.
지난 PR에서 남아있던 것들 & 해야할 것들
내용
Ethereum 잔해 제거
Klaytn과 Ethereum을 함께 사용하는 경우, secp256k1 라이브러리가 충돌나면서 빌드가 안되는 문제가 생김. 그래서 모든 dependency에서 Ethereum을 제거했고 (airframe), 쓰더라도 최대한 ethereum의 crypto 라이브러리를 사용하지 않게 변경함.
Adapter구조 완성
의존성
ABIEncoderV2를 지원하는 Ethereum에서 abi를 가져온 포크를 사용함. indexed event topic문제 해결 - Hex값이 거꾸로 되어 오는 이상한 경우
github.com/klaytn/klaytn
togithub.com/frostornge/klaytn@custom-abi
git.apache.org/thrift.git
togithub.com/apache/thrift v0.12.0
github.com/frostornge/klaytn/accounts/abi/bind/topics.go
참고github.com/frostornge/klaytn/accounts/abi/bind/topics.go
참고API
에러메시지 수정 - 차후에는 타입을 따로 지정하여 최대한 대응할 수 있는 에러의 범위를 크게 할 것. 트랜잭션 에러를 internal error로 바꿈. 원래는 StatusConflict였음. 모든 리소스를 Create/Register할 때, existence를 체크한 뒤 있다면 StatusConflict를 리턴함. 이제 API의 모든 request, response에서 snake_case를 사용함.