Test it out Here: iQoute
Developers follow this guide below
-
Using the Terminal git clone https://github.com/ottokafka/IQuote.git
-
Open the directory of the download and open index.html
- You will see this:
- Install the Web Extension Wallet. Go to the github link
-
in the terminal git clone https://github.com/ChengOrangeJu/WebExtensionWallet.git
-
in Chrome browser: More tools / Extensions
click enable developer and click LOAD UNPACKED
Select WebExtensionWallet folder and click SELECT
You will see this below
Open the extension and select testnet. Note: if you can't find the web extension on chrome it might be hidden so just click the hidden field where I icon might be. it worked for me or create a short cut key for that extension.
unlock your wallet and send NAS to your self
you will see this after you sumbit nas to yourself
Now go back to the main Dapp the index.html file and refresh the page. You can go ahead and use this Dapp now.
Create a Quote such as this example and sign your name. Click Submit and this will save it to the Nebulas blockchain
Now search your name that your used
The Results will show
Below is the full Smart Contract used for this Dapp
"use strict";
var UserInput = function(text) {
if (text) {
var obj = JSON.parse(text);
this.key = obj.key;
this.value = obj.value;
} else {
this.key = "";
this.value = "";
}
};
UserInput.prototype = {
toString: function () {
return JSON.stringify(this);
}
};
var Quotes = function () {
LocalContractStorage.defineMapProperty(this, "repo", {
parse: function (text) {
return new UserInput(text);
},
stringify: function (o) {
return o.toString();
}
});
};
Quotes.prototype = {
init: function () {
},
save: function (key, value) {
key = key.trim();
value = value.trim();
if (key === "" || value === ""){
throw new Error("empty key / value");
}
var usersName = this.repo.get(key);
if (usersName){
throw new Error("This Name is already being used");
}
usersName = new UserInput();
usersName.key = key;
usersName.value = value;
this.repo.put(key, usersName);
},
get: function (key) {
key = key.trim();
if ( key === "" ) {
throw new Error("empty key")
}
return this.repo.get(key);
}
};
module.exports = Quotes;