Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

89
Vistas
Get a variable from Github

I have a json file that's an ABI for a smart contract. I am building a site in Webflow, but due to the 10000 character custom code limit, I need to host the json for the smart contract elsewhere.

I have it on Github at: https://github.com/learyjk/baddognft/blob/main/ABI.js

What I would like to do is have a variable in the custom code section of Webflow and just be able to call ABI so that I can instantiate a web3 contract. I was able to get it working using gitcdn.link but it's not working anymore for some reason.

Another option I played around with but wasn't able to get working were $.get("link here"). I also tried jsdelivr

but I keep getting "ABI not defined" error.

Thanks!

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You need to grab the raw version of the file from github, try changing the link to this:

https://raw.githubusercontent.com/learyjk/baddognft/main/ABI.js

Looking at the file though, you have var ABI = [// your stuff]. Which is invalid json. You have the extension correct so maybe that was just a typo in your question...

7 months 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 empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.