本文整理了Java中org.web3j.utils.Numeric.toHexStringWithPrefixSafe()
方法的一些代码示例,展示了Numeric.toHexStringWithPrefixSafe()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Numeric.toHexStringWithPrefixSafe()
方法的具体详情如下:
包路径:org.web3j.utils.Numeric
类名称:Numeric
方法名:toHexStringWithPrefixSafe
暂无
代码示例来源:origin: web3j/web3j
@Override
public Request<?, EthUninstallFilter> ethUninstallFilter(BigInteger filterId) {
return new Request<>(
"eth_uninstallFilter",
Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
web3jService,
EthUninstallFilter.class);
}
代码示例来源:origin: web3j/web3j
@Override
public Request<?, ShhUninstallFilter> shhUninstallFilter(BigInteger filterId) {
return new Request<>(
"shh_uninstallFilter",
Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
web3jService,
ShhUninstallFilter.class);
}
代码示例来源:origin: web3j/web3j
@Override
public Request<?, EthLog> ethGetFilterLogs(BigInteger filterId) {
return new Request<>(
"eth_getFilterLogs",
Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
web3jService,
EthLog.class);
}
代码示例来源:origin: web3j/web3j
@Override
public Request<?, ShhMessages> shhGetMessages(BigInteger filterId) {
return new Request<>(
"shh_getMessages",
Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
web3jService,
ShhMessages.class);
}
代码示例来源:origin: web3j/web3j
@Override
public Request<?, EthLog> ethGetFilterChanges(BigInteger filterId) {
return new Request<>(
"eth_getFilterChanges",
Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
web3jService,
EthLog.class);
}
代码示例来源:origin: web3j/web3j
@Override
public Request<?, ShhMessages> shhGetFilterChanges(BigInteger filterId) {
return new Request<>(
"shh_getFilterChanges",
Arrays.asList(Numeric.toHexStringWithPrefixSafe(filterId)),
web3jService,
ShhMessages.class);
}
代码示例来源:origin: web3j/web3j
@Test
public void testQuantityEncodeLeadingZero() {
assertThat(Numeric.toHexStringWithPrefixSafe(BigInteger.valueOf(0L)), equalTo("0x00"));
assertThat(Numeric.toHexStringWithPrefixSafe(BigInteger.valueOf(1024L)), equalTo("0x400"));
assertThat(Numeric.toHexStringWithPrefixSafe(BigInteger.valueOf(Long.MAX_VALUE)),
equalTo("0x7fffffffffffffff"));
assertThat(Numeric.toHexStringWithPrefixSafe(
new BigInteger("204516877000845695339750056077105398031")),
equalTo("0x99dc848b94efc27edfad28def049810f"));
}
内容来源于网络,如有侵权,请联系作者删除!