• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Function类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.web3j.abi.datatypes.Function的典型用法代码示例。如果您正苦于以下问题:Java Function类的具体用法?Java Function怎么用?Java Function使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Function类属于org.web3j.abi.datatypes包,在下文中一共展示了Function类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createTokenTransferData

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public static byte[] createTokenTransferData(String to, BigInteger tokenAmount) {
    List<Type> params = Arrays.asList(new Address(to), new Uint256(tokenAmount));

    List<TypeReference<?>> returnTypes = Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {
    });

    Function function = new Function("transfer", params, returnTypes);
    String encodedFunction = FunctionEncoder.encode(function);
    return Numeric.hexStringToByteArray(Numeric.cleanHexPrefix(encodedFunction));
}
 
开发者ID:TrustWallet,项目名称:trust-wallet-android,代码行数:11,代码来源:TokenRepository.java


示例2: executeCallMultipleValueReturnObservable

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
protected Observable<List<Type>> executeCallMultipleValueReturnObservable(Function function) {
    return executeCall(function)
            .flatMap(types -> {
                if (types == null) {
                    return Observable.error(new GethException("value is null"));
                }
                return Observable.just(types);
            });
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:10,代码来源:Contract.java


示例3: executeCallSingleValueReturnObservable

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
protected <T extends Type> Observable<T> executeCallSingleValueReturnObservable(Function function) {
    return executeCall(function)
            .flatMap(types -> {
                if (types == null || types.isEmpty()) {
                    return Observable.error(new GethException("value is null"));
                }
                return Observable.just((T) types.get(0));
            });
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:10,代码来源:Contract.java


示例4: mAvailable

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
/**
 * variables
 **/
public Observable<Bool> mAvailable() {
    Function function = new Function("mAvailable",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Bool>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:11,代码来源:SlotMachine.java


示例5: owner

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Address> owner() {
    Function function = new Function(
            "owner",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Address>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例6: mDecider

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Uint16> mDecider() {
    Function function = new Function(
            "mDecider",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Uint16>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例7: mMinBet

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Uint256> mMinBet() {
    Function function = new Function("mMinBet",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Uint256>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:8,代码来源:SlotMachine.java


示例8: mMaxBet

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Uint256> mMaxBet() {
    Function function = new Function(
            "mMaxBet",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Uint256>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例9: mMaxPrize

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Uint16> mMaxPrize() {
    Function function = new Function(
            "mMaxPrize",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Uint16>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例10: bankerBalance

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Uint256> bankerBalance() {
    Function function = new Function(
            "bankerBalance",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Uint256>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例11: initialPlayerSeedReady

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Bool> initialPlayerSeedReady() {
    Function function = new Function(
            "initialPlayerSeedReady",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Bool>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例12: previousPlayerSeed

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Bytes32> previousPlayerSeed(Uint256 idx) {
    Function function = new Function(
            "previousPlayerSeed",
            Collections.singletonList(idx),
            Collections.singletonList(new TypeReference<Bytes32>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例13: previousBankerSeed

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Bytes32> previousBankerSeed(Uint256 idx) {
    Function function = new Function(
            "previousBankerSeed",
            Collections.singletonList(idx),
            Collections.singletonList(new TypeReference<Bytes32>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例14: mUsedPlayerSeeds

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Bool> mUsedPlayerSeeds(Bytes32 param0) {
    Function function = new Function(
            "mUsedPlayerSeeds",
            Collections.singletonList(param0),
            Collections.singletonList(new TypeReference<Bool>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例15: mCurrentGameId

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Bytes32> mCurrentGameId() {
    Function function = new Function(
            "mCurrentGameId",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Bytes32>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachine.java


示例16: getStorageAddr

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Address> getStorageAddr() {
    Function function = new Function(
            "getStorageAddr",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Address>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachineManager.java


示例17: fixedReverse

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<StaticArray<Uint256>> fixedReverse(StaticArray<Uint256> input) {
    Function function = new Function(
            "fixedReverse",
            Collections.singletonList(input),
            Collections.singletonList(new TypeReference.StaticArrayTypeReference<StaticArray<Uint256>>(10) {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:Arrays.java


示例18: dynamicReverse

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<DynamicArray<Uint256>> dynamicReverse(DynamicArray<Uint256> input) {
    Function function = new Function(
            "dynamicReverse",
            Collections.singletonList(input),
            Collections.singletonList(new TypeReference<DynamicArray<Uint256>>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:Arrays.java


示例19: totalNumOfSlotMachine

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
public Observable<Uint256> totalNumOfSlotMachine() {
    Function function = new Function(
            "totalNumOfSlotMachine",
            Collections.emptyList(),
            Collections.singletonList(new TypeReference<Uint256>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:9,代码来源:SlotMachineStorage.java


示例20: isValidBanker

import org.web3j.abi.datatypes.Function; //导入依赖的package包/类
/**
 * methods
 **/
public Observable<Bool> isValidBanker(Address _banker) {
    Function function = new Function(
            "isValidBanker",
            Collections.singletonList(_banker),
            Collections.singletonList(new TypeReference<Bool>() {
            }));
    return executeCallSingleValueReturnObservable(function);
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:12,代码来源:SlotMachineStorage.java



注:本文中的org.web3j.abi.datatypes.Function类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ViewPagerClassic类代码示例发布时间:2022-05-22
下一篇:
Java ObjectMapper类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap