|
@@ -81,12 +81,11 @@ async function sendSingleReward(privateKey, amount) {
|
|
|
|
|
|
// 通用报名函数(支持 WGT 和 STT)
|
|
// 通用报名函数(支持 WGT 和 STT)
|
|
async function tokenSignUp(privateKey, amount, type) {
|
|
async function tokenSignUp(privateKey, amount, type) {
|
|
- privateKey = normalizePrivateKey(privateKey);
|
|
|
|
- const tokenAddress = TOKEN_ADDRESSES[type.toLowerCase()];
|
|
|
|
- const tokenAmount = web3.utils.toWei(amount.toString(), "ether");
|
|
|
|
-
|
|
|
|
try {
|
|
try {
|
|
const web3 = await getWeb3();
|
|
const web3 = await getWeb3();
|
|
|
|
+ privateKey = normalizePrivateKey(privateKey);
|
|
|
|
+ const tokenAddress = TOKEN_ADDRESSES[type.toLowerCase()];
|
|
|
|
+ const tokenAmount = web3.utils.toWei(amount.toString(), "ether");
|
|
const account = web3.eth.accounts.privateKeyToAccount(privateKey);
|
|
const account = web3.eth.accounts.privateKeyToAccount(privateKey);
|
|
const sender = account.address;
|
|
const sender = account.address;
|
|
|
|
|