Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

202
Vistas
Send Tokens through RPC API (Metamask)

I was doing a USDC transaction on the Ropsten network but in the Metamask documentation I didn't see any place where transactions with tokens were directly touched, I was trying some things I found without success. An example of what I found I took from How to send some custom tokens with MetaMask API?

ethereum.request({
  method: "eth_sendTransaction",
  params: [
    {
      from: ethereum.selectedAddress,
      to: "0x07865c6E87B9F70255377e024ace6630C1Eaa37F",
      data: tokenContract.methods
        .transfer("My Wallet", "0.0001")
        .encodeABI(),
    }
  ]
});

The problem here is that tokenContract is not defined and I have no idea how to define it

I also found VERY old and really obsolete answers, where mostly web3js is used (And MetaMask doesn't allow to work with web3js anymore as far as I understand, I've already tried it).

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

In the example above, tokenContract is address of the token that you want to transfer. Each token contract is deployed on some address, see for example USDT or DAI.

Also, web3js does support MetaMask, see this answer for an example implementation. But MetaMask no longer injects web3js, so that you need to import web3js into the web app separately (previously it was possible to use web3 injected by MM).

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda