0%

OKX X Zeta Sugar Free Mint

Sugar

一款创新的 Web3 的 Dating-Fi 产品,让浪漫关系产生价值升华

数据:

1
0x6a627842000000000000000000000000d0b6b13546f28ad8a083fcbaa3dc174ffbc46b75

合约:

1
0xEb20674C2BA6f9641AadE970dCBDA6D6a93EbF0c

代码示范:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// 创建web3对象
Web3j web3 = Web3j.build(new HttpService(urlNet.zeta));
// 写死GAS费,避免动态获取的额外消耗
BigInteger gas = BigInteger.valueOf(1000000000);
// 交易金额
BigInteger money = Convert.toWei("0", Convert.Unit.ETHER).toBigInteger();
// 获取需要转账的数据
String data = null;
try {
String filePath = "src/main/resources/zeta/okx/hy.txt";
BufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));
String data1 = bufferedReader.readLine();
String address = credentials.getAddress();
String data2 = address.substring(2);
data = data1 + data2 ;
} catch (IOException e) {
System.out.println("Mint ETH方法读取文件时遇到IO异常!");
}
// 构建交易
String transactionHash = null;
try {
// 构建交易对象
EthSendTransaction ethSendTransaction = new RawTransactionManager(
web3, credentials)
.sendEIP1559Transaction(
7001L,
gas, // 优先级
gas, // 最大费用
DefaultGasProvider.GAS_LIMIT,
urlNet.sugar,
data,
money
);
transactionHash = ethSendTransaction.getTransactionHash();
} catch (Exception e) {
}

这样就可以批量搞了。