<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="MonyetIstana NFT">
<meta name="author" content="MonyetIstana.com">
<title>Monyet Istana</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google" content="notranslate" />
<link rel="stylesheet" href="/plugins/themefisher-font/style.css">
<link rel="stylesheet" href="/plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/plugins/lightbox2/dist/css/lightbox.min.css">
<link rel="stylesheet" href="/plugins/animate/animate.css">
<link rel="stylesheet" href="/plugins/slick/slick.css">
<link rel="stylesheet" href="/css/style.css?id=5">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.css" />
<style>
.h1, h1 {
font-size: calc(5vw);
}
</style>
</head>
<body id="body">
<script src="/js/web3.min.js"></script>
<script src="/js/moralis.min.js"></script>
<script src="/plugins/jquery/jquery.min.js?id=1"></script>
<script src="/plugins/form-validation/jquery.form.js"></script>
<script src="/plugins/form-validation/jquery.validate.min.js"></script>
<script src="/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="/plugins/parallax/jquery.parallax-1.1.3.js"></script>
<script src="/plugins/lightbox2/dist/js/lightbox.min.js"></script>
<script src="/plugins/slick/slick.min.js"></script>
<script src="/plugins/filterizr/jquery.filterizr.min.js"></script>
<script src="/plugins/smooth-scroll/smooth-scroll.min.js"></script>
<script src="/js/script.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.3/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.14/moment-timezone-with-data-2012-2022.min.js"></script>
<script>
const truncateRegex = /^(0x[a-zA-Z0-9]{4})[a-zA-Z0-9]+([a-zA-Z0-9]{4})$/;
const truncateEthAddress = (address) => {
const match = address.match(truncateRegex);
if (!match) return address;
return `${match[1]}…${match[2]}`;
};
Moralis.initialize("JQCZ6dB1vNXNZktCq3y0HTySYtyXGfMQOpk6cjnE");
Moralis.serverURL = 'https://adwprfsisrir.usemoralis.com:2053/server';
const tokenAddress = "0x37E618c340a125dc58067C61E1fd73C534f51d29";
const marketplaceAddress = "0x3c74011b03e01aa53eDB8E8249670C0CB5D4b7f9";
var tAbi = [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"indexed": false,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "symbol",
"type": "string"
}
],
"name": "CreateERC1155_v1",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "minter",
"type": "address"
},
{
"indexed": false,
"internalType": "string",
"name": "ipfsCID",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "ItemMinted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "values",
"type": "uint256[]"
}
],
"name": "TransferBatch",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "TransferSingle",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "value",
"type": "string"
},
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "URI",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "_ownerOf",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "accounts",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
}
],
"name": "balanceOfBatch",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "values",
"type": "uint256[]"
}
],
"name": "burnBatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "marketplaceContract",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "string",
"name": "ipfsCID",
"type": "string"
},
{
"internalType": "uint32",
"name": "royalty",
"type": "uint32"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "salePrice",
"type": "uint256"
}
],
"name": "royaltyInfo",
"outputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint256",
"name": "royaltyAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "safeBatchTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "marketplace",
"type": "address"
}
],
"name": "setMarketplaceContract",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "prefixURI",
"type": "string"
}
],
"name": "setPrefixURI",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "setSalePrice",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "newuri",
"type": "string"
}
],
"name": "setURI",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "uri",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
];
var mAbi = [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "OfferAccepted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "buyer",
"type": "address"
}
],
"name": "OfferCanceled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "OfferSubmitted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "PriceUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "listExist",
"type": "bool"
}
],
"name": "Sold",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "acceptOffer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "cancelOffer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "custodialWallet",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getListingInfo",
"outputs": [
{
"internalType": "address",
"name": "n",
"type": "address"
},
{
"internalType": "uint256",
"name": "t",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "bool",
"name": "listExist",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "makeOffer",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "seller",
"type": "address"
},
{
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "purchase",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "custodialAddress",
"type": "address"
}
],
"name": "setCustodialWallet",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "setSalePrice",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "nftContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "setSalePrice",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "tokenContract",
"type": "address"
}
],
"name": "setTokenContractAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "tokenContractAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
];
const connectWalletBtn = document.getElementById("ConnectWallet2");
const signOutBtn = document.getElementById("LoggedInWallet2");
function ShowLoggedIn() {
$("#LoggedOut").hide();
$("#LoggedIn").css("display", "");
}
function HideLoggedIn() {
$("#LoggedOut").css("display", "");
$("#LoggedIn").hide();
}
init = async () => {
initUser();
}
login = async () => {
try {
await Moralis.Web3.authenticate();
initUser();
} catch (error) {
alert(error)
}
}
logout = async () => {
await Moralis.User.logOut();
initUser();
}
function monitorNetwork() {
Moralis.onChainChanged(function () {
window.location.reload();
});
Moralis.onAccountChanged(async function (accounts) {
await logout();
window.location.reload();
});
}
initUser = async () => {
const ethereum = window.ethereum;
if (!ethereum || !ethereum.on) {
console.log("This App Requires MetaMask, Please Install MetaMask");
HideLoggedIn();
}
else {
monitorNetwork();
var user = await Moralis.User.current();
if (user) {
await Moralis.enableWeb3();
window.web3 = new Web3(Moralis.provider);
window.tokenContract = new web3.eth.Contract(tAbi, tokenAddress);
window.marketplaceContract = new web3.eth.Contract(mAbi, marketplaceAddress);
ShowLoggedIn();
const chainId = await Moralis.getChainId();
if (chainId != 56) {
HideLoggedIn();
alert('Please connect to Binance Smart Chain');
if(56 == 97)
{
await addBscNetworkTest();
}
else if(56 == 56)
{
await addBscNetwork();
}
}
else {
const chainId2 = "0x97"; // Change to BSC
const chainIdHex = Moralis.switchNetwork(56);
const authData = user.get("authData");
const signature = authData.moralisEth.signature;
const data = authData.moralisEth.data;
const address = user.get('ethAddress');
options = { chain: 56, address: address, serverUrl: Moralis.serverURL, appId: 'JQCZ6dB1vNXNZktCq3y0HTySYtyXGfMQOpk6cjnE' };
await Moralis.start(options);
const chainIdReadable = 'bsc';
const options2 = { chain: chainIdReadable, address: address };
$('#LoggedInWallet').text(truncateEthAddress(address));
}
} else {
HideLoggedIn();
}
}
}
async function addBscNetwork(){
const chainID = 56;
const chainName = "Binance Smart Chain";
const currencyName = "BNB";
const currencySymbol = "BNB";
const rpcUrl = "https://bsc-dataseed.binance.org/";
const blockExplorerUrl = "https://bscscan.com/";
await Moralis.addNetwork(chainID, chainName, currencyName, currencySymbol, rpcUrl, blockExplorerUrl);
}
async function addBscNetworkTest(){
const chainID = 97;
const chainName = "Binance Smart Chain Testnet";
const currencyName = "BNB";
const currencySymbol = "BNB";
const rpcUrl = "https://data-seed-prebsc-1-s1.binance.org:8545/";
const blockExplorerUrl = "https://testnet.bscscan.com/";
await Moralis.addNetwork(chainID, chainName, currencyName, currencySymbol, rpcUrl, blockExplorerUrl);
}
function delay(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
$(document).ready(function() {
HideLoggedIn();
init();
$("#ConnectWallet").click(async function (event) {
event.preventDefault();
try {
window.web3 = await Moralis.enableWeb3();
const chainId = await Moralis.getChainId();
if (chainId != 56) {
HideLoggedIn();
alert('Please connect to Binance Smart Chain');
if(56 == 97)
{
await addBscNetworkTest();
}
else if(56 == 56)
{
await addBscNetwork();
}
}
else {
await Moralis.Web3.authenticate({
signingMessage: `Click "Sign" to sign in. This request will not trigger a blockchain transaction or cost any gas fees.`});
initUser();
}
} catch (error) {
console.log(error.message);
if(error.message == 'Non ethereum enabled browser')
{
alert("This App Requires MetaMask, Please Install MetaMask");
}
HideLoggedIn();
}
});
$("#LoggedInWallet").click(async function (event) {
$("#settings_modal").modal("show");
});
$("#SignOut").click(async function (event) {
await logout();
window.location.reload();
});
$("#BuyNFTMon").click(async function (event) {
$('#buy_now').modal('show');
});
$("#btnBuy").click(async function (event) {
event.preventDefault();
user = await Moralis.User.current();
if(user == null)
{
// if(!alert("Please connect wallet")) window.location.reload();
// throw new Error("Please connect wallet!");
$("#ConnectWallet").click();
$("#buy_now").modal('hide');
}
else
{
$("#BuyStatusDisplay").show();
// $("#btnBuyNFT").hide();
$("#BuyNFTMon").hide();
$("#BuyStatus").text("Please wait...");
if ($("#txtQuantityBuy").val() == "") {
alert("Please enter quantity!");
}
else
{
const userAddress = user.get('ethAddress');
var Seller = '0x81ED80d05E033E48FB9e665658919379C733e699';
var CA = '0x37E618c340a125dc58067C61E1fd73C534f51d29';
const TokenID = 1;
const PricePerItem = 0.05;
const Quantity = $("#txtQuantityBuy").val();
$("#BuyStatus").text("Please confirm on wallet and wait for confirmation");
await delay(1000);
await marketplaceContract.methods.purchase(Seller, CA, TokenID, Quantity).send({ from: userAddress, value: (PricePerItem * 1000000000000000000) * Quantity }).then(function (result) {
$("#BuyStatus").text("Verifying transaction... The NFT will be in your wallet after transaction is confirmed");
alert('Purchase completed. This page will be refreshed.');
window.location.reload();
}).catch(function (e) {
if(!alert("User Cancelled")) window.location.reload();
});
}
}
});
});
</script>
<div class="modal fade" id="buy_now" tabindex="-1" aria-labelledby="buy_now" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered de-modal">
<div class="modal-content">
<div class="modal-body">
<div class="p-3 form-border">
<h3>Buy NFT</h3>
You are about to purchase <b>Monyet Istana</b>
<div class="spacer-single"></div>
<div class="de-flex mt-3">
<div>Price each</div>
<div><b id="PayTotal">0.05 BNB</b></div>
</div>
<div class="de-flex mt-3" style="visibility: hidden;">
<h6>Quantity</h6>
<div class="form-group">
<div class="form-field">
<input type="number" name="txtQuantityBuy" id="txtQuantityBuy" class="form-control" placeholder="1" value="1">
</div>
</div>
</div>
<div class="spacer-single"></div>
<a id="btnBuy" href="#" class="btn btn-fullwidth btn-dark mt-3">Buy Now</a>
<div id="BuyStatusDisplay" style="display: none;">
<div class="spacer-single"></div>
<div class="de-flex mt-3">
<div style="margin-right: 60px;"></div>
<div><span id="BuyStatus"></span></div>
</div>
<div class="spacer-single"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="preloader">
<div class='preloader'>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<style>
.header-logo {
line-height: 56px;
letter-spacing: 0.088em;
text-transform: uppercase;
list-style-type: none;
--para-spacing: 0;
--head-indent: 0;
--numeric-list-marker: none;
}
.header-logo li a {
font-size: 46px !important;
font-style: normal;
}
.hr-header {
position: relative;
top: 20px;
border: none;
height: 3px;
background: black;
margin-bottom: 50px;
width: 100%;
color: black;
}
.navigation .navbar-light .navbar-nav .nav-item .nav-link {
line-height: 40px;
}
@media screen and (max-width: 767px) {
.mobile-space {margin-top:10px;}
.header-logo li a {
font-size: 25px !important;
font-style: normal;
}
.navigation .navbar-light .navbar-nav .nav-item .nav-link {
line-height: 5px;
}
}
</style>
<header class="navigation fixed-top">
<div class="container" style="max-width: 99%;">
<nav class="navbar navbar-expand-lg navbar-light">
<ul class="navbar-nav ml-auto text-center header-logo" style="width: 100%;">
<li class="nav-item " style="padding-right: 20px;padding-left: 20px;">
<a class="nav-link" href="/" style="">KUASASISWA</a>
</li>
<li class="nav-item " style="padding-right: 20px;padding-left: 20px; width: 100%">
<hr class="hr-header d-none d-sm-block" />
</li>
<li class="nav-item " style="padding-right: 20px;padding-left: 20px;">
<a class="nav-link" href="/" style="">ABOUT</a>
</li>
<li class="nav-item " style="padding-right: 20px;padding-left: 20px;">
<a class="nav-link" href="/buy" style="">BUY</a>
</li>
<li id="LoggedOut" class="nav-item " style="padding-right: 20px;padding-left: 20px;">
<a id="ConnectWallet" class="nav-link" href="#" style="">CONNECT WALLET</a>
</li>
<li id="LoggedIn" class="nav-item " style="padding-right: 20px;padding-left: 20px; display: none;">
<a id="LoggedInWallet" class="nav-link" href="#" style="">0x00</a>
</li>
</ul>
</nav>
</div>
</header>
<section class="section mobile-space" style="padding: 50px;">
</section>
<section class="service-2 section">
<div class="container" style="max-width: 90%;">
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<img src="/images/About_Frame.png?id=2" alt="Monyet Istana" style="width: 100%" />
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<h6 style="margin-top: 10px; font-size: 25px; font-weight: 400;">WHAT IS</h6>
<h1 style="line-height: 0.9; font-size: 5.5rem; width: 50%;">MONYET ISTANA?</h1>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="border" style="width: unset; background: black; height: 3px;"></div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<p style="font-size: 25px;
color: rgb(13, 13, 13);
line-height: 31px;
letter-spacing: -0.03em;
--para-spacing: 0;
text-transform: none;
--head-indent: 0;
--numeric-list-marker: none;
list-style-type: none;">On April 14th, 2022, graphic designer Fahmi Reza was arrested, interrogated and locked up for two days by the police for posting a satirical poster depicting a monkey dressed in royal regalia on social media. Since last year, the designer has been arrested 3 times and investigated 11 times by the police. He has been blacklisted from travelling abroad and currently faces 2 criminal charges over his political graphics. If convicted, he can be fined RM100,000 and sentenced to two years in prison.</p>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<p style="font-size: 33px;
color: rgb(13, 13, 13);
line-height: 41px;
letter-spacing: -0.03em;
--para-spacing: 0;
text-transform: none;
--head-indent: 0;
--numeric-list-marker: none;
list-style-type: none;">100% of the proceeds will be donated to a legal defence fund to support fellow Malaysians investigated and prosecuted for exercising their right to freedom of expression. Fahmi Reza will not take a single cent from this NFT sale.</p>
</div>
</div>
</div>
</div>
</div>
</section>
<footer id="footer" class="bg-one">
<div class="footer-bottom">
<h5><a href="http://kuasasiswa.com" style="color: white;">KUASASISWA 2022</a></h5>
</div>
</footer>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5Y4B9H0SRX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-5Y4B9H0SRX');
</script>
<div class="modal fade" id="settings_modal" tabindex="-1" aria-labelledby="settings_modal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered de-modal">
<div class="modal-content">
<div class="modal-body">
<div class="p-3 form-border">
<a id="SignOut" href="#" class="btn btn-fullwidth btn-dark">Sign Out</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>