Skip to content

Commit

Permalink
forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tadad committed Jan 29, 2025
1 parent 0f17ebc commit 1ada338
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions script/DeployChainRead.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import {Script, console} from "forge-std/Script.sol";
import {Html} from "../src/Html.sol";

contract CounterScript is Script {
Html public html ;
Html public html;

function setUp() public {}

function run() public {
vm.startBroadcast();

string memory page = vm.readFile("./pages/readfromchain.html");
html = new Html(page);

Expand Down
4 changes: 2 additions & 2 deletions script/DeployHelloWorld.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import {Script, console} from "forge-std/Script.sol";
import {Html} from "../src/Html.sol";

contract CounterScript is Script {
Html public html ;
Html public html;

function setUp() public {}

function run() public {
vm.startBroadcast();

string memory page = vm.readFile("./pages/helloworld.html");
html = new Html(page);

Expand Down
5 changes: 3 additions & 2 deletions src/Html.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./IHtml.sol";

/*
* The simplest possible HTML contract. Anyone can update the page, with no permissions.
*/
contract Html is IHtml{
contract Html is IHtml {
string private html;

// roughly 640gas/character
Expand All @@ -20,4 +21,4 @@ contract Html is IHtml{
function POST(bytes memory) external pure returns (string memory) {
return "POST reqeusts not supported";
}
}
}
3 changes: 2 additions & 1 deletion src/HtmlOwnable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./IHtml.sol";
import "../lib/openzeppelin-contracts/contracts/access/Ownable.sol";

Expand All @@ -26,4 +27,4 @@ contract Html is IHtml, Ownable {
function POST(bytes memory) public pure returns (string memory) {
return "POST reqeusts not supported";
}
}
}
2 changes: 1 addition & 1 deletion src/IHtml.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ interface IHtml {
function GET(string memory path) external view returns (string memory);

function POST(bytes memory payload) external returns (string memory);
}
}

0 comments on commit 1ada338

Please sign in to comment.