From 44db1b2dd700728a909f998a29532075d545bcf8 Mon Sep 17 00:00:00 2001 From: Noah Figueras <33466101+noahfigueras@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:38:30 -0800 Subject: [PATCH 1/2] Update StarNotary.sol --- .../starNotaryv2/contracts/StarNotary.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol b/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol index 249a15b8..6fec56a1 100644 --- a/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol +++ b/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol @@ -10,7 +10,10 @@ contract StarNotary is ERC721 { mapping(uint256 => Star) public tokenIdToStarInfo; mapping(uint256 => uint256) public starsForSale; - + + //Initialize ERC721 Token + constructor() ERC721("Star", "STR") public { + } // Create Star using the Struct function createStar(string memory _name, uint256 _tokenId) public { From 34e33e6a6ba52bc7b91c37ec720b90e6c38a6393 Mon Sep 17 00:00:00 2001 From: Noah Figueras <33466101+noahfigueras@users.noreply.github.com> Date: Tue, 10 Nov 2020 19:57:03 -0800 Subject: [PATCH 2/2] Update StarNotary.sol --- .../starNotaryv2/contracts/StarNotary.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol b/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol index 6fec56a1..117b8baf 100644 --- a/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol +++ b/Course_Identity_And_Smart_Contracts/starNotaryv2/contracts/StarNotary.sol @@ -37,7 +37,7 @@ contract StarNotary is ERC721 { uint256 starCost = starsForSale[_tokenId]; address ownerAddress = ownerOf(_tokenId); require(msg.value > starCost, "You need to have enough Ether"); - _transferFrom(ownerAddress, msg.sender, _tokenId); + _transfer(ownerAddress, msg.sender, _tokenId); address payable ownerAddressPayable = _make_payable(ownerAddress); ownerAddressPayable.transfer(starCost); if(msg.value > starCost) {