You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
I am new to truffle and blockchain world and I have tried following a youtube video to make this project. But I am getting an error in deploying the contract.
Uncaught (in promise) Error: TodoList has not been deployed to detected network (network/artifact mismatch)
at truffle-contract.js:456:17
at async Object.loadContract (app.js:60:20)
at async Object.load (app.js:13:5)
Forgive me for the rudeness as it is my first issue.
TodoList.sol
pragma solidity ^0.5.0;
contract TodoList{
uint public taskCount=0;
struct Task{
uint id;
string taskName;
bool completed;
}
mapping(uint => Task) public tasks;
constructor () public {
createTask("Start doig tasks now :)");
}
function createTask(string memory content) public {
taskCount++;
tasks[taskCount] = Task(taskCount,content,false);
}
}
Issue
I am new to truffle and blockchain world and I have tried following a youtube video to make this project. But I am getting an error in deploying the contract.
Uncaught (in promise) Error: TodoList has not been deployed to detected network (network/artifact mismatch)
at truffle-contract.js:456:17
at async Object.loadContract (app.js:60:20)
at async Object.load (app.js:13:5)
Forgive me for the rudeness as it is my first issue.
TodoList.sol
app.js
2_deploy_contracts.js
Environment
truffle version):Truffle v5.0.2 (core: 5.0.2)
Solidity v0.5.0 (solc-js)
node --version): v16.15.0npm --version): 8.12.1