current position:Home>What is the problem that the version of the solid compiler cannot be matched after the truss compile prompt
What is the problem that the version of the solid compiler cannot be matched after the truss compile prompt
2022-02-03 20:51:14 【Q & A of Denglian community】
Take the answer 1:
Hello , This problem is because you are in the environment Truffle What is used Solidity The compiler version is inconsistent with the compiler version required by your contract code .
To look at first truffle Default solidity edition
truffle version
The current default compiler version will be displayed
Truffle v5.1.6 (core: 5.1.6)Solidity v0.5.12 (solc-js)Node v12.9.0Web3.js v1.2.1
Then check the compiler configuration in the project Configure in truffle-config.js In file , By default, there is no compilers
To configure ( see Truffle The configuration document ).
without , The default compiler version is used .
Modify compiler configuration
Because your contract is 0.5.12 Version for , So you can truffle-config.js In the definition of solc Compiler version requirements .
The code is as follows :
module.exports = { compilers: { solc: { version: "0.5.12", } }};
Other answers 1:
Other answers 2:
copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032051114298.html
The sidebar is recommended
- It is said on the Internet that three arrows bought "Adidas and gear", which is actually a fraud
- How will the global network and metauniverse affect international politics?
- GIS + blockchain, a new application scenario of geospatial data, is expected in the future
- The demand for NFT, a clothing luxury brand, has soared, and metauniverse may provide opportunities for transformation
- Curtis sword CSC coin star "Q coin mode" will be launched in January
- Adaoracle ecology and its decentralized Oracle network promote the development of blockchain
- a16z:Web3. 0 ecological panorama
- Development and application of blockchain in food industry
- Chat blockchain (III)
- Ethereum smart contract - building the basic environment
guess what you like
-
Founder of ENS: not only Eth, to be the domain name service provider of every digital resource in the world
-
A piece of land is 32 million. Why do real estate tycoons buy land in the virtual world?
-
Three minutes to understand why arbitrum TVL can lead in layer2
-
13th anniversary of bitcoin white paper, 13 key knowledge points
-
From didi to bitcoin, towards a new era of zero friction economy
-
Randomness in bitcoin
-
Blockchain private Chain NEW
-
Blockchain private chain
-
Blockchain game: unsustainable or is the future coming?
-
Chat blockchain (IV)
Random recommended
- What else does the meta universe lack? Immersive sound hasn't been customized for avatars yet
- Ethereum web3js calls smart contract and does not return transaction hash
- How is Block 0 confirmation implemented
- What are the testing tools for Ethereum smart contract?
- Why can't I display pictures in my wallet when I bind the tokenid with the hash returned from uploading to IPFs?
- TransferHelper: TRANSFER_ FROM_ FAILED
- How to solve the problem of solidness version and package?
- How can a token in Tron wave field and TRX Group LP, pair contract obtain the quantity of a token through LP?
- Using openzepplin library contract
- What was the initial POS consensus agreement?
- Introduction to blockchain
- What progress has filecoin made so far?
- What are the impacts of Libra compared with DCEP?
- What is a token in the blockchain?
- Is there any material that can make Xiaobai learn blockchain quickly?
- How to validate smart contracts?
- Can Ethereum's official wallet password be restored if you forget it?
- What is BiP
- How to convert byte type to integer uint in solidity
- How to convert bytes type into address type in solidity
- How to distinguish between contract address and ordinary account address?
- Can this be used in the smart contract constructor?
- Convert uint to bytes in solidity
- What does gas in Ethereum mean?
- How is the Ethereum contract address calculated?
- What Ethereum projects are suitable for beginners to learn solidity?
- Why create a new contract language, solid, instead of using other existing languages
- Can I get the hash of the transaction in the solidity function?
- How to delete an element at a certain position in an array in solidity?
- Does solid have a simple and universal storage model?
- Solidity: what is the difference between 'view' and 'constant'?
- How to determine whether a key exists in a mapping? Struct is defined in the library (in solidity).
- How does Sha3 / keccak256 in solidity calculate the cell hash value?
- Return and read a structure through Web3
- How do I know the compiled version of solidity I'm using
- What is an event?
- Should we use the private matemask node
- How to build a usdt wallet node based on erc20
- ZK snark how to set CRS if there is cyclic logic in the circuit
- When setting the default initiating account, the console reports an error: Web3 eth. defaultAccounts is not a function