bosagora / boa-space-seaport-js Goto Github PK
View Code? Open in Web Editor NEWA JavaScript library to interface with the BoaSpace marketplace.
License: MIT License
A JavaScript library to interface with the BoaSpace marketplace.
License: MIT License
다음의 기능에 대한 Web3 코드를 작성합니다. 이 이슈는 boa-space-contracts의 #19 이슈에서 이관되었고, 모든 코드는 boa-space-seaport-js
라이브러리에 기반하여 작성합니다.
사용될 Consideration 컨트랙트 함수
주요 고려사항
고려되지 않는 사항
깃헙 CI workflow를 진행하면서 다음에 대한 사항을 체크하도록 한다.
We use the seaport module from boa-space-contracts
instead of the ProjectOpenSea/seaport
. But some errors occur when running the test. This is not critical in the current state but we should check why the errors occur.
The errors are as follows.
1) As a user I want to buy now or accept an offer
A single ERC721 is to be transferred
[Buy now] I want to buy a single ERC721
with ETH
ERC721 <=> ETH (already validated order):
AssertionError: Expected transaction to be reverted with InvalidSigner, but other exception was thrown: Error: VM Exception while processing transaction: reverted with custom error 'InvalidSignature()'
2) As a user I want to buy now or accept an offer
A single ERC721 is to be transferred
[Buy now] I want to buy a single ERC721
with ERC20
ERC721 <=> ERC20 (already validated order):
AssertionError: Expected transaction to be reverted with InvalidSigner, but other exception was thrown: Error: VM Exception while processing transaction: reverted with custom error 'InvalidSignature()'
3) As a user I want to buy now or accept an offer
A single ERC1155 is to be transferred
[Buy now] I want to buy a single ERC1155
with ETH
ERC1155 <=> ETH (already validated order):
AssertionError: Expected transaction to be reverted with InvalidSigner, but other exception was thrown: Error: VM Exception while processing transaction: reverted with custom error 'InvalidSignature()'
4) As a user I want to buy now or accept an offer
A single ERC1155 is to be transferred
[Buy now] I want to buy a single ERC1155
with ERC20
ERC1155 <=> ERC20 (already validated order):
AssertionError: Expected transaction to be reverted with InvalidSigner, but other exception was thrown: Error: VM Exception while processing transaction: reverted with
constants.ts 파일에 다음의 중요 상수가 정의되어 있으며, 이것들에 대한 세팅에 대한 정책을 다음과 같이 수립한다.
SEAPORT_CONTRACT_NAME (완료)
Seaport
프로토콜을 사용함으로, "Seaport"를 그대로 사용한다.SEAPORT_CONTRACT_VERSION (완료)
Seaport
프로토콜 1.1
을 사용함으로, "1.1"을 그대로 사용한다.OPENSEA_CONDUIT_KEY
OPENSEA_CONDUIT_ADDRESS:
CROSS_CHAIN_SEAPORT_ADDRESS
Seaport
컨트랙트의 주소를 세팅한다.DOMAIN_REGISTRY_ADDRESS
DomainRegistry
컨트랙트를 사용하지 않으므로 다음과 같이 Zero Address를 세팅한다.다음은 테스트넷과 메인넷에서 boa-space-seaport-js
의 Seaport
객체를 생성해서 사용할때의 코드의 예제이다.
const seaport = new Seaport(ethers.provider, {
overrides: {
contractAddress: "0x4F445109d11419c3612e43D2e71a3593921621E0", // 테스트넷에 배포된 Seaport 컨트랙트 주소
},
});
const seaport = new Seaport(ethers.provider); // 디폴트로 CROSS_CHAIN_SEAPORT_ADDRESS 값을 사용하게 됨.
./github/workflow/main.yaml에서
run: yarn install
이나 npm: npm install
에서 모두 이슈가 발생함으로 추가 조사 진행 필요. 여기 PR 참조
run: yarn install
의 경우 다음의 에러 발생
Run yarn install
/__w/_temp/0bb985ed-2427-4b2d-b8f8-4ccddaddc19e.sh: 1: yarn: not found
Error: Process completed with exit code 127.
로컬에서는 안 생기는 문제이고, 다시 조사할 필요 있음.
run: npm install
의 경우 다음의 에러 발생
npm WARN tarball tarball data for ltgt@https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz (sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==) seems to be corrupted. Trying again.
이 경우, 서버의 에러인것으로 보이고 기다려봐야할 것으로 보임.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.