Skip to content

Commit

Permalink
backend: Use new sapphire-contracts SiweAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Jul 12, 2024
1 parent 4bbab76 commit 296b961
Show file tree
Hide file tree
Showing 11 changed files with 4,707 additions and 4,138 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand Down
218 changes: 0 additions & 218 deletions backend/contracts/DateTime.sol

This file was deleted.

6 changes: 3 additions & 3 deletions backend/contracts/MessageBox.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./SiweAuth.sol";
import "@oasisprotocol/sapphire-contracts/contracts/auth/SiweAuth.sol";

contract MessageBox is SiweAuth {
string private _message;
address public author;

modifier _authorOnly(bytes calldata bearer) {
modifier authorOnly(bytes calldata bearer) {
if (authMsgSender(bearer) != author) {
revert("not allowed");
}
Expand All @@ -22,7 +22,7 @@ contract MessageBox is SiweAuth {
author = msg.sender;
}

function message(bytes calldata bearer) external view _authorOnly(bearer) returns (string memory) {
function message(bytes calldata bearer) external view authorOnly(bearer) returns (string memory) {
return _message;
}
}
Loading

0 comments on commit 296b961

Please sign in to comment.