Add msg.sender to the triggered_by field in events

This commit is contained in:
EmperorOrokuSaki 2022-12-12 18:42:00 +03:30
parent ca177a0ffe
commit 3cf9be4528
1 changed files with 12 additions and 12 deletions

View File

@ -11,12 +11,12 @@ contract FleekERC721 is ERC721, FleekAccessControl {
using Strings for uint256; using Strings for uint256;
using Counters for Counters.Counter; using Counters for Counters.Counter;
event NewBuild(uint256 indexed token, string indexed commit_hash); event NewBuild(uint256 indexed token, string indexed commit_hash, address indexed triggered_by);
event NewTokenName(uint256 indexed token, string indexed name); event NewTokenName(uint256 indexed token, string indexed name, address indexed triggered_by);
event NewTokenDescription(uint256 indexed token, string indexed description); event NewTokenDescription(uint256 indexed token, string indexed description, address indexed triggered_by);
event NewTokenImage(uint256 indexed token, string indexed image); event NewTokenImage(uint256 indexed token, string indexed image, address indexed triggered_by);
event NewTokenExternalURL(uint256 indexed token, string indexed external_url); event NewTokenExternalURL(uint256 indexed token, string indexed external_url, address indexed triggered_by);
event NewTokenENS(uint256 indexed token, string indexed ENS); event NewTokenENS(uint256 indexed token, string indexed ENS, address indexed triggered_by);
struct Build { struct Build {
string commit_hash; string commit_hash;
@ -168,7 +168,7 @@ contract FleekERC721 is ERC721, FleekAccessControl {
) public virtual requireTokenController(tokenId) { ) public virtual requireTokenController(tokenId) {
_requireMinted(tokenId); _requireMinted(tokenId);
_apps[tokenId].external_url = _tokenExternalURL; _apps[tokenId].external_url = _tokenExternalURL;
emit NewTokenExternalURL(tokenId, _tokenExternalURL); emit NewTokenExternalURL(tokenId, _tokenExternalURL, msg.sender);
} }
function setTokenENS( function setTokenENS(
@ -177,7 +177,7 @@ contract FleekERC721 is ERC721, FleekAccessControl {
) public virtual requireTokenController(tokenId) { ) public virtual requireTokenController(tokenId) {
_requireMinted(tokenId); _requireMinted(tokenId);
_apps[tokenId].ENS = _tokenENS; _apps[tokenId].ENS = _tokenENS;
emit NewTokenENS(tokenId, _tokenENS); emit NewTokenENS(tokenId, _tokenENS, msg.sender);
} }
function setTokenName( function setTokenName(
@ -186,7 +186,7 @@ contract FleekERC721 is ERC721, FleekAccessControl {
) public virtual requireTokenController(tokenId) { ) public virtual requireTokenController(tokenId) {
_requireMinted(tokenId); _requireMinted(tokenId);
_apps[tokenId].name = _tokenName; _apps[tokenId].name = _tokenName;
emit NewTokenName(tokenId, _tokenName); emit NewTokenName(tokenId, _tokenName, msg.sender);
} }
function setTokenDescription( function setTokenDescription(
@ -195,7 +195,7 @@ contract FleekERC721 is ERC721, FleekAccessControl {
) public virtual requireTokenController(tokenId) { ) public virtual requireTokenController(tokenId) {
_requireMinted(tokenId); _requireMinted(tokenId);
_apps[tokenId].description = _tokenDescription; _apps[tokenId].description = _tokenDescription;
emit NewTokenDescription(tokenId, _tokenDescription); emit NewTokenDescription(tokenId, _tokenDescription, msg.sender);
} }
function setTokenImage( function setTokenImage(
@ -204,7 +204,7 @@ contract FleekERC721 is ERC721, FleekAccessControl {
) public virtual requireTokenController(tokenId) { ) public virtual requireTokenController(tokenId) {
_requireMinted(tokenId); _requireMinted(tokenId);
_apps[tokenId].image = _tokenImage; _apps[tokenId].image = _tokenImage;
emit NewTokenImage(tokenId, _tokenImage); emit NewTokenImage(tokenId, _tokenImage, msg.sender);
} }
function setTokenBuild( function setTokenBuild(
@ -219,7 +219,7 @@ contract FleekERC721 is ERC721, FleekAccessControl {
_git_repository, _git_repository,
_author _author
); );
emit NewBuild(tokenId, _commit_hash); emit NewBuild(tokenId, _commit_hash, msg.sender);
} }
function burn( function burn(