looksrare / sdk-v2 Goto Github PK
View Code? Open in Web Editor NEWTypescript SDK to interact with LooksRare V2 contracts
License: MIT License
Typescript SDK to interact with LooksRare V2 contracts
License: MIT License
Find and implement a test coverage tool
Please describe your problem
I don't think there's a good reason for this package to require contracts-exchange-v2
as a dependency. It then requires all consumers of this package to also install a bunch of contract related libraries that serve no purpose in a FE/client repo, and it's really only used for types right now (has no functionality).
Describe the solution you'd like
I would recommend moving this to a dev dependency, then calling typechain on the contracts on those, all utilizing devDependencies
Additional context
The reason I brought this up is because we are currently using this package as a dependency and there's currently a security vulnerability in one of the downstream dependencies @openzeppelin/contracts
Then thought that it was weird for this package to be relying on that in the first place
Create maker order functions will require several on chain read operations (approvals check, royalties, strategy fees) so we need a multicall support in order to reduce the number of rpc requests.
https://www.npmjs.com/package/@0xsequence/multicall provides the best interface to work with ethers, however I have some concerns about the package size.
In order to improve devX: make transferItemsAcrossCollection
accept an array of objects, that it then deconstructs into the format required by the contract. I.e.
{
to: "0x000",
transferData: [
{
collection: "0x000",
assetType: "XYZ",
itemIds: ["1", "2", "3"],
amounts: ["1", "1", "1"],
},
{
collection: "0x001",
assetType: "XYZ",
itemIds: ["1"],
amounts: ["1"],
},
]
};
Raw calls in utils helpers will cause a problem if the client need to the contract's write methods analysis. Seaport came up with a good design where they return the analysis functions + the call function, and let the client use them.
We need to either use this system, or wrap an estimateGas call in each write transaction.
Update new Taker structure and add additional params for collection offers
Any reason that this SDK only supports node 18 and lower? Kind of restricting when installing this as a dependency
Transfer functions are not yet implemented in the LooksRare object.
These functions need a better test coverage as well.
LooksRare/contracts-exchange-v2#372
Following this PR, Solidity will revert for any new merkle tree that contains more than 1,024 orders (2**10 = 1,024).
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.