gakonst / opensea-rs Goto Github PK
View Code? Open in Web Editor NEWRust client to Opensea's APIs and Ethereum smart contracts
Rust client to Opensea's APIs and Ethereum smart contracts
Hi there.
Running cargo check
is giving me the following error:
Compiling ethers-contract-abigen v0.5.4
error: 1 positional argument in format string, but no arguments were given
--> (redacted)/.cargo/registry/src/github.com-1ecc6299db9ec823/ethers-contract-abigen-0.5.4/src/source.rs:93:46
|
93 | .map_err(|_| anyhow!("root path '{}' is not absolute"))?;
| ^^
error: could not compile `ethers-contract-abigen` due to previous error
When I provide "long" (widespread at OpenSea shared contract) nft.ids
, it returns error. E.g.
cargo run prices --nft.address 0x495f947276749ce646f68ac8c248420045cb7b5e --nft.ids 96475701516811371815276227977766131962669887094423874457871336890511147401221
Output:
thread 'main' panicked at 'Integer overflow when casting to u64', /Users/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/primitive-types-0.9.1/src/lib.rs:38:1
Same happens if provide via csv --nft.ids_path
.
Seems like it's trying to convert this string to integer somewhere.
Would be great to have an option to set gas limit w/ cargo run buy --eth.gas
cause 300k gas limit nowadays may return [Out of gas] error.
https://github.com/gakonst/opensea-rs/blob/master/opensea/src/lib.rs#L200
C:\Users\Windows\Documents\opensea-rs-master>cargo run prices
Compiling ethers-providers v0.5.4
error[E0432]: unresolved import tokio::net::UnixStream
--> C:\Users\Windows.cargo\registry\src\github.com-1ecc6299db9ec823\ethers-providers-0.5.4\src\transports\ipc.rs:22:5
|
22 | net::UnixStream,
| ^^^^^^^^^^^^^^^ no UnixStream
in net
error[E0599]: no function or associated item named connect
found for struct ipc::Ipc
in the current scope
--> C:\Users\Windows.cargo\registry\src\github.com-1ecc6299db9ec823\ethers-providers-0.5.4\src\provider.rs:919:31
|
919 | let ipc = crate::Ipc::connect(path).await?;
| ^^^^^^^ function or associated item not found in ipc::Ipc
|
::: C:\Users\Windows.cargo\registry\src\github.com-1ecc6299db9ec823\ethers-providers-0.5.4\src\transports\ipc.rs:30:1
|
30 | pub struct Ipc {
| -------------- function or associated item connect
not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item connect
, perhaps you need to implement one of them:
candidate #1: hyper::client::connect::sealed::Connect
candidate #2: hyper::client::connect::sealed::ConnectSvc
Hi,
First of all thanks for opensourcing this. I am totally new to rust and experiencing some issues.
But a notable one (that might actually be an issue) is the following :
#[serde(deserialize_with = "u256_from_dec_str")] pub current_price: U256,
has problems with how I receive price from opensea as follows :
"current_price": "65000000000000000.00000000000"
To replicate the error you can just add the price above in orders.json and run cargo test
For now I did fix it like :
pub fn u256_from_dec_str<'de, D>(deserializer: D) -> Result<U256, D::Error>
where
D: de::Deserializer<'de>,
{
let s: &str = de::Deserialize::deserialize(deserializer)?;
let s: &str = &s.replace(".", "");
U256::from_dec_str(s).map_err(de::Error::custom)
}```
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.