This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "contracts/StudentManager.sol": { | |
| "__sources__": { | |
| "contracts/StudentManager.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ncontract StudentManager {\r\n\r\n \r\n address public owner;\r\n\r\n \r\n constructor() {\r\n owner = msg.sender;\r\n }\r\n\r\n \r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"Only owner can add students\");\r\n _;\r\n }\r\n\r\n \r\n struct Student {\r\n string name;\r\n uint rollNumber;\r\n uint marks;\r\n bool pass;\r\n }\r\n\r\n \r\n Student[] public students;\r\n\r\n \r\n function checkPass(uint _marks) public pure returns (bool) {\r\n if (_marks >= 50) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n \r\n function addStudent(string memory _name, uint _roll, uint _marks) public onlyOwner {\r\n require(_roll > 0, \"Roll number must be grea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "contracts/StudentManager.sol": { | |
| "__sources__": { | |
| "contracts/StudentManager.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ncontract StudentManager {\r\n\r\n \r\n address public owner;\r\n\r\n \r\n constructor() {\r\n owner = msg.sender;\r\n }\r\n\r\n \r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"Only owner can add students\");\r\n _;\r\n }\r\n\r\n \r\n struct Student {\r\n string name;\r\n uint rollNumber;\r\n uint marks;\r\n bool pass;\r\n }\r\n\r\n \r\n Student[] public students;\r\n\r\n \r\n function checkPass(uint _marks) public pure returns (bool) {\r\n if (_marks >= 50) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n \r\n function addStudent(string memory _name, uint _roll, uint _marks) public onlyOwner {\r\n require(_roll > 0, \"Roll number must be grea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "contracts/StudentManager.sol": { | |
| "__sources__": { | |
| "contracts/StudentManager.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ncontract StudentManager {\r\n\r\n \r\n address public owner;\r\n\r\n \r\n constructor() {\r\n owner = msg.sender;\r\n }\r\n\r\n \r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"Only owner can add students\");\r\n _;\r\n }\r\n\r\n \r\n struct Student {\r\n string name;\r\n uint rollNumber;\r\n uint marks;\r\n bool pass;\r\n }\r\n\r\n \r\n Student[] public students;\r\n\r\n \r\n function checkPass(uint _marks) public pure returns (bool) {\r\n if (_marks >= 50) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n \r\n function addStudent(string memory _name, uint _roll, uint _marks) public onlyOwner {\r\n require(_roll > 0, \"Roll number must be grea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "contracts/StudentManager.sol": { | |
| "__sources__": { | |
| "contracts/StudentManager.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ncontract StudentManager {\r\n\r\n \r\n address public owner;\r\n\r\n \r\n constructor() {\r\n owner = msg.sender;\r\n }\r\n\r\n \r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"Only owner can add students\");\r\n _;\r\n }\r\n\r\n \r\n struct Student {\r\n string name;\r\n uint rollNumber;\r\n uint marks;\r\n bool pass;\r\n }\r\n\r\n \r\n Student[] public students;\r\n\r\n \r\n function checkPass(uint _marks) public pure returns (bool) {\r\n if (_marks >= 50) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n \r\n function addStudent(string memory _name, uint _roll, uint _marks) public onlyOwner {\r\n require(_roll > 0, \"Roll number must be grea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "contracts/StudentManager.sol": { | |
| "__sources__": { | |
| "contracts/StudentManager.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ncontract StudentManager {\r\n\r\n \r\n address public owner;\r\n\r\n \r\n constructor() {\r\n owner = msg.sender;\r\n }\r\n\r\n \r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"Only owner can add students\");\r\n _;\r\n }\r\n\r\n \r\n struct Student {\r\n string name;\r\n uint rollNumber;\r\n uint marks;\r\n bool pass;\r\n }\r\n\r\n \r\n Student[] public students;\r\n\r\n \r\n function checkPass(uint _marks) public pure returns (bool) {\r\n if (_marks >= 50) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n \r\n function addStudent(string memory _name, uint _roll, uint _marks) public onlyOwner {\r\n require(_roll > 0, \"Roll number must be grea |