Code Monkey home page Code Monkey logo

chainlink-avinash's Introduction

Chainlink qa-assessment

This repo contains the test contract, go files and the bash script to execute and get the desired output.

This solution uses SepoliaETH and Alchemy app to test the given smart contract. The go program sets SetUint256 and gets the value that it was set to. And prints the contract address and the value onto the console.

Please note that due to unknown reasons deployContract was not generated by abigen. Hence I had to use the address of manually uploaded contract to sepolia.

The docker image with ubuntu, golang, Private key and API key environment variables has been uploaded to 'avidock16/chainlink:qa-assessment'. And it should be available in the docker public repo.

Below are the detailed steps to execute the solution,

  1. On the terminal, run docker pull avidock16/chainlink:qa-assessment
  2. then run docker run -i -t <image_id> /bin/bash

you should be taken to the bash terminal of your container.

3.then run, sed -i.bak 's/\r$//' runSetGet.sh Please note the above step is needed because of windows line endings on unix.

  1. Finally run, bash runSetGet.sh

You will see this in the output, {"Contract Address" : "0xe7C127f12Dbc68f4114281B82dC1a5DB6515f0A7", "Value set" : "101"}

and if you run the command ls, you will also see that there is an output.json file with the above content. Please note that I was unable to get the wallet address programmatically, hence did not wanna just pass it as ENV variable to print it out.

chainlink-avinash's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.