Compiling solana_rust_bot v0.1.0 (C:\solana_rust_bot)
error: expected item, found `;`
  --> src/lib.rs:36:2
   |
36 | };
   |  ^
   |
   = help: implementation declarations are not followed by a semicolon
help: remove this semicolon
   |
36 - };
36 + }
   |

error[E0428]: the name `RaydiumTrader` is defined multiple times
  --> src/lib.rs:46:1
   |
20 | pub struct RaydiumTrader {
   | ------------------------ previous definition of the type `RaydiumTrader` here
...
46 | pub struct RaydiumTrader {
   | ^^^^^^^^^^^^^^^^^^^^^^^^ `RaydiumTrader` redefined here
   |
   = note: `RaydiumTrader` must be defined only once in the type namespace of this module    

error[E0433]: failed to resolve: use of undeclared type `CommitmentConfig`
  --> src/lib.rs:82:13
   |
82 |             CommitmentConfig::confirmed(),
   |             ^^^^^^^^^^^^^^^^ use of undeclared type `CommitmentConfig`
   |
help: consider importing this struct
   |
2  + use solana_sdk::commitment_config::CommitmentConfig;
   |

warning: unused import: `instruction`
  --> src/lib.rs:14:33
   |
14 | use spl_token::{state::Account, instruction};
   |                                 ^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error[E0119]: conflicting implementations of trait `PyTypeInfo` for type `RaydiumTrader`     
  --> src/lib.rs:45:1
   |
19 | #[pyclass]
   | ---------- first implementation here
...
45 | #[pyclass]
   | ^^^^^^^^^^ conflicting implementation for `RaydiumTrader`
   |
   = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `PyClass` for type `RaydiumTrader`        
  --> src/lib.rs:45:1
   |
19 | #[pyclass]
   | ---------- first implementation here
...
45 | #[pyclass]
   | ^^^^^^^^^^ conflicting implementation for `RaydiumTrader`
   |
   = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `PyFunctionArgument<'_, '_>` for type `&RaydiumTrader`
  --> src/lib.rs:45:1
   |
19 | #[pyclass]
   | ---------- first implementation here
...
45 | #[pyclass]
   | ^^^^^^^^^^ conflicting implementation for `&RaydiumTrader`
   |
   = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `PyFunctionArgument<'_, '_>` for type `&mut RaydiumTrader`
  --> src/lib.rs:45:1
   |
19 | #[pyclass]
   | ---------- first implementation here
...
45 | #[pyclass]
   | ^^^^^^^^^^ conflicting implementation for `&mut RaydiumTrader`
   |
   = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `IntoPy<Py<PyAny>>` for type `RaydiumTrader`
  --> src/lib.rs:45:1
   |
19 | #[pyclass]
   | ---------- first implementation here
...
45 | #[pyclass]
   | ^^^^^^^^^^ conflicting implementation for `RaydiumTrader`
   |
   = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `PyClassImpl` for type `RaydiumTrader`    
  --> src/lib.rs:45:1
   |
19 | #[pyclass]
   | ---------- first implementation here
...
45 | #[pyclass]
   | ^^^^^^^^^^ conflicting implementation for `RaydiumTrader`
   |
   = note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `pyo3::impl_::pyclass::PyMethods<RaydiumTrader>` for type `pyo3::impl_::pyclass::PyClassImplCollector<RaydiumTrader>`
  --> src/lib.rs:53:1
   |
27 | #[pymethods]
   | ------------ first implementation here
...
53 | #[pymethods]
   | ^^^^^^^^^^^^ conflicting implementation for `pyo3::impl_::pyclass::PyClassImplCollector<RaydiumTrader>`
   |
   = note: this error originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0592]: duplicate definitions with name `get_token_balance`
   --> src/lib.rs:29:5
    |
29  |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `get_token_balance`
...
136 |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |     -------------------------------------------------------- other definition for `get_token_balance`

error[E0592]: duplicate definitions with name `__pymethod_get_token_balance__`
  --> src/lib.rs:27:1
   |
27 | #[pymethods]
   | ^^^^^^^^^^^^ duplicate definitions for `__pymethod_get_token_balance__`
...
53 | #[pymethods]
   | ------------ other definition for `__pymethod_get_token_balance__`
   |
   = note: this error originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no function or associated item named `from_str` found for struct `Pubkey` in the current scope
   --> src/lib.rs:31:30
    |
31  |         let pubkey = Pubkey::from_str(&token_account)?;
    |                              ^^^^^^^^ function or associated item not found in `Pubkey`
    |
note: if you're trying to build a new `Pubkey` consider using one of the following associated functions:
      Pubkey::new
      Pubkey::new_from_array
      Pubkey::new_rand
      Pubkey::new_unique
      and 2 others
   --> C:\Users\Orsen\.cargo\registry\src\index.crates.io-6f17d22bba15001f\solana-program-1.18.26\src\pubkey.rs:179:5
    |
179 |     pub fn new(pubkey_vec: &[u8]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
183 |     pub const fn new_from_array(pubkey_array: [u8; 32]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
189 |     pub fn new_rand() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
...
195 |     pub fn new_unique() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: items from traits can only be used if the trait is in scope
help: trait `FromStr` which provides `from_str` is implemented but not in scope; perhaps you want to import it
    |
2   + use std::str::FromStr;
    |
help: there is an associated function `from` with a similar name
    |
31  |         let pubkey = Pubkey::from(&token_account)?;
    |                              ~~~~

error[E0277]: `?` couldn't convert the error to `PyErr`
  --> src/lib.rs:32:59
   |
32 |         let account = self.rpc_client.get_account(&pubkey)?;
   |                                                           ^ the trait `From<solana_client::client_error::ClientError>` is not implemented for `PyErr`, which is required by `Result<f64, PyErr>: FromResidual<Result<std::convert::Infallible, solana_client::client_error::ClientError>>`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following other types implement trait `From<T>`:
             `PyErr` implements `From<&CancelledError>`
             `PyErr` implements `From<&IncompleteReadError>`
             `PyErr` implements `From<&InvalidStateError>`
             `PyErr` implements `From<&LimitOverrunError>`
             `PyErr` implements `From<&PanicException>`
             `PyErr` implements `From<&PyArithmeticError>`
             `PyErr` implements `From<&PyAssertionError>`
             `PyErr` implements `From<&PyAttributeError>`
           and 88 others
   = note: required for `Result<f64, PyErr>` to implement `FromResidual<Result<std::convert::Infallible, solana_client::client_error::ClientError>>`

error[E0034]: multiple applicable items in scope
  --> src/lib.rs:29:8
   |
29 |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
   |        ^^^^^^^^^^^^^^^^^ multiple `__pymethod_get_token_balance__` found
   |
note: candidate #1 is defined in an impl for the type `RaydiumTrader`
  --> src/lib.rs:27:1
   |
27 | #[pymethods]
   | ^^^^^^^^^^^^
note: candidate #2 is defined in an impl for the type `RaydiumTrader`
  --> src/lib.rs:53:1
   |
53 | #[pymethods]
   | ^^^^^^^^^^^^
   = note: this error originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0034]: multiple applicable items in scope
   --> src/lib.rs:29:8
    |
29  |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |        ^^^^^^^^^^^^^^^^^ multiple `get_token_balance` found
    |
note: candidate #1 is defined in an impl for the type `RaydiumTrader`
   --> src/lib.rs:29:5
    |
29  |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl for the type `RaydiumTrader`
   --> src/lib.rs:136:5
    |
136 |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `from_str` found for struct `Pubkey` in the current scope
   --> src/lib.rs:97:35
    |
97  |         let pool_pubkey = Pubkey::from_str(pool)
    |                                   ^^^^^^^^ function or associated item not found in `Pubkey`
    |
note: if you're trying to build a new `Pubkey` consider using one of the following associated functions:
      Pubkey::new
      Pubkey::new_from_array
      Pubkey::new_rand
      Pubkey::new_unique
      and 2 others
   --> C:\Users\Orsen\.cargo\registry\src\index.crates.io-6f17d22bba15001f\solana-program-1.18.26\src\pubkey.rs:179:5
    |
179 |     pub fn new(pubkey_vec: &[u8]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
183 |     pub const fn new_from_array(pubkey_array: [u8; 32]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
189 |     pub fn new_rand() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
...
195 |     pub fn new_unique() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: items from traits can only be used if the trait is in scope
help: trait `FromStr` which provides `from_str` is implemented but not in scope; perhaps you want to import it
    |
2   + use std::str::FromStr;
    |
help: there is an associated function `from` with a similar name
    |
97  |         let pool_pubkey = Pubkey::from(pool)
    |                                   ~~~~

error[E0599]: no function or associated item named `from_str` found for struct `Pubkey` in the current scope
   --> src/lib.rs:138:30
    |
138 |         let pubkey = Pubkey::from_str(&token_account)
    |                              ^^^^^^^^ function or associated item not found in `Pubkey`
    |
note: if you're trying to build a new `Pubkey` consider using one of the following associated functions:
      Pubkey::new
      Pubkey::new_from_array
      Pubkey::new_rand
      Pubkey::new_unique
      and 2 others
   --> C:\Users\Orsen\.cargo\registry\src\index.crates.io-6f17d22bba15001f\solana-program-1.18.26\src\pubkey.rs:179:5
    |
179 |     pub fn new(pubkey_vec: &[u8]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
183 |     pub const fn new_from_array(pubkey_array: [u8; 32]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
189 |     pub fn new_rand() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
...
195 |     pub fn new_unique() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: items from traits can only be used if the trait is in scope
help: trait `FromStr` which provides `from_str` is implemented but not in scope; perhaps you want to import it
    |
2   + use std::str::FromStr;
    |
help: there is an associated function `from` with a similar name
    |
138 |         let pubkey = Pubkey::from(&token_account)
    |                              ~~~~

error[E0599]: no function or associated item named `from_str` found for struct `Pubkey` in the current scope
   --> src/lib.rs:152:35
    |
152 |         let mint_pubkey = Pubkey::from_str(mint).unwrap();
    |                                   ^^^^^^^^ function or associated item not found in `Pubkey`
    |
note: if you're trying to build a new `Pubkey` consider using one of the following associated functions:
      Pubkey::new
      Pubkey::new_from_array
      Pubkey::new_rand
      Pubkey::new_unique
      and 2 others
   --> C:\Users\Orsen\.cargo\registry\src\index.crates.io-6f17d22bba15001f\solana-program-1.18.26\src\pubkey.rs:179:5
    |
179 |     pub fn new(pubkey_vec: &[u8]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
183 |     pub const fn new_from_array(pubkey_array: [u8; 32]) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
189 |     pub fn new_rand() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
...
195 |     pub fn new_unique() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: items from traits can only be used if the trait is in scope
help: trait `FromStr` which provides `from_str` is implemented but not in scope; perhaps you want to import it
    |
2   + use std::str::FromStr;
    |
help: there is an associated function `from` with a similar name
    |
152 |         let mint_pubkey = Pubkey::from(mint).unwrap();
    |                                   ~~~~

error[E0034]: multiple applicable items in scope
   --> src/lib.rs:136:8
    |
136 |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |        ^^^^^^^^^^^^^^^^^ multiple `__pymethod_get_token_balance__` found
    |
note: candidate #1 is defined in an impl for the type `RaydiumTrader`
   --> src/lib.rs:27:1
    |
27  | #[pymethods]
    | ^^^^^^^^^^^^
note: candidate #2 is defined in an impl for the type `RaydiumTrader`
   --> src/lib.rs:53:1
    |
53  | #[pymethods]
    | ^^^^^^^^^^^^
    = note: this error originates in the attribute macro `pymethods` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0034]: multiple applicable items in scope
   --> src/lib.rs:136:8
    |
136 |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |        ^^^^^^^^^^^^^^^^^ multiple `get_token_balance` found
    |
note: candidate #1 is defined in an impl for the type `RaydiumTrader`
   --> src/lib.rs:29:5
    |
29  |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl for the type `RaydiumTrader`
   --> src/lib.rs:136:5
    |
136 |     fn get_token_balance(&self, mint: &str) -> PyResult<f64> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0034, E0119, E0277, E0428, E0433, E0592, E0599.    
For more information about an error, try `rustc --explain E0034`.
warning: `solana_rust_bot` (lib) generated 1 warning
error: could not compile `solana_rust_bot` (lib) due to 21 previous errors; 1 warning emitted
2024-11-23T01:48:44.894085Z  INFO build_wheels: maturin::build_context: close time.busy=624ms
 time.idle=1.40µs
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--jobs" "16" "--message-format" "json-render-diagnostics" "--manifest-path" "C:\\solana_rust_bot\\Cargo.toml" "--release" "--lib"`
(quantum_beast) PS C:\solana_rust_bot>