Skip to content

Commit

Permalink
implement relay metadata for shops
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderer committed Nov 17, 2023
1 parent 0b9d175 commit d59abbf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/store-reg.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import "lib/delegatable-sol/contracts/Delegatable.sol";
contract Store is ERC721Enumerable, Delegatable {
string public baseURI;
mapping(uint256 => bytes32) public storeRootHash;
mapping(uint256 => string[]) public relays;


constructor(
string memory _name,
Expand Down Expand Up @@ -38,6 +40,17 @@ contract Store is ERC721Enumerable, Delegatable {
storeRootHash[id] = hash;
}

function updateRelays(uint256 id, string[] memory _relays) public {
address owner = _ownerOf(id);
require(
msg.sender == owner ||
isApprovedForAll(owner, msg.sender) ||
msg.sender == getApproved(id),
"NOT_AUTHORIZED"
);
relays[id] = _relays;
}

function _msgSender()
internal
view
Expand Down

0 comments on commit d59abbf

Please sign in to comment.