Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolved issue #1 #40

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 30 additions & 29 deletions contracts/Contract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface IERC721 {
address _from,
address _to,
uint256 _id
);
)external;
}
contract Contract {
address public nftaddress;
Expand All @@ -25,18 +25,17 @@ contract Contract {
string memory addline;
}
struct Property {
string memory name;
string memory email;
string memory phoneno;
adds adds;
string memory proptype;
string memory amenities;
string name;
string email;
string phoneno;
Adds adds;
string proptype;
string amenities;
uint256 sqfoot;
uint256 bedno;
string memory img;
string memory descp;
string img;
string descp;
}


mapping(uint256 => Property) public metadata;
modifier OnlySeller(){
Expand All @@ -49,25 +48,27 @@ contract Contract {
_;
}

function list1(
uint256 _nftID,
string _amenities,
uint256 _sqfoot,
uint256 _bedno,
string _img,
string _descp,
uint256 _purchasePrice,
uint256 _tokenID)public {
IERC721(nftaddress).transferFrom(seller, address(this), _tokenID);
purchasePrice[_nftID] = _purchasePrice;
isListed[_nftID] = true;
metadata[_nftID].amenities = _amenities;
metadata[_nftID].sqfoot = _sqfoot;
metadata[_nftID].bedno = _bedno;
metadata[_nftID].img = _img;
metadata[_nftID].descp = _descp;
index+=1;
}
function list1(
uint256 _nftID,
string calldata _amenities,
uint256 _sqfoot,
uint256 _bedno,
string calldata _img,
string calldata _descp,
uint256 _purchasePrice,
uint256 _tokenID
) public {
IERC721(nftaddress).transferFrom(seller, address(this), _tokenID);
purchasePrice[_nftID] = _purchasePrice;
isListed[_nftID] = true;
Property storage property = metadata[_nftID];
property.amenities = _amenities;
property.sqfoot = _sqfoot;
property.bedno = _bedno;
property.img = _img;
property.descp = _descp;
index += 1;
}

function list2(
uint256 _nftID,
Expand Down