-
Notifications
You must be signed in to change notification settings - Fork 2.3k
When i run truffle test following errors occure #3962
Comments
I believe that warning comes from the Solidity compiler which is telling you to put a license identifier in your contracts. This takes the following form at the top of your Solidity source files:
where MIT is the type of license. If you add these that warning should go away. Cheers! |
@coderbang1 oh I seemed to miss the error below the SPDX warning. Are you sure you deployed your contract? Can you share your test? |
i will.... can you help me with this? i want to send a certain portion to a specific address with every transaction in Smart Contract |
Sure I will, just share your project with me and I'll take a look for errors. I need to see your code as well as the steps to reproduce the error. |
here is the code....
|
Can you provide me with the entire project? I can't troubleshoot deployment issues by just looking at your tests. |
this is a smart contract...i want to add functionally like: send a certain portion to a specific address with every transaction in Smart Contract |
You should check out the metacoin box for an example. https://github.com/truffle-box/metacoin-box |
Hi @coderbang1, we're closing this for issue maintenance. Please comment if you'd like us to reopen. thanks! |
Issue
When i run truffle test following errors occur..
Compiling your contracts...
√ Fetching solc version list from solc-bin. Attempt #1
--> /F/pracdap/contracts/SimpleSmartContract.sol
Contract: SimpleSmartContract
1) should be deployed
> No events were emitted
0 passing (130ms)
1 failing
should be deployed:
Error: SimpleSmartContract has not been deployed to detected network (network/artifact mismatch)
at Object.checkNetworkArtifactMatch (F:\node\node_modules\truffle\build\webpack:\packages\contract\lib\utils\index.js:245:1)
at Function.deployed (F:\node\node_modules\truffle\build\webpack:\packages\contract\lib\contract\constructorMethods.js:88:1)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at Context. (test\simpleSmartContract.js:5:33)
Steps to Reproduce
Please provide the shortest amount of steps to reproduce your issue.
Expected Behavior
it should run successfully
Actual Results
Error: SimpleSmartContract has not been deployed to detected network (network/artifact mismatch)
Environment
Operating System: windows 10
Ethereum client:
Truffle version (
truffle version
):Truffle v5.2.6 (core: 5.2.6)node version (
node --version
):Node v14.16.0npm version (
npm --version
): 6.14.11The text was updated successfully, but these errors were encountered: