Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

EIP-1559 gas strategy

Aperta
#193 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Start by reading _get_tx_params and the library's gas strategy integration, which the issue identifies as the relevant entry points. Check how transaction parameters are assembled and how gas strategies supply values; done means the library has a documented or supported way to provide dynamic EIP-1559 fee parameters without editing the library's code.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi,

Love this library, really appreciate it!

I have been using some dynamic legacy gas strategies but would now like to transition to EIP-1559 and from what I can see the only way of doing this with this library without changing too much (which I don't want to do) is to hardcode the new params into '_get_tx_params'. However, by doing this it means I cannot give dynamic values like I could with using the web3 gas strategy (it looks like this is not supported for the new parameters also). What is the suggested way to do this for your library or is it just a case of editing the '_get_tx_params' function with something like this?

def _get_tx_params(self, value: Wei = Wei(0), gas: Wei = Wei(250000)) -> TxParams:
        my_values= personal_function_here()
        return {
            "from": _addr_to_str(self.address),
            "value": value,
            "gas": gas,
            "maxFeePerGas": my_values[0],
            "maxPriorityFeePerGas": my_values[1],
            "type": "0x2",
            "nonce": max(
                self.last_nonce, self.w3.eth.getTransactionCount(self.address)
            ),
 }

Ideally I don't want to touch your code at all but unless I am missing something you can't set the strategy on web3 anymore for this as that returns a gasPrice which we are obviously not wanting to use here. Thanks :)

Lingua principale
Python
Stelle
1k
Fork
373
Merge medio
4g 11h
PR unite (30g)
3

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di uniswap-python/uniswap-python

Tutte le issue di uniswap-python/uniswap-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.