Solidity
This page is a reduced version of the Solidity docs site that is adapted to Viction network to avoid overwhelming information.
Last updated
This page is a reduced version of the Solidity docs site that is adapted to Viction network to avoid overwhelming information.
Last updated
Solidity is a contract-oriented, high-level language for implementing smart contracts. It was influenced by Python and JavaScript and is designed to target the Ethereum Virtual Machine (EVM) both Ethereum and Viction.
Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features.
Viction support Solidity compiler version <=0.8.17, which targets London
hardfork in Ethereum. However, due the fee mechanism in Viction, BASEFEE
opcode is unused and not supported by the runtime.
For Solidity compiler version >=0.8.18, you may still compile and deploy to Viction. However, use it at your own risk.
The table below describes all the opcodes that isn't available in Viction:
Opcode | Description |
---|---|
As you will see, it is possible to create contracts for voting, crowdfunding, blind auctions, multi-signature wallets and more.
The best way to try out Solidity right now is using Remix (it can take a while to load, please be patient). Remix is a web browser-based IDE that allows you to write Solidity smart contracts, then deploy and run the smart contracts.
Once you're strong enough, on the next pages, we will first see a simple smart contract written in Solidity followed by the basics about blockchains and the Ethereum Virtual Machine.
The next section will explain several features of Solidity by giving useful example contracts. Remember that you can always try out the contracts in your browser!
The last and most extensive section will cover all aspects of Solidity in depth.
If you still have questions, you can try searching or asking on the Ethereum Stackexchange site, or come to our Gitter channel. Ideas for improving Solidity or this documentation are always welcome! the world:
BASEFEE
Return base fee of block, this using for https://eips.ethereum.org/EIPS/eip-1559 on London hardfork.
TLOAD
This opcode using for Access List Transaction Type, which hasn’t have any implement for now
TSTORE
This opcode using for Access List Transaction Type
PUSH0
This opcode pushes the constant value 0 onto the stack. It is generated in Solidity version 0.8.20 or higher.
INVALID
Improve the traces process.
BLOBHASH
Which is specific to DankSharing hardfork.