KKSU
2024-05-09 f2dd0068e9f235fd364120cb32607169831b2c98
src/main/java/cc/mrbird/febs/dapp/chain/EthUsdtContract.java
@@ -3,8 +3,6 @@
import io.reactivex.Flowable;
import io.reactivex.functions.Function;
import org.web3j.abi.EventEncoder;
import org.web3j.abi.EventValues;
import org.web3j.abi.FunctionReturnDecoder;
import org.web3j.abi.TypeReference;
import org.web3j.abi.datatypes.*;
import org.web3j.abi.datatypes.generated.Uint256;
@@ -414,6 +412,7 @@
                    typedResponse.coinTarget = (BigInteger) eventValues.getNonIndexedValues().get(4).getValue();
                    typedResponse.usdtCoin = (BigInteger) eventValues.getNonIndexedValues().get(5).getValue();
                    typedResponse.lastMineTime = (BigInteger) eventValues.getNonIndexedValues().get(6).getValue();
                    typedResponse.blockHash = log.getTransactionHash();
                }
                return typedResponse;
@@ -427,7 +426,7 @@
    public Flowable<CoinRewardEventResponse> coinRewardEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
        EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
        filter.addSingleTopic(EventEncoder.encode(TRANSFER_EVENT));
        filter.addSingleTopic(EventEncoder.encode(COINREWARD_EVENT));
        return coinRewardEventFlowable(filter);
    }
@@ -839,5 +838,6 @@
        public BigInteger coinTarget;//币本位多少币
        public BigInteger usdtCoin;//金本位换算后多少币
        public BigInteger lastMineTime;//上一次挖矿时间
        public String blockHash;//上一次挖矿时间
    }
}