tomusdrw / rust-web3

Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library. ENS address: rust-web3.eth
MIT License
1.45k stars 471 forks source link

EIP-1559 from contract #542

Closed JamesSmith2 closed 3 years ago

JamesSmith2 commented 3 years ago

Hello,

Trying to create a signed_call_with_confirmations from contract, but still get legacy tx. (Using latest git version). What i'm missing here? TX type is set U64: 2

` contract.signed_call_with_confirmations(

                        &data.contract_field,
                        (U256::from_dec_str(&data.contract_amount).unwrap(),),
                        Options {
                            transaction_type: Some(transaction_type),
                            access_list: None,
                            gas_price: None,
                            // gas_price: Some(conversion::get_conversion_value(
                            //     &format!("{}", gas_price),
                            //     "ether",
                            //     "gwei",
                            // )),
                            max_fee_per_gas: Some(conversion::get_conversion_value(
                                &format!("{}", gas_price),
                                "ether",
                                "gwei",
                            )),
                            max_priority_fee_per_gas: Some(conversion::get_conversion_value(
                                &format!("{}", gas_price),
                                "ether",
                                "gwei",
                            )),
                            gas: Some(conversion::get_conversion_value(
                                &format!("{}", gas),
                                "gwei",
                                "gwei",
                            )),
                            value: Some(conversion::get_conversion_value(
                                &data.contract_buy,
                                "ether",
                                "wei",
                            )),
                            condition: None,
                            nonce: Some(transaction_id),
                        },
                        1,
                        &prvk,
                    )
                    .await`
JamesSmith2 commented 3 years ago

Ok got it working, missing parameters in mod.rs file.