Lab Assignment 1 Smart Contract
Lab Assignment 1 Smart Contract
Introduction to Solidity
There are a couple of languages we can use to program smart contract. Solidity, an object-
oriented and high-level language, is by far the most famous and well maintained one. We can
use Solidity to create various smart contracts which can be used in different scenarios,
including voting, blind auctions and safe remote purchase. In this lab, we will discuss the
semantics and syntax of Solidity with specific explanation, examples and practices. If you want
to find more information about Solidity, please check its official website at:
solidity.readthedocs.io.
After deciding the coding language, we need to pick an appropriate compiler. Among various
compilers like Visual Code Studio, we will use Remix IDE in this and following labs because it
can be directly accessed from browser where we can test, debug and deploy smart contracts
without any installation. Remix can be reached at its official website:
https://remix.ethereum.org/.
Do the following:
1. Create a file in solidity to declare variables of different data types and arrays (fixed
dynamic) and use a function to get their values.
2. Create a file in solidity to declare functions and experiment with its scope as
(public/private, pure/view and returns/no-returns.
3. Write Smart contracts to perform STACK and QUEUE operations in solidity.
4. Write different contracts in a single file with different functions to perform
multidimensional array operations.
5. Write smart contracts in solidity and call a function from contract1 to contract2 to give
input for solving quadratic equation and the computation need to done in function
declared in different contract.
Submit the file in PDF format only.